IndexBuffer.IndexBuffer Constructor |
Language: |
Creates a new instance of the IndexBuffer class.
Visual Basic Public Sub New( _
ByVal unmanagedObject As IntPtr _
)C# public IndexBuffer(
IntPtr unmanagedObject
);C++ public:
IndexBuffer(
IntPtr unmanagedObject
);JScript public function IndexBuffer(
unmanagedObject : IntPtr
);
unmanagedObject System.IntPtr
Pointer to an unmanaged Component Object Model (COM) IDirect3DIndexBuffer9 interface. This parameter is useful for working with unmanaged applications from managed code. Not supported.
Index buffers are memory resources used to hold indices. They are similar to surfaces and vertex buffers. The use of index buffers enables Microsoft Direct3D to avoid unnecessary data copying and to place the buffer in the optimal memory type for the expected usage.
To use index buffers, create an index buffer, lock it, fill it with indices, unlock it, pass it to Device.Indices, set up the vertices, set up the vertex shader, and call Device.DrawIndexedPrimitives for rendering.
The Caps.MaxVertexIndex member indicates the types of index buffers that are valid for rendering.
Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value. InvalidDataException The data is invalid. OutOfVideoMemoryException Direct3D does not have enough display memory to perform the operation. OutOfMemoryException Direct3D could not allocate sufficient memory to complete the call.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center