LWJGL
May 21, 2013, 17:42:41 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: GLULookAt - Alternative implementations?  (Read 845 times)
MattCa
Newbie
*
Posts: 17


« on: August 27, 2012, 16:48:11 »

Hey guys,
I'm working on moving up to OpenGL 3.2+, and due to the slimmed down API, I have to handle the projection, view and model matrices my self.
However, one of the functions that I commonly use, gluLookAt, does not return a Matrix4f object, and I believe only works with the in-built OpenGL matrices (I could be wrong?)

Does anyone have an implementation of the lookAt function laying around that returns an LWJGL Matrix4f? I've tried converting over Mesa3D's version, but the difference in APIs is a little confusing when you're this tired  Undecided .

Thanks for the help,
Matt.
Logged
Eternity
Newbie
*
Posts: 40


« Reply #1 on: September 04, 2012, 06:11:45 »

What I did was copy the gluLookAt method straight from the lwjgl source code (along with everything it depended on) and then modify it to return a Matrix4. All the glu methods are implemented in lwjgl. The gl methods rely on the driver so to implement things like glFrustum and glOrtho you should look at the opengl red book.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!