• Advertisement
Sign in to follow this  

DX9 render targets

This topic is 2422 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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:

for each window
win->swapChainWindow->getBackBuffer(&backBuffer);
device->setRenderTarget(backbuffer);
device->begin();
render stuff
device->end();
win->swapChainWindow->present();

When I want to render into the render texture the code looks like this:

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()?

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
Advertisement
Sign in to follow this  

  • Advertisement