Esempio n. 1
0
 public partial void BlendFuncSeparate([Flow(FlowDirection.In)] uint buf, [Flow(FlowDirection.In)] OES srcRGB, [Flow(FlowDirection.In)] BlendingFactor dstRGB, [Flow(FlowDirection.In)] BlendingFactor srcAlpha, [Flow(FlowDirection.In)] OES dstAlpha);
Esempio n. 2
0
 public static void BlendFunc(BlendingFactor sfactor, BlendingFactor dfactor)
 {
     CheckCurrent();
     _bindings.glBlendFunc((uint)sfactor, (uint)dfactor);
     CheckError();
 }
Esempio n. 3
0
 public partial void BlendFunc([Flow(FlowDirection.In)] uint buf, [Flow(FlowDirection.In)] BlendingFactor src, [Flow(FlowDirection.In)] BlendingFactor dst);
Esempio n. 4
0
 public static void glBlendFunc(BlendingFactor sfactor, BlendingFactor dfactor)
 {
     i_OpenGL1_1.glBlendFunc(sfactor, dfactor);
 }
 public static void BlendFuncSeparateOES(BlendingFactor srcRGB, BlendingFactor dstRGB, BlendingFactor srcAlpha, BlendingFactor dstAlpha)
 {
     Debug.Assert(Delegates.pglBlendFuncSeparateOES != null, "pglBlendFuncSeparateOES not implemented");
     Delegates.pglBlendFuncSeparateOES((Int32)srcRGB, (Int32)dstRGB, (Int32)srcAlpha, (Int32)dstAlpha);
     LogCommand("glBlendFuncSeparateOES", null, srcRGB, dstRGB, srcAlpha, dstAlpha);
     DebugCheckErrors(null);
 }
 public abstract void BlendFuncSeparate([Flow(FlowDirection.In)] uint buf, [Flow(FlowDirection.In)] BlendingFactor srcRGB, [Flow(FlowDirection.In)] BlendingFactor dstRGB, [Flow(FlowDirection.In)] BlendingFactor srcAlpha, [Flow(FlowDirection.In)] BlendingFactor dstAlpha);
Esempio n. 7
0
 public static void BlendFunc(BlendingFactor sfactor, BlendingFactor dfactor)
 {
     Interop.Calli((int)sfactor, (int)dfactor, BlendFuncAddress);
 }
Esempio n. 8
0
 public partial void BlendFuncSeparate([Flow(FlowDirection.In)] BlendingFactor sfactorRGB, [Flow(FlowDirection.In)] BlendingFactor dfactorRGB, [Flow(FlowDirection.In)] BlendingFactor sfactorAlpha, [Flow(FlowDirection.In)] BlendingFactor dfactorAlpha);
 public abstract void BlendFunc([Flow(FlowDirection.In)] uint buf, [Flow(FlowDirection.In)] BlendingFactor src, [Flow(FlowDirection.In)] BlendingFactor dst);
 public partial void BlendFuncSeparateIndexed([Flow(FlowDirection.In)] uint buf, [Flow(FlowDirection.In)] BlendingFactor srcRGB, [Flow(FlowDirection.In)] BlendingFactor dstRGB, [Flow(FlowDirection.In)] AMD srcAlpha, [Flow(FlowDirection.In)] AMD dstAlpha);
Esempio n. 11
0
 /// <summary>
 /// Creates a new BlendMode instance.
 /// </summary>
 private BlendMode(string name, BlendingFactor srcFactor, BlendingFactor dstFactor)
 {
     _name              = name;
     _sourceFactor      = srcFactor;
     _destinationFactor = dstFactor;
 }
Esempio n. 12
0
 public static void BlendFuncSeparate(BlendingFactor sfactorRGB, BlendingFactor dfactorRGB, BlendingFactor sfactorAlpha, BlendingFactor dfactorAlpha)
 {
     Interop.Calli((int)sfactorRGB, (int)dfactorRGB, (int)sfactorAlpha, (int)dfactorAlpha, BlendFuncSeparateAddress);
 }
Esempio n. 13
0
 /// <summary>
 /// Construct a BlendState with separated RGB/Alpha functions.
 /// </summary>
 /// <param name="rgbEquation">
 /// A <see cref="BlendEquationMode"/> flag indicating which equation to used for blending RGB color components.
 /// </param>
 /// <param name="alphaEquation">
 /// A <see cref="BlendEquationMode"/> flag indicating which equation to used for blending Alpha color component.
 /// </param>
 /// <param name="srcRgbFactor">
 /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to the source color (alpha component excluded).
 /// </param>
 /// <param name="srcAlphaFactor">
 /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to only the source alpha component.
 /// </param>
 /// <param name="dstRgbFactor">
 /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to the destination color (alpha component excluded).
 /// </param>
 /// <param name="dstAlphaFactor">
 /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to only the destination alpha component.
 /// </param>
 public BlendState(BlendEquationMode rgbEquation, BlendEquationMode alphaEquation, BlendingFactor srcRgbFactor, BlendingFactor srcAlphaFactor, BlendingFactor dstRgbFactor, BlendingFactor dstAlphaFactor) :
     this(rgbEquation, alphaEquation, srcRgbFactor, srcAlphaFactor, dstRgbFactor, dstAlphaFactor, new ColorRGBAF())
 {
 }
Esempio n. 14
0
 /// <summary>
 /// Construct a BlendState with unified RGB/Alpha function.
 /// </summary>
 /// <param name="equation">
 /// A <see cref="BlendEquationMode"/> flag indicating which equation to used for blending.
 /// </param>
 /// <param name="srcFactor">
 /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to the source color (including alpha).
 /// </param>
 /// <param name="dstFactor">
 /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to the destination color (including alpha).
 /// </param>
 /// <param name="constColor">
 /// A <see cref="ColorRGBAF"/> that specify the constant color used in blending functions.
 /// </param>
 public BlendState(BlendEquationMode equation, BlendingFactor srcFactor, BlendingFactor dstFactor, ColorRGBAF constColor) :
     this(equation, equation, srcFactor, srcFactor, dstFactor, dstFactor, constColor)
 {
 }
Esempio n. 15
0
 /// <summary>
 /// Construct a BlendState with unified RGB/Alpha function.
 /// </summary>
 /// <param name="equation">
 /// A <see cref="BlendEquationMode"/> flag indicating which equation to used for blending.
 /// </param>
 /// <param name="srcFactor">
 /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to the source color (including alpha).
 /// </param>
 /// <param name="dstFactor">
 /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to the destination color (including alpha).
 /// </param>
 public BlendState(BlendEquationMode equation, BlendingFactor srcFactor, BlendingFactor dstFactor) :
     this(equation, equation, srcFactor, srcFactor, dstFactor, dstFactor, new ColorRGBAF())
 {
 }
Esempio n. 16
0
        /// <summary>
        /// Construct a BlendState with separated RGB/Alpha functions.
        /// </summary>
        /// <param name="rgbEquation">
        /// A <see cref="BlendEquationMode"/> flag indicating which equation to used for blending RGB color components.
        /// </param>
        /// <param name="alphaEquation">
        /// A <see cref="BlendEquationMode"/> flag indicating which equation to used for blending Alpha color component.
        /// </param>
        /// <param name="srcRgbFactor">
        /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to the source color (alpha component excluded).
        /// </param>
        /// <param name="srcAlphaFactor">
        /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to only the source alpha component.
        /// </param>
        /// <param name="dstRgbFactor">
        /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to the destination color (alpha component excluded).
        /// </param>
        /// <param name="dstAlphaFactor">
        /// A <see cref="BlendingFactor"/> that specify the scaling factors applied to only the destination alpha component.
        /// </param>
        /// <param name="constColor">
        /// A <see cref="ColorRGBAF"/> that specify the constant color used in blending functions.
        /// </param>
        public BlendState(BlendEquationMode rgbEquation, BlendEquationMode alphaEquation, BlendingFactor srcRgbFactor, BlendingFactor srcAlphaFactor, BlendingFactor dstRgbFactor, BlendingFactor dstAlphaFactor, ColorRGBAF constColor)
        {
            if (IsSupportedEquation(rgbEquation) == false)
            {
                throw new ArgumentException("not supported blending equation " + srcRgbFactor, "rgbEquation");
            }
            if (IsSupportedEquation(alphaEquation) == false)
            {
                throw new ArgumentException("not supported blending equation " + alphaEquation, "rgbEquation");
            }
            if (IsSupportedFunction(srcRgbFactor) == false)
            {
                throw new ArgumentException("not supported blending function " + srcRgbFactor, "srcRgbFactor");
            }
            if (IsSupportedFunction(srcAlphaFactor) == false)
            {
                throw new ArgumentException("not supported blending function " + srcAlphaFactor, "srcAlphaFactor");
            }
            if (IsSupportedFunction(dstRgbFactor) == false)
            {
                throw new ArgumentException("not supported blending function " + dstRgbFactor, "dstRgbFactor");
            }
            if (IsSupportedFunction(dstAlphaFactor) == false)
            {
                throw new ArgumentException("not supported blending function " + dstAlphaFactor, "dstAlphaFactor");
            }

            // Blend enabled
            _Enabled = true;

            // Store RGB separate equation
            _RgbEquation = rgbEquation;
            // Store alpha separate equation
            _AlphaEquation = alphaEquation;

            // Store rgb separate function
            _RgbSrcFactor = srcRgbFactor;
            _RgbDstFactor = dstRgbFactor;
            // Store alpha separate function
            _AlphaSrcFactor = srcAlphaFactor;
            _AlphaDstFactor = dstAlphaFactor;
            // Store blend color
            _BlendColor = constColor;

            if (EquationSeparated && !Gl.CurrentExtensions.BlendEquationSeparate_EXT)
            {
                throw new InvalidOperationException("not supported separated blending equations");
            }
            if (FunctionSeparated && !Gl.CurrentExtensions.BlendFuncSeparate_EXT)
            {
                throw new InvalidOperationException("not supported separated blending functions");
            }
        }