stange face overcoss

(stange hm,hm… mistake i mean strange)
My init code is:
And when i try to display a cube there are strange triangles on the edges of the cube.
The triangles have textures of the back face.
When the cube is moving the triangles are changing there shape according to the movement of the cube.
When i call the
function then the effect is gone.
Is this a solution?? or?
(Picture of the effect:

[This message has been edited by Fredy (edited 02-21-2001).]

[This message has been edited by Fredy (edited 02-21-2001).]

Calling glPolygonMode(GL_BACK,GL_LINE) does not sound like a good solution. Something is wrong with your code. Try to enable backface culling and check the result.

Looks like a Z-BUffer stuff to me, it’s not accurate enough.

Try with a 24/32bits Zbuffer or try glDepthFunc(GL_LEQUAL);

But anyway, you should enable backface culling too as Mango said. It will avoid backfaces to be rendered, and thus it will avoid the problem you’re having in that case.

Maybe the projection frustrum far limit is “too far”.
If this value is too big, it reduces the Z-buffer accuracy.

Tnx guys! Problem solved.