Device.CreateRenderTarget Method
Creates a render target surface.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Syntax
'Declaration
Public Function CreateRenderTarget ( _
width As Integer, _
height As Integer, _
format As Format, _
multiSampleType As MultiSampleType, _
lockable As Boolean _
) As Surface
'Usage
Dim instance As Device
Dim width As Integer
Dim height As Integer
Dim format As Format
Dim multiSampleType As MultiSampleType
Dim lockable As Boolean
Dim returnValue As Surface
returnValue = instance.CreateRenderTarget(width, height, format, multiSampleType, lockable)
public Surface CreateRenderTarget (
int width,
int height,
Format format,
MultiSampleType multiSampleType,
bool lockable
)
public:
Surface^ CreateRenderTarget (
int width,
int height,
Format format,
MultiSampleType multiSampleType,
bool lockable
)
public Surface CreateRenderTarget (
int width,
int height,
Format format,
MultiSampleType multiSampleType,
boolean lockable
)
public function CreateRenderTarget (
width : int,
height : int,
format : Format,
multiSampleType : MultiSampleType,
lockable : boolean
) : Surface
Parameters
- width
- height
- format
- multiSampleType
A member of the MultiSampleType enumerated type that describes the multisampling buffer type. This parameter specifies the anti-aliasing type for the render target. When this surface is passed to SetRenderTarget, its multisample type must be the same as that of the depth stencil property DepthStencilSurface.
- lockable
Return Value
A Surface.
Exceptions
Exception type | Condition |
---|---|
The device does not support the queried multisample type. |
|
The method call is invalid. For example a parameter might contain an invalid value. |
|
Direct3D has insufficient memory to complete the call. |
Remarks
A render target surface is a rendering surface. For example, a 3-D renderer writes per-pixel scene data, such as color, to a render target surface.
Render-target surfaces are placed in the Pool memory class. The creation of lockable, multisampled render targets is not supported.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Device Class
Device Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace