glutFullScreen problem() problem

Hi there,

When I call glutFullScreen() on a display running at 1280x1024, my window gets drawn larger than the actual screen real estate. It actually appears that the interior of the window is set to 1280x1024, but the title bar is drawn with its origin at the upper left hand corner of the screen, and hence parts of my window are off screen.

Is there an easy way to get the window to maximize properly, or do I just have to calclulate the size of the title bar and borders and then use glutPositionWindow and ResizeWindow() to get what I need?



This is the expected behaviour of glutFullScreen(). If you just want to draw a maximized window you have to calculate the size yourself.


How about exclusive full-screen mode(not full-screen window) under GLUT?
Is it supported? (I’d like to be able to set my own resolution and bit-depth independently of the desktop…)

In GLUT 3.7 and up, there is a game mode you can use to set your own desktop resolution/color depth, along with a fullscreen window.

Hello again!
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); // For example

Do not use glutCreateWindow() or you’ll get an error message. I’m sure you understand the parameters in the gluGamModeString().