15 #include "posixGraphicsStateGuardian.h"
16 #include "config_glxdisplay.h"
19 TypeHandle PosixGraphicsStateGuardian::_type_handle;
26 PosixGraphicsStateGuardian::
28 GLGraphicsStateGuardian(engine, pipe)
38 PosixGraphicsStateGuardian::
39 ~PosixGraphicsStateGuardian() {
40 if (_libgl_handle != (
void *)NULL) {
41 dlclose(_libgl_handle);
55 void *PosixGraphicsStateGuardian::
56 do_get_extension_func(
const char *name) {
57 nassertr(name != NULL, NULL);
59 if (glx_get_os_address) {
60 return get_system_func(name);
74 void *PosixGraphicsStateGuardian::
75 get_system_func(
const char *name) {
76 if (_libgl_handle == (
void *)NULL) {
82 _libgl_handle = dlopen(NULL, RTLD_LAZY);
83 nassertr(_libgl_handle != (
void *)NULL, NULL);
87 if (dlsym(_libgl_handle, name) == NULL) {
88 dlclose(_libgl_handle);
89 glxdisplay_cat.warning()
90 << name <<
" not found in executable; looking in libGL.so instead.\n";
91 _libgl_handle = dlopen(
"libGL.so", RTLD_LAZY);
92 nassertr(_libgl_handle != (
void *)NULL, NULL);
96 return dlsym(_libgl_handle, name);
An object to create GraphicsOutputs that share a particular 3-D API.
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.