28 #ifndef __GLHARWAREBUFFERMANAGER_H__
29 #define __GLHARWAREBUFFERMANAGER_H__
37 # define OGRE_GL_DEFAULT_MAP_BUFFER_THRESHOLD (1024 * 32)
46 size_t mMapBufferThreshold;
50 ~GLHardwareBufferManagerBase();
53 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 const
size_t getGLMapBufferThreshold() const;
81 void setGLMapBufferThreshold( const
size_t value );
89 : HardwareBufferManager(
OGRE_NEW GLHardwareBufferManagerBase())
117 return static_cast<GLHardwareBufferManagerBase*
>(mImpl)->allocateScratch(size);
123 static_cast<GLHardwareBufferManagerBase*
>(mImpl)->deallocateScratch(ptr);
130 return static_cast<GLHardwareBufferManagerBase*
>(mImpl)->getGLMapBufferThreshold();
134 static_cast<GLHardwareBufferManagerBase*
>(mImpl)->setGLMapBufferThreshold(value);
141 #endif // __GLHARWAREBUFFERMANAGER_H__
GLHardwareBufferManager()
Singleton wrapper for hardware buffer manager.
Specialisation of HardwareBuffer for vertex index buffers, still abstract.
Shared pointer implementation used to share index buffers.
static GLenum getGLUsage(unsigned int usage)
Utility function to get the correct GL usage based on HBU's.
void deallocateScratch(void *ptr)
Shared pointer implementation used to share index buffers.
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.
void setGLMapBufferThreshold(const size_t value)
const size_t getGLMapBufferThreshold() const
Threshold after which glMapBuffer is used and not glBufferSubData.
Implementation of HardwareBufferManager for OpenGL.
GLHardwareBufferManagerBase as a Singleton.
~GLHardwareBufferManager()
char * mScratchBufferPool
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.
static GLenum getGLType(unsigned int type)
Utility function to get the correct GL type based on VET's.
void * allocateScratch(uint32 size)
Allocator method to allow us to use a pool of memory as a scratch area for hardware buffers...