Opened 13 years ago
Closed 10 years ago
#741 closed task (fixed)
Reload all GL state when toggling fullscreen on OS X
Reported by: | Philip Taylor | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 17 |
Component: | Core engine | Keywords: | osx |
Cc: | Patch: |
Description
On OS X, switching from fullscreen to windowed mode apparently triggers errors like ogl_program_get_uniform_location(shader, "TextureMatrix1")
returning negative values, and the textures disappear and everything goes black and grey and sometimes it crashes.
I guess the GL context state gets lost when toggling fullscreen, in which case we need to destroy and reload all our GL objects (textures, shaders, vertex buffers, framebuffers, etc) when switching.
Change History (7)
comment:1 by , 13 years ago
comment:2 by , 12 years ago
As far as I'm aware, SDL 1.3 is nowhere near release (and even further from being sufficiently widely available on Linux that we can rely on it as a dependency), so it may not be a viable solution.
comment:4 by , 11 years ago
SDL 2.0 fixes resizing and fullscreen toggling on OS X (so far confirmed on 10.8.3, I'll try testing older versions). Even so, it might be nice to have a way to reload all GL state, but it's much less of a priority now.
comment:5 by , 11 years ago
Keywords: | osx added |
---|
comment:7 by , 10 years ago
Milestone: | Backlog → Alpha 17 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This will be resolved by the use of SDL2 on OS X, which will be the default for A17.
A similar problem occurs on Windows using SDL 1.2 instead of our custom implementation, see #935. Apparently it has been fixed in SDL 1.3, so that may be an alternative solution.