diff options
-rw-r--r-- | src/classes/jogl/javax/media/j3d/JoglPipeline.java | 27 | ||||
-rw-r--r-- | src/native/ogl/Canvas3D.c | 26 |
2 files changed, 26 insertions, 27 deletions
diff --git a/src/classes/jogl/javax/media/j3d/JoglPipeline.java b/src/classes/jogl/javax/media/j3d/JoglPipeline.java index 9d8a678..1d7d36a 100644 --- a/src/classes/jogl/javax/media/j3d/JoglPipeline.java +++ b/src/classes/jogl/javax/media/j3d/JoglPipeline.java @@ -8414,23 +8414,24 @@ class JoglPipeline extends Pipeline { boolean gl20 = false; boolean gl14 = false; boolean gl13 = false; - if (major > 1) { - // OpenGL 2.x -- set flags for 1.3 and 2.0 or greater - gl20 = true; - gl14 = true; - gl13 = true; - } else { + + if (major == 1) { if (minor == 2) { System.err.println("JAVA 3D: OpenGL 1.2 detected; will run with reduced functionality"); - } else if ( minor == 4 ) { - gl14 = true; - gl13 = true; - } - else { - gl13 = true; + } else { + if (minor >= 3) { + gl13 = true; + } + if (minor >= 4) { + gl14 = true; + } } + } else /* major >= 2 */ { + gl13 = true; + gl14 = true; + gl20 = true; } - + if (gl20) { assert gl13; assert gl14; diff --git a/src/native/ogl/Canvas3D.c b/src/native/ogl/Canvas3D.c index 0d50ff1..0b412f4 100644 --- a/src/native/ogl/Canvas3D.c +++ b/src/native/ogl/Canvas3D.c @@ -604,25 +604,23 @@ getPropertiesFromCurrentContext( } if (versionNumbers[0] > 1) { - /* OpenGL 2.x -- set flags for 1.3, 1.4 and 2.0 or greater */ - ctxInfo->gl20 = JNI_TRUE; - ctxInfo->gl14 = JNI_TRUE; - ctxInfo->gl13 = JNI_TRUE; - } - else { if (versionNumbers[1] == 2) { fprintf(stderr, - "JAVA 3D: OpenGL 1.2 detected; will run with reduced functionality\n"); - } else if (versionNumbers[1] == 4) { - ctxInfo->gl14 = JNI_TRUE; - ctxInfo->gl13 = JNI_TRUE; + "JAVA 3D: OpenGL 1.2 detected; will run with reduced functionality\n"); } else { - // OpenGL 1.x (1.3 or greater) - ctxInfo->gl13 = JNI_TRUE; + if (versionNumbers[1] >= 3) { + ctxInfo->gl13 = JNI_TRUE; + } + if (versionNumbers[1] >= 4) { + ctxInfo->gl14 = JNI_TRUE; + } } + } else /* major >= 2 */ { + ctxInfo->gl20 = JNI_TRUE; + ctxInfo->gl14 = JNI_TRUE; + ctxInfo->gl13 = JNI_TRUE; } - - + /* Setup function pointers for core OpenGL 1.3 features */ ctxInfo->textureExtMask |= javax_media_j3d_Canvas3D_TEXTURE_3D; |