| 125 | } |
| 126 | |
| 127 | void GpuCommandBuffer::UpdateTransforms(RenderComponent* component, MeshWorldTransforms* transforms) |
| 128 | { |
| 129 | auto it = drawCommandIndices_.find(component); |
| 130 | if (it == drawCommandIndices_.end()) { |
| 131 | return; |
| 132 | } |
| 133 | |
| 134 | for (size_t i = 0; i < component->GetMeshCount(); ++i) { |
| 135 | const MeshPtr mesh = component->GetMesh(i); |
| 136 | auto index = it->second.find(mesh); |
| 137 | // Mesh does not match this command buffer |
| 138 | if (index == it->second.end()) { |
| 139 | continue; |
| 140 | } |
| 141 | |
| 142 | modelTransforms_->Set(transforms->transforms[i], index->second); |
| 143 | performedUpdate_ = true; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | void GpuCommandBuffer::UpdateMaterials(RenderComponent* component, const GpuMaterialBufferPtr& materials) |
| 148 | { |
no test coverage detected