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

Method AddToRenderQueue

src/Nazara/Graphics/TileMap.cpp:26–38  ·  view source on GitHub ↗

! * \brief Adds the TileMap to the rendering queue * * \param renderQueue Queue to be added * \param instanceData Data for the instance */

Source from the content-addressed store, hash-verified

24 * \param instanceData Data for the instance
25 */
26 void TileMap::AddToRenderQueue(AbstractRenderQueue* renderQueue, const InstanceData& instanceData) const
27 {
28 const VertexStruct_XYZ_Color_UV* vertices = reinterpret_cast<const VertexStruct_XYZ_Color_UV*>(instanceData.data.data());
29
30 std::size_t matCount = 0;
31 std::size_t spriteCount = 0;
32 for (const Layer& layer : m_layers)
33 {
34 renderQueue->AddSprites(instanceData.renderOrder, GetMaterial(matCount++), &vertices[spriteCount], layer.tiles.size());
35
36 spriteCount += layer.tiles.size();
37 }
38 }
39
40 void TileMap::MakeBoundingVolume() const
41 {

Callers

nothing calls this directly

Calls 1

AddSpritesMethod · 0.45

Tested by

no test coverage detected