void VectorNode::preRender(const VertexArrayPtr& pVA, bool bIsParentActive, float parentEffectiveOpacity) { Node::preRender(pVA, bIsParentActive, parentEffectiveOpacity); { ScopeTimer timer(PrerenderProfilingZone); VertexDataPtr pShapeVD = m_pShape->getVertexData(); if (m_bDrawNeeded) { pShapeVD->reset(); Pixel32 color = getColorVal(); calcVertexes(pShapeVD, color); m_bDrawNeeded = false; } if (isVisible()) { m_pShape->setVertexArray(pVA); } } }
void FilledVectorNode::preRender(const VertexArrayPtr& pVA, bool bIsParentActive, float parentEffectiveOpacity) { Node::preRender(pVA, bIsParentActive, parentEffectiveOpacity); float curOpacity = parentEffectiveOpacity*m_FillOpacity; VertexDataPtr pShapeVD = m_pFillShape->getVertexData(); if (isDrawNeeded() || curOpacity != m_EffectiveOpacity) { pShapeVD->reset(); Pixel32 color = getFillColorVal(); calcFillVertexes(pShapeVD, color); m_EffectiveOpacity = curOpacity; } if (isVisible()) { m_pFillShape->setVertexArray(pVA); } VectorNode::preRender(pVA, bIsParentActive, parentEffectiveOpacity); }