Selection cache is also updated when objects are updated
This commit is contained in:
parent
069fc66565
commit
0b1cc8d4c2
8 changed files with 37 additions and 8 deletions
|
|
@ -108,20 +108,20 @@ bool DrawComponent::check_timers(DrawingProgram& drawP, const std::shared_ptr<Dr
|
|||
void DrawComponent::commit_update(DrawingProgram& drawP, bool invalidateCache) {
|
||||
auto lockedCollabInfo = collabListInfo.lock();
|
||||
if(invalidateCache && lockedCollabInfo && worldAABB)
|
||||
drawP.compCache.preupdate_component(lockedCollabInfo, worldAABB);
|
||||
drawP.preupdate_component(lockedCollabInfo);
|
||||
initialize_draw_data(drawP);
|
||||
calculate_world_bounds();
|
||||
if(invalidateCache && lockedCollabInfo && worldAABB)
|
||||
drawP.compCache.preupdate_component(lockedCollabInfo, worldAABB);
|
||||
drawP.preupdate_component(lockedCollabInfo);
|
||||
}
|
||||
|
||||
void DrawComponent::commit_transform(DrawingProgram& drawP, bool invalidateCache) {
|
||||
auto lockedCollabInfo = collabListInfo.lock();
|
||||
if(invalidateCache && lockedCollabInfo && worldAABB)
|
||||
drawP.compCache.preupdate_component(lockedCollabInfo, worldAABB);
|
||||
drawP.preupdate_component(lockedCollabInfo);
|
||||
calculate_world_bounds();
|
||||
if(invalidateCache && lockedCollabInfo && worldAABB)
|
||||
drawP.compCache.preupdate_component(lockedCollabInfo, worldAABB);
|
||||
drawP.preupdate_component(lockedCollabInfo);
|
||||
}
|
||||
|
||||
void DrawComponent::client_send_place_many(DrawingProgram& drawP, std::vector<CollabListType::ObjectInfoPtr>& comps) {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void DrawImage::update(DrawingProgram& drawP) {
|
|||
std::shared_ptr<ResourceDisplay> display = drawP.world.drawData.rMan->get_display_data(d.imageID);
|
||||
if(display) {
|
||||
if(display->update_draw() && collabListInfo.lock())
|
||||
drawP.compCache.invalidate_cache_at_optional_aabb_before_pos(worldAABB, collabListInfo.lock()->pos);
|
||||
drawP.invalidate_cache_at_component(collabListInfo.lock());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue