Login  Register

Re: vbo - DrawArrays - threading question

Posted by gouessej on Sep 08, 2012; 1:56pm
URL: https://forum.jogamp.org/vbo-DrawArrays-threading-question-tp4026028p4026041.html

Hi

Use glBufferSubData to modify the data store. Mapping and unmapping should be done on the rendering thread and when the OpenGL context is current. I would rather use a timer only to know when the data needs to be refreshed but I would perform this refresh on the rendering thread when the OpenGL context is current. You could modify your code by using GLDrawable.invoke() and put your call to fillVertexBuffer into a GLRunnable.
Julien Gouesse | Personal blog | Website