Microsoft DirectX 9.0 SDK Update (October 2004)

Device.GetRenderTarget Method

Language:

Note: This documentation is preliminary and is subject to change.

Retrieves a render target surface.

Definition

Visual Basic .NET Public Function GetRenderTarget( _
    ByVal renderTargetIndex As Integer _
) As Surface
C# public Surface GetRenderTarget(
    int renderTargetIndex
);
Managed C++ public: Surface* GetRenderTarget(
    int renderTargetIndex
);
JScript .NET 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
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.
NotFoundException No render target is available for the given index.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center