Opened 5 months ago

Last modified 13 days ago

#12473 new defect

Switching between windowed and fullscreen mode in 3D OpenGL games loses the loaded textures

Reported by: eriktorbjorn Owned by:
Priority: normal Component: Graphics
Version: Keywords:
Cc: Game:


When switching between windowed and fullscreen mode in a 3D game, the textures are lost. I'm led to believe that these are stored as part of an OpenGL context, that gets destroyed and (not quite) recreated in the process?

At least this happens when I run the games under Linux. It seems the "OpenGL" renderer tends to leave the screen white, while the "OpenGL with shaders" renderer leaves the screen black.

The software renderer works (and also honors the "stretch mode" setting; I haven't found any way to run Grim Fandango in fullscreen and OpenGL without distorting the game to fill the whole screen), but that's not an ideal solution. Particularly not with Myst III, where software rendering runs pretty slow.

Attachments (2)

no-textures.png (5.8 KB ) - added by eriktorbjorn 5 months ago.
scummvm-myst3-window.png (1.8 KB ) - added by macca8 4 months ago.

Download all attachments as: .zip

Change History (6)

by eriktorbjorn, 5 months ago

Attachment: no-textures.png added

comment:1 by criezy, 5 months ago

Bug #12476 seems to be the same issue, and it suggests this is a regression that first appeared in the daily builds from April 18 (build 2.3.0git15408-g9818b47554). A possible culprit would be (SDL: Refactor OpenGLSdlGraphics3dManager to inherit from SdlGraphicsManager).

That ticket was for macOS.

in reply to:  1 comment:2 by eriktorbjorn, 5 months ago

Replying to criezy:

A possible culprit would be (SDL: Refactor OpenGLSdlGraphics3dManager to inherit from SdlGraphicsManager).

Bisecting seems to confirm that. (I was actually wondering about that myself, because I thought it used to work, but I didn't take the time to check until now.)

comment:3 by macca8, 4 months ago

Just to advise a point of difference between macOS (with Myst3) and the Linux behaviour described in this ticket.

On macOS, setting the 3D Renderer to "OpenGL with shaders", then switching screen modes in-game, results in an immediate crash with a segmentation fault. This crash doesn't occur with daily builds prior to 18 April 2021.

With regard to using normal 3D OpenGL, switching Myst3 between screen modes with the "widescreen mod" engine option disabled preserves the screen's black borders, but the main screen and inventory items are blank (see attached screenshot).
With "widescreen mod" enabled, there's no black borders and inventory items are hidden by default, so the result when switching is a completely white screen.

by macca8, 4 months ago

Attachment: scummvm-myst3-window.png added

comment:4 by macca8, 13 days ago

I have reopened #12476, since the variation between behaviours when using OpenGL with shaders is now the default behaviour for Myst3 on macOS, following the change of the 3D Renderer's default setting to OpenGL with shaders - refer commit a16bc2a.

The specific Alt+Enter behaviours applying to OpenGL & OpenGL with shaders (for Myst3) are unchanged.

Note: See TracTickets for help on using tickets.