29 #ifndef __GLES2HardwareBufferManager_H__
30 #define __GLES2HardwareBufferManager_H__
37 # define OGRE_GL_DEFAULT_MAP_BUFFER_THRESHOLD (1024 * 32)
45 size_t mMapBufferThreshold;
49 virtual ~GLES2HardwareBufferManagerBase();
52 size_t numVerts,
HardwareBuffer::Usage usage,
bool useShadowBuffer = false);
61 static GLenum getGLUsage(
unsigned int usage);
64 static GLenum getGLType(
unsigned int type);
73 void* allocateScratch(
uint32 size);
76 void deallocateScratch(
void* ptr);
80 size_t getGLMapBufferThreshold() const;
81 void setGLMapBufferThreshold( const
size_t value );
89 : HardwareBufferManager(
OGRE_NEW GLES2HardwareBufferManagerBase())
115 return static_cast<GLES2HardwareBufferManagerBase*
>(mImpl)->allocateScratch(size);
121 static_cast<GLES2HardwareBufferManagerBase*
>(mImpl)->deallocateScratch(ptr);
128 return static_cast<GLES2HardwareBufferManagerBase*
>(mImpl)->getGLMapBufferThreshold();
132 static_cast<GLES2HardwareBufferManagerBase*
>(mImpl)->setGLMapBufferThreshold(value);
Singleton wrapper for hardware buffer manager.
Specialisation of HardwareBuffer for vertex index buffers, still abstract.
Shared pointer implementation used to share index buffers.
GLES2HardwareBufferManagerBase as a Singleton.
Shared pointer implementation used to share index buffers.
void deallocateScratch(void *ptr)
~GLES2HardwareBufferManager()
static GLenum getGLType(unsigned int type)
Utility function to get the correct GL type based on VET's.
char * mScratchBufferPool
void setGLMapBufferThreshold(const size_t value)
static GLenum getGLUsage(unsigned int usage)
Utility function to get the correct GL usage based on HBU's.
Base definition of a hardware buffer manager.
static GLenum getGLUsage(unsigned int usage)
Utility function to get the correct GL usage based on HBU's.
Implementation of HardwareBufferManager for OpenGL ES.
Abstract class defining common features of hardware buffers.
static GLenum getGLType(unsigned int type)
Utility function to get the correct GL type based on VET's.
Reference-counted shared pointer, used for objects where implicit destruction is required.
void * allocateScratch(uint32 size)
Allocator method to allow us to use a pool of memory as a scratch area for hardware buffers...
GLES2HardwareBufferManager()
size_t getGLMapBufferThreshold() const
Threshold after which glMapBuffer is used and not glBufferSubData.