Example #1
0
	override public void Redraw(bool shouldForceDirty, bool shouldUpdateDepth)
	{
		bool wasMatrixDirty = _isMatrixDirty;
		bool wasAlphaDirty = _isAlphaDirty;
		
		UpdateDepthMatrixAlpha(shouldForceDirty, shouldUpdateDepth);
		
		if(shouldUpdateDepth)
		{
			UpdateFacets();
		}
		
		if(wasMatrixDirty || shouldForceDirty || shouldUpdateDepth)
		{
			_isMeshDirty = true;
		}
		
		if(wasAlphaDirty || shouldForceDirty)
		{
			_isMeshDirty = true;
			_color.ApplyMultipliedAlpha(ref _alphaColor, _concatenatedAlpha);	
		}
		
		if(_areLocalVerticesDirty)
		{
			UpdateLocalVertices();
		}
		
		if(_isMeshDirty) 
		{
			PopulateRenderLayer();
		}
	}
Example #2
0
    override public void Redraw(bool shouldForceDirty, bool shouldUpdateDepth)
    {
        //  if (_isVisible == false && CurveGame.CurveGameCommon.cullFutileInvisible == true)
        //      return;

        bool wasMatrixDirty = _isMatrixDirty;
        bool wasAlphaDirty  = _isAlphaDirty;

        UpdateDepthMatrixAlpha(shouldForceDirty, shouldUpdateDepth);

        if (shouldUpdateDepth)
        {
            UpdateFacets();
        }

        if (wasMatrixDirty || shouldForceDirty || shouldUpdateDepth)
        {
            _isMeshDirty = true;
        }

        if (wasAlphaDirty || shouldForceDirty)
        {
            _isMeshDirty = true;
            _color.ApplyMultipliedAlpha(ref _alphaColor, _concatenatedAlpha);
        }

        if (_areLocalVerticesDirty)
        {
            UpdateLocalVertices();
        }

        if (_isMeshDirty)
        {
            PopulateRenderLayer();
        }
    }