Cameras?

Nibbie
Posts: 2
Joined: 2009.01
Post: #1
are there cameras in openGL, if so how do I create/view/move one, how about what I'm looking at right now? am I looking through an opengl camera in the default view? Dear go what is going on!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
There are no "cameras" per se.

There is a model-view matrix which allows you to change things like the direction you're looking, and a projection matrix which lets you set things like the field of view angles.

If you haven't changed either matrix, you're looking in 2D, the bottom left corner of the window is (-1, -1) and the top right is (1, 1).
Quote this message in a reply
Moderator
Posts: 365
Joined: 2002.04
Post: #3
Try gluLookAt() and gluPerspective() from the GLU for a quick way of setting up a camera-like matrix. That still doesn't give you a 'camera object', though - that's something you'll have to create in your own code.

Neil Carter
Nether - Mac games and comic art
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2009.01
Post: #4
Nah, I found it easier to just rotate and ofset everything as it draws the level, thanks for your advice.
Quote this message in a reply
Post Reply