Share via


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 function CreateRenderTarget(
    width : int, 
    height : int, 
    format : Format, 
    multiSampleType : MultiSampleType, 
    lockable : boolean
) : 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.

  • 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

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

See Also

Reference

Device Class

Device Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace