View Full Version : Help: Drawing OpenGL to the desktop
09-05-2002, 10:39 AM
I have been trying for some time to draw my OpenGL scene to the desktop behind the windows and icon but I cannot figure it out. I have tried using the HDC of the SysListView32 but that draws over the icons. Could somebody please give me a link to a site explaining this? Or good keywords to search with in google?
09-05-2002, 10:47 AM
your keywords are:
ActiveDestktop (Animated Background)
09-05-2002, 10:59 AM
Keywords in what search engine?
They certainly don't mean anything to google...
But on the other hand,
ActiveDesktop (Animated Background)
do mean something.
[This message has been edited by knackered (edited 09-05-2002).]
09-05-2002, 11:08 AM
So it's not posible to draw to just that surface? I need to make a webpage with an imbeded activex control that does opengl?
I did search for those in google, i didnt gat ANYTHING usefull, what should I use?
09-05-2002, 11:14 AM
I wrote a program which grabs the window's handle, then I create an rendering context from it. After that I can render straight to it. Hey, desktop is a window too.
09-05-2002, 11:18 AM
Yes, but the icons are children of that window, and therefore get drawn over when you swapbuffers. He wants the icons to stay untouched - probably in the same way Drempels works:- http://www.geisswerks.com/drempels/index.html
09-05-2002, 11:36 AM
But I was looking at milkdrop, but I think it's made by the same people. They use DX though rite?
is there a way to draw only the area not covered by children?
09-05-2002, 01:31 PM
Christ, I've never seen that Milkdrop before (been a while since I've been to that site) - that is an INCREDIBLE plugin!!!!
That is absolutely beautiful, and very very clever.
09-05-2002, 01:47 PM
YEA IT IS!!!
But...how do i not draw overtop the icons? Is there a specific hdc not just for that SysListView32 but for that one layer that makes up the background? Can I get that maby? or are the icons and background drawn to the same hdc?
09-05-2002, 03:45 PM
I think i figured out how they did it. I was on the internet lookin at some stuff...and i noticed some dark blue text was twinkling, and its the same color as the background to my desktop, so i guese maby they go over all hte pixels on the screen and color all the pixels that color with opengl stuff.
How do you do that?
09-05-2002, 11:27 PM
From the Milkdrop documentation:-
Tweak Overlay Filter Color
Allows you to change the 'bluescreen' color for MilkDrop. When
MilkDrop runs in Desktop Mode, the first thing it does is replace
your wallpaper with a solid image of a single color. The default
color is (15,0,15), which, hopefully, is one you don't use too
often. Then, whenever it's time to show you a frame of animation,
it replaces all the colors on your screen that *would* be (15,0,15)
with the MilkDrop image instead. Setting this color to (0,0,0) or
(255,255,255) can have fun side effects.
So there you have it. It does indeed use a 'blue screen' technique to mask out the icons etc.
I think the only way to do this in opengl would be to use a pbuffer to draw your stuff into, then do a glreadpixels or something to copy the contents of the pbuffer into a ddraw surface, and then blit that surface onto the desktop using its masking functions.
09-06-2002, 01:06 PM
why go through all that? Cant you just read the pixel and draw the pixel to the hdc of the ShellList..32? without using the blit stuff? and ddraw?
09-06-2002, 02:26 PM
what are you talking about? If you draw into the desktops dc, you'll overwrite the icons on the swapbuffer. Clarify what you think you can do...
09-06-2002, 04:00 PM
Even if i only set pixels that are of the color of the background?
09-06-2002, 06:47 PM
Originally posted by napalm21:
Even if i only set pixels that are of the color of the background?You can't. Not with OpenGL alone.
09-07-2002, 11:50 AM
Another way would be to have a fullscreen window that stays in the background, but doesn't cover the taskbar.
There was a method for retreiving the icons of the desktop. So you render those as textures on your fullscreen. If user clicks on it, you would have to execute the "icon".
A little complicated, but it would work on all Windows.
09-07-2002, 12:34 PM
I think i got it but i havent tested it enough.
When my comp crashes, and it does alot, active desktop turns itself on. dunno why, it just does. So after i restarted I opened my project back up, and spy ++ and went back to work, and in spy ++ instead of progman just having a straight linear branch of kids, there was another branching off of one, so i drew to that, and im asuming that that is the window to active desktop. when i cleared the window, the backround turned black(color of my clear) and the icons stayed, but i havent tested it enough yet. Im afraid after i get my new program running that the active desktop will try to draw itself over my ogl stuff. Is there a way to make a blank active desktop?
09-07-2002, 05:28 PM
I am pretty sure that that Milkdrop uses a video overlay. A video overlay does automatic color keying. They are accessable through the DirectShow API.
[This message has been edited by Nakoruru (edited 09-07-2002).]
09-07-2002, 05:36 PM
Yea it does, but I want to do it using only opengl.
The active desktop works, but its realy realy slow. Is there a way to pause the active desktop's process or somthing like that?
09-08-2002, 03:21 AM
Why not use DirectShow and OpenGL at the same time? It is not like the program is going to be portable.
09-08-2002, 03:23 AM
Bear in mind that nvidia cards don't support overlays - ati cards do.
09-08-2002, 05:39 AM
Cause I just started college and I dont know direct x that well and I dont have the time to learn it now, but i know opengl pretty well. But I guese I'll have to....
09-08-2002, 07:18 AM
I really wouldn't bother with rendering to the desktop, if I were you - the good thing about milkdrop is WHAT it does, not where it does it. Concentrate on producing something as spectacular as that, rather than the desktop rendering gimmick.
09-08-2002, 09:07 AM
But I wana do it =) Just to say I did it. And i did do it...its just too slow. But i guese I should give up on it, it is prety worthless.
09-08-2002, 09:57 AM
drempels is fun. i've changed it now so that my title bar drempels, my fonts drempel as well, and the menus, selections etc. i love that it does not only draw to the desktop.. adds much flair to windows with those animated fluid colors.. http://www.opengl.org/discussion_boards/ubb/biggrin.gif
09-09-2002, 10:44 AM
"Bear in mind that nvidia cards don't support overlays - ati cards do." Under OpenGL, do you mean? Because my video player supports and uses overlay surfaces just fine...
09-09-2002, 11:27 AM
Nope, no overlay support with nvidia cards. You're thinking of hardware mpeg decoding?
09-09-2002, 12:34 PM
knackered, even my Vanta has video overlay support. What are you talking about?
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.