diff options
author | Kenneth Russel <[email protected]> | 2007-04-21 02:12:03 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-04-21 02:12:03 +0000 |
commit | f86c85d88597bc227bedf4a4b8ee60e018a76813 (patch) | |
tree | bc1db7cd4646f9ba2984f10ee7787545e75151b2 | |
parent | f82d0109c09ad885c1a7cdaed5b99e69188a30ed (diff) |
Fixed Issue 296: TextureIO cube map support broken
Fixed code paths supporting cube maps. As a positive side-effect, the
VertexProgRefract demo's cube map is now rendered completely
correctly; inversion of the positive and negative Y images, and the
negative Y scale factor on the texture matrix, are no longer needed,
and the seams around the top image are gone. Fixed code relating to
automatic mipmap generation in the presence of only
GL_ARB_texture_rectangle and not GL_ARB_texture_non_power_of_two.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@211 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
-rw-r--r-- | src/demos/data/cubemaps/uffizi_negy.png | bin | 90510 -> 75787 bytes | |||
-rw-r--r-- | src/demos/data/cubemaps/uffizi_posy.png | bin | 75787 -> 90510 bytes | |||
-rw-r--r-- | src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java | 4 | ||||
-rw-r--r-- | src/demos/vertexProgRefract/VertexProgRefract.java | 3 |
4 files changed, 2 insertions, 5 deletions
diff --git a/src/demos/data/cubemaps/uffizi_negy.png b/src/demos/data/cubemaps/uffizi_negy.png Binary files differindex 7678d46..1bad34e 100644 --- a/src/demos/data/cubemaps/uffizi_negy.png +++ b/src/demos/data/cubemaps/uffizi_negy.png diff --git a/src/demos/data/cubemaps/uffizi_posy.png b/src/demos/data/cubemaps/uffizi_posy.png Binary files differindex 1bad34e..7678d46 100644 --- a/src/demos/data/cubemaps/uffizi_posy.png +++ b/src/demos/data/cubemaps/uffizi_posy.png diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index fed51e8..50ff3e4 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -598,7 +598,7 @@ public class HWShadowmapsSimple extends Demo { gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); gl.glTranslatef(.5f, .5f, .5f); - gl.glScalef(.5f, .5f, .5f); + gl.glScalef(.5f, -.5f, .5f); glu.gluPerspective(lightshaper_fovy, 1, lightshaper_zNear, lightshaper_zFar); applyTransform(gl, spotlightInverseTransform); gl.glMatrixMode(GL.GL_MODELVIEW); @@ -645,7 +645,7 @@ public class HWShadowmapsSimple extends Demo { gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); gl.glTranslatef(.5f, .5f, .5f); - gl.glScalef(.5f, .5f, .5f); + gl.glScalef(.5f, -.5f, .5f); glu.gluPerspective(lightshaper_fovy, 1, lightshaper_zNear, lightshaper_zFar); applyTransform(gl, spotlightInverseTransform); gl.glMatrixMode(GL.GL_MODELVIEW); diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java index 8c2e0e7..11daed9 100644 --- a/src/demos/vertexProgRefract/VertexProgRefract.java +++ b/src/demos/vertexProgRefract/VertexProgRefract.java @@ -380,7 +380,6 @@ public class VertexProgRefract extends Demo { cubemap.enable(); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); - gl.glScalef(1.0f, -1.0f, 1.0f); viewer.updateInverseRotation(gl); gl.glActiveTexture(GL.GL_TEXTURE1); @@ -388,7 +387,6 @@ public class VertexProgRefract extends Demo { cubemap.enable(); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); - gl.glScalef(1.0f, -1.0f, 1.0f); viewer.updateInverseRotation(gl); if (useRegisterCombiners) { @@ -614,7 +612,6 @@ public class VertexProgRefract extends Demo { gl.glMatrixMode(GL.GL_TEXTURE); gl.glPushMatrix(); gl.glLoadIdentity(); - gl.glScalef(1.0f, -1.0f, 1.0f); viewer.updateInverseRotation(gl); glut.glutSolidSphere(5.0, 40, 20); |