add support-fade-lod

This commit is contained in:
David Rose 2007-02-13 23:28:13 +00:00
parent 6aff5d74be
commit 755288c2d5
3 changed files with 11 additions and 0 deletions

View File

@ -193,6 +193,12 @@ ConfigVariableBool retransform_sprites
"re-transformed back into the original object space, which is " "re-transformed back into the original object space, which is "
"necessary in order for fog to work correctly on the sprites.")); "necessary in order for fog to work correctly on the sprites."));
ConfigVariableBool support_fade_lod
("support-fade-lod", true,
PRC_DESC("Set this false to make FadeLOD nodes behave like regular LOD nodes "
"(ignoring the fade time). This may be useful, for instance, to "
"test the performance impact of using FadeLOD nodes."));
ConfigVariableInt max_collect_vertices ConfigVariableInt max_collect_vertices
("max-collect-vertices", 65535, ("max-collect-vertices", 65535,
PRC_DESC("Specifies the maximum number of vertices that are allowed to be " PRC_DESC("Specifies the maximum number of vertices that are allowed to be "

View File

@ -46,6 +46,7 @@ extern ConfigVariableBool auto_break_cycles;
extern ConfigVariableBool transform_cache; extern ConfigVariableBool transform_cache;
extern ConfigVariableBool state_cache; extern ConfigVariableBool state_cache;
extern ConfigVariableBool retransform_sprites; extern ConfigVariableBool retransform_sprites;
extern ConfigVariableBool support_fade_lod;
extern ConfigVariableInt max_collect_vertices; extern ConfigVariableInt max_collect_vertices;
extern ConfigVariableInt max_collect_indices; extern ConfigVariableInt max_collect_indices;

View File

@ -81,6 +81,10 @@ make_copy() const {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
bool FadeLODNode:: bool FadeLODNode::
cull_callback(CullTraverser *trav, CullTraverserData &data) { cull_callback(CullTraverser *trav, CullTraverserData &data) {
if (!support_fade_lod) {
return LODNode::cull_callback(trav, data);
}
if (is_any_shown()) { if (is_any_shown()) {
return show_switches_cull_callback(trav, data); return show_switches_cull_callback(trav, data);
} }