View Full Version : Is rendering to the primary framebuffer possible?
08-25-2011, 01:32 AM
Well, i wonder if it's possible to render to the 'primary framebuffer' under Windows?
Assuming that the OS does a paint/render job to a framebuffer like in the 'double buffered scenario' one could grab the (currently invisible) buffer and paint some stuff on it?
Surly instead of using OpenGL this is possible with some functions from Windows, but i'd like to keep the cpu-load low and satisfy my play instinct :D
08-25-2011, 03:03 AM
It most certainly is possible to draw directly to the windows dipslay buffer, as some screen savers do exactly that.
I'm not saying I know how to do it, but it is possible to get a handle on the memory buffer or device context.
As for Windows Vista/7, well different rules will apply from the simpler Windows XP case. I haven't seen those screen savers which interact with the desktop on Win 7, but that's not to say there aren't any.
08-25-2011, 03:11 AM
i see - in my case it's still WinXP to be used
08-25-2011, 03:27 AM
It's possible but you shouldn't do it. Aside from the fact that I've seen it lock up some drivers, and aside from the fact that there is such thing as a traditional "front buffer" under WDDM drivers (it's just another offscreen buffer), there's also the fact that you'll never be able to get vsync and will have to deal with screen tearing.
Is there some kind of specific problem you want to resolve with this approach? There may be a more appropriate solution.
08-25-2011, 05:45 AM
Thanks a lot for your reply!
Well, it is somekind of specific problem ... but it won't hurt if i have to use a regular (OpenGL-) window in fullscreen mode most of the time.
Nevertheless it seems that i have to give the windows API a try .. just a borderless, semi-transparent window, staying on top of all other windows ... that would be it
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.