28 #ifndef __GLHARWAREBUFFERMANAGER_H__
29 #define __GLHARWAREBUFFERMANAGER_H__
36 class GLStateCacheManager;
39 # define OGRE_GL_DEFAULT_MAP_BUFFER_THRESHOLD (1024 * 32)
66 bool useShadowBuffer =
false,
const String& name =
"");
68 static GLenum getGLUsage(
unsigned int usage);
71 static GLenum getGLType(
unsigned int type);
82 void* allocateScratch(
uint32 size);
85 void deallocateScratch(
void* ptr);
89 size_t getGLMapBufferThreshold()
const;
90 void setGLMapBufferThreshold(
const size_t value );
150 #endif // __GLHARWAREBUFFERMANAGER_H__
GLStateCacheManager * getStateCacheManager()
GLHardwareBufferManager()
Singleton wrapper for hardware buffer manager.
Shared pointer implementation used to share vertex buffers.
GLStateCacheManager * mStateCacheManager
Combination of HBU_DYNAMIC, HBU_WRITE_ONLY and HBU_DISCARDABLE.
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.
size_t getGLMapBufferThreshold() const
Threshold after which glMapBuffer is used and not glBufferSubData.
Base definition of a hardware buffer manager.
Usage
Enums describing buffer usage; not mutually exclusive.
void setGLMapBufferThreshold(const size_t value)
Implementation of HardwareBufferManager for OpenGL.
GLHardwareBufferManagerBase as a Singleton.
~GLHardwareBufferManager()
char * mScratchBufferPool
static GLenum getGLType(unsigned int type)
Utility function to get the correct GL type based on VET's.
Shared pointer implementation used to share counter buffers.
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...
size_t mMapBufferThreshold
An in memory cache of the OpenGL state.