53 #include "logicOpAttrib.h" 95 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_PGRAPH) 96 #error Buildsystem error: BUILDING_PANDA_PGRAPH not defined 99 ConfigureDef(config_pgraph);
100 NotifyCategoryDef(pgraph,
"");
101 NotifyCategoryDef(loader,
"");
102 NotifyCategoryDef(portal,
"");
104 ConfigureFn(config_pgraph) {
109 (
"fake-view-frustum-cull",
false,
110 PRC_DESC(
"Set this true to cause culling to be performed by rendering the " 111 "object in red wireframe, rather than actually culling it. This " 112 "helps make culling errors obvious. This variable only has an " 113 "effect when Panda is not compiled for a release build."));
116 (
"clip-plane-cull",
true,
117 PRC_DESC(
"This is normally true; set it false to disable culling of objects " 118 "that are completely behind one or more clip planes (primarily " 119 "useful for debugging) This also disables the use of occluders."));
122 (
"allow-portal-cull",
false,
123 PRC_DESC(
"Set this true to enable portal clipping. This will enable the " 124 "renderer to cull more objects that are clipped if not in the " 125 "current list of portals. This is still somewhat experimental."));
128 (
"debug-portal-cull",
false,
129 PRC_DESC(
"Set this true to enable debug visualization during portal clipping." 130 "(You first need to enable portal culling, using the allow-portal-cull" 134 (
"show-occluder-volumes",
false,
135 PRC_DESC(
"Set this true to enable debug visualization of the volumes used " 136 "to cull objects behind an occluder."));
139 (
"unambiguous-graph",
false,
140 PRC_DESC(
"Set this true to make ambiguous path warning messages generate an " 141 "assertion failure instead of just a warning (which can then be " 142 "trapped with assert-abort)."));
145 (
"detect-graph-cycles",
true,
146 PRC_DESC(
"Set this true to attempt to detect cycles in the scene graph " 147 "(e.g. a node which is its own parent) as soon as they are " 148 "made. This has no effect in NDEBUG mode."));
151 (
"no-unsupported-copy",
false,
152 PRC_DESC(
"Set this true to make an attempt to copy an unsupported type " 153 "generate an assertion failure instead of just a warning (which " 154 "can then be trapped with assert-abort)."));
157 (
"allow-unrelated-wrt",
true,
158 PRC_DESC(
"Set this true to allow unrelated NodePaths (that is, nodes which " 159 "have no common ancestor) to be adjusted relative to each other. If " 160 "true, these will be treated as if they had a common node above " 161 "their top nodes."));
164 (
"paranoid-compose",
false,
165 PRC_DESC(
"Set this true to double-check the componentwise transform compose " 166 "(or invert) operation against the equivalent matrix-based " 167 "operation. This has no effect if NDEBUG is defined."));
170 (
"compose-componentwise",
true,
171 PRC_DESC(
"Set this true to perform componentwise compose and invert " 172 "operations when possible. If this is false, the compositions " 173 "are always computed by matrix."));
176 (
"paranoid-const",
false,
177 PRC_DESC(
"Set this true to double-check that nothing is inappropriately " 178 "modifying the supposedly const structures like RenderState, " 179 "RenderAttrib, TransformState, and RenderEffect. This has no effect " 180 "if NDEBUG is defined."));
183 (
"auto-break-cycles",
true,
184 PRC_DESC(
"Set this true to automatically detect and break reference-count " 185 "cycles in the TransformState and RenderState caches. When this " 186 "is false, you must explicitly call TransformState.clear_cache() " 187 "from time to time to prevent gradual memory bloat."));
190 (
"garbage-collect-states",
true,
191 PRC_DESC(
"Set this true to defer destruction of TransformState and " 192 "RenderState objects until the end of the frame (or whenever " 193 "TransformState::garbage_collect() and RenderState::garbage_collect() " 194 "are called). This is a particularly useful thing to do when " 195 "using multiple threads, because it improves parallelization."));
198 (
"garbage-collect-states-rate", 1.0,
199 PRC_DESC(
"The fraction of the total number of TransformStates " 200 "(or RenderStates, or whatever) that are processed with " 201 "each garbage collection step. Setting this smaller than " 202 "1.0 will collect fewer states each frame, which may require " 203 "less processing time, but risks getting unstable cache " 204 "performance if states accumulate faster than they can be " 208 (
"transform-cache",
true,
209 PRC_DESC(
"Set this true to enable the cache of TransformState objects. " 210 "Using the cache saves time computing transforms and inverse " 211 "transforms, but imposes some overhead for maintaining the " 215 (
"state-cache",
true,
216 PRC_DESC(
"Set this true to enable the cache of RenderState objects, " 217 "similar to the TransformState cache controlled via " 218 "transform-cache."));
221 (
"uniquify-transforms",
true,
222 PRC_DESC(
"Set this true to ensure that equivalent TransformStates " 223 "are pointerwise equal. This may improve caching performance, " 224 "but also adds additional overhead to maintain the cache, " 225 "including the need to check for a composition cycle in " 229 (
"uniquify-states",
true,
230 PRC_DESC(
"Set this true to ensure that equivalent RenderStates " 231 "are pointerwise equal. This may improve caching performance, " 232 "but also adds additional overhead to maintain the cache, " 233 "including the need to check for a composition cycle in " 234 "the cache. It is highly recommended to keep this on."));
237 (
"uniquify-attribs",
true,
238 PRC_DESC(
"Set this true to ensure that equivalent RenderAttribs " 239 "are pointerwise equal. This may improve caching performance, " 240 "but also adds additional overhead to maintain the cache, " 241 "including the need to check for a composition cycle in " 245 (
"retransform-sprites",
true,
246 PRC_DESC(
"To render sprite-based particle effects, Panda must convert " 247 "the sprite points from object space into clip space, and compute " 248 "the corners of the quads in clip space. When this variable is " 249 "false, the resulting quads are then sent to the graphics " 250 "hardware in clip space. When this is true, the quads are " 251 "re-transformed back into the original object space, which is " 252 "necessary in order for fog to work correctly on the sprites."));
255 (
"depth-offset-decals",
true,
256 PRC_DESC(
"Set this true to allow decals to be implemented via the advanced " 257 "depth offset feature, if supported, instead of via the traditional " 258 "(and slower) two-pass approach. This is currently the only method " 259 "by which decals are implemented in Panda3D, and as such, this " 260 "setting is ignored."));
263 (
"max-collect-vertices", 65534,
264 PRC_DESC(
"Specifies the maximum number of vertices that are allowed to be " 265 "accumulated into any one GeomVertexData structure as a result " 266 "of collecting objects together during a flatten operation. " 267 "This prevents the accidental generation of large vertex buffers " 268 "from lots of smaller vertex buffers, while not " 269 "imposing a limit on the original size of any one " 270 "GeomVertexData structure."));
273 (
"max-collect-indices", 65535,
274 PRC_DESC(
"Specifies the maximum number of vertex indices that are allowed " 275 "to be accumulated into any one GeomPrimitive as a result " 276 "of collecting objects together during a flatten operation. " 277 "This prevents the accidental generation of large index buffers " 278 "from lots of smaller index buffers, while not " 279 "imposing a limit on the original size of any one " 283 (
"premunge-data",
true,
284 PRC_DESC(
"Set this true to preconvert vertex data at model load time to " 285 "match the data requirements of the current GSG. For instance, " 286 "color columns are pre-converted to match OpenGL or DirectX " 287 "encoding requirements, as appropriate. When this is false, the " 288 "data will be munged at render time instead."));
291 (
"preserve-geom-nodes",
false,
292 PRC_DESC(
"This specifies the default value for the \"preserved\" flag on " 293 "every GeomNode created. When this is true, GeomNodes will not " 294 "be flattened, so setting this true effectively disables the " 295 "use of flatten to combine GeomNodes."));
298 (
"flatten-geoms",
true,
299 PRC_DESC(
"When this is true (the default), NodePath::flatten_strong() and " 300 "flatten_medium() will attempt to combine multiple Geoms into " 301 "as few Geoms as possible, by combing GeomVertexDatas and then " 302 "unifying. Setting this false disables this behavior, so that " 303 "NodePath flatten operations will only reduce nodes. This affects " 304 "only the NodePath interfaces; you may still make the lower-level " 305 "SceneGraphReducer calls directly."));
309 PRC_DESC(
"Specifies an upper limit on the maximum number of lenses " 310 "and the maximum lens index number) that may be associated with " 311 "a single LensNode. There is no technical reason for this " 312 "limitation, but very large numbers are probably a mistake, so " 313 "this can be used as a simple sanity check. Set it larger or " 314 "smaller to suit your needs."));
317 (
"polylight-info",
false,
318 PRC_DESC(
"Set this true to view some info statements regarding the polylight. " 319 "It is helpful for debugging."));
322 (
"show-vertex-animation",
false,
323 PRC_DESC(
"Set this true to flash any objects whose vertices are animated " 324 "by Panda on the CPU (flash red) or by hardware (flash blue). " 325 "This only has effect when NDEBUG is not defined."));
328 (
"show-transparency",
false,
329 PRC_DESC(
"Set this true to flash any objects that are rendered in " 330 "some transparency mode. The color chosen is based on the " 331 "particular transparency mode in effect. This only has effect " 332 "when NDEBUG is not defined."));
336 PRC_DESC(
"Set this false to disable TransparencyAttrib::M_dual altogether " 337 "(and use M_alpha in its place)."));
340 (
"m-dual-opaque",
true,
341 PRC_DESC(
"Set this false to disable just the opaque part of M_dual."));
344 (
"m-dual-transparent",
true,
345 PRC_DESC(
"Set this false to disable just the transparent part of M_dual."));
348 (
"m-dual-flash",
false,
349 PRC_DESC(
"Set this true to flash any objects that use M_dual, for debugging."));
353 PRC_DESC(
"List the model loader modules that Panda will automatically " 354 "import when a new, unknown model type is loaded. This may be " 355 "either the name of a module, or a space-separate list of filename " 356 "extensions, followed by the name of the module."));
359 (
"default-model-extension",
"",
360 PRC_DESC(
"This specifies the filename extension (with leading dot) that " 361 "should be assumed if an attempt is made to load a filename that " 362 "has no extension. This is primarily designed to support legacy " 363 "code that used the now-deprecated implicit-extension feature of " 364 "Panda's loader; new code should probably give the correct name " 365 "for each model file they intend to load."));
368 (
"allow-live-flatten",
true,
369 PRC_DESC(
"Set this true to allow the use of flatten_strong() or any " 370 "variant on a node that is attached to a live scene graph node, " 371 "or false to disallow this. Flattening a live scene graph node " 372 "can cause problems when threading is enabled. This variable " 373 "only has an effect when Panda is not compiled for a release " 384 static bool initialized =
false;
390 AlphaTestAttrib::init_type();
391 AntialiasAttrib::init_type();
392 AudioVolumeAttrib::init_type();
393 AuxBitplaneAttrib::init_type();
394 AuxSceneData::init_type();
395 BillboardEffect::init_type();
397 ClipPlaneAttrib::init_type();
398 ColorAttrib::init_type();
399 ColorBlendAttrib::init_type();
400 ColorScaleAttrib::init_type();
401 ColorWriteAttrib::init_type();
402 CompassEffect::init_type();
403 CullFaceAttrib::init_type();
404 CullBin::init_type();
405 CullBinAttrib::init_type();
406 CullResult::init_type();
407 CullTraverser::init_type();
408 CullableObject::init_type();
409 DecalEffect::init_type();
410 DepthOffsetAttrib::init_type();
411 DepthTestAttrib::init_type();
412 DepthWriteAttrib::init_type();
413 FindApproxLevelEntry::init_type();
415 FogAttrib::init_type();
416 GeomDrawCallbackData::init_type();
417 GeomNode::init_type();
418 GeomTransformer::init_type();
419 LensNode::init_type();
421 LightAttrib::init_type();
422 LightRampAttrib::init_type();
424 LoaderFileType::init_type();
425 LoaderFileTypeBam::init_type();
426 LogicOpAttrib::init_type();
427 MaterialAttrib::init_type();
428 ModelFlattenRequest::init_type();
429 ModelLoadRequest::init_type();
430 ModelSaveRequest::init_type();
431 ModelNode::init_type();
432 ModelRoot::init_type();
433 NodePath::init_type();
434 NodePathComponent::init_type();
435 PandaNode::init_type();
436 PandaNodePipelineReader::init_type();
437 ParamNodePath::init_type();
438 PlaneNode::init_type();
439 PolylightNode::init_type();
440 PolylightEffect::init_type();
441 PortalNode::init_type();
442 OccluderEffect::init_type();
443 OccluderNode::init_type();
444 PortalClipper::init_type();
445 RenderAttrib::init_type();
446 RenderEffect::init_type();
447 RenderEffects::init_type();
448 RenderModeAttrib::init_type();
449 RenderState::init_type();
450 RescaleNormalAttrib::init_type();
451 SceneSetup::init_type();
452 ScissorAttrib::init_type();
453 ScissorEffect::init_type();
454 ShadeModelAttrib::init_type();
455 ShaderAttrib::init_type();
456 ShowBoundsEffect::init_type();
457 StateMunger::init_type();
458 StencilAttrib::init_type();
459 TexMatrixAttrib::init_type();
460 TexProjectorEffect::init_type();
461 TextureAttrib::init_type();
462 TexGenAttrib::init_type();
463 TransformState::init_type();
464 TransparencyAttrib::init_type();
467 AntialiasAttrib::register_with_read_factory();
468 AudioVolumeAttrib::register_with_read_factory();
470 BillboardEffect::register_with_read_factory();
479 CullFaceAttrib::register_with_read_factory();
481 DepthOffsetAttrib::register_with_read_factory();
499 OccluderEffect::register_with_read_factory();
502 RenderModeAttrib::register_with_read_factory();
505 ScissorAttrib::register_with_read_factory();
506 ScissorEffect::register_with_read_factory();
507 ShadeModelAttrib::register_with_read_factory();
508 ShaderAttrib::register_with_read_factory();
510 TexMatrixAttrib::register_with_read_factory();
511 TexProjectorEffect::register_with_read_factory();
512 TextureAttrib::register_with_read_factory();
514 TransformState::register_with_read_factory();
520 TransformState::init_states();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PlaneNode.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ColorBlendAttrib.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ModelRoot.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ShowBoundsEffect.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ModelNode.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type DepthWriteAttrib.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type Fog.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type Camera.
static void register_with_read_factory()
Tells the BamReader how to create objects of type OccluderNode.
This is a convenience class to specialize ConfigVariable as a boolean type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static LoaderFileTypeRegistry * get_global_ptr()
Returns a pointer to the global LoaderFileTypeRegistry object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void init_states()
Make sure the global _states map is allocated.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type LightRampAttrib.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void init_attribs()
Make sure the global _attribs map is allocated.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type RenderState.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PolylightNode.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is similar to ConfigVariable, but it reports its value as a list of strings.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
This defines the Loader interface to read Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type DepthTestAttrib.
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.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PortalNode.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(LoaderFileType *type)
Defines a new LoaderFileType in the universe.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type MaterialAttrib.
static void register_with_read_factory()
Tells the BamReader how to create objects of type AlphaTestAttrib.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CullBinAttrib.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type AuxBitplaneAttrib.
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 floating- point type.
static void register_with_read_factory()
Tells the BamReader how to create objects of type LensNode.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type TransparencyAttrib.
This is a convenience class to specialize ConfigVariable as a string 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.
static void register_with_read_factory()
Tells the BamReader how to create objects of type FogAttrib.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type TexGenAttrib.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ColorWriteAttrib.
static void register_with_read_factory()
Tells the BamReader how to create objects of type LogicOpAttrib.
static void register_with_read_factory()
Tells the BamReader how to create objects of type RenderEffects.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ColorScaleAttrib.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CompassEffect.
This class maintains the set of all known LoaderFileTypes in the universe.
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.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type GeomNode.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type DecalEffect.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ParamValue.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ColorAttrib.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as an integer 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.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ClipPlaneAttrib.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type LightAttrib.
static void register_with_read_factory()
Tells the BamReader how to create objects of type RescaleNormalAttrib.
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.
void init_libpgraph()
Initializes the library.
static void init_states()
Make sure the global _states map is allocated.