Hey guys,
I’m relatively new to JOGL and have a problem that I’ve been unable to answer through about 8 hours of trying code and searching google.
I am rendering a scene by running a Thread on an awt.Canavs implementing Runnable (the run method essentially goes into a loop that each iteration repositions the camera, redraws the shapes, and swaps the buffers onto the canvas).
Currently when I load textures, I load them from TextureData (which I pre-create in another thread) inside the loop (which pauses the rendering, since the loop is on a single thread). I would like to export the texture generation to another thread and continue rendering, updating the render once the texture becomes available (probably using a volatile boolean to switch on while waiting for the texture to generate). Is this possible?