From ff9fb2d0adc81fdf25d6e26b91e1f67d8241e3e4 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 26 Apr 2013 07:41:12 +0200 Subject: GLContext*'s ctxGLSLVersion: Use zeroVersion to denominate uninitialized VersionNumber instead of null, it's get*string returns a zero length string instead of null. --- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java') 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); -- cgit v1.2.3