mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
add support-fade-lod
This commit is contained in:
parent
6aff5d74be
commit
755288c2d5
@ -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 "
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user