static MTLColorWriteMask TranslateColorWriteMask(MgColorComponentFlagBits writeMask) { AmtColorWriteMaskKey[] masks = new [] { new AmtColorWriteMaskKey { Compare = MgColorComponentFlagBits.R_BIT, WriteMask = MTLColorWriteMask.Red }, new AmtColorWriteMaskKey { Compare = MgColorComponentFlagBits.G_BIT, WriteMask = MTLColorWriteMask.Green }, new AmtColorWriteMaskKey { Compare = MgColorComponentFlagBits.B_BIT, WriteMask = MTLColorWriteMask.Blue }, new AmtColorWriteMaskKey { Compare = MgColorComponentFlagBits.A_BIT, WriteMask = MTLColorWriteMask.Alpha }, }; MTLColorWriteMask output = MTLColorWriteMask.None; foreach (var key in masks) { if ((writeMask & key.Compare) == key.Compare) { output |= key.WriteMask; } } return(output); }
public void SetColorMask(uint index, MgColorComponentFlagBits colorMask) { GL.ColorMask( index, (colorMask & MgColorComponentFlagBits.R_BIT) == MgColorComponentFlagBits.R_BIT, (colorMask & MgColorComponentFlagBits.G_BIT) == MgColorComponentFlagBits.G_BIT, (colorMask & MgColorComponentFlagBits.B_BIT) == MgColorComponentFlagBits.B_BIT, (colorMask & MgColorComponentFlagBits.A_BIT) == MgColorComponentFlagBits.A_BIT); }
public void SetColorMask(uint index, MgColorComponentFlagBits colorMask) { }