im trying to get a little projective texturing demo to work, but it doesnt, and i dont find a reason. here is my code for setting up the texture matrix, is it ok?
GLenum coord[] = {GL_S, GL_T, GL_R, GL_Q };
float m[4][4] = {1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f};
for (int i=0;i<4;i++)
glTexGenfv(coord[i], GL_OBJECT_PLANE, m[i]);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_GEN_R);
glEnable(GL_TEXTURE_GEN_Q);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glTranslatef(.5, .5, 0);
glScalef(.5, .5, 1);
gluPerspective(45.0f, 1, .1, 1);
glTranslatef(0.0f, -6.0f, 0.0f);
glMatrixMode(GL_MODELVIEW);