aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/ogl
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2007-03-07 00:09:16 +0000
committerChien Yang <[email protected]>2007-03-07 00:09:16 +0000
commit462b4a4200cf6aeb6ac4f7133dd7f8ae1abae319 (patch)
tree78ef41b65107114a143dc100b1790c9e0b2d446b /src/native/ogl
parent3034edfa147c43cea5dc5384ff75715998016e29 (diff)
1) Fix Issue 455 : Need to disable NPOT textures for older cards that claim to support it.
2) Clean up NPOT texture support. git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@787 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native/ogl')
-rw-r--r--src/native/ogl/Canvas3D.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/native/ogl/Canvas3D.c b/src/native/ogl/Canvas3D.c
index 00b281e..2a7cfc1 100644
--- a/src/native/ogl/Canvas3D.c
+++ b/src/native/ogl/Canvas3D.c
@@ -649,12 +649,20 @@ getPropertiesFromCurrentContext(
/* look for OpenGL 2.0 features */
- if (ctxInfo->gl20) {
+ /*
+ // Fix to Issue 455 : Need to disable NPOT textures for older cards that claim to support it.
+ // Some older cards (e.g., Nvidia fx500 and ATI 9800) claim to support OpenGL 2.0.
+ // This means that these cards have to support non-power-of-two (NPOT) texture,
+ // but their lack the necessary HW force the vendors the emulate this feature in software.
+ // The result is a ~100x slower down compare to power-of-two textures.
+ // Do not check for gl20 but instead check of GL_ARB_texture_non_power_of_two extension string
+ if (ctxInfo->gl20) {
if (!getJavaBoolEnv(env, "enforcePowerOfTwo")) {
ctxInfo->textureExtMask |=
javax_media_j3d_Canvas3D_TEXTURE_NON_POWER_OF_TWO;
}
}
+ */
/* check extensions for remaining of 1.1 and 1.2 */
if(isExtensionSupported(tmpExtensionStr, "GL_EXT_multi_draw_arrays")){