How to change zNear and zFar dynamically

Post: #1
Newbie question #02 :

any tips on how the zNear and zFar parameters of gluPerspective can be changed dynamically?
I've tried all sorts of things with glutPostRedisplay(), amongst others, but it seems I can only manage to alter the gluLookAt dynamically...
Is there perhaps an other way this has to be done with clipping planes or something similar...

Any tip is welcome. Thanks

Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
just move your perspective calls from the reshape callback into the top of the display callback; that way you can change them each frame.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Cursor coordinates off during resolution change akb825 2 5,260 Aug 19, 2005 08:21 PM
Last Post: akb825