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; } } }
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); } }
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); } }
/// <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; }
/// <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; }
/// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="dest"></param> public BlendingGroupNode(BlendingSourceFactor source, BlendingDestinationFactor dest) { this.blending = new BlendState(source, dest); }
/// <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; }
public static void BlendFunc(BlendingSourceFactor sfactor, BlendingDestinationFactor dfactor) { BlendFunc((uint)sfactor, (uint)dfactor); }