Alpha-blend Direct3Ddevice with Windows Desktop?

ScalarWave

Newcomer
Joined
Jan 27, 2005
Messages
3
Is it possible to create a Direct3D device as an alpha-blended overlay on the Windows desktop? I would like the desktop to be my base layer upon which I will overlay one or more layers in the standard manner. If this is not directly supported, can I write a routine which will sample the desktop space behind my DirectX device and then render it to a texture?
 
ScalarWave said:
Is it possible to create a Direct3D device as an alpha-blended overlay on the Windows desktop? I would like the desktop to be my base layer upon which I will overlay one or more layers in the standard manner. If this is not directly supported, can I write a routine which will sample the desktop space behind my DirectX device and then render it to a texture?

What about creating a compatible bitmap from the desktop and then using the bitmap as a backround for your D3D App?
 
coldfusion244 said:
What about creating a compatible bitmap from the desktop and then using the bitmap as a backround for your D3D App?

That sounds like a good idea. I could use GDI+ to do a screen grab. The question is, can I grab the screen 'under' my application? I.e. I want my app to overlay another app's viewport window. So if my app is running, I want my DX viewport to continually reflect the underlying app's viewport contents. Can I use GDI+ to grab the desktop region occluded by my app? My first attempt involved setting the transparency key on a panel the size of the viewport. This way I can position my app as a 'screen' on top of the other viewport. This works, but what I really want is a transparent directx window in this region.
 
That could work, but constantly grabbing the screen contents would be kind of slow and cumbersome, besides you'd have to minimize all windows and then take the screenshot and save it as a bitmap (Mybitmap.save("file.bmp") and use it and ... well, if you're onnly doing it once, then go for it, but multiple times would be... hard. Either that or I'm not understanding your question.
 
Back
Top