GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


CubeMap Problem by UnreaL
1
 
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
glBindTexture(GL_TEXTURE_CUBE_MAP_ARB,box.cubemap.texID);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP);
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP);
 
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_GEN_R);
 
glBegin(GL_QUADS);
glNormal3f(0,1,0);
glTexCoord2f(0,0);
glVertex3f(-100,-20,100);
glTexCoord2f(1,0);
glVertex3f(100,-20,100);
glTexCoord2f(1,1);
glVertex3f(100,-20,-100);
glTexCoord2f(0,1);
glVertex3f(-100,-20,-100);
glEnd();
glPopMatrix();
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_TEXTURE_GEN_R);