diff options
author | Kenneth Russel <[email protected]> | 2006-11-15 07:30:17 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-11-15 07:30:17 +0000 |
commit | f918cd7c0ebc50b8521a79303e13cb775a7440d7 (patch) | |
tree | 5732db2976d94ed75f98226af6ecdc40ef12ab0e /src/classes/com/sun/opengl/util/texture | |
parent | badf69f35a6eb37a77cbca5475b1011d3a3a0f51 (diff) |
Fixed Issue 247: Texture class should use GL_CLAMP if OpenGL version is 1.1
Changed code to check for presence of OpenGL 1.2 and use GL_CLAMP
instead of GL_CLAMP_TO_EDGE if not available.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@984 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/util/texture')
-rwxr-xr-x | src/classes/com/sun/opengl/util/texture/Texture.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java index 454d73c61..157ae836a 100755 --- a/src/classes/com/sun/opengl/util/texture/Texture.java +++ b/src/classes/com/sun/opengl/util/texture/Texture.java @@ -330,10 +330,9 @@ public class Texture { gl.glBindTexture(newTarget, texID); } - // REMIND: let the user specify these, optionally int minFilter = (data.getMipmap() ? GL.GL_LINEAR_MIPMAP_LINEAR : GL.GL_LINEAR); int magFilter = GL.GL_LINEAR; - int wrapMode = GL.GL_CLAMP_TO_EDGE; + int wrapMode = (gl.isExtensionAvailable("GL_VERSION_1_2") ? GL.GL_CLAMP_TO_EDGE : GL.GL_CLAMP); // REMIND: figure out what to do for GL_TEXTURE_RECTANGLE_ARB if (newTarget != GL.GL_TEXTURE_RECTANGLE_ARB) { @@ -485,8 +484,9 @@ public class Texture { * Sets the OpenGL integer texture parameter for the texture's * target. This gives control over parameters such as * GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, which by default are set - * to GL_CLAMP_TO_EDGE. Causes this texture to be bound to the - * current texture state. + * to GL_CLAMP_TO_EDGE if OpenGL 1.2 is supported on the current + * platform and GL_CLAMP if not. Causes this texture to be bound to + * the current texture state. * * @throws GLException if no OpenGL context was current or if any * OpenGL-related errors occurred |