why does this make a square
| CODE |
glBegin (GL_QUADS); glVertex2f (-0.1f, 0.1f); glVertex2f (0.1f, 0.1f); glVertex2f (0.1f, -0.1f); glVertex2f (-0.1f, -0.1f); glEnd (); |
and this just makes an odd looking quad
| CODE |
glBegin (GL_QUADS); glVertex2f (0.1f, -0.1f); glVertex2f (-0.1f, 0.1f); glVertex2f (0.1f, 0.1f); glVertex2f (-0.1f, -0.1f); glEnd (); |
all i can think of is it has to do with how OpenGL draws, more specificaly which directions or something... anyway its got me really confused and if it is because of how OGL draws id like to know the specifics of like which directions it draws and it what order or whatever.... i hope this makes sense to someone :wacko:
just immagine you connecting the dots and you'll see why it is so
3D is composed of triangles. If you don't have the right order for the triangles' coordinates, they could overlap each other instead of neighboring each other.
NeHe on
GameDev.Net is an excellent resource.