23 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_EGG2PG) 24 #error Buildsystem error: BUILDING_PANDA_EGG2PG not defined 27 ConfigureDef(config_egg2pg);
28 NotifyCategoryDef(egg2pg,
"");
31 (
"egg-normal-scale", 1.0);
33 (
"egg-show-normals",
false);
36 (
"egg-coordinate-system", CS_default);
39 (
"egg-ignore-mipmaps",
false);
41 (
"egg-ignore-filters",
false);
43 (
"egg-ignore-decals",
false);
46 PRC_DESC(
"This is normally true to flatten out useless nodes after loading " 47 "an egg file. Set it false if you want to see the complete " 48 "and true hierarchy as the egg loader created it (although the " 49 "extra nodes may have a small impact on render performance)."));
52 (
"egg-flatten-radius", 0.0,
53 PRC_DESC(
"This specifies the minimum cull radius in the egg file. Nodes " 54 "whose bounding volume is smaller than this radius will be " 55 "flattened tighter than nodes larger than this radius, to " 56 "reduce the node count even further. The idea is that small " 57 "objects will not need to have their individual components " 58 "culled separately, but large environments should. This allows " 59 "the user to specify what should be considered \"small\". Set " 60 "it to 0.0 to disable this feature."));
64 PRC_DESC(
"When this is true, then in addition to flattening the scene graph " 65 "nodes, the egg loader will also combine as many Geoms as " 67 "a given node into a single Geom. This has theoretical performance " 68 "benefits, especially on higher-end graphics cards, but it also " 69 "slightly slows down egg loading."));
72 (
"egg-combine-geoms",
false,
73 PRC_DESC(
"Set this true to combine sibling GeomNodes into a single GeomNode, " 74 "when possible. This usually shouldn't be necessary, since the " 75 "egg loader does a pretty good job of combining these by itself."));
78 (
"egg-rigid-geometry",
false,
79 PRC_DESC(
"Set this true to create rigid pieces of an animated character as " 80 "separate static nodes, or false to leave these in with the parent " 81 "node as vertex-animated geometry. Setting this true means less " 82 "geometry has to be vertex-animated, but there will tend to be " 83 "more separate pieces."));
86 (
"egg-flat-shading",
false,
87 PRC_DESC(
"Set this true to allow the egg loader to create geometry with the " 88 "ShadeModelAttrib::M_flat attribute set. It will do this only " 89 "for geometry that has per-polygon normals and/or colors. This " 90 "allows the egg loader to avoid duplicating vertices when they " 91 "are shared between connected polygons with different normals or " 92 "colors, but it prevents the flat-shaded geometry from being " 93 "combined with any adjacent smooth-shaded geometry (for instance, " 94 "as the result of a flatten_strong operation). It is false by " 95 "default, since flat-shaded geometry is rare; but you may wish " 96 "to set it true if your scene largely or entirely consists of " 97 "flat-shaded polygons."));
100 (
"egg-flat-colors",
true,
101 PRC_DESC(
"Set this true to allow the egg loader to create geometry with the " 102 "ColorAttrib::T_flat attribute set: that is, geometry that uses " 103 "the scene graph color instead of per-vertex color. Normally Panda " 104 "will do this as an optimization for Geoms whose vertices are all " 105 "the same color, or all white. This allows the removal of the " 106 "color attribute from the vertices where it is not necessary to " 107 "specify colors per-vertex. If this is false, the color attribute " 108 "will always be specified per-vertex, even if all vertices have the " 112 (
"egg-load-old-curves",
true,
113 PRC_DESC(
"When this is true, a <NurbsCurve> entry appearing in an egg file " 114 "will load as a NurbsCurve or ClassicNurbsCurve object (see below). " 115 "When this is false, it will load a RopeNode instead, which uses the " 116 "new NurbsCurveEvaluator interface."));
120 (
"egg-load-classic-nurbs-curves",
false,
121 PRC_DESC(
"When this is true (and the above is also true), a <NurbsCurve> " 122 "entry appearing in an egg file will load a ClassicNurbsCurve object " 123 "instead of the default, a NurbsCurve object. This only makes a " 124 "difference when the NURBS++ library is available, in which case the " 125 "default, NurbsCurve, is actually a NurbsPPCurve object."));
129 (
"egg-accept-errors",
true,
130 PRC_DESC(
"When this is true, certain kinds of recoverable errors (not syntax " 131 "errors) in an egg file will be allowed and ignored when an egg file " 132 "is loaded. When it is false, only perfectly pristine egg files may " 137 (
"egg-suppress-hidden",
false,
138 PRC_DESC(
"When this is true, objects flagged as \"hidden\" with the visibility " 139 "scalar are not created at all. When false, these objects are " 140 "created, but initially stashed."));
144 (
"egg-alpha-mode", EggRenderMode::AM_blend,
145 PRC_DESC(
"Specifies the alpha mode to apply when the alpha specification " 146 "\"on\" appears in the egg file (or when a primitive is implicitly " 147 "transparent, because of a <RGBA> that involves a non-unity alpha, " 148 "or because of a four-channel texture."));
151 (
"egg-max-vertices", 65534,
152 PRC_DESC(
"Specifies the maximum number of vertices that will be " 153 "added to any one GeomVertexData by the egg loader."));
156 (
"egg-max-indices", 65535,
157 PRC_DESC(
"Specifies the maximum number of vertex indices that will be " 158 "added to any one GeomPrimitive by the egg loader."));
161 (
"egg-emulate-bface",
true,
162 PRC_DESC(
"When this is true, the bface flag applied to a polygon will " 163 "cause two different polygons to be created, back-to-back. When " 164 "it is false, a single polygon will be created with the two_sided " 168 (
"egg-preload-simple-textures",
true,
169 PRC_DESC(
"This specifies whether the egg loader will generate simple " 170 "texture images for each texture loaded. This supercedes the " 171 "preload-simple-textures global default, for egg files. In " 172 "fact, the egg loader will generate simple texture images if " 173 "either this or preload-simple-textures is true."));
176 (
"egg-vertex-membership-quantize", 0.1,
177 PRC_DESC(
"Specifies the nearest amount to round each vertex joint " 178 "membership value when loading an egg file. This affects animated " 179 "egg files only. There is a substantial runtime " 180 "performance advantage for reducing trivial differences in joint " 181 "membership. Set this to 0 to leave joint membership as it is."));
184 (
"egg-vertex-max-num-joints", 4,
185 PRC_DESC(
"Specifies the maximum number of distinct joints that are allowed " 186 "to control any one vertex. If a vertex requests assignment to " 187 "more than this number of joints, the joints with the lesser membership " 188 "value are ignored. Set this to -1 to allow any number of joints."));
191 (
"egg-implicit-alpha-binary",
false,
192 PRC_DESC(
"If this is true, then a <Scalar> alpha value appearing in an egg " 193 "file that appears to specify only a binary (0 or 1) value for alpha " 194 "will automatically be downgraded to alpha type \"binary\" instead of " 195 "whatever appears in the egg file."));
197 ConfigureFn(config_egg2pg) {
209 static bool initialized =
false;
221 (
"egg-object-type-*",
222 ConfigVariableCore::VT_string,
"",
223 "Defines egg syntax for the named object type.",
224 ConfigVariableCore::F_dynamic);
226 EggRenderState::init_type();
227 LoaderFileTypeEgg::init_type();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as a boolean type.
static LoaderFileTypeRegistry * get_global_ptr()
Returns a pointer to the global LoaderFileTypeRegistry object.
This defines the Loader interface to read Egg files.
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere ...
void register_type(LoaderFileType *type)
Defines a new LoaderFileType in the universe.
This is a convenience class to specialize ConfigVariable as a floating- point type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ConfigVariableCore * make_variable_template(const std::string &pattern, ConfigFlags::ValueType type, const std::string &default_value, const std::string &description=std::string(), int flags=0)
Defines a variable "template" to match against dynamically-defined variables that may or may not be c...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class specializes ConfigVariable as an enumerated type.
This class maintains the set of all known LoaderFileTypes in the universe.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as an integer type.
void init_libegg2pg()
Initializes the library.