common questions :take a screenshot?
how i can made a screenshot using code?
-----------------------------------------------
"Cuando se es peon, la unica salida es la revolución"
Assuming it is a screenshot of _your_ program : Lock()ing the drawing surface will yield you a pointer to the video buffer. Use the data in the buffer to build a file in a recognizable gfx format and save it.
If its not your program, I don''t know.
If its not your program, I don''t know.
This website is where I learned how to take screenshots and save them to bitmap:
http://www.geocities.com/foetsch/screenshot/screenshot.htm
http://www.geocities.com/foetsch/screenshot/screenshot.htm
tnk.
-----------------------------------------------
"Cuando se es peon, la unica salida es la revolución"
-----------------------------------------------
"Cuando se es peon, la unica salida es la revolución"
What a horribly messy way to do it. Try this much simpler call: D3DXSaveSurfaceToFile. Here''s what you might do:
LPDIRECT3DSURFACE8 pTempBB;
D3DDevice->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, &pTempBB );
D3DXSaveSurfaceToFile( );<br>pTempBB->Release();<br>With a bit of clever coding you can detect whether a file exists or not, and use scrnshotX.bmp and increment X each time. When i get home ill post the full code. <br><br>—————————–<br>The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
LPDIRECT3DSURFACE8 pTempBB;
D3DDevice->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, &pTempBB );
D3DXSaveSurfaceToFile( );<br>pTempBB->Release();<br>With a bit of clever coding you can detect whether a file exists or not, and use scrnshotX.bmp and increment X each time. When i get home ill post the full code. <br><br>—————————–<br>The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement