Condividi tramite


Classe VertexBuffer

Aggiornamento: novembre 2007

Modifica le risorse vertex buffer.

Spazio dei nomi:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Sintassi

'Dichiarazione
Public Class VertexBuffer _
    Inherits Resource _
    Implements IDisposable
'Utilizzo
Dim instance As VertexBuffer
public class VertexBuffer : Resource, 
    IDisposable
public ref class VertexBuffer : public Resource, 
    IDisposable
public class VertexBuffer extends Resource implements IDisposable

Note

Questo oggetto eredita funzionalità aggiuntive dall'oggetto Resource.

Esempi

Nell'esempio di codice riportato di seguito viene illustrato come creare un vertex buffer per l'archiviazione dei vertici.

' This code example is taken from the
' Direct3D Mobile Vertices Sample
' of the .NET Compact Framework Samples in the SDK.

Private Sub OnCreateDevice(ByVal sender As Object, ByVal e As EventArgs) 
    Dim dev As Device = CType(sender, Device)
    ' Create the vertex buffer.
    vertexBuffer = New VertexBuffer(GetType(CustomVertex.TransformedColored), 3, dev, 0, CustomVertex.TransformedColored.Format, Pool.Managed)
    AddHandler vertexBuffer.Created, AddressOf Me.OnCreateVertexBuffer
    Me.OnCreateVertexBuffer(vertexBuffer, Nothing)

End Sub
// This code example is taken from the
// Direct3D Mobile Vertices Sample
// of the .NET Compact Framework Samples in the SDK.

    private void OnCreateDevice(object sender, EventArgs e)
    {
        Device dev = (Device)sender;
        // Now Create the VB
        vertexBuffer = new VertexBuffer(typeof(CustomVertex.TransformedColored), 3, dev, 0, CustomVertex.TransformedColored.Format, Pool.Managed);
        vertexBuffer.Created += new System.EventHandler(this.OnCreateVertexBuffer);
        this.OnCreateVertexBuffer(vertexBuffer, null);
    }

Gerarchia di ereditarietà

System.Object
  Microsoft.WindowsMobile.DirectX.Direct3D.Resource
    Microsoft.WindowsMobile.DirectX.Direct3D.VertexBuffer

Codice thread safe

Qualsiasi membro static (Shared in Visual Basic) pubblico di questo tipo è thread-safe. I membri di istanza non sono garantiti come thread-safe.

Piattaforme

Windows CE, Windows Mobile per Smartphone, Windows Mobile per Pocket PC

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Compact Framework

Supportato in: 3.5, 2.0

Vedere anche

Riferimenti

Membri VertexBuffer

Spazio dei nomi Microsoft.WindowsMobile.DirectX.Direct3D

Altre risorse

Programmazione per Mobile Direct3D in .NET Compact Framework