Fix regression in dynamic mesh bounds and triangles setup after refactor
This commit is contained in:
@@ -55,7 +55,7 @@ namespace
|
||||
|
||||
// Index Buffer
|
||||
{
|
||||
if (accessor.AllocateBuffer(MeshBufferType::Index, triangleCount, indexFormat))
|
||||
if (accessor.AllocateBuffer(MeshBufferType::Index, triangleCount * 3, indexFormat))
|
||||
return true;
|
||||
auto indexStream = accessor.Index();
|
||||
ASSERT(indexStream.IsLinear(indexFormat));
|
||||
|
||||
@@ -311,6 +311,11 @@ void MeshBase::SetBounds(const BoundingBox& box)
|
||||
_box = box;
|
||||
BoundingSphere::FromBox(box, _sphere);
|
||||
_hasBounds = true;
|
||||
if (_model && _model->IsLoaded())
|
||||
{
|
||||
// Send event (actors using this model can update bounds, etc.)
|
||||
_model->onLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
void MeshBase::SetBounds(const BoundingBox& box, const BoundingSphere& sphere)
|
||||
|
||||
Reference in New Issue
Block a user