PDA

View Full Version : change view



tracey
12-13-2003, 09:42 AM
Hi,
I have a question about changing view position so the viewer can see the sorrounding objects also include the viewer is in motion ( for example: viewer is moving around a circle).
I have my program using:
gluPerspective( 60.0f, aspect, nearClip, farClip );
Should I just add some variables into this function to achive above purpose.
Could someone help me? Thank you.

nexusone
12-13-2003, 11:19 AM
glPerspective or ortho set's your viewing volume and not location.

To set the scene view do it in model view with gluLookAt or rotate/translate commands, then draw your scene



Originally posted by tracey:
Hi,
I have a question about changing view position so the viewer can see the sorrounding objects also include the viewer is in motion ( for example: viewer is moving around a circle).
I have my program using:
gluPerspective( 60.0f, aspect, nearClip, farClip );
Should I just add some variables into this function to achive above purpose.
Could someone help me? Thank you.