• Advertisement

Archived

This topic is now archived and is closed to further replies.

a section always cut out of my quads

This topic is 5302 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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


Share this post


Link to post
Share on other sites
Last post is VERY lazy.... not a good idea. =)

"Game Maker For Life, probably never professional thou." =)

Share this post


Link to post
Share on other sites

  • Advertisement