Transparent OpenGL window

Is there any way to make the OpenGL window transparent so that I can see the desktop through it where there is no geometry displayed? I’m mainly interested in a solution for Windows XP but a general solution would certainly be of interest.

The problem is simply of wild imagination.
i don’t know if this works ,but you can try the win32 api SetBkMode(hdc,TRANSPARENT).

I just tried and found the SetBkMode is of no use at all. However, accidently in digging into the msdn , i found the layer Window might be works.

This is sample command.
CreateWindowEx(WS_EX_LAYERED | // Layered Windows
WS_EX_TRANSPARENT | // Don’t hittest this window
WS_EX_TOPMOST | WS_EX_TOOLWINDOW,
gszFade, gszFade, WS_POPUP | WS_VISIBLE, prc->left,
prc->top, 0, 0, NULL, (HMENU)0, ghinst, NULL);

For more ,please look into the MSDN.I might as well give it try.
One more thing, the layered window is only applicable in win 2k and xp .

[This message has been edited by RunningRabbit (edited 06-26-2003).]

I am using Glut. In the display function, do not call glClear. This makes your window use the data on the video card before it was created - i.e. the desktop. You can then copy this to a buffer and do whatever u want with it. Change the display function after that. A screensaver is a good example. But I guess you want to make your window transparent so that changes to the desktop can be seen via the window. I haven’t found a solution to this yet.

Regards.

Ah that’s a good start - I’ll give it a whirl. Please do post if you think of anyway to have the lower windows update the texture. Maybe something is possible with a global window hook.

Try playing with the Win32 API function, SetWindowRgn.