Exchange Frame Buffer for Texture

Greetings everybody,

My Problem is that I need to "grab" the Output from the Framebuffer, no matter what it currently displays, and use these frames as textures for further manipulation in Direct3D. The difficult thing here is that I don't want the Application to first write the complete Frame in the normal Framebuffer, then read it to a texture but directly set the Texture as the Framebuffer, alter the texture and finally write the altered Texture into the normal Framebuffer for display. And this shall not work only for 3D-Rendering or Video-Display, but also with normal Desktop-Apps and even the bare Desktop itself. So I think I must find a way to reroute the Frames heading to the Framebuffer for display to "my own" Framebuffer, which is intended to be a Direct3D Texture.

I hope someone can help me with this exotic Problem ;-)

Thanks!

[875 byte] By [De_Vaddrr] at [2007-12-23]
# 1
There's no way use the "Framebuffer" (or front buffer as Direct3D calls it) as a texure on Windows.
RossRidge at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 2
If there's no way to direct the Frames directly to a Texture, how do all the 3D-Desktop-Extensions do the Trick? These obviously display the Desktop and Apps on Planes etc in 3D. Do they just create a Screen-Capture and read this back to a Texture (which is from my pov not the most efficient way)?
De_Vaddrr at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 3
You'd have to ask the developers of these extensions exactly how they did it.
RossRidge at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 4
Ok, let's say that direct copy to a Texture is no-go. Are there API-Calls or mechanisms from Windows which allow me to access the normal Frontbuffer?
De_Vaddrr at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 5
You can use GetFrontBufferData() to get a copy of the front buffer in Direct3D. You can also do in GDI by creating a DC for the entire screen and copying it using BltBlt() to your own bitmap. See the "Capturing an Image" topic in the Platform SDK.
RossRidge at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...