Panda3D
graphicsPipeSelection.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file graphicsPipeSelection.I
10  * @author drose
11  * @date 2002-08-15
12  */
13 
14 /**
15  * Returns the number of display modules that are still to be loaded. If this
16  * is nonzero, then calling load_aux_modules() will likely increase the number
17  * of GraphicsPipes available.
18  */
19 INLINE int GraphicsPipeSelection::
21  return _display_modules.size();
22 }
23 
24 /**
25  * Returns a pointer to the one global GraphicsPipeSelection object.
26  */
29  if (_global_ptr == nullptr) {
30  _global_ptr = new GraphicsPipeSelection;
31  }
32  return _global_ptr;
33 }
34 
35 /**
36  * Conditionally calls do_load_default_module(), if it has not been called
37  * before.
38  */
39 INLINE void GraphicsPipeSelection::
40 load_default_module() const {
41  if (!_default_module_loaded) {
42  ((GraphicsPipeSelection *)this)->do_load_default_module();
43  }
44 }
45 
46 /**
47  *
48  */
49 INLINE GraphicsPipeSelection::PipeType::
50 PipeType(TypeHandle type, PipeConstructorFunc *constructor) :
51  _type(type),
52  _constructor(constructor)
53 {
54 }
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:81
int get_num_aux_modules() const
Returns the number of display modules that are still to be loaded.