Jump to content
  • Advertisement
Sign in to follow this  
Mari_p

How to capture a region from the desktop with the D3D app hidden

This topic is 4322 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello friends, I already captured the frontbuffers of D3D applications and saved them to files. This can be easily made by using CreateOffscreenPlainSurface, GetFrontBufferData and D3DXSaveSurfaceToFile functions. Suppose now my D3D application is minimized or hidden. How could I use Direct3D to capture a region from the desktop (to a surface or a texture)? Actually, I would like to capture the desktop area that corresponds to the window area when it is hidden. (please notice that I don't want to get a screenshot of my application). Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Ops... I had not noticed that the GetFrontBufferData function could get the entire desktop area. I was think it could only capture the window area.

So, the problem can be solved by hiding the app window and capturing its desktop rect.

Anyway, if someone knows a better way to capture to texture, please I would like very much to know. I'm doing these steps:

1) Create the texture
2) Create a off-screen surface and load it with the desktop captured area
3) Get a surface from the texture (GetSurfaceLevel)
4) Copy the off-screen surface to the texture surface (UpdateSurface)

Thanks again

[Edited by - Mari_p on November 18, 2006 1:35:38 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!