Esempio n. 1
0
 public IBlendState CreateBlendState(gl.BlendingFactorSrc colorSource, gl.BlendEquationMode colorEquation, gl.BlendingFactorDest colorDest,
                                     gl.BlendingFactorSrc alphaSource, gl.BlendEquationMode alphaEquation, gl.BlendingFactorDest alphaDest)
 {
     return(new CacheBlendState(true, colorSource, colorEquation, colorDest, alphaSource, alphaEquation, alphaDest));
 }
Esempio n. 2
0
 Blend ConvertBlendArg(gl.BlendingFactorSrc glmode)
 {
     if (glmode == gl.BlendingFactorSrc.Zero)
     {
         return(Blend.Zero);
     }
     if (glmode == gl.BlendingFactorSrc.One)
     {
         return(Blend.One);
     }
     if (glmode == gl.BlendingFactorSrc.SrcColor)
     {
         return(Blend.SourceColor);
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusSrcColor)
     {
         return(Blend.InverseSourceColor);
     }
     if (glmode == gl.BlendingFactorSrc.SrcAlpha)
     {
         return(Blend.SourceAlpha);
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusSrcAlpha)
     {
         return(Blend.InverseSourceAlpha);
     }
     if (glmode == gl.BlendingFactorSrc.DstAlpha)
     {
         return(Blend.DestinationAlpha);
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusDstAlpha)
     {
         return(Blend.InverseDestinationAlpha);
     }
     if (glmode == gl.BlendingFactorSrc.DstColor)
     {
         return(Blend.DestinationColor);
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusDstColor)
     {
         return(Blend.InverseDestinationColor);
     }
     if (glmode == gl.BlendingFactorSrc.SrcAlphaSaturate)
     {
         return(Blend.SourceAlphaSaturated);
     }
     if (glmode == gl.BlendingFactorSrc.ConstantColorExt)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.ConstantColor)
     {
         return(Blend.BlendFactor);
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusConstantColor)
     {
         return(Blend.InverseBlendFactor);
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusConstantColorExt)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.ConstantAlpha)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.ConstantAlphaExt)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusConstantAlphaExt)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusConstantAlpha)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.Src1Alpha)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.Src1Color)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusSrc1Color)
     {
         throw new NotSupportedException();
     }
     if (glmode == gl.BlendingFactorSrc.OneMinusSrc1Alpha)
     {
         throw new NotSupportedException();
     }
     throw new ArgumentOutOfRangeException();
 }
Esempio n. 3
0
 Blend ConvertBlendArg(gl.BlendingFactorSrc glmode) => glmode switch
 {
Esempio n. 4
0
 public IBlendState CreateBlendState(gl.BlendingFactorSrc colorSource, gl.BlendEquationMode colorEquation, gl.BlendingFactorDest colorDest,
                                     gl.BlendingFactorSrc alphaSource, gl.BlendEquationMode alphaEquation, gl.BlendingFactorDest alphaDest)
 {
     return(null);
 }