Crossing polygons

Started by
6 comments, last by Oktan 22 years, 4 months ago
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?
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.
--New feature - Windows users, press ALT-F4 to launch the IQ test.
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
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.
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.
Kippesoep
Thanks 4 da replies Kippesoep and wolfman8k, It must''ve been ''cause my far plane was set to 10000, hehe, silly me!

Again, thanks
how can i tell openGL to use a 32 bit z-buffer?
You set the depth buffer size in your call to SetPixelFormat.

This topic is closed to new replies.

Advertisement