|
Author | Topic: Camera (Read 66 times) |
aphoticgenesis Posts
  member is offline
![[avatar]](http://www.avatarsdb.com/avatars/place_for_mouse.jpg)
Joined: Apr 2009 Gender: Male  Posts: 56 Location: United States
|  | Camera « Thread Started on Nov 7, 2009, 2:07am » | |
When making a game remember to use gluLookAt() with the correct vector calulations preferably SVector3(structure) containing x, y, z, usually some other functions, you should use this because it only changes the camera, the old style of camera most people have done on this forum was glRotatef() and glTranslatef( )which is very slow because your rotating all of your data and moving all of your data. So if you want a higher framerate and better performance make a professional camera using gluLookAt() with the correct vector calculations. 
Also i might post a tutorial for anyone is confused about what i said, i might also make a plugin which does all of the camera calculations for you.
| |
|
matthew Global Moderator
     member is offline
![[avatar]](http://matthew-4gl.wikispaces.com/space/showimage/proboards_ken_cropped.gif)
Joined: Apr 2006 Gender: Male  Posts: 1,794 Location: England
|  | Re: Camera « Reply #1 on Nov 7, 2009, 1:31pm » | |
I've noticed that a lot of the OpenGL programs written in C or C++ usually use the gluLookAt() command too, so you're probably right, it is more efficient.
| |
|
DJLinux Global Moderator
     member is offline
\_/?
Joined: Apr 2008 Gender: Male  Posts: 486 Location: Germany NRW Essen
|  | Re: Camera « Reply #2 on Nov 7, 2009, 2:32pm » | |
yes you are right
with glMultMatrixF() you can move/scale/rotate your 3D objects in worldspace and before this you can move/rotate your observer/camera with gluLookAt()
Joshy
|
(sorry for my bad English) I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong.
|
|
Darkjester Posts a bit
   member is offline
![[avatar]](http://www.avatarsdb.com/avatars/help.gif)
Joined: Jun 2009 Gender: Male  Posts: 173
|  | Re: Camera « Reply #3 on Nov 8, 2009, 11:10am » | |
im going to say that is about half-right, my understand of glulookat() is that it sets the intitial view of the camera then you use transformations just like usual, as glulookat() doesnt contain anyway to rotate the camera, you also use gluperspective to finish the camera off -darkjester
| -I love Krystal <3
http://joshkoert.wikispaces.com/ |
|
aphoticgenesis Posts
  member is offline
![[avatar]](http://www.avatarsdb.com/avatars/place_for_mouse.jpg)
Joined: Apr 2009 Gender: Male  Posts: 56 Location: United States
|  | Re: Camera « Reply #4 on Nov 10, 2009, 10:18am » | |
it doesent matter if im right or wrong, ive tryed more than one method and gluLookAt() comes out on top(more effecient)
| |
|
|