Panda3D
tinySDLGraphicsPipe.h
1 // Filename: tinySDLGraphicsPipe.h
2 // Created by: drose (24Apr08)
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 TINYSDLGRAPHICSPIPE_H
16 #define TINYSDLGRAPHICSPIPE_H
17 
18 #include "pandabase.h"
19 
20 #ifdef HAVE_SDL
21 
22 #include "graphicsWindow.h"
23 #include "graphicsPipe.h"
24 
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : TinySDLGraphicsPipe
29 // Description : This graphics pipe manages SDL windows for rendering
30 // TinyPanda software buffers.
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_TINYDISPLAY TinySDLGraphicsPipe : public GraphicsPipe {
33 public:
34  TinySDLGraphicsPipe();
35  virtual ~TinySDLGraphicsPipe();
36 
37  virtual string get_interface_name() const;
38  static PT(GraphicsPipe) pipe_constructor();
39 
40 protected:
41  virtual PT(GraphicsOutput) make_output(const string &name,
42  const FrameBufferProperties &fb_prop,
43  const WindowProperties &win_prop,
44  int flags,
45  GraphicsEngine *engine,
47  GraphicsOutput *host,
48  int retry,
49  bool &precertify);
50 
51 public:
52  static TypeHandle get_class_type() {
53  return _type_handle;
54  }
55  static void init_type() {
56  GraphicsPipe::init_type();
57  register_type(_type_handle, "TinySDLGraphicsPipe",
58  GraphicsPipe::get_class_type());
59  }
60  virtual TypeHandle get_type() const {
61  return get_class_type();
62  }
63  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
64 
65 private:
66  static TypeHandle _type_handle;
67 };
68 
69 #include "tinySDLGraphicsPipe.I"
70 
71 #endif // HAVE_SDL
72 
73 #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
This is a base class for the various different classes that represent the result of a frame of render...
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
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...