Panda3D
graphicsDevice.h
1 // Filename: graphicsDevice.h
2 // Created by: masad (21Jul03)
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 GRAPHICSDEVICE_H
16 #define GRAPHICSDEVICE_H
17 
18 #include "pandabase.h"
19 
20 #include "typedReferenceCount.h"
21 
22 class GraphicsPipe;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : GraphicsDevice
26 // Description : An abstract device object that is part of Graphics
27 // Pipe. This device is set to NULL for OpenGL. But
28 // DirectX uses it to take control of multiple windows
29 // under single device or multiple devices (i.e. more
30 // than one adapters in the machine).
31 //
32 ////////////////////////////////////////////////////////////////////
33 class EXPCL_PANDA_DISPLAY GraphicsDevice : public TypedReferenceCount {
34 public:
36 
37 private:
38  GraphicsDevice(const GraphicsDevice &copy);
39  void operator = (const GraphicsDevice &copy);
40 
41 PUBLISHED:
42  virtual ~GraphicsDevice();
43 
44  INLINE GraphicsPipe *get_pipe() const;
45 
46 protected:
47  GraphicsPipe *_pipe;
48 
49 public:
50  static TypeHandle get_class_type() {
51  return _type_handle;
52  }
53  static void init_type() {
54  TypedReferenceCount::init_type();
55  register_type(_type_handle, "GraphicsDevice",
56  TypedReferenceCount::get_class_type());
57  }
58  virtual TypeHandle get_type() const {
59  return get_class_type();
60  }
61  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
62 
63 private:
64  static TypeHandle _type_handle;
65 
66  friend class GraphicsPipe;
67  friend class GraphicsEngine;
68 };
69 
70 #include "graphicsDevice.I"
71 
72 #endif /* GRAPHICSDEVICE_H */
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:58
An abstract device object that is part of Graphics Pipe.
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