Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Fullscreen performance impact

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2010
    Posts
    15

    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?
    Code :
    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.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2007
    Posts
    982

    Re: Fullscreen performance impact

    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.

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2010
    Posts
    15

    Re: Fullscreen performance impact

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

  4. #4
    Member Regular Contributor
    Join Date
    Oct 2006
    Posts
    349

    Re: Fullscreen performance impact

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

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Jan 2007
    Posts
    982

    Re: Fullscreen performance impact

    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.

  6. #6
    Junior Member Newbie
    Join Date
    Oct 2010
    Posts
    15

    Re: Fullscreen performance impact

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •