| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" |
| 3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> |
| 4 | <refentry id="glColorMask"> |
| 5 | <refmeta> |
| 6 | <refmetainfo> |
| 7 | <copyright> |
| 8 | <year>1991-2006</year> |
| 9 | <holder>Silicon Graphics, Inc.</holder> |
| 10 | </copyright> |
| 11 | </refmetainfo> |
| 12 | <refentrytitle>glColorMask</refentrytitle> |
| 13 | <manvolnum>3G</manvolnum> |
| 14 | </refmeta> |
| 15 | <refnamediv> |
| 16 | <refname>glColorMask, glColorMaski</refname> |
| 17 | <refpurpose>enable and disable writing of frame buffer color components</refpurpose> |
| 18 | </refnamediv> |
| 19 | <refsynopsisdiv><title>C Specification</title> |
| 20 | <funcsynopsis> |
| 21 | <funcprototype> |
| 22 | <funcdef>void <function>glColorMask</function></funcdef> |
| 23 | <paramdef>GLboolean <parameter>red</parameter></paramdef> |
| 24 | <paramdef>GLboolean <parameter>green</parameter></paramdef> |
| 25 | <paramdef>GLboolean <parameter>blue</parameter></paramdef> |
| 26 | <paramdef>GLboolean <parameter>alpha</parameter></paramdef> |
| 27 | </funcprototype> |
| 28 | </funcsynopsis> |
| 29 | <funcsynopsis> |
| 30 | <funcprototype> |
| 31 | <funcdef>void <function>glColorMaski</function></funcdef> |
| 32 | <paramdef>GLuint <parameter>buf</parameter></paramdef> |
| 33 | <paramdef>GLboolean <parameter>red</parameter></paramdef> |
| 34 | <paramdef>GLboolean <parameter>green</parameter></paramdef> |
| 35 | <paramdef>GLboolean <parameter>blue</parameter></paramdef> |
| 36 | <paramdef>GLboolean <parameter>alpha</parameter></paramdef> |
| 37 | </funcprototype> |
| 38 | </funcsynopsis> |
| 39 | </refsynopsisdiv> |
| 40 | <refsect1 id="parameters"><title>Parameters</title> |
| 41 | <variablelist> |
| 42 | <varlistentry> |
| 43 | <term><parameter>buf</parameter></term> |
| 44 | <listitem> |
| 45 | <para> |
| 46 | For <function>glColorMaski</function>, specifies the index of the |
| 47 | draw buffer whose color mask to set. |
| 48 | </para> |
| 49 | </listitem> |
| 50 | </varlistentry> |
| 51 | <varlistentry> |
| 52 | <term><parameter>red</parameter></term> |
| 53 | <term><parameter>green</parameter></term> |
| 54 | <term><parameter>blue</parameter></term> |
| 55 | <term><parameter>alpha</parameter></term> |
| 56 | <listitem> |
| 57 | <para> |
| 58 | Specify whether red, green, blue, and alpha are to be written |
| 59 | into the frame buffer. |
| 60 | The initial values are all <constant>GL_TRUE</constant>, |
| 61 | indicating that the color components are written. |
| 62 | </para> |
| 63 | </listitem> |
| 64 | </varlistentry> |
| 65 | </variablelist> |
| 66 | </refsect1> |
| 67 | <refsect1 id="description"><title>Description</title> |
| 68 | <para> |
| 69 | <function>glColorMask</function> and <function>glColorMaski</function> specify whether the individual color components in the frame buffer |
| 70 | can or cannot be written. <function>glColorMaski</function> sets the mask for a specific draw buffer, whereas |
| 71 | <function>glColorMask</function> sets the mask for all draw buffers. |
| 72 | If <parameter>red</parameter> is <constant>GL_FALSE</constant>, |
| 73 | for example, |
| 74 | no change is made to the red component of any pixel in any of the |
| 75 | color buffers, |
| 76 | regardless of the drawing operation attempted. |
| 77 | </para> |
| 78 | <para> |
| 79 | Changes to individual bits of components cannot be controlled. |
| 80 | Rather, |
| 81 | changes are either enabled or disabled for entire color components. |
| 82 | </para> |
| 83 | </refsect1> |
| 84 | <refsect1 id="associatedgets"><title>Associated Gets</title> |
| 85 | <para> |
| 86 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_COLOR_WRITEMASK</constant> |
| 87 | </para> |
| 88 | </refsect1> |
| 89 | <refsect1 id="seealso"><title>See Also</title> |
| 90 | <para> |
| 91 | <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>, |
| 92 | <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>, |
| 93 | <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry> |
| 94 | </para> |
| 95 | </refsect1> |
| 96 | <refsect1 id="Copyright"><title>Copyright</title> |
| 97 | <para> |
| 98 | Copyright <trademark class="copyright"></trademark> 1991-2006 |
| 99 | Silicon Graphics, Inc. |
| 100 | Copyright <trademark class="copyright"></trademark> 2010-2011 Khronos Group. |
| 101 | This document is licensed under the SGI |
| 102 | Free Software B License. For details, see |
| 103 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. |
| 104 | </para> |
| 105 | </refsect1> |
| 106 | </refentry> |