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
Not applicable.
Parameters
- width
The width of the render-target surface, in pixels.
- height
The height of the render-target surface, in pixels.
- format
A member of the Format enumerated type that describes the format of the render target.
- 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
Set to true if render targets are lockable; otherwise, false. Note that lockable render targets reduce performance on some graphics hardware.
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.
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Device Class
Device Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace