a section always cut out of my quads
Whenever i make quads i always get a triangle section of it that is cut out and not there and I have no idea why it does this, it will butcher all the sides but the first.
How do you draw your quad? Post some code pls
--------------------------------------------------------
"If it looks good, it is good computer graphics"
"If it looks like computer graphics, it is bad computer graphics"
Corrail
corrail@gmx.at
ICQ#59184081
--------------------------------------------------------
"If it looks good, it is good computer graphics"
"If it looks like computer graphics, it is bad computer graphics"
Corrail
corrail@gmx.at
ICQ#59184081
glBegin(GL_QUADS);
glVertex3f(1.0f, 1.0f, 0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
glVertex3f(1.0f, -1.0f, 0.0f);
glVertex3f(-1.0f, -1.0f, 0.0f);
glEnd();
thats how I do them it always cuts a section thats like a triangle out of them.
glVertex3f(1.0f, 1.0f, 0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
glVertex3f(1.0f, -1.0f, 0.0f);
glVertex3f(-1.0f, -1.0f, 0.0f);
glEnd();
thats how I do them it always cuts a section thats like a triangle out of them.
even when i execute other peoples programs wiht quads in them it cuts a triangle section out of each quad. I''m wonderimg if it''s my computer. Its getting very frustrating because i only see part of mapped textures and quads, because there is a triangle cut out of them.
quote:Original post by Protteus13
glBegin(GL_QUADS);
glVertex3f(1.0f, 1.0f, 0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
glVertex3f(1.0f, -1.0f, 0.0f);
glVertex3f(-1.0f, -1.0f, 0.0f);
glEnd();
switch the last two glVertex3f() calls.
vertex coordinates need to be in either clockwise or counter clockwise order...
A B
(-1.0, 1.0) | (1.0, 1.0)
. | .
-----------------|----------------
. | .
(-1.0, -1.0) | (1.0, -1.0)
C D
you were processing them in this order...
B A D C
the A-D was causing the triangle
the correct order as posted by krez would draw it
B A C D
A B
(-1.0, 1.0) | (1.0, 1.0)
. | .
-----------------|----------------
. | .
(-1.0, -1.0) | (1.0, -1.0)
C D
you were processing them in this order...
B A D C
the A-D was causing the triangle
the correct order as posted by krez would draw it
B A C D
Last post is VERY lazy.... not a good idea. =)
"Game Maker For Life, probably never professional thou." =)
"Game Maker For Life, probably never professional thou." =)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement