Device.CreateRenderTarget Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
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
)
member CreateRenderTarget :
width:int *
height:int *
format:Format *
multiSampleType:MultiSampleType *
lockable:bool -> Surface
Parameters
- width
Type: System.Int32
The width of the render-target surface, in pixels.
- height
Type: System.Int32
The height of the render-target surface, in pixels.
- format
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Format
A member of the Format enumerated type that describes the format of the render target.
- multiSampleType
Type: Microsoft.WindowsMobile.DirectX.Direct3D.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
Type: System.Boolean
Set to true if render targets are lockable; otherwise, false. Note that lockable render targets reduce performance on some graphics hardware.
Return Value
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Surface
A Surface.
Exceptions
Exception | Condition |
---|---|
NotAvailableException | The device does not support the queried multisample type. |
InvalidCallException | The method call is invalid. For example, a parameter might contain an invalid value. |
OutOfMemoryException | 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 Using Libraries from Partially Trusted Code.
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0