Fullscreen performance impact

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:

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

  1. 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.

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.

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)?

No, it renders at 1280x720 but clips at 640x480.

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.

Thanks for the tip. Unfortunately, clearing at fullscreen resolution didn’t produce a performance improvement. But, nonetheless, I’m thankful for the tip!