Archived

This topic is now archived and is closed to further replies.

Metzler

Drawing to the Desktop with D3DX9 ?

Recommended Posts

Hey, I am trying to draw something directly on the background with DirectX 9, but the only thing, i get, is an exception. So, is there any way of blitting graphics directly onto the desktop without a window or do i have to do it via Device-Context and GDI ? THX for answers

Share this post


Link to post
Share on other sites
I dont think theres a way to get the Desktop handle and use it for rendering (I tried once with OGL - and found out from many sources that it is not possible that way). So perhaps you have a couple of options -

1: If you''re wanting some sort of 3D Background/Desktop wallpaper, try creating an activeX control and putting it in an HTML document. Then set that as the wall paper.

2: Alternatively get the Desktop handle, create a HBITMAP from it (ie a screenshot of the current desktop). With your borderless D3D window (same size as the screen), you could render the screenshot you''ve taken (using D3D9 Textures - you may need several for a large desktop - you probably will anyway because of desktop resolutions), The render over that. This will give the impression that the desktop is being drawn over (it isnt - we''re just fooling the user), and you can play about with the window and not worry about other complication with trying to render directly to the Desktop.

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites
Maybe not much help, but there are programs which render to desktop. One of them is WinDVD (not a very usefull feature since desktop items will apear on top on the film). And that feature works (as I recall) without activating "Active Desktop" (which enables html backgrounds). So there should be some way of doing it.

Share this post


Link to post
Share on other sites
There''s a sample at angelCode (it''s hosted on GDNet, so you''ll find a link on the hosted page) that did draw to the background using DirectDraw. You might want to look at it. I suppose the way to go would be to render your stuff to an invisible window/buffer and then copy that somehow to the desktop.

Also, check out SuperX studios, they have done something called "Desktop Dreamscape" that''s said to be amazing (it''s some sort of a long cut-scene played in the background of windows)

Muhammad Haggag

Share this post


Link to post
Share on other sites