SpiecsEngine
 
Loading...
Searching...
No Matches

◆ Draw()

template<typename F >
void Spices::Mesh::Draw ( VkCommandBuffer & commandBuffer,
F func )
inline

Call mesh packs Draw().

Parameters
[in]commandBufferWhich command buffer we want submit command.
[in]functhe function pointer used for bind material parameters.

This function is used for bind material parameters.

Parameters
[in]meshpackIdMeshPack index of array.
[in]meshPackMeshPack.

Definition at line 119 of file Mesh.h.

120 {
121 m_Pack->for_each([&](const uint32_t& k, const std::shared_ptr<MeshPack>& v) {
122
128 func(k, v);
129
130 v->OnBind(commandBuffer);
131 v->OnDraw(commandBuffer);
132
133 return false;
134 });
135 }
std::shared_ptr< scl::linked_unordered_map< uint32_t, std::shared_ptr< MeshPack > > > m_Pack
All packs in this mesh.
Definition Mesh.h:115