| Summary: | OpenGL context no longer re-created upon subsequent calls to SDL_SetVideoMode? | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sagittaur <SDL> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.14 | ||
| Hardware: | x86 | ||
| OS: | Windows (NT) | ||
|
Description
Sagittaur
2010-05-09 22:20:09 UTC
There was a change made on Windows to retain the GL context when just resizing the window, since most games would have to reload all their textures, buffers, shaders, state, etc. Your solution (explicitly restarting the video subsystem) is correct, if you want to reset all the state. I'd like to make this API more clear in SDL 1.3, though. --ryan. Thanks for the response. This really isn't all a big deal... I'm just curious to know what I'm missing. I was still a little confused until I found that I was supposed to call glViewport after SDL_SetVideoMode... as if the window was resizeable and I was handling the event. Doing so eliminates the need to call SDL_QuitSubSystem and SDL_InitSubSystem. So now I am just wondering: is this new behavior supposed to be consistent across platforms? |