Panda3D

config_pgraphnodes.cxx

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 #include "uvScrollNode.h"
00035 
00036 #include "dconfig.h"
00037 
00038 ConfigureDef(config_pgraphnodes);
00039 NotifyCategoryDef(pgraphnodes, "");
00040 
00041 ConfigureFn(config_pgraphnodes) {
00042   init_libpgraphnodes();
00043 }
00044 
00045 ConfigVariableEnum<LODNodeType> default_lod_type
00046 ("default-lod-type", LNT_pop,
00047  PRC_DESC("Set this to either 'pop' or 'fade' to determine the type of "
00048           "LODNode that is created by LODNode::make_default_lod()."));
00049 
00050 ConfigVariableInt parallax_mapping_samples
00051 ("parallax-mapping-samples", 3,
00052  PRC_DESC("Sets the amount of samples to use in the parallax mapping "
00053           "implementation. A value of 0 means to disable it entirely."));
00054 
00055 ConfigVariableDouble parallax_mapping_scale
00056 ("parallax-mapping-scale", 0.1,
00057  PRC_DESC("Sets the strength of the effect of parallax mapping, that is, "
00058           "how much influence the height values have on the texture "
00059           "coordinates."));
00060 
00061 ////////////////////////////////////////////////////////////////////
00062 //     Function: init_libpgraphnodes
00063 //  Description: Initializes the library.  This must be called at
00064 //               least once before any of the functions or classes in
00065 //               this library can be used.  Normally it will be
00066 //               called by the static initializers and need not be
00067 //               called explicitly, but special cases exist.
00068 ////////////////////////////////////////////////////////////////////
00069 void
00070 init_libpgraphnodes() {
00071   static bool initialized = false;
00072   if (initialized) {
00073     return;
00074   }
00075   initialized = true;
00076 
00077   AmbientLight::init_type();
00078   CallbackData::init_type();
00079   CallbackNode::init_type();
00080   CallbackObject::init_type();
00081   DirectionalLight::init_type();
00082   FadeLODNode::init_type();
00083   FadeLODNodeData::init_type();
00084   LightLensNode::init_type();
00085   LightNode::init_type();
00086   LODNode::init_type();
00087   NodeCullCallbackData::init_type();
00088   PointLight::init_type();
00089   SelectiveChildNode::init_type();
00090   SequenceNode::init_type();
00091   ShaderGenerator::init_type();
00092   Spotlight::init_type();
00093   SwitchNode::init_type();
00094   UvScrollNode::init_type();
00095 
00096   AmbientLight::register_with_read_factory();
00097   CallbackNode::register_with_read_factory();
00098   DirectionalLight::register_with_read_factory();
00099   FadeLODNode::register_with_read_factory();
00100   LightLensNode::register_with_read_factory();
00101   LightNode::register_with_read_factory();
00102   LODNode::register_with_read_factory();
00103   PointLight::register_with_read_factory();
00104   SelectiveChildNode::register_with_read_factory();
00105   SequenceNode::register_with_read_factory();
00106   Spotlight::register_with_read_factory();
00107   SwitchNode::register_with_read_factory();
00108   UvScrollNode::register_with_read_factory();
00109 }
 All Classes Functions Variables Enumerations