Panda3D
 All Classes Functions Variables Enumerations
graphicsDevice.h
00001 // Filename: graphicsDevice.h
00002 // Created by:  masad (21Jul03)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef GRAPHICSDEVICE_H
00016 #define GRAPHICSDEVICE_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "typedReferenceCount.h"
00021 
00022 class GraphicsPipe;
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : GraphicsDevice
00026 // Description : An abstract device object that is part of Graphics
00027 //               Pipe. This device is set to NULL for OpenGL. But 
00028 //               DirectX uses it to take control of multiple windows
00029 //               under single device or multiple devices (i.e. more
00030 //               than one adapters in the machine).   
00031 //
00032 ////////////////////////////////////////////////////////////////////
00033 class EXPCL_PANDA_DISPLAY GraphicsDevice : public TypedReferenceCount {
00034 public:
00035   GraphicsDevice(GraphicsPipe *pipe);
00036 
00037 private:
00038   GraphicsDevice(const GraphicsDevice &copy);
00039   void operator = (const GraphicsDevice &copy);
00040 
00041 PUBLISHED:
00042   virtual ~GraphicsDevice();
00043 
00044   INLINE GraphicsPipe *get_pipe() const;
00045 
00046 protected:
00047   GraphicsPipe *_pipe;
00048 
00049 public:
00050   static TypeHandle get_class_type() {
00051     return _type_handle;
00052   }
00053   static void init_type() {
00054     TypedReferenceCount::init_type();
00055     register_type(_type_handle, "GraphicsDevice",
00056                   TypedReferenceCount::get_class_type());
00057   }
00058   virtual TypeHandle get_type() const {
00059     return get_class_type();
00060   }
00061   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00062 
00063 private:
00064   static TypeHandle _type_handle;
00065 
00066   friend class GraphicsPipe;
00067   friend class GraphicsEngine;
00068 };
00069 
00070 #include "graphicsDevice.I"
00071 
00072 #endif /* GRAPHICSDEVICE_H */
 All Classes Functions Variables Enumerations