Creating custom window with SDL

View: New views
5 Messages — Rating Filter:   Alert me  

Creating custom window with SDL

by Xzod :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello

the following code :







Code:
SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE | SDL_NOFRAME );


create a standard square black window with no frame.

i want to create a custom shape window (not a square window or a transparent window) with sdl, i couldn't find out how to make that. that seems to be possible with win32 api, however i need to do it in sdl.

can anyone help me please ?

thank you

_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Creating custom window with SDL

by nfries88 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
You can fetch the windows window information (window handle, etc) from SDL using SDL_GetWMInfo

Dunno if there's an equivalent function for SDL 1.3, but it should be in the compatibility layer anyway.

_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Creating custom window with SDL

by Xzod :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
thanks for this help

no much documentation on SDL_GetWMInfo, i'm not sure how to use it Embarassed

let me guess, SDL_GetWMInfo allow to get win32api handle, then should use some win32api code to make window transparent ?

isn't there a better way to do that in sdl ?

_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Creating custom window with SDL

by Kenneth Bull :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/1 Xzod <trashmobs@...>
thanks for this help

no much documentation on SDL_GetWMInfo, i'm not sure how to use it Embarassed

let me guess, SDL_GetWMInfo allow to get win32api handle, then should use some win32api code to make window transparent ?

isn't there a better way to do that in sdl ?

This is a planned feature for SDL 1.3, but not yet implemented.
I believe the idea is to have an alpha channel on the window itself, but I'm not sure how that works if you're using the renderer API rather than surfaces.


_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Creating custom window with SDL

by Xzod :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
ok thank you for this information

_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org