VertexBuffer イベント
パブリック イベント| 名前 | 説明 | |
|---|---|---|
| Created | デバイスがリセットされ、VertexBuffer が再作成された後に発生します。 |
| Disposing | Dispose メソッドが呼び出されたか、または VertexBuffer オブジェクトが終了してガベージ コレクタによって収集されたときに発生します。 |
参照VertexBuffer クラス
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)
構文Public Class VertexBuffer Inherits Resource Implements IDisposable
public class VertexBuffer : Resource, IDisposable
public class VertexBuffer extends Resource implements IDisposable
public class VertexBuffer extends Resource implements IDisposable
解説
使用例頂点を格納するための頂点バッファを作成するコード例を次に示します。
' This code example is taken from the ' Direct3D Mobile Vertices Sample ' of the .NET Compact Framework Samples ' in the .NET Framework SDK Samples. Public 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 .NET Framework SDK Samples. public 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); }
継承階層Microsoft.WindowsMobile.DirectX.Direct3D.BaseMesh
Microsoft.WindowsMobile.DirectX.Direct3D.Resource
Microsoft.WindowsMobile.DirectX.Direct3D.BaseTexture
Microsoft.WindowsMobile.DirectX.Direct3D.VertexBuffer
スレッド セーフ
プラットフォームWindows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照VertexBuffer コンストラクタ
オーバーロードの一覧| 名前 | 説明 |
|---|---|
| VertexBuffer (Device, Int32, Usage, VertexFormats, Pool) | VertexBuffer クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
| VertexBuffer (Type, Int32, Device, Usage, VertexFormats, Pool) | .NET Compact Framework によってサポートされています。 |
参照VertexBuffer コンストラクタ (Device, Int32, Usage, VertexFormats, Pool)
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)
構文Public Sub New ( _ device As Device, _ sizeOfBufferInBytes As Integer, _ usage As Usage, _ vertexFormat As VertexFormats, _ pool As Pool _ )
Dim device As Device Dim sizeOfBufferInBytes As Integer Dim usage As Usage Dim vertexFormat As VertexFormats Dim pool As Pool Dim instance As New VertexBuffer(device, sizeOfBufferInBytes, usage, vertexFormat, pool)
public VertexBuffer ( Device device, int sizeOfBufferInBytes, Usage usage, VertexFormats vertexFormat, Pool pool )
public: VertexBuffer ( Device^ device, int sizeOfBufferInBytes, Usage usage, VertexFormats vertexFormat, Pool pool )
public VertexBuffer ( Device device, int sizeOfBufferInBytes, Usage usage, VertexFormats vertexFormat, Pool pool )
public function VertexBuffer ( device : Device, sizeOfBufferInBytes : int, usage : Usage, vertexFormat : VertexFormats, pool : Pool )
- sizeOfBufferInBytes
頂点バッファのサイズ (バイト単位)。vertexFormat が 0 に設定された場合、sizeOfBufferInBytes は少なくとも 1 つの頂点を格納できる大きさである必要がありますが、頂点サイズの倍数である必要はありません。vertexFormat が 0 以外に設定されている場合は、sizeOfBufferInBytes は検証されません。解説を参照してください。
例外
解説Device は、頂点バッファ オブジェクトに格納された頂点データを使用するプリミティブのレンダリングをサポートします。頂点バッファは Device から作成され、頂点バッファの作成元になった Device でのみ使用できます。
.NET Framework のセキュリティ
プラットフォームWindows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照VertexBuffer コンストラクタ (Type, Int32, Device, Usage, VertexFormats, Pool)
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)
構文Public Sub New ( _ typeVertexType As Type, _ numVerts As Integer, _ device As Device, _ usage As Usage, _ vertexFormat As VertexFormats, _ pool As Pool _ )
Dim typeVertexType As Type Dim numVerts As Integer Dim device As Device Dim usage As Usage Dim vertexFormat As VertexFormats Dim pool As Pool Dim instance As New VertexBuffer(typeVertexType, numVerts, device, usage, vertexFormat, pool)
public VertexBuffer ( Type typeVertexType, int numVerts, Device device, Usage usage, VertexFormats vertexFormat, Pool pool )
public: VertexBuffer ( Type^ typeVertexType, int numVerts, Device^ device, Usage usage, VertexFormats vertexFormat, Pool pool )
public VertexBuffer ( Type typeVertexType, int numVerts, Device device, Usage usage, VertexFormats vertexFormat, Pool pool )
public function VertexBuffer ( typeVertexType : Type, numVerts : int, device : Device, usage : Usage, vertexFormat : VertexFormats, pool : Pool )
パラメータ
例外
解説Device は、頂点バッファ オブジェクトに格納された頂点データを使用するプリミティブのレンダリングをサポートします。頂点バッファは Device から作成され、頂点バッファの作成元になった Device でのみ使用できます。
.NET Framework のセキュリティ
プラットフォームWindows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照VertexBuffer プロパティ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| Device | リソースに関連付けられているデバイスを取得します。 ( Resource から継承されます。) |
| Priority | 現在のリソースの優先順位を取得または設定します。 ( Resource から継承されます。) |
| Type | リソースの種類を取得します。 ( Resource から継承されます。) |
参照VertexBuffer メソッド
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| Dispose | VertexBuffer によって使用されているすべてのリソースを解放します。 |
| Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
| GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
| GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
| Lock | オーバーロードされます。 頂点データの範囲をロックし、頂点バッファ メモリを取得します。 |
| PreLoad | マネージ リソースをプリロードします。 ( Resource から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
| SetData | 頂点データの範囲をロック、設定、およびロック解除します。 |
| ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |
| Unlock | 頂点データのロックを解除します。 |
プロテクト メソッド
参照VertexBuffer メンバ
VertexBuffer データ型で公開されるメンバを以下の表に示します。
パブリック コンストラクタ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| Device | リソースに関連付けられているデバイスを取得します。(Resource から継承されます。) |
| Priority | 現在のリソースの優先順位を取得または設定します。(Resource から継承されます。) |
| Type | リソースの種類を取得します。(Resource から継承されます。) |
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| Dispose | VertexBuffer によって使用されているすべてのリソースを解放します。 |
| Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
| GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
| GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
| Lock | オーバーロードされます。 頂点データの範囲をロックし、頂点バッファ メモリを取得します。 |
| PreLoad | マネージ リソースをプリロードします。 (Resource から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
| SetData | 頂点データの範囲をロック、設定、およびロック解除します。 |
| ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |
| Unlock | 頂点データのロックを解除します。 |
プロテクト メソッド
パブリック イベント| 名前 | 説明 | |
|---|---|---|
| Created | デバイスがリセットされ、VertexBuffer が再作成された後に発生します。 |
| Disposing | Dispose メソッドが呼び出されたか、または VertexBuffer オブジェクトが終了してガベージ コレクタによって収集されたときに発生します。 |
参照- VertexBufferのページへのリンク