PDA

View Full Version : Transparent Window



Juergen
04-18-2008, 02:00 AM
Hello!
I want to create an opengl Window without any background (fully transparent). I only want to see the 3D-Shapes, drawn over whatever application or desktop is visible behind.

With this I want to make a unique "Splah-Screen" for my application.

Is there a way to do this in pure OpenGL, without use of shaders?
I was thinking of something like clearing the screen with a transparent color, or maybe overlay windows.
But nothing I tried so far gave me the appropriate result. I would be glad if somebody could tell me if this is possible at all, and what keywords I should google for.

Of course, if somebody has a code example it would be great!

Regards, Juergen

niko
04-18-2008, 07:31 AM
AFAIK not actually opengl related, more of underlying desktop api thing. On win32 you could try this (http://www.codeproject.com/KB/winsdk/quaker1.aspx).

/N

Juergen
04-20-2008, 11:14 PM
Thanks for your answer niko. I will try this today!

niko
04-21-2008, 06:38 AM
I tried that and got a bit disappointed: the performance of my extreme testapp (one-textured-quad rendered by fixedpipe) drops roughly tenfold. Another note of interest: opengl context which window has the colorkeying/alpha enabled degenerates to not-so-usefull "OpenGL 1.1.0/Microsoft Corporation/GDI Generic" -mode... *sigh*

/N

ZbuffeR
04-21-2008, 12:53 PM
A number of past projects managed to do that (with hardware accelerated GL), here my search results, from newest to oldest :

http://www.opengl.org/discussion_boards/...true#Post216469 (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Board=9&Number=216469&Searchpage=1&Main=43115&Words=%2BWindow+without+any+%2Bbackground+fully+%2 Btransparent&topic=0&Search=true#Post216469)
http://www.opengl.org/discussion_boards/...true#Post194443 (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Board=3&Number=194443&Searchpage=1&Main=38785&Words=%2BWindow+without+any+%2Bbackground+fully+%2 Btransparent&topic=0&Search=true#Post194443)
http://www.opengl.org/discussion_boards/...true#Post123974 (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Board=3&Number=123974&Searchpage=1&Main=28661&Words=%2BWindow+without+any+%2Bbackground+fully+%2 Btransparent&topic=0&Search=true#Post123974)