/// <inheritdoc/> public override int GetHashCode() { var hashCode = 2038336081; hashCode = hashCode * -1521134295 + Handle.GetHashSafe(); hashCode = hashCode * -1521134295 + SymbolicName.GetHashSafe(); hashCode = hashCode * -1521134295 + NodeId.GetHashSafe(); hashCode = hashCode * -1521134295 + NodeClass.GetHashCode(); hashCode = hashCode * -1521134295 + BrowseName.GetHashSafe(); hashCode = hashCode * -1521134295 + DisplayName.GetHashSafe(); hashCode = hashCode * -1521134295 + Description.GetHashSafe(); hashCode = hashCode * -1521134295 + WriteMask.GetHashSafe(); hashCode = hashCode * -1521134295 + UserWriteMask.GetHashSafe(); hashCode = hashCode * -1521134295 + AccessRestrictions.GetHashSafe(); hashCode = hashCode * -1521134295 + RolePermissions.GetHashSafe(); hashCode = hashCode * -1521134295 + UserRolePermissions.GetHashSafe(); return(hashCode); }
/// <summary> /// Initializes a new instance of the <see cref="GorgonBlendState"/> class. /// </summary> internal GorgonBlendState() { LogicOperation = LogicOperation.Noop; SourceAlphaBlend = SourceColorBlend = Blend.One; DestinationAlphaBlend = DestinationColorBlend = Blend.Zero; AlphaBlendOperation = ColorBlendOperation = BlendOperation.Add; WriteMask = WriteMask.All; }
/// <summary> /// Initializes a new instance of the <see cref="BlendState"/> class. /// </summary> /// <param name="src">The SRC.</param> /// <param name="dst">The DST.</param> /// <param name="op">The op.</param> /// <param name="srcAlpha">The SRC alpha.</param> /// <param name="dstAlpha">The DST alpha.</param> /// <param name="opAlpha">The op alpha.</param> /// <param name="alphaToCov">if set to <c>true</c> alpha to coverage is used.</param> /// <param name="write">The write.</param> /// <param name="Sample">The Sample.</param> public BlendState(BlendOperand src, BlendOperand dst, BlendOperation op, BlendOperand srcAlpha, BlendOperand dstAlpha, BlendOperation opAlpha, bool alphaToCov, WriteMask write, byte sample) : this(src, dst, op, srcAlpha, dstAlpha, opAlpha) { alphaToCoverage = alphaToCov; writeMasks[0] = write; sampleMask = sample; }
internal static ColorComponents GetColorWriteMask(WriteMask mask) { return(mask == WriteMask.All ? ColorComponents.All : mask == WriteMask.R ? ColorComponents.R : mask == WriteMask.G ? ColorComponents.G : mask == WriteMask.B ? ColorComponents.B : mask == WriteMask.A ? ColorComponents.A : ColorComponents.All); }
public BlendMode(Factor srcColor, Factor dstColor, Op colorOp, Factor srcAlpha, Factor dstAlpha, Op alphaOp, WriteMask mask = WriteMask.All) { SrcColorFactor = srcColor; DstColorFactor = dstColor; ColorOp = colorOp; SrcAlphaFactor = srcAlpha; DstAlphaFactor = dstAlpha; AlphaOp = alphaOp; Mask = mask; }
/// <summary> /// Initializes a new instance of the <see cref="GorgonBlendState"/> class. /// </summary> /// <param name="state">The state to copy.</param> internal GorgonBlendState(GorgonBlendState state) { WriteMask = state.WriteMask; AlphaBlendOperation = state.AlphaBlendOperation; ColorBlendOperation = state.ColorBlendOperation; DestinationAlphaBlend = state.DestinationAlphaBlend; DestinationColorBlend = state.DestinationColorBlend; IsBlendingEnabled = state.IsBlendingEnabled; LogicOperation = state.LogicOperation; SourceAlphaBlend = state.SourceAlphaBlend; SourceColorBlend = state.SourceColorBlend; }
/// <summary> /// Function to set the write mask. /// </summary> /// <param name="writeMask">The write mask to apply.</param> /// <returns>The fluent builder interface.</returns> public GorgonBlendStateBuilder WriteMask(WriteMask writeMask) { WorkingState.WriteMask = writeMask; return(this); }
/// <summary> /// Sets the write mask. /// </summary> /// <param name="index">The index.</param> /// <param name="mask">The mask.</param> public void SetWriteMask(uint index, WriteMask mask) { Changed(); writeMasks[index] = mask; }