public void SetDepthStencilState(XnaDepthState state)
 {
     CounterClockwiseStencilDepthBufferFail = (StencilOperation)state.CounterClockwiseStencilDepthBufferFail;
     CounterClockwiseStencilFail            = (StencilOperation)state.CounterClockwiseStencilFail;
     CounterClockwiseStencilFunction        = (CompareFunction)state.CounterClockwiseStencilFunction;
     CounterClockwiseStencilPass            = (StencilOperation)state.CounterClockwiseStencilPass;
     DepthBufferEnable      = state.DepthBufferEnable;
     DepthBufferFunction    = (CompareFunction)state.DepthBufferFunction;
     DepthBufferWriteEnable = state.DepthBufferWriteEnable;
     ReferenceStencil       = state.ReferenceStencil;
     StencilDepthBufferFail = (StencilOperation)state.StencilDepthBufferFail;
     StencilEnable          = state.StencilEnable;
     StencilFail            = (StencilOperation)state.StencilFail;
     StencilFunction        = (CompareFunction)state.StencilFunction;
     StencilMask            = state.StencilMask;
     StencilPass            = (StencilOperation)state.StencilPass;
     StencilWriteMask       = state.StencilWriteMask;
     TwoSidedStencilMode    = state.TwoSidedStencilMode;
 }
 public void UpdateDepthStencilState(XnaDepthState state)
 {
     state.CounterClockwiseStencilDepthBufferFail = (XnaStencilOperation)CounterClockwiseStencilDepthBufferFail;
     state.CounterClockwiseStencilFail            = (XnaStencilOperation)CounterClockwiseStencilFail;
     state.CounterClockwiseStencilFunction        = (XnaCompareFunction)CounterClockwiseStencilFunction;
     state.CounterClockwiseStencilPass            = (XnaStencilOperation)CounterClockwiseStencilPass;
     state.DepthBufferEnable      = DepthBufferEnable;
     state.DepthBufferFunction    = (XnaCompareFunction)DepthBufferFunction;
     state.DepthBufferWriteEnable = DepthBufferWriteEnable;
     state.ReferenceStencil       = ReferenceStencil;
     state.StencilDepthBufferFail = (XnaStencilOperation)StencilDepthBufferFail;
     state.StencilEnable          = StencilEnable;
     state.StencilFail            = (XnaStencilOperation)StencilFail;
     state.StencilFunction        = (XnaCompareFunction)StencilFunction;
     state.StencilMask            = StencilMask;
     state.StencilPass            = (XnaStencilOperation)StencilPass;
     state.StencilWriteMask       = StencilWriteMask;
     state.TwoSidedStencilMode    = TwoSidedStencilMode;
     depthStencilStateDirty       = false;
 }