OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::MetalMultiSourceVertexBufferPool Class Reference

#include <OgreMetalMultiSourceVertexBufferPool.h>

+ Inheritance diagram for Ogre::MetalMultiSourceVertexBufferPool:

Public Member Functions

 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.
 
void destroyVertexBuffers (VertexBufferPackedVec &inOutVertexBuffers)
 Destroys all the buffers returned from a call to createVertexBuffers.
 
size_t getBytesOffsetToSource (uint8 sourceIdx) const
 
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 *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 

Constructor & Destructor Documentation

◆ 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

Member Function Documentation

◆ 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).
numVerticesThe number of vertices for these vertex buffer.
initialDataInitial 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
keepAsShadowWhether to keep the pointer "initialData" as a shadow copy of the contents. @See 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]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
void  
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/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() [3/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/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


The documentation for this class was generated from the following file: