Panda3D
glxGraphicsWindow.h
1 // Filename: glxGraphicsWindow.h
2 // Created by: mike (09Jan97)
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 GLXGRAPHICSWINDOW_H
16 #define GLXGRAPHICSWINDOW_H
17 
18 #include "pandabase.h"
19 
20 #include "x11GraphicsWindow.h"
21 #include "glxGraphicsPipe.h"
22 #include "graphicsWindow.h"
23 #include "buttonHandle.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : glxGraphicsWindow
27 // Description : An interface to the glx system for managing GL
28 // windows under X.
29 ////////////////////////////////////////////////////////////////////
31 public:
33  const string &name,
34  const FrameBufferProperties &fb_prop,
35  const WindowProperties &win_prop,
36  int flags,
38  GraphicsOutput *host);
39  virtual ~glxGraphicsWindow() {};
40 
41  virtual bool begin_frame(FrameMode mode, Thread *current_thread);
42  virtual void end_flip();
43 
44 protected:
45  virtual void close_window();
46  virtual bool open_window();
47 
48 private:
49  virtual void setup_colormap(GLXFBConfig fbconfig);
50  virtual void setup_colormap(XVisualInfo *visual);
51 
52 public:
53  static TypeHandle get_class_type() {
54  return _type_handle;
55  }
56  static void init_type() {
57  x11GraphicsWindow::init_type();
58  register_type(_type_handle, "glxGraphicsWindow",
59  x11GraphicsWindow::get_class_type());
60  }
61  virtual TypeHandle get_type() const {
62  return get_class_type();
63  }
64  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
65 
66 private:
67  static TypeHandle _type_handle;
68 };
69 
70 #endif
A container for the various kinds of properties we might ask to have on a graphics window before we o...
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:58
virtual void end_flip()
This function will be called within the draw thread after begin_flip() has been called on all windows...
This is a base class for the various different classes that represent the result of a frame of render...
A thread; that is, a lightweight process.
Definition: thread.h:51
Encapsulates all the communication with a particular instance of a given rendering backend...
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
An interface to the glx system for managing GL windows under X.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
Interfaces to the X11 window system.
virtual bool begin_frame(FrameMode mode, Thread *current_thread)
This function will be called within the draw thread before beginning rendering for a given frame...