jzy3d / jogl

Mirror of https://jogamp.org/cgit/jogl.git/
Other
6 stars 2 forks source link

GL2 -> profileImpl GL3bc !!! not mapped #31

Open jzy3d opened 1 year ago

jzy3d commented 1 year ago

Somehow JOGL can't map an implementation to the OpenGL version it does detect. Looking for GL3bc means JOGL assume your hadware supports OpenGL 3 and is in backward compatible mode.

Debugging

Useful discussions in forum

jzy3d commented 1 year ago

Julien proposed a fix that worked : You have to replace in GLProfile.java:

} else if(GL2 == profile && hasAnyGL234Impl && ( desktopCtxUndef || GLContext.isGL2Available(device, isHardwareRasterizer))) {
            return desktopCtxUndef ? GL2 : GLContext.getAvailableGLProfileName(device, 2, GLContext.CTX_PROFILE_COMPAT);

by:

} else if(GL2 == profile && hasAnyGL234Impl && ( desktopCtxUndef || GLContext.isGL2Available(device, isHardwareRasterizer))) {
            return desktopCtxUndef || (GL3bc == GLContext.getAvailableGLProfileName(device, 2, GLContext.CTX_PROFILE_COMPAT) && !GLContext.isGL3bcAvailable(device, isHardwareRasterizer)) ? GL2 : GLContext.getAvailableGLProfileName(device, 2, GLContext.CTX_PROFILE_COMPAT);