PDA

View Full Version : Fullscreen performance impact



jsmithown
01-12-2011, 12:19 PM
I have two questions. I'm using GLUT and GLEW.

1) Why does it not allow me to enter fullscreen at the resolution specified?

To enter fullscreen, I use the following routines:
glutGameModeString("640x480:16@120");
glutEnterGameMode();

But, it seems like it's entering fullscreen at my desktop resolution (1280x720).

2) If that can't be changed, how can I prevent fullscreen from impacting performance on a lower resolution viewport?
I enter fullscreen at 1280x720, then set the viewport to 640x480. However, rendering is much slower than in windowed mode at that resolution. I thought that since the majority of the window area is black, it would render faster at fullscreen with a smaller viewport.

mhagain
01-12-2011, 01:45 PM
It's possible that your monitor and/or driver just doesn't support the mode you've requested. Try a 32bpp mode and start at 800x600.

jsmithown
01-12-2011, 03:00 PM
That worked! I did "800x600:32@60". Thanks

Can anyone provide some input on question number 2? Does OpenGL render the image at my fullscreen resolution (1280x720), then shrink it down (640x480)?

Stephen A
01-12-2011, 03:08 PM
No, it renders at 1280x720 but clips at 640x480.

mhagain
01-12-2011, 03:20 PM
You may be able to improve performance by setting glViewport to your full screen resolution before you glClear, then call glClear, then set your sized-down viewport. Clearing a sized down viewport can be slower than just clearing the full window.

Also, when clearing, make sure that if you get a stencil buffer (and you might have one even if you don't explicitly request one) you clear it at the same time as your depth buffer - there's something like a 10% to 20% performance loss if you don't.

jsmithown
01-15-2011, 08:58 PM
Thanks for the tip. Unfortunately, clearing at fullscreen resolution didn't produce a performance improvement. But, nonetheless, I'm thankful for the tip!