diff options
author | Chien Yang <[email protected]> | 2007-03-09 21:31:45 +0000 |
---|---|---|
committer | Chien Yang <[email protected]> | 2007-03-09 21:31:45 +0000 |
commit | c1ad5aac9f0ad6e1bed67c7a588c9463be71edf0 (patch) | |
tree | a617d3601efbba676b162acf3db518e43156477f /src/native | |
parent | a84d004aa9539731b5d5daa382c1ca20c5c2b2c2 (diff) |
Fixed a logic bug setting gl version flags.
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@794 ba19aa83-45c5-6ac9-afd3-db810772062c
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; |