can someone please post basic layout please


Am new to openGl and am having problems as i dont know where things should go, could someone please post up a basic layout, e.g. where the gluPerspective should be defined. I have the follwoing as a what i use as a start up:

  //initiate any openGL stuff

  //use this to create the window and used for callbacks
  glutInit ( &argc, argv )
  glutMainLoop ();

  /use this to listen to key presses

The main thing that i am looking for is where should i put the gluPerspective and the gluLookAt as these are what i am using, jhave tried the init and display functions but changing the values dont do anything.


Hi !

glut comes with lots of small nice example applications, the easiest thing is to look at them.


I have a basic GLUT layout on my website:

As for using perspective and glulookat, they are used to setup how openGL looks at the 3D world.
I think you need to do a more of the nehe tutors and download or buy a copy the openGL red book.
There is a link for a PDF version of the red book under documetation on this website, it will explain setting up your views using perspective and ortho.