PlatformApplyState() private method

private PlatformApplyState ( Microsoft.Xna.Framework.Graphics.GraphicsDevice device, bool force = false ) : void
device Microsoft.Xna.Framework.Graphics.GraphicsDevice
force bool
return void
Example #1
0
        public void End()
        {
            _beginCalled = false;

            if (_sortMode != SpriteSortMode.Immediate)
            {
                Setup();
            }
#if PSM
            GraphicsDevice.BlendState = _blendState;
            _blendState.PlatformApplyState(GraphicsDevice);
#endif

            _batcher.DrawBatch(_sortMode, _effect);
        }
Example #2
0
        internal void ApplyState(bool applyShaders)
        {
            PlatformBeginApplyState();

            if (_blendStateDirty)
            {
                _actualBlendState.PlatformApplyState(this);
                _blendStateDirty = false;
            }

            if (_depthStencilStateDirty)
            {
                _actualDepthStencilState.PlatformApplyState(this);
                _depthStencilStateDirty = false;
            }

            if (_rasterizerStateDirty)
            {
                _actualRasterizerState.PlatformApplyState(this);
                _rasterizerStateDirty = false;
            }

            PlatformApplyState(applyShaders);
        }