Ticket #741 (new task)

Opened 15 months ago

Last modified 3 weeks ago

Reload all GL state when toggling fullscreen on OS X

Reported by: Philip Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords:
Cc:

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

comment:1 Changed 8 months ago by historic_bruno

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.

comment:2 Changed 6 months ago by Philip

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:3 Changed 3 weeks ago by ben

In 11752:

Disables broken window resizing and fullscreen toggling on OS X. Fixes #1381. Refs #741

Note: See TracTickets for help on using tickets.