Hey all, me again. I’m having a problem with glNormalPointer/glEnableClientState(GL_NORMAL_ARRAY). Here’s what’s up:
I’m using glNormalPointer along with glVertexPointer and glTexCoordPointer. When filling the function, however, my Microsoft VC++ 6 compiler complains that glNormalPointer doesn’t take 4 params. Even though I just specified 4 params for the other two, it only takes 3 (no stride), as follows:
glVertexPointer(3, GL_FLOAT, 0, verts);
glNormalPointer(3, GL_FLOAT, normals);
glTexCoordPointer(2, GL_FLOAT, 0, tex);
It’ll only compile when I use the above. When I run the program, it crashes, dumping me to some asm code.
I used the above vertex, normal, and texcoord arrays with glBegin/glEnd GL_TRIANGLES and GL_TRIANGLE_STRIP and it works fine. If I comment out the glNormalPointer call it also works fine (albeit without normals .
Does anyone have any idea why this is happening, why glNormalPointer is acting differently? This is somewhat annoying, please tell me it is something stupid that I’m overlooking so I can change it and go on.
Thanks in advance.