MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / AddToRenderQueue

Method AddToRenderQueue

src/Nazara/Graphics/SkeletalModel.cpp:56–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 */
55
56 void SkeletalModel::AddToRenderQueue(AbstractRenderQueue* renderQueue, const InstanceData& instanceData) const
57 {
58 if (!m_mesh)
59 return;
60
61 unsigned int submeshCount = m_mesh->GetSubMeshCount();
62 for (unsigned int i = 0; i < submeshCount; ++i)
63 {
64 const SkeletalMesh* mesh = static_cast<const SkeletalMesh*>(m_mesh->GetSubMesh(i));
65 const Material* material = GetMaterial(mesh->GetMaterialIndex());
66
67 MeshData meshData;
68 meshData.indexBuffer = mesh->GetIndexBuffer();
69 meshData.primitiveMode = mesh->GetPrimitiveMode();
70 meshData.vertexBuffer = SkinningManager::GetBuffer(mesh, &m_skeleton);
71
72 renderQueue->AddMesh(instanceData.renderOrder, material, meshData, m_skeleton.GetAABB(), instanceData.transformMatrix);
73 }
74 }
75
76 /*!
77 * \brief Updates the animation of the mesh

Callers

nothing calls this directly

Calls 7

GetSubMeshCountMethod · 0.80
GetSubMeshMethod · 0.80
GetMaterialIndexMethod · 0.80
GetPrimitiveModeMethod · 0.80
GetIndexBufferMethod · 0.45
AddMeshMethod · 0.45
GetAABBMethod · 0.45

Tested by

no test coverage detected