directx-11render-to-texturerendertarget

Set a Render Target View to part of a texture direct X 11


I want to render to part of a texture in direct x 11.

Is there a simple way to just set the render target view to part of the texture?

If not, is there a better way. Thanks!


Solution

    1. OMSetRenderTargets to the render target you want to use
    2. RSSetViewports to the viewport on the RT you want to render to.
    3. RSSetScissorRects to ensure things are properly clipped to your viewport.