Sign in to follow this  
luasitdown

How to get back buffer ?

Recommended Posts

I know now.
HRESULT GetBackBuffer( UINT iSwapChain,
UINT BackBuffer,
D3DBACKBUFFER_TYPE Type,
IDirect3DSurface9 **ppBackBuffer
);

but what is different between iSwapChain and BackBuffer??

Share this post


Link to post
Share on other sites
When the render-target is first initialized it will be the backbuffer, so the best way to get the backbuffer is to use d3dDevice->GetRenderTarget() and save it to a variable. Mine looks like this


LPDIRECT3DSURFACE9 g_pBackBuffer;


From then on you can switch to or refer to the backbuffer with this pointer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this