diff options
author | Sven Gothel <[email protected]> | 2013-04-26 07:41:12 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-04-26 07:41:12 +0200 |
commit | ff9fb2d0adc81fdf25d6e26b91e1f67d8241e3e4 (patch) | |
tree | 50d846b7475b6cfa2bdb06e74912dccfc8fbed1b /src/jogl/classes/jogamp/opengl/GLContextImpl.java | |
parent | 36dc4f5ab6957a4078842c488afb51df2fdc0630 (diff) |
GLContext*'s ctxGLSLVersion: Use zeroVersion to denominate uninitialized VersionNumber instead of null, it's get*string returns a zero length string instead of null.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 1b8b0316c..b947bd693 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1041,17 +1041,17 @@ public abstract class GLContextImpl extends GLContext { ctxVendorVersion = glVendorVersion; ctxOptions = ctp; if(useGL) { - ctxGLSLVersion = null; + ctxGLSLVersion = VersionNumber.zeroVersion; if(major >= 2) { // >= ES2 || GL2.0 final String glslVersion = gl.glGetString(GL2ES2.GL_SHADING_LANGUAGE_VERSION); if( null != glslVersion ) { ctxGLSLVersion = new VersionNumber(glslVersion, "."); if( ctxGLSLVersion.getMajor() < 1 ) { - ctxGLSLVersion = null; // failed .. + ctxGLSLVersion = VersionNumber.zeroVersion; // failed .. } } } - if( null == ctxGLSLVersion ){ + if( ctxGLSLVersion.isZero() ) { final int[] sver = new int[2]; getStaticGLSLVersionNumber(major, minor, ctxOptions, sver); ctxGLSLVersion = new VersionNumber(sver[0], sver[1], 0); |