00001 // Filename: graphicsDevice.cxx 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 #include "graphicsDevice.h" 00016 #include "graphicsPipe.h" 00017 #include "config_display.h" 00018 00019 TypeHandle GraphicsDevice::_type_handle; 00020 00021 //////////////////////////////////////////////////////////////////// 00022 // Function: GraphicsDevice::Constructor 00023 // Access: Protected 00024 // Description: Normally, the GraphicsDevice constructor holds 00025 // a reference to the Graphics Pipe that it is part of 00026 //////////////////////////////////////////////////////////////////// 00027 GraphicsDevice:: 00028 GraphicsDevice(GraphicsPipe *pipe) { 00029 #ifdef DO_MEMORY_USAGE 00030 MemoryUsage::update_type(this, this); 00031 #endif 00032 _pipe = pipe; 00033 00034 if (display_cat.is_debug()) { 00035 display_cat.debug() 00036 << "Creating new device using pipe " << (void *)pipe << "\n"; 00037 } 00038 } 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // Function: GraphicsDevice::Copy Constructor 00042 // Access: Private 00043 // Description: 00044 //////////////////////////////////////////////////////////////////// 00045 GraphicsDevice:: 00046 GraphicsDevice(const GraphicsDevice &) { 00047 nassertv(false); 00048 } 00049 00050 //////////////////////////////////////////////////////////////////// 00051 // Function: GraphicsDevice::Copy Assignment Operator 00052 // Access: Private 00053 // Description: 00054 //////////////////////////////////////////////////////////////////// 00055 void GraphicsDevice:: 00056 operator = (const GraphicsDevice &) { 00057 nassertv(false); 00058 } 00059 00060 //////////////////////////////////////////////////////////////////// 00061 // Function: GraphicsDevice::Destructor 00062 // Access: Published, Virtual 00063 // Description: 00064 //////////////////////////////////////////////////////////////////// 00065 GraphicsDevice:: 00066 ~GraphicsDevice() { 00067 // And we shouldn't have a GraphicsPipe pointer anymore. 00068 // nassertv(_pipe == (GraphicsPipe *)NULL); 00069 } 00070