diff options
Diffstat (limited to 'src/native')
-rw-r--r-- | src/native/ogl/Canvas3D.c | 26 |
1 files changed, 12 insertions, 14 deletions
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; |