OGRE: Ogre::GLES2MultiSourceVertexBufferPool Class Reference

| OGRE 2.2.4 Object-Oriented Graphics Rendering Engine

Public Member Functions | List of all members
Ogre::GLES2MultiSourceVertexBufferPool Class Reference

`#include <OgreGLES2MultiSourceVertexBufferPool.h>`

Inheritance diagram for Ogre::GLES2MultiSourceVertexBufferPool:
[legend]

## Public Member Functions
| GLES2MultiSourceVertexBufferPool (size_t vboPoolIndex, GLuint vboName, const VertexElement2VecVec &vertexElementsBySource, size_t maxVertices, BufferType bufferType, size_t internalBufferStart, VaoManager *vaoManager)
virtual | ~GLES2MultiSourceVertexBufferPool ()
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, 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 More...
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
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 More...

## Constructor & Destructor Documentation

## ◆ GLES2MultiSourceVertexBufferPool()

Ogre::GLES2MultiSourceVertexBufferPool::GLES2MultiSourceVertexBufferPool | ( | size_t | vboPoolIndex,
|  | GLuint | vboName,
|  | const VertexElement2VecVec & | vertexElementsBySource,
|  | size_t | maxVertices,
|  | BufferType | bufferType,
|  | size_t | internalBufferStart,
|  | VaoManager * | vaoManager
| ) |  |

## ◆ ~GLES2MultiSourceVertexBufferPool()

virtual Ogre::GLES2MultiSourceVertexBufferPool::~GLES2MultiSourceVertexBufferPool | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ createVertexBuffers()

void Ogre::GLES2MultiSourceVertexBufferPool::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. @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:

- OgreGLES2MultiSourceVertexBufferPool.h