Subversion Repositories AndroidProjects

Rev

Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
             "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="glColorMask">
    <refmeta>
        <refmetainfo>
            <copyright>
                <year>1991-2006</year>
                <holder>Silicon Graphics, Inc.</holder>
            </copyright>
        </refmetainfo>
        <refentrytitle>glColorMask</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glColorMask</refname>
        <refpurpose>enable and disable writing of frame buffer color components</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glColorMask</function></funcdef>
                <paramdef>GLboolean <parameter>red</parameter></paramdef>
                <paramdef>GLboolean <parameter>green</parameter></paramdef>
                <paramdef>GLboolean <parameter>blue</parameter></paramdef>
                <paramdef>GLboolean <parameter>alpha</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>red</parameter></term>
            <term><parameter>green</parameter></term>
            <term><parameter>blue</parameter></term>
            <term><parameter>alpha</parameter></term>
            <listitem>
                <para>
                    Specify whether red, green, blue, and alpha can or cannot be written
                    into the frame buffer.
                    The initial values are all <constant>GL_TRUE</constant>,
                    indicating that the color components can be written.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 id="description"><title>Description</title>
        <para>
            <function>glColorMask</function> specifies whether the individual color components in the frame buffer
            can or cannot be written.
            If <parameter>red</parameter> is <constant>GL_FALSE</constant>,
            for example,
            no change is made to the red component of any pixel in any of the
            color buffers,
            regardless of the drawing operation attempted.
        </para>
        <para>
            Changes to individual bits of components cannot be controlled.
            Rather,
            changes are either enabled or disabled for entire color components.
        </para>
    </refsect1>
    <refsect1 id="errors"><title>Errors</title>
        <para>
            <constant>GL_INVALID_OPERATION</constant> is generated if <function>glColorMask</function>
            is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
            and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
        </para>
    </refsect1>
    <refsect1 id="associatedgets"><title>Associated Gets</title>
        <para>
            <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_COLOR_WRITEMASK</constant>
        </para>
        <para>
            <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_RGBA_MODE</constant>
        </para>
    </refsect1>
    <refsect1 id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>
        </para>
    </refsect1>
    <refsect1 id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"></trademark> 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
        </para>
    </refsect1>
</refentry>