Exemple #1
0
 public static BlendState ToOw(this Microsoft.Xna.Framework.Graphics.BlendState bullshit)
 {
     if (bullshit == Microsoft.Xna.Framework.Graphics.BlendState.AlphaBlend)
     {
         return(BlendState.AlphaBlend);
     }
     else
     {
         return(BlendState.Opaque);
     }
 }
 internal void UpdateBlendState(XnaBlendState state)
 {
     state.AlphaBlendFunction    = (XnaBlendFunc)AlphaBlendFunction;
     state.AlphaDestinationBlend = (XnaBlend)AlphaDestinationBlend;
     state.AlphaSourceBlend      = (XnaBlend)AlphaSourceBlend;
     state.BlendFactor           = BlendFactor.ToXnaColor();
     state.ColorBlendFunction    = (XnaBlendFunc)ColorBlendFunction;
     state.ColorDestinationBlend = (XnaBlend)ColorDestinationBlend;
     state.ColorSourceBlend      = (XnaBlend)ColorSourceBlend;
     state.ColorWriteChannels    = (XnaBlendChannel)ColorWriteChannels;
     state.ColorWriteChannels1   = (XnaBlendChannel)ColorWriteChannels1;
     state.ColorWriteChannels2   = (XnaBlendChannel)ColorWriteChannels2;
     state.ColorWriteChannels3   = (XnaBlendChannel)ColorWriteChannels3;
     state.MultiSampleMask       = MultiSampleMask;
     blendStateDirty             = false;
 }
 public void SetBlendState(XnaBlendState state)
 {
     AlphaBlendFunction    = (BlendFunction)state.AlphaBlendFunction;
     AlphaDestinationBlend = (Blend)state.AlphaDestinationBlend;
     AlphaSourceBlend      = (Blend)state.AlphaSourceBlend;
     BlendFactor           = state.BlendFactor.ToColor();
     ColorBlendFunction    = (BlendFunction)state.ColorBlendFunction;
     ColorDestinationBlend = (Blend)state.ColorDestinationBlend;
     ColorSourceBlend      = (Blend)state.ColorSourceBlend;
     ColorWriteChannels    = (ColorWriteChannels)state.ColorWriteChannels;
     ColorWriteChannels1   = (ColorWriteChannels)state.ColorWriteChannels1;
     ColorWriteChannels2   = (ColorWriteChannels)state.ColorWriteChannels2;
     ColorWriteChannels3   = (ColorWriteChannels)state.ColorWriteChannels3;
     MultiSampleMask       = state.MultiSampleMask;
     blendStateDirty       = true;
 }