public class DynamicVertexBuffer extends VertexBuffer
Modifier and Type | Field and Description |
---|---|
Event<EventArgs> |
ContentLost
Occurs when resources are lost due to a lost device event.
|
_usage
_parent, Disposing, Name, Tag
Constructor and Description |
---|
DynamicVertexBuffer(GraphicsDevice graphicsDevice,
java.lang.Class vertexType,
int vertexCount,
BufferUsage usage)
Creates a new instance of this object.
|
DynamicVertexBuffer(GraphicsDevice graphicsDevice,
VertexDeclaration vertexDeclaration,
int vertexCount,
BufferUsage usage)
Creates a new instance of this object.
|
Modifier and Type | Method and Description |
---|---|
<T extends ValueType> |
SetData(int offsetInBytes,
T[] data,
int startIndex,
int elementCount,
int vertexStride,
SetDataOptions options)
Sets dynamic vertex buffer data, specifying the offset, start index, number of elements and vertex stride.
|
<T extends ValueType> |
SetData(T[] data,
int startIndex,
int elementCount,
SetDataOptions options)
Sets dynamic vertex buffer data, specifying the start index, number of elements and options.
|
getBufferUsage, GetData, GetData, GetData, getVertexDeclaration, SetData, SetData, SetData, toString, VertexCount
Dispose, Dispose, finalize, getGraphicsDevice, IsDisposed, raise_disposing
public DynamicVertexBuffer(GraphicsDevice graphicsDevice, VertexDeclaration vertexDeclaration, int vertexCount, BufferUsage usage)
graphicsDevice
- The graphics device.vertexDeclaration
- The vertex declaration, which describes per-vertex data.vertexCount
- The number of vertices.usage
- Behavior options; it is good practice for this to match the createOptions parameter in the GraphicsDevice constructor.public DynamicVertexBuffer(GraphicsDevice graphicsDevice, java.lang.Class vertexType, int vertexCount, BufferUsage usage)
graphicsDevice
- The graphics device.vertexType
- The data type.vertexCount
- The number of vertices.usage
- Behavior options; it is good practice for this to match the createOptions parameter in the GraphicsDevice constructor.public <T extends ValueType> void SetData(T[] data, int startIndex, int elementCount, SetDataOptions options)
data
- Array of data.startIndex
- The first element to use.elementCount
- The number of elements to use.options
- Specifies whether existing data in the buffer will be kept after this operation. Dynamic geometry may be rendered on the Xbox 360 by using DrawUserIndexedPrimitives instead of setting the data for the vertex buffer.public <T extends ValueType> void SetData(int offsetInBytes, T[] data, int startIndex, int elementCount, int vertexStride, SetDataOptions options)
offsetInBytes
- data
- Array of data.startIndex
- The first element to use.elementCount
- The number of elements to use.vertexStride
- The size, in bytes, of the elements in the vertex buffer.options
- Specifies whether existing data in the buffer will be kept after this operation. Dynamic geometry may be rendered on the Xbox 360 by using DrawUserIndexedPrimitives instead of setting the data for the vertex buffer.