MeVisLab Resolution Independence API
ml::GLContextStack Class Reference

#include <mlGLContext.h>

Classes

class  TemporaryGLContextScope
class  StoreCurrentGLContextScope

Static Public Member Functions

static void pushCurrentContext ()
 Pushes the current OpenGL context (detected via a platform-specific state) to the stack.
static void popCurrentContext ()
 Pops the previously pushed context and activates it.
static void createTemporaryContextAndActivate ()
static void destroyTemporaryContextAndActivatePreviousContext ()

Detailed Description

Manages a stack of GL contexts and their correct activation. Note: This is only accessible in the GUI main thread!

Definition at line 27 of file mlGLContext.h.

Member Function Documentation

◆ createTemporaryContextAndActivate()

void ml::GLContextStack::createTemporaryContextAndActivate ( )
static

Pushes the current context and creates and activates a new temporary OpenGL context, which may be used to query GL capabilities. Note: This call needs to be paired with a call to destroyTemporaryContextAndActivatePreviousContext() to cleanup the allocated context.

Referenced by ml::GLContextStack::TemporaryGLContextScope::TemporaryGLContextScope().

◆ destroyTemporaryContextAndActivatePreviousContext()

void ml::GLContextStack::destroyTemporaryContextAndActivatePreviousContext ( )
static

Destroys the temporary context created via createTemporaryContextAndActivate() and pops/activates the previous context.

Referenced by ml::GLContextStack::TemporaryGLContextScope::~TemporaryGLContextScope().

◆ popCurrentContext()

void ml::GLContextStack::popCurrentContext ( )
static

Pops the previously pushed context and activates it.

Referenced by ml::GLContextStack::StoreCurrentGLContextScope::~StoreCurrentGLContextScope().

◆ pushCurrentContext()

void ml::GLContextStack::pushCurrentContext ( )
static

Pushes the current OpenGL context (detected via a platform-specific state) to the stack.

Referenced by ml::GLContextStack::StoreCurrentGLContextScope::StoreCurrentGLContextScope().


The documentation for this class was generated from the following file: