MCPcopy Create free account
hub / github.com/KTStephano/StratusGFX / UpdateTransforms

Method UpdateTransforms

Source/Engine/StratusGpuCommandBuffer.cpp:127–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

Calls 3

GetMeshCountMethod · 0.80
GetMeshMethod · 0.80
SetMethod · 0.80

Tested by

no test coverage detected