BACKENDS: OPENGL: Fix rendering issues in 3D games when antialiasing is enabled#6702
Merged
bluegr merged 2 commits intoscummvm:masterfrom Jun 9, 2025
Merged
BACKENDS: OPENGL: Fix rendering issues in 3D games when antialiasing is enabled#6702bluegr merged 2 commits intoscummvm:masterfrom
bluegr merged 2 commits intoscummvm:masterfrom
Conversation
This is used when AA is enabled to make sure the engine reads the frame it just generated instead of the previous one.
In reality they are aliases but GL_DRAW_FRAMEBUFFER_BINDING is not always defined.
aquadran
approved these changes
Jun 9, 2025
Member
|
Nice work, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When 3D backends have been merged, I took the decision to use multisampling FBO to get AA rendering instead of relying on the OpenGL context having it.
This has allowed to add antialiasing to Android and iOS and avoids OpenGL context switches when a new setting is requested.
The main problem it introduces is that now, there are two distinct FBOs: one for reading and one for drawing and some engines expect to read what they just drew without issuing an updateScreen call first (to avoid polluting the display).
This PR adds a new presentBuffer call which does this offscreen rendering letting the engines read back what they have just rendered.
This has been tested with WME (fixing post filters), Grim (fixing save screenshots) and Myst III (fixing transitions).