Transparent Framebuffer

How do we achieve the transparent framebuffer goal to create a transparent window? Is there anything similar to GLFW’s solution like a flag to set for such?

Thanks for any help.

Are you looking for this? SDL_SetWindowOpacity - SDL Wiki

Not really, that makes the entire window transparent I suppose, I am looking for a command to make the framebuffer transparent, not the window itself entirely.
If that is not supported by SDL2, I will have to do manually using platform specific API like WINAPI.

Pretty sure this is supposed to be controlled by setting ALPHA_SIZE via e.g SDL_GL_SetAttribute() … Not sure about a more general way.

There was some issue around this recently because some games did this but expected the background to always be opaque, but then compositors actually honored it… so various extensions had to be added to opt out. At least that’s my cursory understanding. Some of it you can read here.

I am already setting the alpha size, I guess some actions needed for the OS side to make it work, the texture becomes transparent, but can’t see through the window, DWM on Windows draws it opaque.

I can use SetWindowLong to set the WS_EX_LAYERED flag for that, but I was looking for a platform-independent solution offered by SDL2, if any.