FANDOM


DefinitionEdit

The colorMask() method specifies whether red, green, blue, and alpha can or cannot be written into the frame buffer.

SyntaxEdit

gl.colorMask(red, green, blue, alpha)

ParametersEdit

  • red: Boolean data type, the default value is true
  • green: Boolean data type, the default value is true
  • blue: Boolean data type, the default value is true
  • alpha: Boolean data type, the default value is true

ExamplesEdit

// Enables writing of all color components in the frame buffer
gl.colorMask(true, true, true, true);

See alsoEdit

Community content is available under CC-BY-SA unless otherwise noted.