Jump to content
  • Advertisement

Archived

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

Oktan

Crossing polygons

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

I have a problem with crossing polygons. My OpenGL doesn''t show it right. They looks like broken. Why is it happened? How may I resolve this problem?

Share this post


Link to post
Share on other sites
Advertisement
Not sure what you mean, but to handle crossing/overlapping polygons you must use glEnable(GL_DEPTH_TEST);

--
New feature - Windows users, press ALT-F4 to launch the IQ test.

Share this post


Link to post
Share on other sites
Not quite sure what he means either, but I have a similar (possibly same?) problem also.

Say I have two cubes which intersect one-another...
Where they meet, it err (hard to explain) sometimes draws strange artifacts where they meet.

Depthtesting is on, alpha off... Just loox screwy

Share this post


Link to post
Share on other sites
things to try:
1) increase the near plane
2) decrease the far plane
3) use a 32 bit zbuffer

or split the polygons manually, maybe use a bsp tree.

Share this post


Link to post
Share on other sites
If depth testing is enabled and set up correctly, then it''s probably caused by insufficient precision in the depth buffer. Usually that happens because of a near Z plane which is too close to 0.

Share this post


Link to post
Share on other sites
Thanks 4 da replies Kippesoep and wolfman8k, It must''ve been ''cause my far plane was set to 10000, hehe, silly me!

Again, thanks

Share this post


Link to post
Share on other sites

  • 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!