Loading [MathJax]/extensions/MathMenu.js
ROOT
6.14/05
Reference Guide
ROOT Home
Main Page
Tutorials
Functional Parts
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
v
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
u
v
w
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
core
base
src
TVirtualGL.cxx
Go to the documentation of this file.
1
// @(#)root/base:$Id$
2
// Author: Valery Fine 05/03/97
3
4
/** \class TVirtualGL
5
6
The TVirtualGL class is an abstract base class defining the
7
OpenGL interface protocol. All interactions with OpenGL should be
8
done via the global pointer gVirtualGL. If the OpenGL library is
9
available this pointer is pointing to an instance of the TGLKernel
10
class which provides the actual interface to OpenGL. Using this
11
scheme of ABC we can use OpenGL in other parts of the framework
12
without having to link with the OpenGL library in case we don't
13
use the classes using OpenGL.
14
*/
15
16
#include "
TVirtualGL.h
"
17
#include "
TROOT.h
"
18
#include "
TGlobal.h
"
19
20
21
ClassImp
(
TGLManager
);
22
23
TGLManager
* (*gPtr2GLManager)() = 0;
24
25
namespace
{
26
static
struct
AddPseudoGlobals {
27
AddPseudoGlobals() {
28
// User "gCling" as synonym for "libCore static initialization has happened".
29
// This code here must not trigger it.
30
TGlobalMappedFunction::Add
(
new
TGlobalMappedFunction
(
"gGLManager"
,
"TVirtualGL*"
,
31
(
TGlobalMappedFunction::GlobalFunc_t
) &
TGLManager::Instance
));
32
}
33
} gAddPseudoGlobals;
34
}
35
36
////////////////////////////////////////////////////////////////////////////////
37
38
TGLManager::TGLManager
() :
TNamed
(
"gGLManager"
,
""
)
39
{
40
}
41
42
////////////////////////////////////////////////////////////////////////////////
43
/// Return the global GL Manager.
44
45
TGLManager
*&
TGLManager::Instance
()
46
{
47
static
TGLManager
*instance = 0;
48
49
if
(
gPtr2GLManager
) {
50
instance =
gPtr2GLManager
();
51
}
52
53
return
instance;
54
}
55
56
ClassImp
(
TVirtualGLPainter
);
57
58
59
ClassImp
(
TVirtualGLManip
);
60
61
ClassImp
(
TGLPaintDevice
);
TGLManager::TGLManager
TGLManager()
Definition:
TVirtualGL.cxx:38
TVirtualGL.h
TGLPaintDevice
Definition:
TVirtualGL.h:144
TGlobal.h
TGlobalMappedFunction
Definition:
TGlobal.h:52
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition:
TNamed.h:29
TVirtualGLPainter
Definition:
TVirtualGL.h:45
TROOT.h
TGLManager::Instance
static TGLManager *& Instance()
Return the global GL Manager.
Definition:
TVirtualGL.cxx:45
TGlobalMappedFunction::Add
static void Add(TGlobalMappedFunction *gmf)
Definition:
TGlobal.cxx:183
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:359
TGLManager
Definition:
TVirtualGL.h:70
gPtr2GLManager
TGLManager *(* gPtr2GLManager)()=0
Definition:
TVirtualGL.cxx:23
TGlobalMappedFunction::GlobalFunc_t
void *(* GlobalFunc_t)()
Definition:
TGlobal.h:54
TVirtualGLManip
Definition:
TVirtualGL.h:59