I have a scene graph in my opengl engine, I traverses the graph and fills a buffer with some data for each node of the scene graph.
I have a buffer filled with memory and i can send it as parameter of a kernel, and execute the kernel.
Now: when i traverses again the graph i'm need only of the nodes that contain a flag to true(the flag is true only on the translate and rotated elements ).
How i can minimize the band from host to the device(the gpu)?
I see the enquequeMapBuffer, but i have a segmented memory and i shall call many time the enquequeMapBuffer and that i think that this is slow .
Is possible to update the kernel(send data to an args) before that is executed with only a part of the data(those that have the flag to true), and remember on the kernel all the old data?
or each time that i must execute a kernel i need to send all the data?