Removed RAW support to compile for Emscripten, fixed bug in cache in online use
This commit is contained in:
parent
c685da008b
commit
f155905185
5 changed files with 21 additions and 14 deletions
|
|
@ -53,8 +53,9 @@ DrawingProgram::DrawingProgram(World& initWorld):
|
|||
for(auto& c : comps)
|
||||
components.clientInsertCallback(c);
|
||||
};
|
||||
components.clientServerLastPosShiftCallback = [&](uint64_t lastShiftPos) {
|
||||
compCache.invalidate_cache_before_pos(lastShiftPos);
|
||||
components.clientServerFirstPosShiftCallback = [&](uint64_t firstShiftPos) {
|
||||
compCache.clear_own_cached_surfaces();
|
||||
selection.clear_own_cached_surfaces();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -216,6 +216,10 @@ void DrawingProgramSelection::invalidate_cache_at_optional_aabb_before_pos(const
|
|||
cache.invalidate_cache_at_optional_aabb_before_pos(aabb, placementToInvalidateAt);
|
||||
}
|
||||
|
||||
void DrawingProgramSelection::clear_own_cached_surfaces() {
|
||||
cache.clear_own_cached_surfaces();
|
||||
}
|
||||
|
||||
void DrawingProgramSelection::preupdate_component(const CollabListType::ObjectInfoPtr& objToCheck) {
|
||||
cache.preupdate_component(objToCheck);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class DrawingProgramSelection {
|
|||
bool is_being_transformed();
|
||||
|
||||
void invalidate_cache_at_optional_aabb_before_pos(const std::optional<SCollision::AABB<WorldScalar>>& aabb, uint64_t placementToInvalidateAt);
|
||||
void clear_own_cached_surfaces();
|
||||
void preupdate_component(const CollabListType::ObjectInfoPtr& objToCheck);
|
||||
private:
|
||||
std::function<bool(const std::shared_ptr<DrawingProgramCacheBVHNode>&, std::vector<CollabListType::ObjectInfoPtr>&)> erase_select_objects_in_bvh_func(std::unordered_set<CollabListType::ObjectInfoPtr>& selectedComponents, const SCollision::ColliderCollection<float>& cC, const SCollision::ColliderCollection<WorldScalar>& cCWorld);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue