Skip to main content
GameDev.net gamedev.net
🔒 Locked

Make SDL window transparent

Started by grillvanten Jul 30, 2006 at 8:35 AM 4 replies 2.2k views
Original Post
grillvanten
grillvanten
Is it possible to make parts of an SDL window transparent? I would like to create something like rounded corners and stuff. I know this can be done using the windows libs and so on but if it could be done in SDL it would be a whole lot easier...
Scet
Scet
I don't think you can do this directly with SDL, it is the "Simple" library after all. You could of course get the window handle and use Win32, but that would be a total pain and it eliminates the point of using SDL.

One option might be to uses a cross-platform windows API like wxWidgets with SDL(I've seen it done), although I have no idea how SDL would fare with a malformed window.
grillvanten
grillvanten
The SDL part isn't really that important, im using SDL to set up the window to draw openGL. Maybe wxWidgets is worth checking out..
wolverine
wolverine
Quote:

One option might be to uses a cross-platform windows API like wxWidgets with SDL(I've seen it done), although I have no idea how SDL would fare with a malformed window.


Yes, it's true... i've done some experiments with both. Here's a tutorial for joining wxWidgets and SDL:
wxWidgets+SDL

I'm also not sure if it will work well on the SDL part, but you can try doing some experiments...
grillvanten
grillvanten
Do you have any idea if it's possible make parts of the window transparent in wxWidgets?
wolverine
wolverine
I really don't know because i've never tried to do that (and i don't have wx
installed on this machine). However, it seems you can set a shape of a window:
wxtoplevelwindow

But, again, i've never tried to do that so it's just a guess from me. Try making a post about this in the Alternative Game Libraries forum.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.