Skip to main content
GameDev.net gamedev.net
🔒 Locked

getting the screen resolution

Started by Hanatarou Sep 21, 2006 at 6:11 PM 1 replies 1.4k views
Original Post
Hanatarou
Hanatarou
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.
Kalidor
Kalidor
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.
Hanatarou
Hanatarou
Thanks Kalidor! This glutGet function rocks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.