PDA

View Full Version : Setting up views?



04-27-2001, 12:39 AM
just wondering what are the correct functions to use when setting up views and how should they be used?
Also i want to be able to set the camera position, how do i use the gluLookAt function correctly to achieve this affect?
Any help is greatly appreciated.

My initial glut setup is like this:
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_DOUBLE | GLUT_DEPTH ); glutInitWindowSize(600, 600);
glutInitWindowPosition( 100, 25 );
glutCreateWindow( "My World" );
glutDisplayFunc( DrawWorld );
glutSpecialFunc( Special );

04-27-2001, 06:57 PM
try this:
gluLookAt(1,1,1,0,0,0,0,1,0);
this sets (1,1,1) as your camera position
(0,0,0) as where the camera is pointing
and the y axis as up

if you wanted the x axis up, change the last 3 digits to 1,0,0
and for z use 0,0,1