Setting the render target back

Started by
1 comment, last by LevyDee 12 years ago
I might be missing something here, or my brain not working, but after rendering to different surfaces for post processing ect... how would you set the render target back to the back buffer?

Right now, I am doing this

IDirect3DSurface9* backBuffer;
_d3dDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE::D3DBACKBUFFER_TYPE_MONO, &backBuffer);
_d3dDevice->SetRenderTarget(0, backBuffer);


This works, but it feels completely wrong.

What am I missing here?

Thanks!
Advertisement
Nope, that's more or less correct (the only thing you're missing is a Release call after you set back - without it you'll leak the IDirect3DSurface9 - and some error checking).

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

interesting lol. Thanks for response.

This topic is closed to new replies.

Advertisement