Rendering Problem !

Hi,

I develop a visualization prog with Qt 2.2.3 and OpenGL under both windows and linux.I render 3D object with 3 methods :
Wire Mode
<img src = “http://www.lpmo.edu/~armati/wire.png”>

Solid mode
<img src = “http://www.lpmo.edu/~armati/solidOk.png”>

Wire and Solid mode
<img src = “http://www.lpmo.edu/~armati/wireSolidOk.png”>

but on some PC, the rendering bugs :
Solid mode
<img src = “http://www.lpmo.edu/~armati/solid.png”>

Wire and Solid mode
<img src = “http://www.lpmo.edu/~armati/wireSolid.png”>

What is the problem ? I do the same with linux and windows.
It seems depthBuffer is disabled !!!
How can i correct it ?

Wire Mode:

Solid mode

Wire and Solid mode

but on some PC, the rendering bugs :
Solid mode

Wire and Solid mode

Pictures doesnt work :frowning:

Looks like Z-Fighting.

The systems that render “ok” mostlikly have an 24bit Z-Buffer while the systems that dont render “ok” are only using 16bits for the Z-Buffer.

Try adjusting the near and far clipplane to overcome the problem.

Sould i modify the gluperspective() function ?

Ok, thanks, it works, but when i set the near clipplan far, it cuts my object !
Before (without the ok) the near clipplan = 0.1, it was ugly, now it’s 0.5, te render is better, but object are clipped ! what is the best value for the near plan ?

A good value for the near plane is about 0.1% of the far plane. You can go down to 0.01% for a 24-bit depth buffer. Example; if the far plane is at 10, you can have the near at 0.01. If The far plane is at 10000, you can have the near at 10. It’s not absolute values that matter, but relative values.

the best value is equal to the nearest point in the view, and far value should be as near as the vertex most away from teh camera