SDL3 SDL_RenderTextureRotated() function doesn't work with KWIN

SDL_RenderTextureRotated() is used to rotate or flip sprite textures, doesn’t work properly with the KWIN compositor. The sprite goes blank when trying to flip or rotate the texture. If someone could inform KDE Devs; I have trouble getting an account, keeps saying the password is wrong.

If you look at the SDL3 GITHUB issues from June/2025 the SDL3 Devs are aware.


I asked Gemini AI and it tells me this:
The problem exists because the KDE compositor, KWin, is not correctly or robustly handling the transformed drawing commands it receives from the underlying graphics system when an application (like your SDL program) uses advanced features like rotation or flipping.


I hope KDE can fix this problem. I am using CachyOS latest kernel and KDE PLASMA 6.5.1

There is a SDL3 example to confirm which uses an ARROW graphic and by press 1 2 3 or arrow keys if will flip the sprite.

Thank you if you can fix this bug.

Probably referring to this SDL issue

Recent comments suggest this has been fixed but might not have been released yet

Hi, I have been learning SDL3 too and can confirm that it works on my system.

kinfo

Operating System: EndeavourOS 
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.6-arch1-1 (64-bit)
Graphics Platform: Wayland

Screen Recording

Just replaced SDL_RenderTexture in an image displaying program with SDL_RenderTextureRotated

Well my $ kinfo


Operating System: CachyOS Linux
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.7-3-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 32 GiB of RAM (30.5 GiB usable)
Graphics Processor 1: AMD Radeon RX 7800 XT
Graphics Processor 2: AMD Ryzen 7 7800X3D 8-Core Processor


Well it doesn’t work for me this SDL3 function.

Which graphics card you using?

Maybe a certain KDE Desktop setting is messing it up?

Okay, thanks for some feedback.

Judging by the comments on the SDL issue the important bit of information is the SDL version.

Those who experience the bug seem to be using 3.2.26

Perhaps some other reason.
I am also using the Arch repo’s SDL3

❯ pacman -Sii sdl3
Repository      : extra
Name            : sdl3
Version         : 3.2.26-1
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 64 GiB of RAM (62.7 GiB usable)
Graphics Processor: AMD Radeon RX 7600

I didn’t use the exact code in the example though, so perhaps some problem in that.

Okay, I have it working with the new SDL 3.3.3 that I got from github.

Just remember to include the SDL library path before running it.

LD_LIBRARY_PATH=~/sdl3/lib:$LD_LIBRARY_PATH ./spritetest

not ./spritetest for example

Thanks for trying to help.

1 Like