#include <OgreMetalMultiSourceVertexBufferPool.h>
|
| MetalMultiSourceVertexBufferPool (size_t vboPoolIndex, id< MTLBuffer > vboName, const VertexElement2VecVec &vertexElementsBySource, size_t maxVertices, BufferType bufferType, size_t internalBufferStart, VaoManager *vaoManager) |
|
virtual | ~MetalMultiSourceVertexBufferPool () |
|
void | createVertexBuffers (VertexBufferPackedVec &outVertexBuffers, size_t numVertices, void *const *initialData, bool keepAsShadow) |
| Creates a vertex buffer based on the given parameters. More...
|
|
void | destroyVertexBuffers (VertexBufferPackedVec &inOutVertexBuffers) |
| Destroys all the buffers returned from a call to createVertexBuffers. More...
|
|
size_t | getBytesOffsetToSource (uint8 sourceIdx) const |
|
void | operator delete (void *ptr) |
|
void | operator delete (void *ptr, void *) |
|
void | operator delete (void *ptr, const char *, int, const char *) |
|
void | operator delete[] (void *ptr) |
|
void | operator delete[] (void *ptr, const char *, int, const char *) |
|
void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info More...
|
|
void * | operator new (size_t sz) |
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new More...
|
|
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info More...
|
|
void * | operator new[] (size_t sz) |
|
◆ MetalMultiSourceVertexBufferPool()
Ogre::MetalMultiSourceVertexBufferPool::MetalMultiSourceVertexBufferPool |
( |
size_t |
vboPoolIndex, |
|
|
id< MTLBuffer > |
vboName, |
|
|
const VertexElement2VecVec & |
vertexElementsBySource, |
|
|
size_t |
maxVertices, |
|
|
BufferType |
bufferType, |
|
|
size_t |
internalBufferStart, |
|
|
VaoManager * |
vaoManager |
|
) |
| |
◆ ~MetalMultiSourceVertexBufferPool()
virtual Ogre::MetalMultiSourceVertexBufferPool::~MetalMultiSourceVertexBufferPool |
( |
| ) |
|
|
virtual |
◆ createVertexBuffers()
void Ogre::MetalMultiSourceVertexBufferPool::createVertexBuffers |
( |
VertexBufferPackedVec & |
outVertexBuffers, |
|
|
size_t |
numVertices, |
|
|
void *const * |
initialData, |
|
|
bool |
keepAsShadow |
|
) |
| |
|
virtual |
Creates a vertex buffer based on the given parameters.
Behind the scenes, the vertex buffer is part of much larger vertex buffer, in order to reduce bindings at runtime.
- Parameters
-
outVertexBuffers | [out] A list of the generated vertex buffers, one per buffer source in mVertexElementsPerSource. WARNING: Can be empty if the pool is out of memory or too fragmented to honour this request, in which case you need to use another pool (or free some memory from this pool). |
numVertices | The number of vertices for these vertex buffer. |
initialData | Initial data the buffer will hold upon creation. Can be null (i.e. you plan to upload later). Cannot be null when bufferType is BT_IMMUTABLE. Must have enough room to prevent an overflow. If non-null, the buffer must hold enough data for each vertex buffers. E.g. If mVertexElementsPerSource.size() == 3 then this is valid: initialData = 0; This is also valid: initialData[0] = buffer[numVertices * sumOfBytes(mVertexElementsPerSource[0])]; initialData[1] = 0; //Unless bufferType == BT_IMMUTABLE initialData[2] = buffer[numVertices * sumOfBytes(mVertexElementsPerSource[2])]; |
This is invalid: initialData[0] = whatever; initialData[1] = out of bounds;
- Parameters
-
keepAsShadow | Whether to keep the pointer "initialData" as a shadow copy of the contents. BufferPacked::BufferPacked regarding on who is responsible for freeing this pointer and what happens if an exception was raised. |
- Returns
- The desired vertex buffer pointer
Implements Ogre::MultiSourceVertexBufferPool.
◆ destroyVertexBuffers()
void Ogre::MultiSourceVertexBufferPool::destroyVertexBuffers |
( |
VertexBufferPackedVec & |
inOutVertexBuffers | ) |
|
|
inherited |
Destroys all the buffers returned from a call to createVertexBuffers.
All the returned buffers from that call must be supplied. Not one more, not one less. They can be in any order, though.
- Parameters
-
inOutVertexBuffers | [in] [out] In: The list of buffers that was returned by createVertexBuffers. Can be sorted in any order Out: Cleared list. |
◆ getBytesOffsetToSource()
size_t Ogre::MultiSourceVertexBufferPool::getBytesOffsetToSource |
( |
uint8 |
sourceIdx | ) |
const |
|
inherited |
◆ operator delete() [1/3]
◆ operator delete() [2/3]
◆ operator delete() [3/3]
◆ operator delete[]() [1/2]
◆ operator delete[]() [2/2]
◆ operator new() [1/3]
template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new |
( |
size_t |
sz, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
func |
|
) |
| |
|
inlineinherited |
operator new, with debug line info
◆ operator new() [2/3]
◆ operator new() [3/3]
◆ operator new[]() [1/2]
template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] |
( |
size_t |
sz, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
func |
|
) |
| |
|
inlineinherited |
array operator new, with debug line info
◆ operator new[]() [2/2]
The documentation for this class was generated from the following file: