Пример #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;
         }
     }
 }
Пример #2
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;
         }
     }
 }
Пример #3
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            {
                var item = this.lstSourceFactor.SelectedItem;
                if (item == null)
                {
                    MessageBox.Show("Please select a source factor!");
                    return;
                }
                this.SelectedSourceFactor = (BlendingSourceFactor)item;
            }
            {
                var item = this.lstDestinationFactor.SelectedItem;
                if (item == null)
                {
                    MessageBox.Show("Please select a destination factor!");
                    return;
                }
                this.SelectedDestinationFactor = (BlendingDestinationFactor)item;
            }

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
Пример #4
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;
 }
Пример #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 BlendState(BlendingSourceFactor sourceFactor, BlendingDestinationFactor destFactor)
     : base(OpenGL.GL_BLEND, true)
 {
     this.SourceFactor = sourceFactor;
     this.DestFactor = destFactor;
 }
Пример #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="source"></param>
 /// <param name="dest"></param>
 public BlendingGroupNode(BlendingSourceFactor source, BlendingDestinationFactor dest)
 {
     this.blending = new BlendState(source, dest);
 }
Пример #7
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;
 }
Пример #8
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);
            }
        }
Пример #9
0
 public static void BlendFunc(BlendingSourceFactor sfactor, BlendingDestinationFactor dfactor)
 {
     BlendFunc((uint)sfactor, (uint)dfactor);
 }
Пример #10
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);
            }
        }