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

Allow adjusting the scale quality in the options #29

Open ccawley2011 opened 3 years ago

ccawley2011 commented 3 years ago

Using linear filtering can be quite slow when using software rendering.

sharkwouter commented 3 years ago

Thanks! This seems like a useful change. Just to make sure I understand, this will not make the game look better, but it will make it run better? I don't know the difference and I'm having a hard time seeing it on my system.

ccawley2011 commented 3 years ago

Thanks! This seems like a useful change. Just to make sure I understand, this will not make the game look better, but it will make it run better? I don't know the difference and I'm having a hard time seeing it on my system.

That's correct, the algorithm SDL's software renderer uses for linear filtering is noticeably slower than nearest pixel sampling. The performance difference when using OpenGL is likely to be less noticeable since filtering is done in hardware.

sharkwouter commented 3 years ago

Ah, that explains quite a bit. Maybe it could be made a bit clearer to the user which one if faster by renaming the options to something like pretty and fast for example. I'm not quite sure what would be best, but it wasn't quite clear to me which was which 😅

sharkwouter commented 2 years ago

Oh damn, I'm finally found out why this is not working for me. The version of SDL on my distribution is lower than 2.0.12.

sharkwouter commented 2 years ago

I just tried this on Debian 11, which has a newer version of SDL. There I get a segfault if I enable linear scaling.