PDA

View Full Version : GL_NORMAL_ARRAY & glTexGeni problem



bobGL
01-31-2007, 07:43 PM
As soon as I enable the GL_NORMAL_ARRAY the texture coordinate generated by glTexGeni, (GL_S & GL_T) look really strange.

Am I doing something wrong?

<code>
glActiveTextureARB(GL_TEXTURE2_ARB);
glEnable(GL_TEXTURE_2D);
...
...
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
...
...
glEnableClientState(GL_NORMAL_ARRAY);
glNormalPointer(GL_FLOAT, 0, vertex_normals);
...
...
glDrawElements(...);
</code>

If I comments the normal array everything's fine... why?

Cheers,

V-man
01-31-2007, 10:31 PM
Post a screenshot on your server.

SPHERE_MAP uses the normals you supply and also the model view matrix.

bobGL
01-31-2007, 11:02 PM
any workaround?

bobGL
01-31-2007, 11:25 PM
Ok well forget it I found where the bug come from ;)

my bad... cheers anyway man ;)