SurfaceCaps-Struktur

Dieser Dokumentation für die Vorschau nur ist und in späteren Versionen geändert. Leere Themen wurden als Platzhalter eingefügt.]

Stellt Informationen über Oberflächenfähigkeiten dar.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Structure SurfaceCaps
'Usage
Dim instance As SurfaceCaps
public struct SurfaceCaps
public value class SurfaceCaps
[<SealedAttribute>]
type SurfaceCaps =  struct end

Beispiele

Im folgenden Codebeispiel veranschaulicht die Struktur SurfaceCaps verwenden.

' This code example is taken from the' Direct3D Mobile Texture Sample of the' .NET Compact Framework Samples in the SDK.'' Called whenever the rendering device is createdPrivateSub OnCreateDevice(ByVal sender AsObject, ByVal e As EventArgs) 
    Dim vertexBufferPool As Pool
    Dim caps As Caps
    Dim dev As Device = CType(sender, Device)

    ' Get the device capabilities
    caps = dev.DeviceCaps

    If caps.SurfaceCaps.SupportsVidVertexBuffer Then
        vertexBufferPool = Pool.VideoMemory
    Else
        vertexBufferPool = Pool.SystemMemory
    EndIf    ' Now create the vertex buffer
    vertexBuffer = New VertexBuffer(GetType(CustomVertex.PositionNormalTextured), 100, dev, Usage.WriteOnly, CustomVertex.PositionNormalTextured.Format, vertexBufferPool)
    AddHandler vertexBuffer.Created, AddressOfMe.OnCreateVertexBuffer
    Me.OnCreateVertexBuffer(vertexBuffer, Nothing)

EndSub
// This code example is taken from the// Direct3D Mobile Texture Sample of the// .NET Compact Framework Samples in the SDK.// Called whenever the rendering device is createdvoid OnCreateDevice(object sender, EventArgs e)
{
    Pool vertexBufferPool;
    Caps caps;
    Device dev = (Device)sender;

    // Get the device capabilities

    caps = dev.DeviceCaps;

    if (caps.SurfaceCaps.SupportsVidVertexBuffer)
        vertexBufferPool = Pool.VideoMemory;
    else
        vertexBufferPool = Pool.SystemMemory;

    // Now create the vertex buffer.
    vertexBuffer = new VertexBuffer(
        typeof(CustomVertex.PositionNormalTextured), 100, dev,
        Usage.WriteOnly, CustomVertex.PositionNormalTextured.Format,
        vertexBufferPool);
    vertexBuffer.Created += new System.EventHandler(
        this.OnCreateVertexBuffer);
    this.OnCreateVertexBuffer(vertexBuffer, null);
}

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Plattformen

Windows CE, Windows Mobile für Smartphone, Windows Mobile für Pocket PC

Die .NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET framework.

Versionsinformationen

.NET Compact Framework

Unterstützt in: 3.5, 2.0

Siehe auch

Referenz

Member SurfaceCaps

Microsoft.WindowsMobile.DirectX.Direct3D-Namespace

Weitere Ressourcen

Mobile Direct3D-Programmierung in .NET Compact Framework