Login  Register

Re: GLProfile.isGL2Available() equivalent for current jogl code

Posted by gouessej on Oct 23, 2014; 8:59am
URL: https://forum.jogamp.org/GLProfile-isGL2Available-equivalent-for-current-jogl-code-tp4033430p4033434.html

Sven is right:

System.out.println("GL2:   " + (GLProfile.isAvailable(GLProfile.GL2) ? "Yes" : "No"));
System.out.println("GL3:   " + (GLProfile.isAvailable(GLProfile.GL3) ? "Yes" : "No"));
System.out.println("GL3bc: " + (GLProfile.isAvailable(GLProfile.GL3bc) ? "Yes" : "No"));
System.out.println("GL4:   " + (GLProfile.isAvailable(GLProfile.GL4) ? "Yes" : "No"));
System.out.println("GL4bc: " + (GLProfile.isAvailable(GLProfile.GL4bc) ? "Yes" : "No"));

http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLProfile.html#isAvailable(java.lang.String)

Edit.: You could have used "final GL gl = GLContext.getCurrentGL();" instead of passing GL instances. GLShader and GLUniform could probably be replaced by some JOGL classes (GLUniformData, ShaderCode, ShaderProgram, ShaderState, ShaderUtil). Using display lists isn't a good idea, the speed up isn't consistent across platforms and it is badly implemented in some drivers.
Julien Gouesse | Personal blog | Website