Jump to content
  • Advertisement
Sign in to follow this  
Hanatarou

OpenGL getting the screen resolution

This topic is 4442 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

This may be a stupid question, but here goes... I'm using glut with opengl. Is there any way to determine the screen resolution during runtime inside the program when the program is running in fullscreen mode? The reason why I ask is that I want to use the mouse to move the camera towards the left when the mouse is all the way to the left side of the screen, and vice versa for the right side. So in order to do this I kind of need to know what the screen resolution is so I can tell the camera when to move.

Share this post


Link to post
Share on other sites
Advertisement
Well, you tell GLUT what you want the resolution to be so you must know it at some point. Why not save it somewhere then? If you really want to query the windowing system, in GLUT you can use glutGet.

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!