PDA

View Full Version : help me plz



Imp
02-08-2001, 02:46 PM
I only started programming OpenGl and im already stuck. So I was wondering if maybe one of you guys could help me?

Im drawing a pyramide and rotating it. And either its not displayed ( when i enable GL_DEPTH_TEST) or its displayed but the deepth isnt correct( when i enable the testing). I tried using glDepthFunc and glDepthRange in different but it dosent fix the problem. What am i doing wrong?

THX in advance,
dave

DFrey
02-08-2001, 03:43 PM
Set the depth function to GL_LESS, the depth range to 0,1, and make sure zNear (in gluPerspective or glFrustum) is greater than 0. And finally enable depth testing. Should work fine with these settings.