Re: [PyOpenGL-Users] Depth problem
Brought to you by:
mcfletch
From: Greg E. <gre...@ca...> - 2008-04-17 22:51:56
|
Prashant Saxena wrote: > Everything I am drawing with 'z' less the 1.0 is visible. If I am > drawing something where 'z' is greater then 1.0 it's not visible. You haven't set the near and far clipping depths, so they're defaulting to 0.0 and 1.0. You need to call glOrtho() to set up a projection, e.g. glOrtho(0.0, screen_width, 0.0, screen_height, min_depth, max_depth) where min_depth and max_depth are the range of z coordinates that you intend to use. -- Greg |