Beispiel #1
0
 public void GetNext(out BlendingSourceFactor source, out BlendingDestinationFactor dest)
 {
     source = sourceFactors[currentSource];
     dest   = destFactors[currentDest];
     currentDest++;
     if (currentDest >= destFactors.Length)
     {
         currentDest = 0;
         currentSource++;
         if (currentSource >= sourceFactors.Length)
         {
             currentSource = 0;
         }
     }
 }
 public void GetNext(out BlendingSourceFactor source, out BlendingDestinationFactor dest)
 {
     source = sourceFactors[currentSource];
     dest = destFactors[currentDest];
     currentDest++;
     if (currentDest >= destFactors.Length)
     {
         currentDest = 0;
         currentSource++;
         if (currentSource >= sourceFactors.Length)
         {
             currentSource = 0;
         }
     }
 }
Beispiel #3
0
        private void SetupBlending(SceneNodeBase sceneNodeBase, BlendingSourceFactor s, BlendingDestinationFactor d)
        {
            var node = sceneNodeBase as TextBillboardNode;

            if (node != null)
            {
                node.Blend.SourceFactor = s;
                node.Blend.DestFactor   = d;
            }

            foreach (var item in sceneNodeBase.Children)
            {
                SetupBlending(item, s, d);
            }
        }
Beispiel #4
0
        private void SetupBlending(SceneNodeBase sceneNodeBase, BlendingSourceFactor sf, BlendingDestinationFactor df)
        {
            var node = sceneNodeBase as RectGlassNode;

            if (node != null)
            {
                node.Blend.SourceFactor = sf;
                node.Blend.DestFactor   = df;
            }

            foreach (var item in sceneNodeBase.Children)
            {
                SetupBlending(item, sf, df);
            }
        }
Beispiel #5
0
 /// <summary>
 /// specify pixel arithmetic.
 /// </summary>
 /// <param name="sourceFactor">Specifies how the red, green, blue, and alpha source blending factors are computedThe initial value is GL_ONE.</param>
 /// <param name="destFactor">Specifies how the red, green, blue, and alpha destination blending factors are computed. The initial value is GL_ZERO.</param>
 public BlendSwitch(BlendingSourceFactor sourceFactor, BlendingDestinationFactor destFactor)
     : base(OpenGL.GL_BLEND, true)
 {
     this.SourceFactor = sourceFactor;
     this.DestFactor   = destFactor;
 }
Beispiel #6
0
 /// <summary>
 /// specify pixel arithmetic.
 /// </summary>
 /// <param name="sourceFactor">Specifies how the red, green, blue, and alpha source blending factors are computedThe initial value is GL_ONE.</param>
 /// <param name="destFactor">Specifies how the red, green, blue, and alpha destination blending factors are computed. The initial value is GL_ZERO.</param>
 public BlendState(BlendingSourceFactor sourceFactor, BlendingDestinationFactor destFactor)
     : base(OpenGL.GL_BLEND, true)
 {
     this.SourceFactor = sourceFactor;
     this.DestFactor = destFactor;
 }
Beispiel #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="source"></param>
 /// <param name="dest"></param>
 public BlendingGroupNode(BlendingSourceFactor source, BlendingDestinationFactor dest)
 {
     this.blending = new BlendState(source, dest);
 }
Beispiel #8
0
 /// <summary>
 /// specify pixel arithmetic.
 /// </summary>
 /// <param name="sourceFactor">Specifies how the red, green, blue, and alpha source blending factors are computedThe initial value is GL_ONE.</param>
 /// <param name="destFactor">Specifies how the red, green, blue, and alpha destination blending factors are computed. The initial value is GL_ZERO.</param>
 /// <param name="enableCapacity"></param>
 public BlendState(BlendingSourceFactor sourceFactor, BlendingDestinationFactor destFactor, bool enableCapacity = true)
     : base(GL.GL_BLEND, enableCapacity)
 {
     this.SourceFactor = sourceFactor;
     this.DestFactor   = destFactor;
 }
Beispiel #9
0
 public static void BlendFunc(BlendingSourceFactor sfactor, BlendingDestinationFactor dfactor)
 {
     BlendFunc((uint)sfactor, (uint)dfactor);
 }