hi i have a question. what i have to use to move the view of the application, the glViewport statement or the glTranslatef, what use?.
i’m working in one application in C++ with Win32 and python with wxpython to test the openGL libraries and how they work. now i want move mouse to move the view (no rotate) move to x y or z if the view is rotated how i can do that?
or create a camera and work whit it.
in nehe i can’t find nothing that helps
Your having a laugh, right?
Of course HeNE can help, as it implements a complete camera class which will do exactly what you need and more.
You need to read the tutorials a little more fully and try to understand what is happening with the ModelView matrix as this is the key to what you see on the screen.
The poor chap is obviously neither a native English speaker or an experienced programmer:
Further NeHe’s python classes are somewhat limited from what I remember (unless someone has updated them of late.)
glViewport only changes the size of the area you draw to. Do not want.
glTranslate / glRotate move objects around inside the ‘world’.
The camera does not move, you must move the world around the camera.
This may sound (and is) backwards to what you would expect, but makes sense for the computer.
Person moves mouse: GlTranslate / glrotate to move the world around the camera (making it look like the camera moved).
Move objects around with glTranslate / glrotate
It is best when you begin to imagine there is only one camera. This camera does not move, rather you move everything else around it.
While this is not (strictly) true, it makes it simpler to understand how you ‘move the camera’.