Re: JOGL - without GLEventListener (GLCanvas or GLJPanel)
Posted by Andrzej on Apr 26, 2018; 11:53am
URL: https://forum.jogamp.org/JOGL-without-GLEventListener-GLCanvas-or-GLJPanel-tp4038837p4038840.html
Hi,
Ok, I'm having some success with GLCanvas, GLJPanel, and even GLWindow inside the NewtCanvasAWT, at least with my single classes and triangle rendering :)
I can't get my native c++ renderer to work however... I can get it to work in standalong GLWindow only. As soon as I try to put it in a NewtCanvasAWT or if I try using GLCanvas or GLJPanel I have problems.
The rendering in those cases behaves strange, some things get rendered some do not. My native c++ renderer relies on making a callback to Java to make the context current on the current thread to perform the rendering. So call java to make thread current, get back and do a bunch of gl* calls.
So I guess my question is general, why would I see any differences on the how the openGL rendering works depending on whether my GLWindow is standalone or inside a NewtCanvasAWT? I suspect some threading quirks but I really don't know where to look for the answer :(