Nez.Portable/Graphics/Batcher/Batcher.cs
/// <summary>
/// enables/disables scissor testing. If the RasterizerState changes it will cause a batch flush.
/// </summary>
/// <returns>The scissor test.</returns>
/// <param name="shouldEnable">Should enable.</param>
enables/disables scissor testing. If the RasterizerState changes it will cause a batch flush.
enables / disables scissor testing . If the RasterizerState changes it will cause a batch flush .
public void enableScissorTest(bool shouldEnable)
        {
            var currentValue = _rasterizerState.ScissorTestEnable;
            if (currentValue == shouldEnable)
                return;
            flushBatch();
            _rasterizerState = new RasterizerState
                                   {
                                       CullMode = _rasterizerState.CullMode,
                                       DepthBias = _rasterizerState.DepthBias,
                                       FillMode = _rasterizerState.FillMode,
                                       MultiSampleAntiAlias = _rasterizerState.MultiSampleAntiAlias,
                                       SlopeScaleDepthBias = _rasterizerState.SlopeScaleDepthBias,
                                       ScissorTestEnable = shouldEnable
                                   };
        }
public void enableScissorTest ( bool shouldEnable ) { var currentValue = _rasterizerState . ScissorTestEnable ; if ( currentValue == shouldEnable ) return ; flushBatch ( ) ; _rasterizerState = new RasterizerState { CullMode = _rasterizerState . CullMode , DepthBias = _rasterizerState . DepthBias , FillMode = _rasterizerState . FillMode , MultiSampleAntiAlias = _rasterizerState . MultiSampleAntiAlias , SlopeScaleDepthBias = _rasterizerState . SlopeScaleDepthBias , ScissorTestEnable = shouldEnable } ; }
enables/disables scissor testing.
enables / disables scissor testing .
The scissor test.
The scissor test .
shouldEnable
bool
None