Standard implementation of a buffer allocator which re-uses buffers. More...
#include <OgreTerrain.h>

Public Member Functions | |
| DefaultGpuBufferAllocator () | |
| ~DefaultGpuBufferAllocator () | |
| void | allocateVertexBuffers (Terrain *forTerrain, size_t numVertices, HardwareVertexBufferSharedPtr &destPos, HardwareVertexBufferSharedPtr &destDelta) |
| Allocate (or reuse) vertex buffers for a terrain LOD. | |
| void | freeVertexBuffers (const HardwareVertexBufferSharedPtr &posbuf, const HardwareVertexBufferSharedPtr &deltabuf) |
| Free (or return to the pool) vertex buffers for terrain. | |
| HardwareIndexBufferSharedPtr | getSharedIndexBuffer (uint16 batchSize, uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols, uint16 skirtRowColSkip) |
| Get a shared index buffer for a given number of settings. | |
| void | freeAllBuffers () |
| Free any buffers we're holding. | |
| void | warmStart (size_t numInstances, uint16 terrainSize, uint16 maxBatchSize, uint16 minBatchSize) |
| 'Warm start' the allocator based on needing x instances of terrain with the given configuration. | |
| 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 * | operator new (size_t sz, void *ptr) |
| placement operator new | |
| void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info | |
| void * | operator new[] (size_t sz) |
| 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 *) |
Protected Types | |
| typedef list < HardwareVertexBufferSharedPtr > ::type | VBufList |
| typedef map< uint32, HardwareIndexBufferSharedPtr > ::type | IBufMap |
Protected Member Functions | |
| uint32 | hashIndexBuffer (uint16 batchSize, uint16 vdatasize, size_t vertexIncrement, uint16 xoffset, uint16 yoffset, uint16 numSkirtRowsCols, uint16 skirtRowColSkip) |
| HardwareVertexBufferSharedPtr | getVertexBuffer (VBufList &list, size_t vertexSize, size_t numVertices) |
Protected Attributes | |
| VBufList | mFreePosBufList |
| VBufList | mFreeDeltaBufList |
| IBufMap | mSharedIBufMap |
Standard implementation of a buffer allocator which re-uses buffers.
Definition at line 566 of file OgreTerrain.h.
typedef map<uint32, HardwareIndexBufferSharedPtr>::type Ogre::Terrain::DefaultGpuBufferAllocator::IBufMap [protected] |
Definition at line 588 of file OgreTerrain.h.
typedef list<HardwareVertexBufferSharedPtr>::type Ogre::Terrain::DefaultGpuBufferAllocator::VBufList [protected] |
Definition at line 585 of file OgreTerrain.h.
| void Ogre::Terrain::DefaultGpuBufferAllocator::allocateVertexBuffers | ( | Terrain * | forTerrain, |
| size_t | numVertices, | ||
| HardwareVertexBufferSharedPtr & | destPos, | ||
| HardwareVertexBufferSharedPtr & | destDelta | ||
| ) | [virtual] |
Allocate (or reuse) vertex buffers for a terrain LOD.
| numVertices | The total number of vertices |
| destPos | Pointer to a vertex buffer for positions, to be bound |
| destDelta | Pointer to a vertex buffer for deltas, to be bound |
Implements Ogre::Terrain::GpuBufferAllocator.
| void Ogre::Terrain::DefaultGpuBufferAllocator::freeAllBuffers | ( | ) | [virtual] |
Free any buffers we're holding.
Implements Ogre::Terrain::GpuBufferAllocator.
| void Ogre::Terrain::DefaultGpuBufferAllocator::freeVertexBuffers | ( | const HardwareVertexBufferSharedPtr & | posbuf, |
| const HardwareVertexBufferSharedPtr & | deltabuf | ||
| ) | [virtual] |
Free (or return to the pool) vertex buffers for terrain.
Implements Ogre::Terrain::GpuBufferAllocator.
| HardwareIndexBufferSharedPtr Ogre::Terrain::DefaultGpuBufferAllocator::getSharedIndexBuffer | ( | uint16 | batchSize, |
| uint16 | vdatasize, | ||
| size_t | vertexIncrement, | ||
| uint16 | xoffset, | ||
| uint16 | yoffset, | ||
| uint16 | numSkirtRowsCols, | ||
| uint16 | skirtRowColSkip | ||
| ) | [virtual] |
Get a shared index buffer for a given number of settings.
| batchSize | The batch size along one edge |
| vdatasize | The size of the referenced vertex data along one edge |
| vertexIncrement | The number of vertices to increment for each new indexed row / column |
| xoffset | The x offset from the start of vdatasize, at that resolution |
| yoffset | The y offset from the start of vdatasize, at that resolution |
| numSkirtRowsCols | Number of rows and columns of skirts |
| skirtRowColSkip | The number of rows / cols to skip in between skirts |
Implements Ogre::Terrain::GpuBufferAllocator.
| HardwareVertexBufferSharedPtr Ogre::Terrain::DefaultGpuBufferAllocator::getVertexBuffer | ( | VBufList & | list, |
| size_t | vertexSize, | ||
| size_t | numVertices | ||
| ) | [protected] |
| uint32 Ogre::Terrain::DefaultGpuBufferAllocator::hashIndexBuffer | ( | uint16 | batchSize, |
| uint16 | vdatasize, | ||
| size_t | vertexIncrement, | ||
| uint16 | xoffset, | ||
| uint16 | yoffset, | ||
| uint16 | numSkirtRowsCols, | ||
| uint16 | skirtRowColSkip | ||
| ) | [protected] |
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, |
| void * | |||
| ) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, |
| const char * | , | ||
| int | , | ||
| const char * | |||
| ) | [inherited] |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, |
| const char * | , | ||
| int | , | ||
| const char * | |||
| ) | [inherited] |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, |
| const char * | file, | ||
| int | line, | ||
| const char * | func | ||
| ) | [inherited] |
operator new, with debug line info
Definition at line 67 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, |
| void * | ptr | ||
| ) | [inherited] |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, |
| const char * | file, | ||
| int | line, | ||
| const char * | func | ||
| ) | [inherited] |
array operator new, with debug line info
Definition at line 85 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
| void Ogre::Terrain::DefaultGpuBufferAllocator::warmStart | ( | size_t | numInstances, |
| uint16 | terrainSize, | ||
| uint16 | maxBatchSize, | ||
| uint16 | minBatchSize | ||
| ) |
'Warm start' the allocator based on needing x instances of terrain with the given configuration.
Definition at line 587 of file OgreTerrain.h.
Definition at line 586 of file OgreTerrain.h.
Definition at line 589 of file OgreTerrain.h.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:44