MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
mlGLContext.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2007, 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 ML_GLCONTEXT_H
14
#define ML_GLCONTEXT_H
15
17
18
#include "
mlOpenGLSystem.h
"
19
#include "
mlOpenGL.h
"
20
21
ML_OPENGL_START_NAMESPACE
22
23
class
GLContextStackPrivate;
24
27
class
MLOPENGL_EXPORT
GLContextStack
28
{
29
public
:
34
class
TemporaryGLContextScope
35
{
36
public
:
37
TemporaryGLContextScope
()
38
{
39
GLContextStack::createTemporaryContextAndActivate
();
40
}
41
~TemporaryGLContextScope
()
42
{
43
GLContextStack::destroyTemporaryContextAndActivatePreviousContext
();
44
}
45
};
46
49
class
StoreCurrentGLContextScope
50
{
51
public
:
52
StoreCurrentGLContextScope
()
53
{
54
GLContextStack::pushCurrentContext
();
55
}
56
~StoreCurrentGLContextScope
()
57
{
58
GLContextStack::popCurrentContext
();
59
}
60
};
61
63
static
void
pushCurrentContext
();
64
66
static
void
popCurrentContext
();
67
73
static
void
createTemporaryContextAndActivate
();
74
77
static
void
destroyTemporaryContextAndActivatePreviousContext
();
78
79
private
:
80
static
void
init();
81
82
static
GLContextStackPrivate* _private;
83
};
84
85
ML_OPENGL_END_NAMESPACE
86
#endif
// __mlGLContext_H
ml::GLContextStack::StoreCurrentGLContextScope::~StoreCurrentGLContextScope
~StoreCurrentGLContextScope()
Definition
mlGLContext.h:56
ml::GLContextStack::StoreCurrentGLContextScope::StoreCurrentGLContextScope
StoreCurrentGLContextScope()
Definition
mlGLContext.h:52
ml::GLContextStack::TemporaryGLContextScope::~TemporaryGLContextScope
~TemporaryGLContextScope()
Definition
mlGLContext.h:41
ml::GLContextStack::TemporaryGLContextScope::TemporaryGLContextScope
TemporaryGLContextScope()
Definition
mlGLContext.h:37
ml::GLContextStack
Definition
mlGLContext.h:28
ml::GLContextStack::createTemporaryContextAndActivate
static void createTemporaryContextAndActivate()
ml::GLContextStack::destroyTemporaryContextAndActivatePreviousContext
static void destroyTemporaryContextAndActivatePreviousContext()
ml::GLContextStack::pushCurrentContext
static void pushCurrentContext()
Pushes the current OpenGL context (detected via a platform-specific state) to the stack.
ml::GLContextStack::popCurrentContext
static void popCurrentContext()
Pops the previously pushed context and activates it.
mlOpenGLSystem.h
MLOPENGL_EXPORT
#define MLOPENGL_EXPORT
Closes the namespace for all ML code after the usage of ML_UTILS_START_NAMESPACE.
Definition
mlOpenGLSystem.h:56
mlOpenGL.h
MeVis
Foundation
Sources
MLOpenGL
mlGLContext.h
Generated by
1.18.0