Login  Register

GLContext version...

Posted by Matt on Jan 26, 2011; 12:47am
URL: https://forum.jogamp.org/GLContext-version-tp2335528.html

Hi,

I have upted version of JOGL from the one that was a couple of months old to the current one.

In CLContext the old isGL3() method looked like this:

  public final boolean isGL3() {
      return ctxMajorVersion>=3 && 0!=(ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_CORE));
  }

I am using GL3.3 functionality in my code and my app was running fine.

In current JOGL version the mentioned method looks like this:

  public final boolean isGL3() {
      return ( ctxMajorVersion>3 || ctxMajorVersion==3 && ctxMinorVersion>=1 )
             && 0 != (ctxOptions & CTX_IS_ARB_CREATED)
             && 0 != (ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_CORE));
  }

and returns false and thus breaks my application.

What's interesting is that while I am positive I am running OpenGL 3.3 capable nvidia drivers, the GLContext ctxVersionString field has value = "3.0 (compatibility profile, any, old) - 3.3.0" meaning the ctxMinorVersion=0 (-> false), even though the OpenGL version string states "3.3.0".
The second thing is that my ctxOptions field has value 34 and so fails the test for CTX_IS_ARB_CREATED (-> false).

When I manually override this two checks, the application starts, the shaders compile, but then I almost immediately get OpenGL "Out of memory" error, so something must be wrong with the context initialization...
In the mean time the same app running on the mentioned older version of JOGL is running fine, and GPU-Z is showing no memory leaks...

I would appreciate any help with this problem...

Thanks,
Mat