GraphicsDevice.SetRenderTarget Method (RenderTargetCube, CubeMapFace)
Sets a new render target for this GraphicsDevice.
Syntax
'Declaration
Public Sub SetRenderTarget ( _
renderTarget As RenderTargetCube, _
cubeMapFace As CubeMapFace _
)
public void SetRenderTarget (
RenderTargetCube renderTarget,
CubeMapFace cubeMapFace
)
public:
void SetRenderTarget(
RenderTargetCube renderTarget,
CubeMapFace cubeMapFace
)
Parameters
- renderTarget
Type: RenderTargetCube
A new render target for the device, or null to set the device render target to the back buffer of the device. - cubeMapFace
Type: CubeMapFace
The cube map face type.
Exceptions
Exception type | Condition |
---|---|
ArgumentException | An invalid render target index was requested. |
ArgumentOutOfRangeException | The render target index must be within the valid range for this device. |
ObjectDisposedException | SetRenderTarget was called after this renderTarget was disposed. |
Remarks
The following restrictions apply when using this method.
- The multisample type must be the same for the render target and the depth stencil surface.
- The formats must be compatible for the render target and the depth stencil surface.
- The size of the depth stencil surface must be greater than or equal to the size of the render target.
These restrictions are validated only when using the debug runtime when any of the GraphicsDevice drawing methods are called.
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
GraphicsDevice Class
GraphicsDevice Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone