summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2007-04-21 02:12:03 +0000
committerKenneth Russel <[email protected]>2007-04-21 02:12:03 +0000
commitf86c85d88597bc227bedf4a4b8ee60e018a76813 (patch)
treebc1db7cd4646f9ba2984f10ee7787545e75151b2 /src
parentf82d0109c09ad885c1a7cdaed5b99e69188a30ed (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
Diffstat (limited to 'src')
-rw-r--r--src/demos/data/cubemaps/uffizi_negy.pngbin90510 -> 75787 bytes
-rw-r--r--src/demos/data/cubemaps/uffizi_posy.pngbin75787 -> 90510 bytes
-rw-r--r--src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java4
-rw-r--r--src/demos/vertexProgRefract/VertexProgRefract.java3
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
index 7678d46..1bad34e 100644
--- a/src/demos/data/cubemaps/uffizi_negy.png
+++ b/src/demos/data/cubemaps/uffizi_negy.png
Binary files differ
diff --git a/src/demos/data/cubemaps/uffizi_posy.png b/src/demos/data/cubemaps/uffizi_posy.png
index 1bad34e..7678d46 100644
--- a/src/demos/data/cubemaps/uffizi_posy.png
+++ b/src/demos/data/cubemaps/uffizi_posy.png
Binary files differ
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);