Saturday, January 2, 2010

Solved: "Why won't my quad show up?!?"

Order of vertices is important. This will show up if put in front of the camera:

glVertex3f( size, size, z);
glVertex3f(-size, size, z);
glVertex3f(-size, -size, z);
glVertex3f( size, -size, z);

This, on the other hand, won't (it'll show up if you move the camera past it and turn around):

glVertex3f(-size, size, z);
glVertex3f( size, size, z);
glVertex3f( size, -size, z);
glVertex3f(-size, -size, z);

Guess which one I was just trying for 30+ minutes. :-/

This was due to my using backface culling. Durr. ><

No comments: