MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoGlobalGLContextScope.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2008, MeVis Medical Solutions AG
4
**
5
** The user may use this file in accordance with the license agreement provided with
6
** the Software or, alternatively, in accordance with the terms contained in a
7
** written agreement between the user and MeVis Medical Solutions AG.
8
**
9
** For further information use the contact form at https://www.mevislab.de/contact
10
**
11
**************************************************************************************/
12
13
#ifndef SO_GLOBAL_GLCONTEXT_SCOPE_H
14
#define SO_GLOBAL_GLCONTEXT_SCOPE_H
15
16
#include "
InventorGUIWrapperDllInit.h
"
17
18
#include <
mlGLContext.h
>
19
20
class
SoGlobalGLSharedContextBase;
21
class
QOpenGLContext;
22
class
QSurface;
23
35
class
INVENTORGUIWRAPPER_API
SoGlobalGLContextScope
36
{
37
38
public
:
40
SoGlobalGLContextScope
();
41
43
~SoGlobalGLContextScope
();
44
46
void
deactivate
();
47
49
int
getShareID
();
50
52
static
int
getGlobalShareID
();
53
54
static
void
registerSoQtGLWidgetGLContextCallbacks
();
55
56
private
:
58
static
void
initializeGlobalContext();
59
61
static
SoGlobalGLSharedContextBase* createGlobalContext();
62
63
static
SoGlobalGLSharedContextBase* _globalContext;
64
static
bool
_globalIsCurrent;
65
69
static
void
makeCurrentCB(
void
* scopeContainer);
70
static
void
doneCurrentCB(
void
* scopeContainer);
72
74
static
SoGlobalGLContextScope
* _activeScope;
75
77
static
QOpenGLContext* _previousContext;
78
static
QSurface* _previousSurface;
79
};
80
81
#endif
// of __SoGlobalGLContextScope_H
InventorGUIWrapperDllInit.h
INVENTORGUIWRAPPER_API
#define INVENTORGUIWRAPPER_API
Definition
InventorGUIWrapperDllInit.h:20
SoGlobalGLContextScope::SoGlobalGLContextScope
SoGlobalGLContextScope()
Stores the current GL context and activates the global shared Open Inventor GL context.
SoGlobalGLContextScope::getShareID
int getShareID()
Returns the Open Inventor context share ID, which is required for GLRender actions.
SoGlobalGLContextScope::registerSoQtGLWidgetGLContextCallbacks
static void registerSoQtGLWidgetGLContextCallbacks()
SoGlobalGLContextScope::getGlobalShareID
static int getGlobalShareID()
Returns the global Open Inventor context share ID, which is required for GLRender actions.
SoGlobalGLContextScope::deactivate
void deactivate()
Activates the previous stored GL context (same as destructor).
SoGlobalGLContextScope::~SoGlobalGLContextScope
~SoGlobalGLContextScope()
Activates the previous stored GL context.
mlGLContext.h
MeVis
Foundation
Sources
MLInventorGUIBinding
SoGlobalGLContextScope.h
Generated by
1.18.0