PDA

View Full Version : cube mapping not acting like reflection



supagu
03-02-2005, 12:44 AM
the title sums things up.

i have a sphere with a cube map applied, lets say i can see object X on the cube map. Now if i move around to the opposite side of my sphere, the object X follows me around to the other side!

this is how i bind my cube map texture:

glActiveTextureARB(GL_TEXTURE0_ARB + texUnit);
glBindTexture(GL_TEXTURE_CUBE_MAP, texture);

glEnable(GL_TEXTURE_CUBE_MAP);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); // GL_NORMAL_MAP GL_REFLECTION_MAP
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); // GL_NORMAL_MAP
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); // GL_NORMAL_MAP

glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_GEN_R);
glEnable(GL_NORMALIZE);am i missing something?

Silkut
03-04-2005, 09:01 AM
Hm, I don't totally understand your explanation of the problem, there is an object that follows you ?

Can you post some pictures or executable ?

Java Cool Dude
03-04-2005, 10:18 AM
Sigh...
Check this out (http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=013098)