Re: OpenGL & multi-threading...
Posted by Demoscene Passivist on Mar 12, 2011; 1:20am
URL: https://forum.jogamp.org/OpenGL-multi-threading-tp2665744p2667650.html
If u don't have a lot of experience with JOGL/OpenGL I would suggest using the helper class com.jogamp.opengl.util.awt.TextureRenderer for ur purpose. It encapsulates Java2D rendering (to a BufferedImage) and does the Texture conversion for u.
Regarding ur "partial" updates problem TextureRenderer also comes in handy as it has a markDirty() method wich (in conjunction with getTexture()) is "automatically" capable of doing partial texture updates.
By that u could also avoid ur multithreading problem completly as u could simply do multiple small partial updates inside ur GLEventListeners display() method. E.g. if u only need to update ur image every five frames, then simply update only 1/5th of ur TextureRenderer, thereby also reducing the performance impact of the texture upload to 1/5th.