Jump to content
  • Advertisement
Sign in to follow this  
Woltan

Noop primitiv question

This topic is 4766 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

Hey guys, i want do draw some primitives, but somehow, once again my prog isn't doing what is is supposed to do. First i want do draw a quad with glBegin(GL_QUADS); ... ... ... ... glEnd(); this works fine no prob with that. but then i want to draw a polygon which partily overlapps the quad like: glBegin(GL_POLYGON); ... ... ... ... ... glEnd(); both primitives are been drawn in the same z-layer (if thats the correct name for it). however the quad is always drawn on top of the polygon. Depth-test is enabled and i cant fix the prob. i'd apreciate any help on this one thanks in advance regards woltan

Share this post


Link to post
Share on other sites
Advertisement
What is your depth function?
set it to: glDepthFunc(GL_LEQUAL);
However this solution might result in z-fighting.
If all you wanna do is to draw that polygon, on the same plane as the quad, and
that it will be completely visible, disable the depth test.

Share this post


Link to post
Share on other sites
Hey IceFront,
thanks for the help it works now fine. i thought that that the depth-test would take care that the polygon would be drawn on top of the quad. i guess i have to read again what the depth-test does exactly one more time.
anyway, it works thanks for that
so long
woltan

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!