Browse Source

Ensure CustomGeometry world bounding box gets updated on Commit().

Lasse Öörni 10 years ago
parent
commit
0dafa13b0c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/Urho3D/Graphics/CustomGeometry.cpp

+ 3 - 0
Source/Urho3D/Graphics/CustomGeometry.cpp

@@ -341,6 +341,9 @@ void CustomGeometry::Commit()
             boundingBox_.Merge(vertices_[i][j].position_);
     }
 
+    // Make sure world-space bounding box will be updated
+    OnMarkedDirty(node_);
+
     // Resize (recreate) the vertex buffer only if necessary
     if (vertexBuffer_->GetVertexCount() != totalVertices || vertexBuffer_->GetElementMask() != elementMask_ ||
         vertexBuffer_->IsDynamic() != dynamic_)