IGpuBuffer
Description
- Derived from
- Extended by
-
GpuBufferBase abstract
IIndexBuffer
IVertexBuffer
A GPU buffer, storing elements of fixed size, typically stored in high-performance memory.
Buffer data is written in binary form.
A buffer may have an element size of zero (see ElementSize). In this case, the buffer has an undefined structure and is used as a raw byte buffer.
Public / Methods
BufferMap
Maps a region of this buffer for writing.
This is the preferred way of updating a GPU buffer with ResourceAccessPattern.Mappable access.
This method can also be used on GPU buffers with ResourceAccessPattern.Dynamic access. In this case, the implementing class will transparently map the API calls to BufferUpdate.
- See also
BufferPrepare
Prepares the buffer that has been returned by BufferMap for writing to a range of elements resp. bytes.
This method may only be called between calls to BufferMap and BufferUnmap.
- See also
BufferUnmap
Unmaps a this buffer.
Calling BufferUnmap on a buffer that cannot be locked (i.e. GpuBufferFlags.Update is not present) or without a prior call to BufferMap does not have any effect, the method just returns silently.
- See also
BufferUpdate
Updates a range of elements in the buffer.
To prevent an overflow in the GPU buffer, the given data will be truncated by reducing the count in parameter, if necessary. The calling code is responsible for preventing a buffer underflow of values in.
This is the preferred way of updating a GPU buffer with ResourceAccessPattern.Dynamic access.
This method can also be used on GPU buffers with ResourceAccessPattern.Mappable access. In this case, the implementing class will transparently map the API calls to BufferMap, BufferPrepare and BufferUnmap.
- See also
BufferUpdateArray
Updates a range of 32-bit integer values in the buffer.
This method assumes that this buffer has an element size of 4 bytes. If the buffer has a different element size, it will return silently. This method is usually used in conjunction with IIndexBuffers, which always have an element size of 4 bytes.
To prevent an overflow in the GPU buffer, the given data will be truncated by reducing the count in parameter, if necessary. The calling code is responsible for preventing a buffer underflow of values in.
This is the preferred way of updating a GPU buffer with ResourceAccessPattern.Dynamic access.
This method can also be used on GPU buffers with ResourceAccessPattern.Mappable access. In this case, the implementing class will transparently map the API calls to BufferMap, BufferPrepare and BufferUnmap.