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

Method UnregisterMaterial

SDK/src/NDK/Components/GraphicsComponent.cpp:244–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242 }
243
244 void GraphicsComponent::UnregisterMaterial(Nz::Material* material)
245 {
246 auto it = m_materialEntries.find(material);
247 NazaraAssert(it != m_materialEntries.end(), "Material not registered");
248
249 MaterialEntry& matEntry = it->second;
250 if (--matEntry.renderableCounter == 0)
251 {
252 if (material->GetReflectionMode() == Nz::ReflectionMode_RealTime)
253 {
254 if (--m_reflectiveMaterialCount == 0)
255 InvalidateReflectionMap();
256 }
257
258 m_materialEntries.erase(it);
259 }
260 }
261
262 /*!
263 * \brief Updates the bounding volume

Callers

nothing calls this directly

Calls 1

endMethod · 0.45

Tested by

no test coverage detected