Jump to content
  • Advertisement

Archived

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

Le0

How to take a screen shot?

This topic is 5552 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

How can i implement a screenshot key to my tetris? because when i press printscreen, i get a screen of my game that is half drawn and with the wrong colors

Share this post


Link to post
Share on other sites
Advertisement
- create a Surface
- GetFrontBuffer( created surface )
- D3DXSaveSurfaceToFile( create surface )

This saves the complete front buffer to a file.

If you only want to save the content of your own window try to use the following functions:
- GetClientRect
- ClientToScreen

Share this post


Link to post
Share on other sites
I find that algorithm ("Generating screenshot in DX 8.1") quite slow when it comes to doing it in real-time... Are they are other ways of doing it? When I did it, it took about one and a half seconds just to take one shot....

I made it search through a directory for a free shotxxxx.* file and write it to that. I''ll check that source again to make sure it''s not the prob...

....... Ummmm, Wait a sec!!! I had F12 take the shots. I think I''d better put a time delay between shots. That might be it. I''ll do that when I get home.



- Rob Loach
Current Project: Upgrade to .NET and DirectX 9

"Do or do not. There is no try."
- Yoda

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!