overloadnn
11-14-2000, 03:09 PM
I have a textured quad that I want to divide in smaller quads for better lighting.
How do I draw it ? I tried with a quad strip, but what about texture coords?
This is what I do for my simple quad:
Texture.Enable;
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(0,0);
glTexCoord2f(1, 0); glVertex2f(100,0);
glTexCoord2f(1, 1); glVertex2f(100,100);
glTexCoord2f(0, 1); glVertex2f(0,100);
glEnd;
How do I draw it ? I tried with a quad strip, but what about texture coords?
This is what I do for my simple quad:
Texture.Enable;
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(0,0);
glTexCoord2f(1, 0); glVertex2f(100,0);
glTexCoord2f(1, 1); glVertex2f(100,100);
glTexCoord2f(0, 1); glVertex2f(0,100);
glEnd;