Hi
I’m using glTexGeni to generate the texture coordinates for an object that is supposed to reflect an environment map.
It seems like the normals (viewXnormal) point in the opposite direction. So, when a surface is supposed to point downwards, it reflects upwards.
Does anyone know whether this is a bug in jogl?
I know I have my own normals correct, so that won’t be what causes the problem.
I use this code to generate the coords:
myGL.glTexGeni(GL.GL_S, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP_ARB);
myGL.glTexGeni(GL.GL_T, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP_ARB);
myGL.glTexGeni(GL.GL_R, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP_ARB);
myGL.glEnable(GL.GL_TEXTURE_GEN_S);
myGL.glEnable(GL.GL_TEXTURE_GEN_T);
myGL.glEnable(GL.GL_TEXTURE_GEN_R);
myGL.glEnable(GL.GL_NORMALIZE);