libsdl-org / sdl2-compat

An SDL2 compatibility layer that uses SDL3 behind the scenes.
zlib License
80 stars 19 forks source link

macOS: rendering textures is busted... #196

Closed icculus closed 3 months ago

icculus commented 3 months ago

This is testsprite2, using the latest sdl2-compat and SDL3 on macOS:

image

Normal SDL2 testsprite2 works fine, as does SDL3's testsprite.

icculus commented 3 months ago

This is SDL3 revision 40f9fd854fd56bbf1ed117879e1f6654276c8ec7 (which is not the culprit, just where I am in bisecting this)...

image
icculus commented 3 months ago

I couldn't manage to bisect it, but it works with all renderer backends if I convert icon.bmp from 8-bit indexed color to RGB565, so I'm assuming this was the blit-with-no-palette change in SDL3.

It's not a Metal-specific thing, it didn't work on OpenGL or Software rendering, either. Both looked like this, unlike Metal's blank output:

image

This is likely not Mac-specific after all, but I haven't checked.

slouken commented 3 months ago

Fixed, thanks!

sezero commented 3 months ago

BTW: is SDL_image OK?

slouken commented 3 months ago

Yep!