xzhu
xzhu

Reputation: 5755

How do I enter fullscreen mode with a specified resolution using GLUT?

While glutFullScreen() make the window full-screen, it doesn't change the screen resolution. It is actually equivalent to resize the window to the screen's size and hide the title bar and the border.

How do I change the resolution to a specified one?

I'm using Ubuntu/Mesa/FreeGlut/C.

Upvotes: 1

Views: 1659

Answers (1)

Frédéric Hamidi
Frédéric Hamidi

Reputation: 262939

You can try calling glutGameModeString() followed by glutEnterGameMode(). Depending on your system, it might be able to change the screen resolution:

glutGameModeString("800x600:32@60");
glutEnterGameMode();

Upvotes: 2

Related Questions