Closed TwistedBlizzard closed 5 months ago
The errors are from MESA, probably related to this: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10293
Manually calling SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE); fixes the transparency but the errors are still present.
By default, the clear color alpha channel is zero, so if KDE honors the render target alpha channel, this makes sense. SDL does set the window opaque region when SDL_WINDOW_TRANSPARENT
isn't set on a window, but it's just a hint that the compositor is free to ignore.
Hmm, actually, SDL also sets the EGL_PRESENT_OPAQUE_EXT
and VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR
properties on backbuffers for non-transparent windows, so the alpha channel should be ignored. This might be a KDE or MESA bug.
I have a similar problem. The window is black at the beginning, but when I enlarge it, it looks like the attachment. Using Linux Mint 64bit with x11 and cinnamon. GPU Intel i915 There is no message in the console.
Are you actually drawing anything to the window? Windows on several platforms don't react well if they are resized without being repainted.
OS: Arch Linux GPU: Nvidia RTX 3060 (Mobile) Desktop Environment: KDE (Wayland)
Hey folks,
When I create a window, I get the following errors and the window appears fully transparent:
Here's how I'm creating the window:
But the line
SDL_Renderer* renderer = SDL_CreateRenderer(window, NULL, 0);
throws the same errors.Manually calling
SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE);
fixes the transparency but the errors are still present.I'm building from source using CMake with fetchcontent pulling the latest commit on this repo.
The same code runs fine on Windows.