MeVisLab Resolution Independence API
SoGlobalGLContextScope Class Reference

The SoGlobalGLContextScope can be used to automatically push/pop the current GL context and to enable a shared global Open Inventor GL context inside of the scope. More...

#include <SoGlobalGLContextScope.h>

Public Member Functions

 SoGlobalGLContextScope ()
 Stores current GL context and activates global shared Open Inventor GL context. More...
 
 ~SoGlobalGLContextScope ()
 Activates the previous stored GL context. More...
 
void deactivate ()
 Activates the previous stored GL context (same as destructor). More...
 
int getShareID ()
 Get the Open Inventor context share id, which is required for GLRender actions. More...
 

Static Public Member Functions

static QGLWidget * getGlobalGLWidget ()
 Get access to globally shared QGLWidget. More...
 
static int getGlobalShareID ()
 Get the global Open Inventor context share id, which is required for GLRender actions. More...
 
static void registerSoQtGLWidgetGLContextCallbacks ()
 
static bool useNewOpenGLWidget ()
 Forwarding of SoQt::useNewOpenGLWidget() More...
 

Detailed Description

The SoGlobalGLContextScope can be used to automatically push/pop the current GL context and to enable a shared global Open Inventor GL context inside of the scope.

{
// now the current global shared GL context is current
// do something like offscreen rendering here...
}
// when scope gets deleted, the previously current GL context is made current again
The SoGlobalGLContextScope can be used to automatically push/pop the current GL context and to enable...

Definition at line 34 of file SoGlobalGLContextScope.h.

Constructor & Destructor Documentation

◆ SoGlobalGLContextScope()

SoGlobalGLContextScope::SoGlobalGLContextScope ( )

Stores current GL context and activates global shared Open Inventor GL context.

◆ ~SoGlobalGLContextScope()

SoGlobalGLContextScope::~SoGlobalGLContextScope ( )

Activates the previous stored GL context.

Member Function Documentation

◆ deactivate()

void SoGlobalGLContextScope::deactivate ( )

Activates the previous stored GL context (same as destructor).

◆ getGlobalGLWidget()

static QGLWidget* SoGlobalGLContextScope::getGlobalGLWidget ( )
static

Get access to globally shared QGLWidget.

◆ getGlobalShareID()

static int SoGlobalGLContextScope::getGlobalShareID ( )
static

Get the global Open Inventor context share id, which is required for GLRender actions.

◆ getShareID()

int SoGlobalGLContextScope::getShareID ( )

Get the Open Inventor context share id, which is required for GLRender actions.

◆ registerSoQtGLWidgetGLContextCallbacks()

static void SoGlobalGLContextScope::registerSoQtGLWidgetGLContextCallbacks ( )
static

◆ useNewOpenGLWidget()

static bool SoGlobalGLContextScope::useNewOpenGLWidget ( )
static

Forwarding of SoQt::useNewOpenGLWidget()


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