-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Texture-based rendering #440
Labels
Milestone
Comments
cxong
added a commit
that referenced
this issue
Jul 18, 2016
This was referenced Jul 20, 2016
Closed
Closed
cxong
added a commit
that referenced
this issue
May 20, 2017
Most of this work has actually been done via #500 ; need to check if this can be closed off Seems like there is a possible rendering bug in macOS, especially with two windows. |
This has been mostly implemented (still need to do the HUD), however it's apparent that performance is worse, at least at low resolutions. I suspect it's due to texture switching, so this task should be put on hold for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After the SDL2 port #169, we can move to a more efficient rendering method, by rendering entire textures instead of software rendering into a surface. This should make the game much more efficient, especially on high resolutions.
I've already tested separating the menu background into a different texture and it works well. Contrary to what the SDL2 migration guide implies, rendering multiple textures, where one of them is a software-updated one, is perfectly fine.
Other advantages include:
SDL_RenderCopy
BlitMasked
,BlitTint
et al with the more efficientSDL_SetTextureColorMod
Some considerations:
SDL_SetWindowBrightness
but from testing it affects the entire display (and can be overridden by apps like flux), and also cannot set brightness above 100%. The alternative, to overlay everything with a semi-transparent white texture, isn't going to look as good.The text was updated successfully, but these errors were encountered: