Panda3D
 All Classes Functions Variables Enumerations
posixGraphicsStateGuardian.h
1 // Filename: posixGraphicsStateGuardian.h
2 // Created by: drose (14Jan12)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef POSIXGRAPHICSSTATEGUARDIAN_H
16 #define POSIXGRAPHICSSTATEGUARDIAN_H
17 
18 #include "pandabase.h"
19 
20 #include "glgsg.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : PosixGraphicsStateGuardian
24 // Description : This GSG is used only for CallbackGraphicsWindow
25 // (which might not be using the glx interfaces), to add
26 // the ability to peek in libGL.so to find the extension
27 // functions.
28 ////////////////////////////////////////////////////////////////////
29 class PosixGraphicsStateGuardian : public GLGraphicsStateGuardian {
30 public:
33 
34 protected:
35  virtual void *do_get_extension_func(const char *name);
36  void *get_system_func(const char *name);
37 
38 private:
39  void *_libgl_handle;
40 
41 public:
42  static TypeHandle get_class_type() {
43  return _type_handle;
44  }
45  static void init_type() {
46  GLGraphicsStateGuardian::init_type();
47  register_type(_type_handle, "PosixGraphicsStateGuardian",
48  GLGraphicsStateGuardian::get_class_type());
49  }
50  virtual TypeHandle get_type() const {
51  return get_class_type();
52  }
53  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
54 
55 private:
56  static TypeHandle _type_handle;
57 };
58 
59 #include "posixGraphicsStateGuardian.I"
60 
61 #endif
This GSG is used only for CallbackGraphicsWindow (which might not be using the glx interfaces)...
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:58
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85