28 #ifndef __D3D11HARDWAREINDEXBUFFER_H__
29 #define __D3D11HARDWAREINDEXBUFFER_H__
54 void readData(
size_t offset,
size_t length,
void* pDest);
55 void writeData(
size_t offset,
size_t length,
const void* pSource,
56 bool discardWholeBuffer =
false);
59 size_t dstOffset,
size_t length,
bool discardWholeBuffer =
false);
void * lockImpl(size_t offset, size_t length, LockOptions options)
Internal implementation of lock()
void unlockImpl(void)
Internal implementation of unlock()
void copyData(HardwareBuffer &srcBuffer, size_t srcOffset, size_t dstOffset, size_t length, bool discardWholeBuffer=false)
Copy data from another buffer into this one.
void writeData(size_t offset, size_t length, const void *pSource, bool discardWholeBuffer=false)
Writes data to the buffer from an area of system memory; note that you must ensure that your buffer i...
bool recreateIfDefaultPool(D3D11Device &device)
For dealing with lost devices - recreate the resource if in the default pool.
Specialisation of HardwareBuffer for vertex index buffers, still abstract.
void unlock(void)
Releases the lock on this buffer.
LockOptions
Locking options.
~D3D11HardwareIndexBuffer()
void readData(size_t offset, size_t length, void *pDest)
Reads data from the buffer and places it in the memory pointed to by pDest.
Base definition of a hardware buffer manager.
Usage
Enums describing buffer usage; not mutually exclusive.
void * lock(size_t offset, size_t length, LockOptions options)
Lock the buffer for (potentially) reading / writing.
bool releaseIfDefaultPool(void)
For dealing with lost devices - release the resource if in the default pool.
D3D11HardwareBuffer * mBufferImpl
Abstract class defining common features of hardware buffers.
ID3D11Buffer * getD3DIndexBuffer(void) const
Get the D3D-specific index buffer.
Base implementation of a D3D11 buffer, dealing with all the common aspects.
bool isLocked(void) const
D3D11HardwareIndexBuffer(HardwareBufferManagerBase *mgr, IndexType idxType, size_t numIndexes, HardwareBuffer::Usage usage, D3D11Device &device, bool useSystemMem, bool useShadowBuffer)