Panda3D

Loading...
Searching...
No Matches
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 */
19INLINE int GraphicsPipeSelection::
20 get_num_aux_modules() const {
21 return _display_modules.size();
22}
23
24/**
25 * Returns a pointer to the one global GraphicsPipeSelection object.
26 */
27INLINE GraphicsPipeSelection *GraphicsPipeSelection::
28 get_global_ptr() {
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 */
39INLINE void GraphicsPipeSelection::
40load_default_module() const {
41 if (!_default_module_loaded) {
42 ((GraphicsPipeSelection *)this)->do_load_default_module();
43 }
44}
45
46/**
47 *
48 */
49INLINE GraphicsPipeSelection::PipeType::
50PipeType(TypeHandle type, PipeConstructorFunc *constructor) :
51 _type(type),
52 _constructor(constructor)
53{
54}
GraphicsPipeSelection
This maintains a list of GraphicsPipes by type that are available for creation.
Definition graphicsPipeSelection.h:33
GraphicsPipeSelection::get_global_ptr
static GraphicsPipeSelection * get_global_ptr()
Returns a pointer to the one global GraphicsPipeSelection object.
Definition graphicsPipeSelection.I:28
GraphicsPipeSelection::get_num_aux_modules
int get_num_aux_modules() const
Returns the number of display modules that are still to be loaded.
Definition graphicsPipeSelection.I:20
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81