15 #include "config_util.h" 16 #include "animInterface.h" 17 #include "bamCacheIndex.h" 18 #include "bamCacheRecord.h" 19 #include "bamReader.h" 20 #include "bamReaderParam.h" 23 #include "buttonHandle.h" 24 #include "buttonMap.h" 25 #include "cachedTypedWritableReferenceCount.h" 26 #include "callbackData.h" 27 #include "callbackObject.h" 28 #include "clockObject.h" 29 #include "configurable.h" 30 #include "copyOnWriteObject.h" 31 #include "cPointerCallbackObject.h" 33 #include "doubleBitMask.h" 34 #include "factoryParam.h" 36 #include "nodeCachedReferenceCount.h" 37 #include "paramValue.h" 38 #include "referenceCount.h" 39 #include "sparseArray.h" 40 #include "typedObject.h" 41 #include "typedReferenceCount.h" 42 #include "typedWritable.h" 43 #include "typedWritableReferenceCount.h" 44 #include "writableConfigurable.h" 45 #include "writableParam.h" 46 #include "keyboardButton.h" 47 #include "mouseButton.h" 51 ConfigureDef(config_util);
52 NotifyCategoryDef(util,
"");
53 NotifyCategoryDef(bam, util_cat);
56 (
"bam-endian", BamEnums::BE_native,
57 PRC_DESC(
"The default endianness to use for writing major numeric data " 58 "tables to bam files. This does not affect all numbers written " 59 "to bam files, only those for which the individual object was " 60 "designed to support this flag. The default is \"native\"; you " 61 "may set it to \"littleendian\" or \"bigendian\" to target a " 62 "particular platform."));
65 (
"bam-stdfloat-double",
66 #ifdef STDFLOAT_DOUBLE
71 PRC_DESC(
"The default width of floating-point numbers to write to a bam " 72 "file. Set this true to force doubles (64-bit floats), or false " 73 "to force singles (32-bit floats). The default is whichever width " 74 "Panda has been compiled to use natively. Normally, this setting " 75 "should not be changed from the default."));
78 (
"bam-texture-mode", BamEnums::BTM_relative,
79 PRC_DESC(
"Set this to specify how textures should be written into Bam files." 80 "See the panda source or documentation for available options."));
82 ConfigureFn(config_util) {
99 if (model_path == NULL) {
102 PRC_DESC(
"The default directories to search for all models and general " 103 "files loaded into Panda."));
112 if (plugin_path == NULL) {
114 (
"plugin-path",
"<auto>",
115 PRC_DESC(
"The directories to search for plugin shared libraries."));
122 (
"sleep-precision", 0.01,
123 PRC_DESC(
"This is the accuracy within which we can expect select() to " 124 "return precisely. That is, if we use select() to request a " 125 "timeout of 1.0 seconds, we can expect to actually sleep for " 126 "somewhere between 1.0 and 1.0 + sleep-precision seconds."));
129 (
"preload-textures",
true,
130 PRC_DESC(
"When this is true, texture images are loaded from disk as soon " 131 "as the Texture is created from the TexturePool. When this is " 132 "false, the Texture is created immediately, but the image data " 133 "is not loaded from disk until the Texture is actually rendered " 134 "(or otherwise prepared) on the GSG. This can help reduce " 135 "wasted memory from Textures that are created but never used " 139 (
"preload-simple-textures",
false,
140 PRC_DESC(
"When this is true, every texture image will have a simple " 141 "image generated for it at load time. (Normally, textures " 142 "get a simple image at egg2bam time.) This slows the initial " 143 "loading time of textures, but allows you to take advantage " 144 "of gsg::set_incomplete_render() to load textures on-the-fly " 145 "in a sub-thread. It's not generally necessary if you are " 146 "loading bam files that were generated via egg2bam."));
149 (
"cache-check-timestamps",
true,
150 PRC_DESC(
"Set this true to check the timestamps on disk (when possible) " 151 "before reloading a file from the in-memory cache, e.g. via ModelPool, " 152 "TexturePool, etc. When this is false, a model or texture " 153 "that was previously loaded and is still found in the ModelPool is " 154 "immediately returned without consulting the disk, even if the " 155 "file on disk has recently changed. When this is true, the file " 156 "on disk is always checked to ensure its timestamp has not " 157 "recently changed; and if it has, the in-memory cache is automatically " 158 "invalidated and the file is reloaded from disk. This is not related " 159 "to on-disk caching via model-cache-dir, which always checks the " 172 static bool initialized =
false;
178 AnimInterface::init_type();
179 BamCacheIndex::init_type();
180 BamCacheRecord::init_type();
181 BamReaderAuxData::init_type();
182 BamReaderParam::init_type();
183 BitArray::init_type();
184 BitMask16::init_type();
185 BitMask32::init_type();
186 BitMask64::init_type();
187 ButtonHandle::init_type();
188 ButtonMap::init_type();
189 CPointerCallbackObject::init_type();
190 CachedTypedWritableReferenceCount::init_type();
191 CallbackData::init_type();
192 CallbackObject::init_type();
193 ClockObject::init_type();
194 Configurable::init_type();
195 CopyOnWriteObject::init_type();
196 Datagram::init_type();
197 DoubleBitMaskNative::init_type();
198 FactoryParam::init_type();
199 Namable::init_type();
200 NodeCachedReferenceCount::init_type();
201 ParamMatrix3d::init_type(
"ParamMatrix3d");
202 ParamMatrix3f::init_type(
"ParamMatrix3f");
203 ParamMatrix4d::init_type(
"ParamMatrix4d");
204 ParamMatrix4f::init_type(
"ParamMatrix4f");
205 ParamString::init_type(
"ParamString");
206 ParamTypedRefCount::init_type();
207 ParamValueBase::init_type();
208 ParamVecBase2d::init_type(
"ParamVecBase2d");
209 ParamVecBase2f::init_type(
"ParamVecBase2f");
210 ParamVecBase2i::init_type(
"ParamVecBase2i");
211 ParamVecBase3d::init_type(
"ParamVecBase3d");
212 ParamVecBase3f::init_type(
"ParamVecBase3f");
213 ParamVecBase3i::init_type(
"ParamVecBase3i");
214 ParamVecBase4f::init_type(
"ParamVecBase4f");
215 ParamVecBase4d::init_type(
"ParamVecBase4d");
216 ParamVecBase4i::init_type(
"ParamVecBase4i");
217 ParamWstring::init_type(
"ParamWstring");
218 QuadBitMaskNative::init_type();
219 ReferenceCount::init_type();
220 SparseArray::init_type();
222 TypedReferenceCount::init_type();
223 TypedWritable::init_type();
224 TypedWritableReferenceCount::init_type();
225 WritableConfigurable::init_type();
226 WritableParam::init_type();
This is similar to a ConfigVariableList, but it returns its list as a DSearchPath, as a list of directories.
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
This is a convenience class to specialize ConfigVariable as a boolean type.
This is a convenience class to specialize ConfigVariable as a floating-point type.
This class specializes ConfigVariable as an enumerated type.
static void register_with_read_factory()
Tells the BamReader how to create objects of type BamCacheRecord.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ParamValue.
static void register_with_read_factory()
Tells the BamReader how to create objects of type BamCacheRecord.