Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8677707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:31:55+00:00 2026-06-12T20:31:55+00:00

This question is about a graphics application using OpenGL. (At the time I am

  • 0

This question is about a graphics application using OpenGL. (At the time I am using the framework GLFW but I consider changing it.)

My aim is to let the user (as much as possible) continuously switch between fullscreen mode and windowed mode. This procedure should take less than a second and can occur during runtime. For example see the game Minecraft where the user can toggle fullscreen with virtually no delay.

The window recreation process doesn’t take so much time. But the problem is, that closing the window destroys my OpenGL context and I have to reload all my shaders and buffers.

How to recreate the window of a graphics application without destroying the OpenGL context? (I would like to use GLFW but I am open minded about alternative frameworks or a own implementation.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:31:58+00:00Added an answer on June 12, 2026 at 8:31 pm

    Technically the OpenGL context is not tied to any window. What’s important is, that the visual format of the window matches that of the visual format the context has been created for. It is perfectly possible to use a single OpenGL context with multiple windows.

    The problem you’re facing is, that frameworks like GLFW, SDL or GLUT don’t expose this kind of functionality. It’s a feature that definitely should be added to them some time.

    You can however do it, when you create and manage your windows and OpenGL context yourself. The principal process of what you intend is the following:

    1. select the visual format for the windows (PIXELFORMATDESCRIPTOR, Visual, FBConfig, depending on OS and graphics system)

    2. create your first window and set the visual format

    3. create the OpenGL context with respect to the first window as drawable

    4. create further windows and set them to the very same visual format you’ve already selected.

    You can now detach the OpenGL context from its current drawable (=window) and attach it to any other drawable (i.e. window) having a compatible visual format

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Followed this question about delayed_job and monit Its working on my development machine. But
Note: I originally asked this question about an hour ago but only recently realized
I have seen this question about deploying to WebSphere using the WAS ant tasks.
JD Long helped me with this: question about manual annotation . But is it
My Application is a Graphics Application written in C++ using OpenGL. I need to
I asked a question about this earlier but received no responses, so I'm trying
This question about Timers for windows services got me thinking: Say I have (and
I've this question about pass some instances by ref or not: here is my
Follow up to this question about GNU make : I've got a directory, flac
This is sort of the Java analogue of this question about C# . Suppose

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.