void FilledVectorNode::preRender() { Node::preRender(); float curOpacity = getParent()->getEffectiveOpacity()*m_FillOpacity; VertexArrayPtr pFillVA; pFillVA = m_pFillShape->getVertexArray(); if (isDrawNeeded() || curOpacity != m_OldOpacity) { pFillVA->reset(); Pixel32 color = getFillColorVal(); calcFillVertexes(pFillVA, color); pFillVA->update(); m_OldOpacity = curOpacity; } VectorNode::preRender(); }
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); }