| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- // Copyright (C) 2009-2023, Panagiotis Christopoulos Charitos and contributors.
- // All rights reserved.
- // Code licensed under the BSD License.
- // http://www.anki3d.org/LICENSE
- #include <AnKi/Renderer/RenderQueue.h>
- namespace anki {
- U32 RenderQueue::countAllRenderables() const
- {
- U32 drawableCount = 0;
- drawableCount += m_renderables.getSize();
- drawableCount += m_forwardShadingRenderables.getSize();
- for(const SpotLightQueueElement& slight : m_spotLights)
- {
- if(slight.m_shadowRenderQueue)
- {
- drawableCount += slight.m_shadowRenderQueue->countAllRenderables();
- }
- }
- for(const PointLightQueueElement& plight : m_pointLights)
- {
- for(U i = 0; i < 6; ++i)
- {
- if(plight.m_shadowRenderQueues[i])
- {
- drawableCount += plight.m_shadowRenderQueues[i]->countAllRenderables();
- }
- }
- }
- if(m_reflectionProbeForRefresh)
- {
- for(U i = 0; i < 6; ++i)
- {
- if(m_reflectionProbeForRefresh->m_renderQueues[i])
- {
- drawableCount += m_reflectionProbeForRefresh->m_renderQueues[i]->countAllRenderables();
- }
- }
- }
- return drawableCount;
- }
- } // end namespace anki
|