Panda3D
 All Classes Functions Variables Enumerations
graphicsDevice.cxx
1 // Filename: graphicsDevice.cxx
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 #include "graphicsDevice.h"
16 #include "graphicsPipe.h"
17 #include "config_display.h"
18 
19 TypeHandle GraphicsDevice::_type_handle;
20 
21 ////////////////////////////////////////////////////////////////////
22 // Function: GraphicsDevice::Constructor
23 // Access: Protected
24 // Description: Normally, the GraphicsDevice constructor holds
25 // a reference to the Graphics Pipe that it is part of
26 ////////////////////////////////////////////////////////////////////
29 #ifdef DO_MEMORY_USAGE
30  MemoryUsage::update_type(this, this);
31 #endif
32  _pipe = pipe;
33 
34  if (display_cat.is_debug()) {
35  display_cat.debug()
36  << "Creating new device using pipe " << (void *)pipe << "\n";
37  }
38 }
39 
40 ////////////////////////////////////////////////////////////////////
41 // Function: GraphicsDevice::Copy Constructor
42 // Access: Private
43 // Description:
44 ////////////////////////////////////////////////////////////////////
47  nassertv(false);
48 }
49 
50 ////////////////////////////////////////////////////////////////////
51 // Function: GraphicsDevice::Copy Assignment Operator
52 // Access: Private
53 // Description:
54 ////////////////////////////////////////////////////////////////////
55 void GraphicsDevice::
56 operator = (const GraphicsDevice &) {
57  nassertv(false);
58 }
59 
60 ////////////////////////////////////////////////////////////////////
61 // Function: GraphicsDevice::Destructor
62 // Access: Published, Virtual
63 // Description:
64 ////////////////////////////////////////////////////////////////////
65 GraphicsDevice::
66 ~GraphicsDevice() {
67  // And we shouldn't have a GraphicsPipe pointer anymore.
68  // nassertv(_pipe == (GraphicsPipe *)NULL);
69 }
70 
GraphicsDevice(GraphicsPipe *pipe)
Normally, the GraphicsDevice constructor holds a reference to the Graphics Pipe that it is part of...
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.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85