void RenderSubmit(SceneCollector& collector) { // (This is only called if a > 0) collector.Submit(&m_Overlay); if (ICmpSelectable::ms_EnableDebugOverlays) { // allocate debug overlays on-demand if (!m_DebugBoundingBoxOverlay) m_DebugBoundingBoxOverlay = new SOverlayLine; if (!m_DebugSelectionBoxOverlay) m_DebugSelectionBoxOverlay = new SOverlayLine; CmpPtr<ICmpVisual> cmpVisual(GetSimContext(), GetEntityId()); if (cmpVisual) { SimRender::ConstructBoxOutline(cmpVisual->GetBounds(), *m_DebugBoundingBoxOverlay); m_DebugBoundingBoxOverlay->m_Thickness = 2; m_DebugBoundingBoxOverlay->m_Color = CColor(1.f, 0.f, 0.f, 1.f); SimRender::ConstructBoxOutline(cmpVisual->GetSelectionBox(), *m_DebugSelectionBoxOverlay); m_DebugSelectionBoxOverlay->m_Thickness = 2; m_DebugSelectionBoxOverlay->m_Color = CColor(0.f, 1.f, 0.f, 1.f); collector.Submit(m_DebugBoundingBoxOverlay); collector.Submit(m_DebugSelectionBoxOverlay); } } else { // reclaim debug overlay line memory when no longer debugging (and make sure to set to zero after deletion) if (m_DebugBoundingBoxOverlay) SAFE_DELETE(m_DebugBoundingBoxOverlay); if (m_DebugSelectionBoxOverlay) SAFE_DELETE(m_DebugSelectionBoxOverlay); } }
void CCmpPathfinder::RenderSubmit(SceneCollector& collector) { for (size_t i = 0; i < m_DebugOverlayShortPathLines.size(); ++i) collector.Submit(&m_DebugOverlayShortPathLines[i]); m_LongPathfinder.HierarchicalRenderSubmit(collector); }
void RenderSubmit(SceneCollector& collector) { if (!m_Enabled) return; for (size_t i = 0; i < m_Sprites.size(); ++i) collector.Submit(&m_Sprites[i]); }
void RenderSubmit(SceneCollector& collector) { if (!m_Enabled || !ICmpOverlayRenderer::m_OverrideVisible) return; for (size_t i = 0; i < m_Sprites.size(); ++i) collector.Submit(&m_Sprites[i]); }
void CParticleManager::RenderSubmit(SceneCollector& collector, const CFrustum& UNUSED(frustum)) { PROFILE("submit unattached particles"); // Delete any unattached emitters that have no particles left m_UnattachedEmitters.remove_if(EmitterHasNoParticles()); // TODO: should do some frustum culling for (std::list<CParticleEmitterPtr>::iterator it = m_UnattachedEmitters.begin(); it != m_UnattachedEmitters.end(); ++it) collector.Submit(it->get()); }