PDA

View Full Version : Texture Vertex Coordinate Order



11-13-2002, 04:25 AM
Hi,


I was just having some problems with texturing. When setting the texture coordinates before the vertex coordinates were set everything worked fine. Now my question: is the order important?

Jurgen

yakuza
11-13-2002, 08:23 AM
OpenGL is a state machine, thus when you set a texture coordinate, it will apply to the subsequent vertices until you set another texture coordinate or disable texturing.

In other words, when you call glVertex*, the vertex is drawn and all other properties you have set prior to the glVertex* call are assumed to apply.

In a similar fashion, when you specify a normal with glNormal*, that normal will apply to all vertices until you specify a new normal.

Hope that helps.