The following code fails abysmally.
`
import net.java.games.jogl.*;
public class Query {
public static void main(String[] args) {
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
GL gl=canvas.getGL();
String result=gl.glGetString(GL.GL_VERSION);
System.out.println(result);
}
}
`
It compiles fine, of course… but prints “(null)”, which isn’t what I’d hope to see.
In C, I’d use the glutInit functions to ensure that OpenGL was set up correctly before calling any glGet functions, but how do I do that with jogl? Evidently what I tried above does not seem to work.
Is there any way that I can possibly do stuff like this without the burden of a GUI application?
Thanks