Opened 4 years ago

Closed 3 years ago

#12473 closed defect (fixed)

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

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

Description

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 4 years ago.
scummvm-myst3-window.png (1.8 KB ) - added by macca8 3 years ago.

Download all attachments as: .zip

Change History (7)

by eriktorbjorn, 4 years ago

Attachment: no-textures.png added

comment:1 by criezy, 4 years 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 https://github.com/scummvm/scummvm/commit/d33487f64 (SDL: Refactor OpenGLSdlGraphics3dManager to inherit from SdlGraphicsManager).

That ticket was for macOS.

in reply to:  1 comment:2 by eriktorbjorn, 4 years ago

Replying to criezy:

A possible culprit would be https://github.com/scummvm/scummvm/commit/d33487f64 (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, 3 years 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, 3 years ago

Attachment: scummvm-myst3-window.png added

comment:4 by macca8, 3 years 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.

comment:5 by bluegr, 3 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

The issue should be fixed now with pull request 3392:
https://github.com/scummvm/scummvm/pull/3392

Closing

Note: See TracTickets for help on using tickets.