Re: Obtaining OpenGL Context Handle without Passing as a Variable.
Posted by
gouessej on
Apr 02, 2014; 8:38am
URL: https://forum.jogamp.org/Obtaining-OpenGL-Context-Handle-without-Passing-as-a-Variable-tp4032092p4032094.html
jmaasing is right.
Never store a GL instance into a field, it should be a local variable in the worst case. Why not using GLContext.getCurrentGL()? If the OpenGL context is current on this thread, you'll get a non null value.