Panda3D
|
00001 // Filename: graphicsPipeSelection.I 00002 // Created by: drose (15Aug02) 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 //////////////////////////////////////////////////////////////////// 00016 // Function: GraphicsPipeSelection::get_num_aux_modules 00017 // Access: Published 00018 // Description: Returns the number of display modules that are still 00019 // to be loaded. If this is nonzero, then calling 00020 // load_aux_modules() will likely increase the number of 00021 // GraphicsPipes available. 00022 //////////////////////////////////////////////////////////////////// 00023 INLINE int GraphicsPipeSelection:: 00024 get_num_aux_modules() const { 00025 return _display_modules.size(); 00026 } 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Function: GraphicsPipeSelection::get_global_ptr 00030 // Access: Published, Static 00031 // Description: Returns a pointer to the one global 00032 // GraphicsPipeSelection object. 00033 //////////////////////////////////////////////////////////////////// 00034 INLINE GraphicsPipeSelection *GraphicsPipeSelection:: 00035 get_global_ptr() { 00036 if (_global_ptr == (GraphicsPipeSelection *)NULL) { 00037 _global_ptr = new GraphicsPipeSelection; 00038 } 00039 return _global_ptr; 00040 } 00041 00042 //////////////////////////////////////////////////////////////////// 00043 // Function: GraphicsPipeSelection::load_default_module 00044 // Access: Private 00045 // Description: Conditionally calls do_load_default_module(), if it has 00046 // not been called before. 00047 //////////////////////////////////////////////////////////////////// 00048 INLINE void GraphicsPipeSelection:: 00049 load_default_module() const { 00050 if (!_default_module_loaded) { 00051 ((GraphicsPipeSelection *)this)->do_load_default_module(); 00052 } 00053 } 00054 00055 //////////////////////////////////////////////////////////////////// 00056 // Function: GraphicsPipeSelection::PipeType::Constructor 00057 // Access: Public 00058 // Description: 00059 //////////////////////////////////////////////////////////////////// 00060 INLINE GraphicsPipeSelection::PipeType:: 00061 PipeType(TypeHandle type, PipeConstructorFunc *constructor) : 00062 _type(type), 00063 _constructor(constructor) 00064 { 00065 }