How do i render a transparent window with the DesktopGL framework?

Hi, i’m working on a personal project, specifically a stream overlay that i composite in using OBS and keying out pure black. I’m using the DesktopGL framework, and want to get a transparent background, but have everything that i render in on top show at full opacity. I’ve seen this done with WinForms, and WPF, but those require windows, and i don’t like or run that. is there a way to render a window with a transparent background in the DesktopGL version of MonoGame?

You’d have to call the SDL functions directly. There’s some info here:

I have an example project showing how to call the SDL functions from MonoGame:

Specifically, grab:

using static SDL2.SDL;

To call the win32 function, you can do something like I did here:

that does help, however, the first link you posted seems to rely on some win32 stuff, which i’ve already stated won’t work for me (i’m using linux), so i was hoping for an alternative to something that relies on windows APIs

On Linux it’s a bit more complicated it seems. Which distro are you on?

There might be a lead here:

currently i’m using manjaro, with KDE as the DE and picom replacing the stock compositor

You might be able to write a custom window shader:

Search for fshader:

I saw an example for grayscale here:

Not sure how you apply that specifically to target your game but I’m sure it’s explained somewhere in the docs. (Or if this is the best solution.)