can someone please post basic layout please

Hi,

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:

init()
  //initiate any openGL stuff
  glClearColor()

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

keyPressFunc()
  /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.

Cheers

Hi !

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

Mikael

I have a basic GLUT layout on my website: www.angelfire.com/linux/nexusone/

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.