Example #1
0
        public void ApplyOptions(DrawOptions drawOptions)
        {
            if (drawOptions.EqualsTo(_drawOptions))
            {
                return;
            }

            _currentMesh.Flush(_currentTexture, shader, _matrix, layer, renderQueue);
            _drawOptions.CopyFrom(drawOptions);
        }
Example #2
0
        private void ApplyDrawOptions()
        {
            if (_currentItem.drawOptions == null)
            {
                _drawOptions.Reset();
            }
            else
            {
                _drawOptions.CopyFrom(_currentItem.drawOptions);
            }

            for (var item = _currentItem.parent; item != null; item = item.parent)
            {
                if (item.drawOptions != null)
                {
                    _drawOptions.MergeWith(item.drawOptions);
                }
            }

            _stage.sceneBatch.ApplyOptions(_drawOptions);
        }