Jump to content
  • Advertisement
Sign in to follow this  
YellowMaple

OpenGL finding opengl parameters

This topic is 4589 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I was wondering if anyone knew of a way to get the values that were used to the last call of gluLookAt and gluPerspective. Is there a function (something like glIsEnabled() perhaps?) that will give you these values? for example, with respect to gluPerspective, I might want to find the aspect ratio and viewing angle at some part of my program, but I don't want to set these values, just know what they were set to. Thanks! :)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by YellowMaple
Hello, I was wondering if anyone knew of a way to get the values that were used to the last call of gluLookAt and gluPerspective. Is there a function (something like glIsEnabled() perhaps?) that will give you these values? for example, with respect to gluPerspective, I might want to find the aspect ratio and viewing angle at some part of my program, but I don't want to set these values, just know what they were set to. Thanks! :)


AFAIK No. What gluLookAt and gluPerspective do is they setup the Model view and projection matrix for you. What you could do is read back these matricies and work backwards to get the values or alternatively you could keep track of what values you call those functions with yourself.

HTH

Share this post


Link to post
Share on other sites
nts is right, gluLookAt and gluPerspective only build a matrix. If you later need the aspect ratio and angle passed to the functions, you would be better off wrapping the calls and saving the parameters passed in.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!