Panda3D
 All Classes Functions Variables Enumerations
graphicsPipeSelection.I
1 // Filename: graphicsPipeSelection.I
2 // Created by: drose (15Aug02)
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 ////////////////////////////////////////////////////////////////////
16 // Function: GraphicsPipeSelection::get_num_aux_modules
17 // Access: Published
18 // Description: Returns the number of display modules that are still
19 // to be loaded. If this is nonzero, then calling
20 // load_aux_modules() will likely increase the number of
21 // GraphicsPipes available.
22 ////////////////////////////////////////////////////////////////////
23 INLINE int GraphicsPipeSelection::
25  return _display_modules.size();
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: GraphicsPipeSelection::get_global_ptr
30 // Access: Published, Static
31 // Description: Returns a pointer to the one global
32 // GraphicsPipeSelection object.
33 ////////////////////////////////////////////////////////////////////
36  if (_global_ptr == (GraphicsPipeSelection *)NULL) {
37  _global_ptr = new GraphicsPipeSelection;
38  }
39  return _global_ptr;
40 }
41 
42 ////////////////////////////////////////////////////////////////////
43 // Function: GraphicsPipeSelection::load_default_module
44 // Access: Private
45 // Description: Conditionally calls do_load_default_module(), if it has
46 // not been called before.
47 ////////////////////////////////////////////////////////////////////
48 INLINE void GraphicsPipeSelection::
49 load_default_module() const {
50  if (!_default_module_loaded) {
51  ((GraphicsPipeSelection *)this)->do_load_default_module();
52  }
53 }
54 
55 ////////////////////////////////////////////////////////////////////
56 // Function: GraphicsPipeSelection::PipeType::Constructor
57 // Access: Public
58 // Description:
59 ////////////////////////////////////////////////////////////////////
60 INLINE GraphicsPipeSelection::PipeType::
61 PipeType(TypeHandle type, PipeConstructorFunc *constructor) :
62  _type(type),
63  _constructor(constructor)
64 {
65 }
int get_num_aux_modules() const
Returns the number of display modules that are still to be loaded.
This maintains a list of GraphicsPipes by type that are available for creation.
static GraphicsPipeSelection * get_global_ptr()
Returns a pointer to the one global GraphicsPipeSelection object.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85