fix bounding volume bug after flatten
This commit is contained in:
parent
f790a11254
commit
700051ff5f
|
|
@ -342,6 +342,7 @@ set_primitive(int i, const GeomPrimitive *primitive) {
|
|||
cdata->_got_usage_hint = false;
|
||||
cdata->_modified = Geom::get_next_modified();
|
||||
clear_cache_stage(current_thread);
|
||||
mark_internal_bounds_stale(cdata);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -387,6 +388,7 @@ add_primitive(const GeomPrimitive *primitive) {
|
|||
cdata->_got_usage_hint = false;
|
||||
cdata->_modified = Geom::get_next_modified();
|
||||
clear_cache_stage(current_thread);
|
||||
mark_internal_bounds_stale(cdata);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -412,6 +414,7 @@ remove_primitive(int i) {
|
|||
cdata->_got_usage_hint = false;
|
||||
cdata->_modified = Geom::get_next_modified();
|
||||
clear_cache_stage(current_thread);
|
||||
mark_internal_bounds_stale(cdata);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -435,6 +438,7 @@ clear_primitives() {
|
|||
cdata->_shade_model = SM_uniform;
|
||||
reset_geom_rendering(cdata);
|
||||
clear_cache_stage(current_thread);
|
||||
mark_internal_bounds_stale(cdata);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -484,6 +484,8 @@ check_valid() const {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
void GeomNode::
|
||||
unify(int max_indices) {
|
||||
bool any_changed = false;
|
||||
|
||||
Thread *current_thread = Thread::get_current_thread();
|
||||
OPEN_ITERATE_CURRENT_AND_UPSTREAM(_cycler, current_thread) {
|
||||
CDStageWriter cdata(_cycler, pipeline_stage, current_thread);
|
||||
|
|
@ -507,6 +509,7 @@ unify(int max_indices) {
|
|||
if (new_entry._geom->copy_primitives_from(entry._geom)) {
|
||||
// Successfully combined!
|
||||
unified = true;
|
||||
any_changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -528,6 +531,10 @@ unify(int max_indices) {
|
|||
}
|
||||
}
|
||||
CLOSE_ITERATE_CURRENT_AND_UPSTREAM(_cycler);
|
||||
|
||||
if (any_changed) {
|
||||
mark_internal_bounds_stale();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue