Device.GetRenderTarget(Int32) Method (Microsoft.DirectX.Direct3D)
Retrieves a render target surface.
Definition
Visual Basic Public Function GetRenderTarget( _
ByVal renderTargetIndex As Integer _
) As SurfaceC# public Surface GetRenderTarget(
int renderTargetIndex
);C++ public:
Surface^ GetRenderTarget(
int renderTargetIndex
);JScript public function GetRenderTarget(
renderTargetIndex : int
) : Surface;
Parameters
renderTargetIndex System.Int32
Index of the render target. See Remarks.
Return Value
Microsoft.DirectX.Direct3D.Surface
A Surface that represents the returned render target surface for the current device.
Remarks
Typically, methods that return state do not work on devices created using PureDevice. This method, however, is an exception because it returns an interface.
The device can support multiple render targets. The number of render targets supported by a device is contained in the Caps.NumberSimultaneousRts member.
Exceptions
The method call is invalid. For example, a method's parameter might contain an invalid value.
No render target is available for the given index.
See Also