From 462b4a4200cf6aeb6ac4f7133dd7f8ae1abae319 Mon Sep 17 00:00:00 2001 From: Chien Yang Date: Wed, 7 Mar 2007 00:09:16 +0000 Subject: 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 --- src/classes/jogl/javax/media/j3d/JoglPipeline.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/classes/jogl') diff --git a/src/classes/jogl/javax/media/j3d/JoglPipeline.java b/src/classes/jogl/javax/media/j3d/JoglPipeline.java index ff22d5c..a6a134a 100644 --- a/src/classes/jogl/javax/media/j3d/JoglPipeline.java +++ b/src/classes/jogl/javax/media/j3d/JoglPipeline.java @@ -8436,11 +8436,18 @@ class JoglPipeline extends Pipeline { cv.textureExtendedFeatures |= Canvas3D.TEXTURE_LOD_RANGE; // look for OpenGL 2.0 features - if (gl20) { - if(!VirtualUniverse.mc.enforcePowerOfTwo) { - cv.textureExtendedFeatures |= Canvas3D.TEXTURE_NON_POWER_OF_TWO; - } - } + // 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 (gl20) { + // if(!VirtualUniverse.mc.enforcePowerOfTwo) { + // cv.textureExtendedFeatures |= Canvas3D.TEXTURE_NON_POWER_OF_TWO; + // } + // } + // Setup GL_EXT_abgr if (gl.isExtensionAvailable("GL_EXT_abgr")) { -- cgit v1.2.3