Panda3D
panda
src
glxdisplay
posixGraphicsStateGuardian.h
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file posixGraphicsStateGuardian.h
10
* @author drose
11
* @date 2012-01-14
12
*/
13
14
#ifndef POSIXGRAPHICSSTATEGUARDIAN_H
15
#define POSIXGRAPHICSSTATEGUARDIAN_H
16
17
#include "
pandabase.h
"
18
19
#include "
glgsg.h
"
20
21
/**
22
* This GSG is used only for CallbackGraphicsWindow (which might not be using
23
* the glx interfaces), to add the ability to peek in libGL.so to find the
24
* extension functions.
25
*/
26
class
PosixGraphicsStateGuardian
:
public
GLGraphicsStateGuardian {
27
public
:
28
PosixGraphicsStateGuardian
(
GraphicsEngine
*engine,
GraphicsPipe
*pipe);
29
~
PosixGraphicsStateGuardian
();
30
31
protected
:
32
virtual
void
*do_get_extension_func(
const
char
*name);
33
void
*get_system_func(
const
char
*name);
34
35
private
:
36
void
*_libgl_handle;
37
38
public
:
39
static
TypeHandle
get_class_type() {
40
return
_type_handle;
41
}
42
static
void
init_type() {
43
GLGraphicsStateGuardian::init_type();
44
register_type
(_type_handle,
"PosixGraphicsStateGuardian"
,
45
GLGraphicsStateGuardian::get_class_type());
46
}
47
virtual
TypeHandle
get_type()
const
{
48
return
get_class_type();
49
}
50
virtual
TypeHandle
force_init_type() {init_type();
return
get_class_type();}
51
52
private
:
53
static
TypeHandle
_type_handle;
54
};
55
56
#include "
posixGraphicsStateGuardian.I
"
57
58
#endif
PosixGraphicsStateGuardian
This GSG is used only for CallbackGraphicsWindow (which might not be using the glx interfaces),...
Definition:
posixGraphicsStateGuardian.h:26
glgsg.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition:
register_type.I:22
GraphicsEngine
This class is the main interface to controlling the render process.
Definition:
graphicsEngine.h:53
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
GraphicsPipe
An object to create GraphicsOutputs that share a particular 3-D API.
Definition:
graphicsPipe.h:52
posixGraphicsStateGuardian.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Sun Dec 27 2020 13:22:59 for Panda3D by
1.8.20