PDA

View Full Version : Color a face in a GL_QUAD_STRIP



10-19-2001, 01:31 AM
How can we fill color a face and not a angle like this wrong code :

glColor3f nRf, nVf, nBf
glVertex3f Thick / 2, Raise1, 0 'V1
glVertex3f Thick / 2, Raise2, Length 'V2
glColor3f nRf, nVf, nBf
glVertex3f -Thick / 2, Raise1, 0 'V3
glVertex3f -Thick / 2, Raise2, Length 'V4
glColor3f nRf, nVf, nBf
glVertex3f -Thick / 2, Height1, 0 'V5
glVertex3f -Thick / 2, Height2, Length 'V6
glColor3f 0, 0, 0
glVertex3f Thick / 2, Height1, 0 'V7
glVertex3f Thick / 2, Height2, Length 'V8

Leyder Dylan
10-19-2001, 12:24 PM
// One face
glColor(r,g,b);
glVertex3f(x,y,z);
glVertex3f(x,y,z);
glVertex3f(x,y,z);
glVertex3f(x,y,z);

// 2 face
glColor(r,g,b);
glVertex3f(x,y,z);
glVertex3f(x,y,z);
glVertex3f(x,y,z);
glVertex3f(x,y,z);

// 3 face
glColor(r,g,b);
glVertex3f(x,y,z);
glVertex3f(x,y,z);
glVertex3f(x,y,z);
glVertex3f(x,y,z);

etc ...