-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend sub-pixel rendering support #2609
Merged
Vankata453
merged 7 commits into
SuperTux:master
from
Vankata453:sdl-sub-pixel-rendering
Aug 28, 2023
Merged
Extend sub-pixel rendering support #2609
Vankata453
merged 7 commits into
SuperTux:master
from
Vankata453:sdl-sub-pixel-rendering
Aug 28, 2023
Conversation
This file contains 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
Replaces drawing functions in `SDLPainter` with their `float` equivalents. Fixes SuperTux#2422.
Vankata453
added
category:code
status:needs-review
Work needs to be reviewed by other people
type:bugfix
Pull Requests that fix bugs.
labels
Aug 25, 2023
Previously, the `DrawingContext` size getters would always return an integer value, which didn't account for possible floating-point scale values of the current transform. Those functions now return floating-point values, which fixes some graphical bugs.
Vankata453
changed the title
SDL sub-pixel rendering support
Extend sub-pixel rendering support
Aug 26, 2023
Rusty-Box
approved these changes
Aug 27, 2023
Does this have any impact on performance? Floating point arithmetic tends to be slower. |
@mrkubax10 To me it made no difference. Either way, in my opinion, we shouldn't sacrifice proper rendering for performance. |
It should be fine then. |
mrkubax10
approved these changes
Aug 28, 2023
Vankata453
removed
the
status:needs-review
Work needs to be reviewed by other people
label
Sep 2, 2023
Vankata453
added a commit
to Vankata453/supertux
that referenced
this pull request
Sep 22, 2023
Addition to SuperTux#2609 (commit 154315d). Implements sub-pixel rendering support for lines and triangles on the SDL renderer.
tobbi
pushed a commit
that referenced
this pull request
Sep 24, 2023
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.
Implements sub-pixel rendering support for the SDL2 renderer. Achieved by replacing drawing functions in
SDLPainter
with theirfloat
equivalents.Additionally, the
DrawingContext
size getters now return floating-point values, since before, they would always return an integer value, which didn't account for possible floating-point scale values of the current transform. This helps fix various other graphical glitches.Fixes #2422.