Sign in to follow this  
schupf

DX9 render targets

Recommended Posts

Hello,

in D3D9 a Win32 window and a texture could be considered as render targets (something I can render into). Let's say I have 3 windows and 1 render texture (a texture I want to render into).
If I want to render into any of the windows, the code (pseudo!) is basically this:
[code]
for each window
win[i]->swapChainWindow->getBackBuffer(&backBuffer);
device->setRenderTarget(backbuffer);
device->begin();
render stuff
device->end();
win[i]->swapChainWindow->present();
[/code]
When I want to render into the render texture the code looks like this:
[code]
renderTexture->getSurface(0. &backBuffer);
device->setRenderTarget(backbuffer);
device->begin();
render stuff
device->end();
// Now the texture is alreay updated? No need for a call to Present()?
[/code]
So in order to update the render texture I do NOT have to call Present()? Are my assumptions correct?

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