View Full Version : Depth buffer problem ?

03-05-2003, 09:38 AM
1.)I have a really simple program displaing 2 triangles but it won't display them if the z-coordinates are higher than 0 even when I set depth buffer


Where is the problem ?

2.)How can I set the screen coordinates ? I don't want to use floating point numbers frequently(-1,1,-1,1,-1,1).glOrtho doesn't seem to work

03-05-2003, 05:41 PM
1) You seem to be setting the perspective up wrong. I can't say for sure without more code.

2) I belive you want the gluUnproject(...) procedure.

- Halcyon

03-06-2003, 01:32 AM
Use negative values of z to move objects further to front, you wont see positive values (with Projection) there is a different story with Ortho though. Anyway nehe.gamedev.net

03-08-2003, 06:17 AM
As I know 0 on z axis should be displayed(and it is)but in case the object is not rotated then it is shown only once then disappers whats wrong with that ?