Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
Menge::GLContextManager Class Reference

Handles updating the scene graph when there is a new OpenGL context. More...

#include <GLContextManager.h>

Static Public Member Functions

static void addCallback (void(*newGLContext)())
 Register a new class callback to the context manager. More...
 
static void newGLContext ()
 Called when the OpenGL context changes - triggers all of the registered callbacks.
 

Detailed Description

Handles updating the scene graph when there is a new OpenGL context.

Through this class and its static members, all of the resources used in the scene graph are refreshed when the OpenGL context changes.

Each resource registers a refresh callback to the manager and then the viewer, when changin GL Contexts, calls newGLContext() to have the resources update.

If any new resources are added to the SceneGraph which have OpenGL-dependent memory (such as textures, display lists, arrays of data, etc.) that class must provide a static callback method and register it so its data can be restored in the new context (e.g. ImageData, Circle, Cylinder, etc.).

Member Function Documentation

void Menge::GLContextManager::addCallback ( void(*)()  newGLContext)
static

Register a new class callback to the context manager.

Parameters
newGLContextA pointer to the callback function.

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