JoseTomasTocino / freegemas

Freegemas is an open source version of the well known Bejeweled, built in C++ using SDL2
GNU General Public License v2.0
61 stars 18 forks source link

Improve performance when rendering text shadows #28

Closed ccawley2011 closed 3 years ago

ccawley2011 commented 3 years ago

When using SDL's software renderer, alpha modulation is quite slow. Setting the alpha value in TTF_RenderUTF8_Blended provides a useful performance improvement, and this PR also provides a smaller performance and memory improvement by combining the text and shadow before uploading it to a texture.

sharkwouter commented 3 years ago

Works well, thanks!