Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Persisting OpenGL context across window recreation?  (Read 1030 times)

0 Members and 1 Guest are viewing this topic.

mrchris

  • Newbie
  • *
  • Posts: 1
    • View Profile
Persisting OpenGL context across window recreation?
« on: April 23, 2010, 11:18:59 pm »
Currently when I recreate a window to switch from windowed to fullscreen or the reverse, I lose all the loaded textures. I guess because the OpenGL context is deleted on window recreation. I am using SFML2, I see that I can create an sf::Context separate from a window but I do not see a way to then give it to a window, it seems a window always makes its own context on creation... I feel like the answer is staring me in the face. Is it possible to persist the OpenGL context while creating and destroying windows?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Persisting OpenGL context across window recreation?
« Reply #1 on: April 24, 2010, 10:21:06 am »
This never happens in SFML, there is always a valid context alive even when no window exists.

You probably have another problem with your textures.
Laurent Gomila - SFML developer

 

anything