Re: Can JOGL be used without requiring GLAutoDrawable instances?
Posted by
xghost on
Jul 25, 2015; 9:41pm
URL: https://forum.jogamp.org/Can-JOGL-be-used-without-requiring-GLAutoDrawable-instances-tp4034953p4034971.html
xghost wrote
Does this mean that I can do something along the following lines without needing to be inside one of the GLEventListener overrides or something?:
private void someMethodThatIsNotGLEventListenerDisplayOverride() {
GL4 gl = GLContext.getGL().getGL4();
gl.glUseProgram(...);
// ... more arbitrary OpenGL calls, etc...
}
The following seems to be possible, at arbitrary locations and without a need to use GLEventListener:
GL4 gl = com.jogamp.opengl.GLContext.getCurrentGL().getGL4();
gl.glUseProgram(0);
// ...
Please let me know if I'm running into a time-bomb waiting to go off or if this is just fine. If this is a good way to use JOGL, then it seems it might allow me to do exactly what I needed.
I'll wait for advice on this kind of use.
Thanks in advance,
-x