|
| BufferPacked (size_t internalBufferStartBytes, size_t numElements, uint32 bytesPerElement, uint32 numElementsPadding, BufferType bufferType, void *initialData, bool keepAsShadow, VaoManager *vaoManager, BufferInterface *bufferInterface) |
| Generic constructor.
|
|
virtual | ~BufferPacked () |
|
size_t | _getFinalBufferStart (void) const |
|
size_t | _getInternalBufferStart (void) const |
|
size_t | _getInternalNumElements (void) const |
|
size_t | _getInternalTotalSizeBytes (void) const |
|
void | _setBufferInterface (BufferInterface *bufferInterface) |
| For internal use.
|
|
void | _setShadowCopy (void *copy) |
| This will not delete the existing shadow copy so it can be used for other purposes if it is not needed call OGRE_FREE_SIMD( m->getShadowCopy(), MEMCATEGORY_GEOMETRY ) before calling this function.
|
|
void | advanceFrame (void) |
|
BufferInterface * | getBufferInterface (void) const |
|
virtual BufferPackedTypes | getBufferPackedType (void) const =0 |
| Useful to query which one is the derived class.
|
|
BufferType | getBufferType (void) const |
|
size_t | getBytesPerElement (void) const |
|
MappingState | getMappingState (void) const |
| Returns the mapping state.
|
|
size_t | getNumElements (void) const |
|
const void * | getShadowCopy (void) const |
|
size_t | getTotalSizeBytes (void) const |
|
bool | isCurrentlyMapped (void) const |
| Returns whether the buffer is currently mapped.
|
|
void *RESTRICT_ALIAS_RETURN | map (size_t elementStart, size_t elementCount, bool bAdvanceFrame=true) |
| Maps the specified region to a pointer the CPU can access.
|
|
void | operator delete (void *ptr) |
|
void | operator delete (void *ptr, const char *, int, const char *) |
|
void | operator delete (void *ptr, void *) |
|
void | operator delete[] (void *ptr) |
|
void | operator delete[] (void *ptr, const char *, int, const char *) |
|
void * | operator new (size_t sz) |
|
void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info
|
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new
|
|
void * | operator new[] (size_t sz) |
|
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info
|
|
AsyncTicketPtr | readRequest (size_t elementStart, size_t elementCount) |
| Async data read request.
|
|
void | regressFrame (void) |
| Performs the opposite of.
|
|
void | unmap (UnmapOptions unmapOption, size_t flushStartElem=0, size_t flushSizeElem=0) |
| Unmaps or flushes the region mapped with.
|
|
virtual void | upload (const void *data, size_t elementStart, size_t elementCount) |
| Sends the provided data to the GPU.
|
|
Generic constructor.
- Parameters
-
initialData | Initial data to populate. If bufferType == BT_IMMUTABLE, can't be null. |
keepAsShadow | Keeps "intialData" as a shadow copy for reading from CPU without querying the GPU (can be useful for reconstructing buffers on device/context loss or for efficient reading of the data without streaming back from GPU.) |
If keepAsShadow is false, caller is responsible for freeing the data
If keepAsShadow is true, we're responsible for freeing the pointer. We will free the pointer using OGRE_FREE_SIMD( MEMCATEGORY_GEOMETRY ), in which case the pointer must* have been allocated using OGRE_MALLOC_SIMD( MEMCATEGORY_GEOMETRY )
If the constructor throws, then data will NOT be freed, and caller will have to do it.
- See also
- FreeOnDestructor to help you with exceptions and correctly freeing the data.
Must be false if bufferType >= BT_DYNAMIC