![]() |
![]() |
![]() |
Device.GetRenderTarget Method |
Language: |
Retrieves a render target surface.
Visual Basic .NET Public Function GetRenderTarget( _
ByVal renderTargetIndex As Integer _
) As SurfaceC# public Surface GetRenderTarget(
int renderTargetIndex
);Managed C++ public: Surface* GetRenderTarget(
int renderTargetIndex
);JScript .NET public function GetRenderTarget(
renderTargetIndex : int
) : Surface;
renderTargetIndex System.Int32. Index of the render target. See Remarks.
Microsoft.DirectX.Direct3D.Surface . A Surface that represents the returned render target surface for the current device.
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.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center