Login  Register

Re: z buffer problem in mac os x

Posted by runiter on Dec 12, 2012; 9:14pm
URL: https://forum.jogamp.org/z-buffer-problem-in-mac-os-x-tp4027467p4027491.html

Thank you all. It turned out that there is nothing wrong with z buffer in mac.
The problem was that polygonOffset was behaving differently in mac os x.

In my project when you draw a wall, some annotation lines are drawn on it. These lines flicker or hide under the wall polygon so I was forced to use PolygonOffset. Unfortunately in OpenGL PolygonOffset doesn't have any effect on lines (am I correct?) so I had to offset the wall mesh. But doing that caused Mac OS X to render the back mesh in front.

So now I went through every single mesh in my scene and offset all of them except the lines. Is this the way to go? or was there an easier way?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D