aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/ogl
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2007-02-28 23:35:03 +0000
committerChien Yang <[email protected]>2007-02-28 23:35:03 +0000
commit1856fc92c798ef83af1fc8695eaf060122dd18ca (patch)
tree98e8833661feb365a90b8a316060060fde753087 /src/native/ogl
parent537cac28344a39da93b0b2d4900d215bc56cbead (diff)
1) OGL and JOGL only : Fix to Issue 415 : Need ability to disable NPOT textures for raster/background
2) Minor fix on when to call setHasMultiSample(). At present this method is not called, but getHasMultiSample() is used. git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@781 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native/ogl')
-rw-r--r--src/native/ogl/Canvas3D.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/native/ogl/Canvas3D.c b/src/native/ogl/Canvas3D.c
index 345da07..f1dac23 100644
--- a/src/native/ogl/Canvas3D.c
+++ b/src/native/ogl/Canvas3D.c
@@ -376,9 +376,9 @@ checkTextureExtensions(
ctxInfo->textureExtMask |=
javax_media_j3d_Canvas3D_TEXTURE_LOD_OFFSET;
}
-
- if (isExtensionSupported(tmpExtensionStr,
- "GL_ARB_texture_non_power_of_two")) {
+
+ if (isExtensionSupported(tmpExtensionStr, "GL_ARB_texture_non_power_of_two") &&
+ !getJavaBoolEnv(env, "enforcePowerOfTwo")) {
ctxInfo->textureNonPowerOfTwoAvailable = JNI_TRUE;
ctxInfo->textureExtMask |=
javax_media_j3d_Canvas3D_TEXTURE_NON_POWER_OF_TWO;
@@ -650,10 +650,12 @@ getPropertiesFromCurrentContext(
/* look for OpenGL 2.0 features */
- if (ctxInfo->gl20) {
- ctxInfo->textureNonPowerOfTwoAvailable = JNI_TRUE;
- ctxInfo->textureExtMask |=
- javax_media_j3d_Canvas3D_TEXTURE_NON_POWER_OF_TWO;
+ if (ctxInfo->gl20) {
+ if (!getJavaBoolEnv(env, "enforcePowerOfTwo")) {
+ ctxInfo->textureNonPowerOfTwoAvailable = JNI_TRUE;
+ ctxInfo->textureExtMask |=
+ javax_media_j3d_Canvas3D_TEXTURE_NON_POWER_OF_TWO;
+ }
}
/* check extensions for remaining of 1.1 and 1.2 */