Login  Register

Re: Selecting the highest possible GL profile at runtime.

Posted by Martin on Oct 04, 2021; 4:12pm
URL: https://forum.jogamp.org/Selecting-the-highest-possible-GL-profile-at-runtime-tp4041302p4041349.html

Thank you Julien! When using -Djogl.disable.openglcore=true, I got a GL_VERSION that is now relevant with the requested GL profile.

So to summarize
- Add VM args -Djogl.disable.openglcore=true
- Choose a profile for the canvas with GLCapabilities caps = new GLCapabilities(GLProfile.getMaximum(true)); or GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL4));
- Call gl.glGetString(GL.GL_VERSION)

Then I properly get

GL_VERSION : 4.1 NVIDIA-10.17.5 355.10.05.45f01


The sad thing is that even if the selected profile is backward compatible (I get a GL4bc), it can't invoke GL2 functions :

Caused by: com.jogamp.opengl.GLException: Not a GL2 implementation
        at jogamp.opengl.gl4.GL4bcImpl.getGL2(GL4bcImpl.java:40488)
        at org.jzy3d.painters.NativeDesktopPainter.configureGL(NativeDesktopPainter.java:141)
        at org.jzy3d.plot3d.rendering.view.View.initQuality(View.java:910)
        at org.jzy3d.plot3d.rendering.view.View.init(View.java:882)
        at org.jzy3d.plot3d.rendering.view.Renderer3d.init(Renderer3d.java:75)
        at jogamp.opengl.GLDrawableHelper.reshape(GLDrawableHelper.java:749)