Sdk/RenderSystem: Add EnableCulling method

This commit is contained in:
Lynix
2018-08-04 15:38:05 +02:00
parent f3ea154da4
commit 602992609f
6 changed files with 74 additions and 4 deletions

View File

@@ -70,6 +70,33 @@ namespace Nz
return visibleHash;
}
template<typename T>
std::size_t CullingList<T>::FillWithAllEntries()
{
m_results.clear();
std::size_t visibleHash = 0U;
for (NoTestVisibilityEntry& entry : m_noTestList)
{
m_results.push_back(entry.renderable);
Nz::HashCombine(visibleHash, entry.renderable);
}
for (SphereVisibilityEntry& entry : m_sphereTestList)
{
m_results.push_back(entry.renderable);
Nz::HashCombine(visibleHash, entry.renderable);
}
for (VolumeVisibilityEntry& entry : m_volumeTestList)
{
m_results.push_back(entry.renderable);
Nz::HashCombine(visibleHash, entry.renderable);
}
return visibleHash;
}
template<typename T>
auto CullingList<T>::RegisterNoTest(const T* renderable) -> NoTestEntry
{