getting the screen resolution

Started by
1 comment, last by Hanatarou 17 years, 6 months ago
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.
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.
Thanks Kalidor! This glutGet function rocks!

This topic is closed to new replies.

Advertisement