Basic4GL
« Camera »

Welcome Guest. Please Login or Register.
Dec 22, 2009, 2:29am




Basic4GL :: BASIC4GL Boards :: Basic4GL General Discussion :: Camera
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: Camera (Read 66 times)
aphoticgenesis
Posts
**
member is offline

[avatar]



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.
Link to Post - Back to Top  IP: Logged
matthew
Global Moderator
*****
member is offline

[avatar]

[icq] [yim] [msn] [aim]
[homepage]

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.
Link to Post - Back to Top  IP: Logged
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
Link to Post - Back to Top  IP: Logged

(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]



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
Link to Post - Back to Top  IP: Logged

-I love Krystal <3

http://joshkoert.wikispaces.com/
aphoticgenesis
Posts
**
member is offline

[avatar]



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)
Link to Post - Back to Top  IP: Logged
   [Search This Thread][Send Topic To Friend] [Print]

Google
Webbasic4gl.proboards.com
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!