Manages OpenGL resources.
More...
#include <mlGLResourceManager.h>
|
| GLResourceManager () |
|
virtual | ~GLResourceManager () |
|
bool | isContextActive () const |
| check if the current context is ac
|
|
void | destroyTextures (int num, GLuint *textures) |
| destroy the given texture ids (destroys them later if no GL context is currently active)
|
|
void | destroyFragmentProgramARB (GLuint program) |
| destroy the given fragment program id (destroys it later if no GL context is currently active)
|
|
void | destroyRenderBuffer (GLuint id) |
| destroy the given render buffer (destroys it later if no GL context is currently active)
|
|
void | destroyFrameBuffer (GLuint id) |
| destroy the given render buffer (destroys it later if no GL context is currently active)
|
|
void | destroyBuffer (GLuint id) |
| destroy the given vertex buffer (destroys it later if no GL context is currently active)
|
|
void | destroyPixelBuffer (GLuint id) |
| destroy the given pixel buffer (destroys it later if no GL context is currently active)
|
|
void | destroyVertexBuffer (GLuint id) |
| destroy the given pixel buffer (destroys it later if no GL context is currently active)
|
|
void | destroyGLSLShader (GLuint id) |
| destroy the given shader (destroys it later if no GL context is currently active)
|
|
void | destroyGLSLProgram (GLuint id) |
| destroy the given program (destroys it later if no GL context is currently active)
|
|
void | destroyFTFont (FTFont *font) |
| destroy the given font (destroys it later if no GL context is currently active)
|
|
void | detachGLSLShader (GLuint program, GLuint shader) |
| detach the given shader from the program (this is done later of the GL context is not currently active)
|
|
void | disableGLSLProgram () |
| remove currently active program
|
|
void | unlockContext (unsigned int cacheContextId) |
| set that the context is active
|
|
void | lockContext () |
| set that the context is locked
|
|
unsigned int | cacheContextID () |
| get the current cache context id
|
|
GLenum | getGLError () const |
| check for OpenGL error (returns GL_INVALID_OPERATION if there is no valid OpenGL context)
|
|
Manages OpenGL resources.
Definition at line 28 of file mlGLResourceManager.h.
◆ GLSLProgramShaderPair
◆ GLResourceManager()
ml::GLResourceManager::GLResourceManager |
( |
| ) |
|
◆ ~GLResourceManager()
virtual ml::GLResourceManager::~GLResourceManager |
( |
| ) |
|
|
virtual |
◆ add()
◆ addResource()
void ml::GLResourceManager::addResource |
( |
GLResource * | program | ) |
|
|
protected |
◆ cacheContextID()
unsigned int ml::GLResourceManager::cacheContextID |
( |
| ) |
|
|
inline |
◆ cleanup()
static void ml::GLResourceManager::cleanup |
( |
| ) |
|
|
static |
◆ contextDestroyed()
void ml::GLResourceManager::contextDestroyed |
( |
| ) |
|
|
protected |
forget about all resources, the shared context was destroyed
◆ destroyBuffer()
void ml::GLResourceManager::destroyBuffer |
( |
GLuint | id | ) |
|
destroy the given vertex buffer (destroys it later if no GL context is currently active)
◆ destroyFragmentProgramARB()
void ml::GLResourceManager::destroyFragmentProgramARB |
( |
GLuint | program | ) |
|
destroy the given fragment program id (destroys it later if no GL context is currently active)
◆ destroyFrameBuffer()
void ml::GLResourceManager::destroyFrameBuffer |
( |
GLuint | id | ) |
|
destroy the given render buffer (destroys it later if no GL context is currently active)
◆ destroyFTFont()
void ml::GLResourceManager::destroyFTFont |
( |
FTFont * | font | ) |
|
destroy the given font (destroys it later if no GL context is currently active)
◆ destroyGLSLProgram()
void ml::GLResourceManager::destroyGLSLProgram |
( |
GLuint | id | ) |
|
destroy the given program (destroys it later if no GL context is currently active)
◆ destroyGLSLShader()
void ml::GLResourceManager::destroyGLSLShader |
( |
GLuint | id | ) |
|
destroy the given shader (destroys it later if no GL context is currently active)
◆ destroyPixelBuffer()
void ml::GLResourceManager::destroyPixelBuffer |
( |
GLuint | id | ) |
|
|
inline |
destroy the given pixel buffer (destroys it later if no GL context is currently active)
Definition at line 57 of file mlGLResourceManager.h.
◆ destroyRenderBuffer()
void ml::GLResourceManager::destroyRenderBuffer |
( |
GLuint | id | ) |
|
destroy the given render buffer (destroys it later if no GL context is currently active)
◆ destroyTextures()
void ml::GLResourceManager::destroyTextures |
( |
int | num, |
|
|
GLuint * | textures ) |
destroy the given texture ids (destroys them later if no GL context is currently active)
◆ destroyVertexBuffer()
void ml::GLResourceManager::destroyVertexBuffer |
( |
GLuint | id | ) |
|
|
inline |
destroy the given pixel buffer (destroys it later if no GL context is currently active)
Definition at line 59 of file mlGLResourceManager.h.
◆ detachGLSLShader()
void ml::GLResourceManager::detachGLSLShader |
( |
GLuint | program, |
|
|
GLuint | shader ) |
detach the given shader from the program (this is done later of the GL context is not currently active)
◆ disableGLSLProgram()
void ml::GLResourceManager::disableGLSLProgram |
( |
| ) |
|
remove currently active program
◆ freeResources()
void ml::GLResourceManager::freeResources |
( |
| ) |
|
|
protected |
free resources that could not be destroyed earlier
◆ getGLError()
GLenum ml::GLResourceManager::getGLError |
( |
| ) |
const |
check for OpenGL error (returns GL_INVALID_OPERATION if there is no valid OpenGL context)
◆ init()
static void ml::GLResourceManager::init |
( |
| ) |
|
|
static |
◆ isContextActive()
bool ml::GLResourceManager::isContextActive |
( |
| ) |
const |
|
inline |
◆ lockContext()
void ml::GLResourceManager::lockContext |
( |
| ) |
|
set that the context is locked
◆ remove()
◆ removeResource()
void ml::GLResourceManager::removeResource |
( |
GLResource * | program | ) |
|
|
protected |
remove the given resource
◆ self()
◆ unlockContext()
void ml::GLResourceManager::unlockContext |
( |
unsigned int | cacheContextId | ) |
|
set that the context is active
◆ GLResource
◆ _buffersToFree
std::vector<GLuint> ml::GLResourceManager::_buffersToFree |
|
protected |
◆ _cacheContextID
unsigned int ml::GLResourceManager::_cacheContextID |
|
protected |
◆ _contextLocked
bool ml::GLResourceManager::_contextLocked |
|
protected |
◆ _frameBuffersToFree
std::vector<GLuint> ml::GLResourceManager::_frameBuffersToFree |
|
protected |
◆ _FTFontsToFree
std::vector<FTFont*> ml::GLResourceManager::_FTFontsToFree |
|
protected |
◆ _GLSLProgramsToFree
std::vector<GLuint> ml::GLResourceManager::_GLSLProgramsToFree |
|
protected |
◆ _GLSLShadersToDetach
◆ _GLSLShadersToFree
std::vector<GLuint> ml::GLResourceManager::_GLSLShadersToFree |
|
protected |
◆ _programsARBToFree
std::vector<GLuint> ml::GLResourceManager::_programsARBToFree |
|
protected |
◆ _renderBuffersToFree
std::vector<GLuint> ml::GLResourceManager::_renderBuffersToFree |
|
protected |
◆ _resources
◆ _self
◆ _texturesToFree
std::vector<GLuint> ml::GLResourceManager::_texturesToFree |
|
protected |
The documentation for this class was generated from the following file: