-
-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Edit: This is in regards to vcpkg release libtcod:x64-mingw-dynamic version 1.20.1
While setting up my Windows 11 MSYS2 MinGW64 environment to work with vscode+vcpkg+libtcod, I got the example program at https://libtcod.readthedocs.io/en/latest/guides/getting-started.html working as a starting point.
For some reason, however, it seems to be rendering garbage if the window is set/resized to certain dimensions. Here are some screenshots:


Using a viewport to enforce aspect ratio letterboxing + integer scaling doesn't seem to help.
I did notice that the artifacts seem to possibly be related to the foreground color set for the tiles at their location. Adding extra logic to paint black-on-black characters wherever possible improved things quite a bit, but it's still artifacting a bit around the "R"s and other characters in this screenshot:

I strongly suspect that SDL is accidentally picking up a little bit of a neighboring glyph from a tileset bitmap while attempting to perform filtered scaling or something - especially since forcing a renderer_type of TCOD_RENDERER_OPENGL (which seems to use unfiltered scaling) doesn't suffer from any artifacting.