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 3 of 3

Thread: possibility to switch between fullscreen/windowed without loosing resources

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2007
    Posts
    1

    possibility to switch between fullscreen/windowed without loosing resources

    It would be VERY nice if it was possible to switch between fullscreen/windowed display without having to reload all resources. Same goes if context is lost in any other manner.

    Having to write resources so they reload themselves, buffering them seems wasteful when the driver probably buffers them too.

    This would seriously help beginners who want stable gl-programs that just works! Also it would probably help lower memory requirements. Perfect for alt+tab for switching between fullscreen/windowed quickly etc.

    How to make for dynamic resources I don't know, maybe only certain resources are buffered.

    Something to consider if the object models is under discussion.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: possibility to switch between fullscreen/windowed without loosing resources

    Resources are only lost when the rendering context is destroyed. So if you don't want to lose the resources, then just don't destroy the rendering context. The rendering context is already required to survive a resolution change.

    But if your code, or the windowing library you use, decides to destroy and recreate the rendering context on a resolution change, that that's your/the library's fault and have nothing to do with OpenGL.

  3. #3
    Advanced Member Frequent Contributor arekkusu's Avatar
    Join Date
    Nov 2003
    Posts
    676

    Re: possibility to switch between fullscreen/windowed without loosing resources

    One way to do this is to create the resources in the window context, and then share the fullscreen context with the window context.

    There is a still a hard case to deal with here when you have multiple displays driven by multiple GPUs, and you want to go fullscreen on a single display when the window was on an arbitrary display.

Posting Permissions

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