18 TypeHandle PosixGraphicsStateGuardian::_type_handle;
23 PosixGraphicsStateGuardian::
25 GLGraphicsStateGuardian(engine, pipe)
27 _libgl_handle =
nullptr;
33 PosixGraphicsStateGuardian::
34 ~PosixGraphicsStateGuardian() {
35 if (_libgl_handle !=
nullptr) {
36 dlclose(_libgl_handle);
46 void *PosixGraphicsStateGuardian::
47 do_get_extension_func(
const char *name) {
48 nassertr(name !=
nullptr,
nullptr);
50 if (glx_get_os_address) {
51 return get_system_func(name);
62 void *PosixGraphicsStateGuardian::
63 get_system_func(
const char *name) {
64 if (_libgl_handle ==
nullptr) {
70 _libgl_handle = dlopen(
nullptr, RTLD_LAZY);
71 nassertr(_libgl_handle !=
nullptr,
nullptr);
75 if (dlsym(_libgl_handle, name) ==
nullptr) {
76 dlclose(_libgl_handle);
77 glxdisplay_cat.warning()
78 << name <<
" not found in executable; looking in libGL.so instead.\n";
79 _libgl_handle = dlopen(
"libGL.so", RTLD_LAZY);
80 nassertr(_libgl_handle !=
nullptr,
nullptr);
84 return dlsym(_libgl_handle, name);
An object to create GraphicsOutputs that share a particular 3-D API.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.