Hello Guest

depth test not working on MacBook Pro?

  • 0 Replies
  • 5163 Views
depth test not working on MacBook Pro?
« on: September 11, 2006, 11:24:45 »
Hi there,

newbie question on OpenGL, using lwjgl and swt and playing on a MacBook Pro:

Take the pyramid from NeHe's tutorial lesson 05 on 3d shapes -- draw the back and the left side, then rotate around the y axis.

On my machine, although GL_DEPTH_TEST enabled and tried with GL_LESS and GL_LEQUALS as depth funcs, the triangles are always drawn in painters order... it means that while the thing is rotating, suddenly it looks as if the side that should be in the back becomes the one in the front.

The error goes away if I take care to paint the triangles in the right order, deepest triangle first. But I thought, OpenGL would relieve of such stuff.

Is this behaviour normal? Is it a bug in my understanding of GL, in my code, in lwjgl code, or in the 3d card of the mb pro? I can post code and images on my website if anybody's interested.

Thanks,
buraq