Skip to main content
gamedev.net
🔒 Locked

Capturing a from screen

Started by shvalb 1 reply 350+ views
Original Post
shvalb
shvalb
Hi. I have a program that render geometry shapes to the screen and creates an Avi file from it. the creation of the file is done like this: CreateOffscreenPlainSurface() - Creates a surface to hold the front buffer GetFrontBufferData() - gets the front buffer and saves it to a file LPD3DXBUFFER - declares a buffer D3DXSaveSurfaceToFileInMemory - saves front surface buffer to a PD3DXBUFFER buffer. and few more steps The result of it is that the rendered screen is being captured to a file, which is good, but!, if while the screen is being rendered I switch to a different application it captures the different application rather than the desired one. How can I copy the front buffer data to a file without involving the screen ?? is there a way ?? Thanks alot!
DBX
DBX
The front buffer is the screen. I suspect what you really want is to capture the back buffer before presenting it, or just render to a texture and save that.
__Daedalus__
__Daedalus__
Create an off screen render target and use that instead of the front buffer. Look at the CreateRenderTarget() and SetRenderTarget() methods of IDirect3DDevice9

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.