• 07-04-2003
frenchfry164
For some reason, whenever I try to make a quad with OpenGL, it always has a clear triangle in it. I included a picture that show an example of it.
• 07-04-2003
XSquared
• 07-04-2003
frenchfry164
Code:

```void Render(void) {         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);         glPushMatrix();         glTranslatef(-1.0f, -1.0f, 0.0f);         glRotatef(SpinX, 1.0, 0.0, 0.0);         glRotatef(SpinY, 0.0, 1.0, 0.0);         glRotatef(SpinZ, 0.0, 0.0, 1.0);         glBegin(GL_TRIANGLES);                 glColor3f(1.0f, 1.0f, 1.0f);                 glVertex3f(0.0f, 0.0f, 0.0f);                 glVertex3f(0.0f, 2.0f, 0.0f);                 glVertex3f(2.0f, 0.0f, 0.0f);                 glColor3f(1.0f, 0.0f, 0.0f);                 glVertex3f(0.0f, 0.0f, 3.0f);                 glVertex3f(0.0f, 2.0f, 3.0f);                 glVertex3f(2.0f, 0.0f, 3.0f);         glEnd();         glBegin(GL_QUADS);                 glColor3f(0.0f, 1.0f, 0.0f);                 glVertex3f(0.0f, 0.0f, 0.0f);                 glVertex3f(0.0f, 0.0f, 3.0f);                 glVertex3f(2.0f, 0.0f, 0.0f);                 glVertex3f(2.0f, 0.0f, 3.0f);         glEnd();         glPopMatrix();         glutSwapBuffers(); }```
• 07-04-2003
confuted
Just looking at that picture... it looks like a shadow.
• 07-04-2003
frenchfry164
it's not, because if you rotate the image you can see right through it :eek:
• 07-04-2003
Perspective
you are drawing the vertices in the wrong order...

Code:

``` you are doing this... 1----2     /   /   / 3----4 you need to do this 4--3   |   | 1--2```
edit: ascii art
• 07-05-2003
frenchfry164
I guess I should look up the order of vertices again :D

thx
• 07-05-2003
Silvercord
or turn off culling