Panda3D
|
00001 // Filename: config_pgraphnodes.cxx 00002 // Created by: drose (05Nov08) 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 #include "config_pgraphnodes.h" 00016 00017 #include "ambientLight.h" 00018 #include "callbackData.h" 00019 #include "callbackNode.h" 00020 #include "callbackObject.h" 00021 #include "directionalLight.h" 00022 #include "fadeLodNode.h" 00023 #include "fadeLodNodeData.h" 00024 #include "lightLensNode.h" 00025 #include "lightNode.h" 00026 #include "lodNode.h" 00027 #include "nodeCullCallbackData.h" 00028 #include "pointLight.h" 00029 #include "selectiveChildNode.h" 00030 #include "sequenceNode.h" 00031 #include "shaderGenerator.h" 00032 #include "spotlight.h" 00033 #include "switchNode.h" 00034 00035 #include "dconfig.h" 00036 00037 ConfigureDef(config_pgraphnodes); 00038 NotifyCategoryDef(pgraphnodes, ""); 00039 00040 ConfigureFn(config_pgraphnodes) { 00041 init_libpgraphnodes(); 00042 } 00043 00044 ConfigVariableEnum<LODNodeType> default_lod_type 00045 ("default-lod-type", LNT_pop, 00046 PRC_DESC("Set this to either 'pop' or 'fade' to determine the type of " 00047 "LODNode that is created by LODNode::make_default_lod().")); 00048 00049 ConfigVariableInt parallax_mapping_samples 00050 ("parallax-mapping-samples", 3, 00051 PRC_DESC("Sets the amount of samples to use in the parallax mapping " 00052 "implementation. A value of 0 means to disable it entirely.")); 00053 00054 ConfigVariableDouble parallax_mapping_scale 00055 ("parallax-mapping-scale", 0.1, 00056 PRC_DESC("Sets the strength of the effect of parallax mapping, that is, " 00057 "how much influence the height values have on the texture " 00058 "coordinates.")); 00059 00060 //////////////////////////////////////////////////////////////////// 00061 // Function: init_libpgraphnodes 00062 // Description: Initializes the library. This must be called at 00063 // least once before any of the functions or classes in 00064 // this library can be used. Normally it will be 00065 // called by the static initializers and need not be 00066 // called explicitly, but special cases exist. 00067 //////////////////////////////////////////////////////////////////// 00068 void 00069 init_libpgraphnodes() { 00070 static bool initialized = false; 00071 if (initialized) { 00072 return; 00073 } 00074 initialized = true; 00075 00076 AmbientLight::init_type(); 00077 CallbackData::init_type(); 00078 CallbackNode::init_type(); 00079 CallbackObject::init_type(); 00080 DirectionalLight::init_type(); 00081 FadeLODNode::init_type(); 00082 FadeLODNodeData::init_type(); 00083 LightLensNode::init_type(); 00084 LightNode::init_type(); 00085 LODNode::init_type(); 00086 NodeCullCallbackData::init_type(); 00087 PointLight::init_type(); 00088 SelectiveChildNode::init_type(); 00089 SequenceNode::init_type(); 00090 ShaderGenerator::init_type(); 00091 Spotlight::init_type(); 00092 SwitchNode::init_type(); 00093 00094 AmbientLight::register_with_read_factory(); 00095 CallbackNode::register_with_read_factory(); 00096 DirectionalLight::register_with_read_factory(); 00097 FadeLODNode::register_with_read_factory(); 00098 LightLensNode::register_with_read_factory(); 00099 LightNode::register_with_read_factory(); 00100 LODNode::register_with_read_factory(); 00101 PointLight::register_with_read_factory(); 00102 SelectiveChildNode::register_with_read_factory(); 00103 SequenceNode::register_with_read_factory(); 00104 Spotlight::register_with_read_factory(); 00105 SwitchNode::register_with_read_factory(); 00106 }