| 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="glClearStencil"> |
| 5 | <refmeta> |
| 6 | <refmetainfo> |
| 7 | <copyright> |
| 8 | <year>1991-2006</year> |
| 9 | <holder>Silicon Graphics, Inc.</holder> |
| 10 | </copyright> |
| 11 | </refmetainfo> |
| 12 | <refentrytitle>glClearStencil</refentrytitle> |
| 13 | <manvolnum>3G</manvolnum> |
| 14 | </refmeta> |
| 15 | <refnamediv> |
| 16 | <refname>glClearStencil</refname> |
| 17 | <refpurpose>specify the clear value for the stencil buffer</refpurpose> |
| 18 | </refnamediv> |
| 19 | <refsynopsisdiv><title>C Specification</title> |
| 20 | <funcsynopsis> |
| 21 | <funcprototype> |
| 22 | <funcdef>void <function>glClearStencil</function></funcdef> |
| 23 | <paramdef>GLint <parameter>s</parameter></paramdef> |
| 24 | </funcprototype> |
| 25 | </funcsynopsis> |
| 26 | </refsynopsisdiv> |
| 27 | <!-- eqn: ignoring delim $$ --> |
| 28 | <refsect1 id="parameters"><title>Parameters</title> |
| 29 | <variablelist> |
| 30 | <varlistentry> |
| 31 | <term><parameter>s</parameter></term> |
| 32 | <listitem> |
| 33 | <para> |
| 34 | Specifies the index used when the stencil buffer is cleared. |
| 35 | The initial value is 0. |
| 36 | </para> |
| 37 | </listitem> |
| 38 | </varlistentry> |
| 39 | </variablelist> |
| 40 | </refsect1> |
| 41 | <refsect1 id="description"><title>Description</title> |
| 42 | <para> |
| 43 | <function>glClearStencil</function> specifies the index used by <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry> to clear the stencil buffer. |
| 44 | <parameter>s</parameter> is masked with |
| 45 | <inlineequation><mml:math> |
| 46 | <!-- eqn: 2 sup m - 1:--> |
| 47 | <mml:mrow> |
| 48 | <mml:msup><mml:mn>2</mml:mn> |
| 49 | <mml:mi mathvariant="italic">m</mml:mi> |
| 50 | </mml:msup> |
| 51 | <mml:mo>-</mml:mo> |
| 52 | <mml:mn>1</mml:mn> |
| 53 | </mml:mrow> |
| 54 | </mml:math></inlineequation>, |
| 55 | where |
| 56 | <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation> |
| 57 | is the number of bits in the stencil buffer. |
| 58 | </para> |
| 59 | </refsect1> |
| 60 | <refsect1 id="errors"><title>Errors</title> |
| 61 | <para> |
| 62 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glClearStencil</function> |
| 63 | is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> |
| 64 | and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. |
| 65 | </para> |
| 66 | </refsect1> |
| 67 | <refsect1 id="associatedgets"><title>Associated Gets</title> |
| 68 | <para> |
| 69 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_CLEAR_VALUE</constant> |
| 70 | </para> |
| 71 | <para> |
| 72 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_BITS</constant> |
| 73 | </para> |
| 74 | </refsect1> |
| 75 | <refsect1 id="seealso"><title>See Also</title> |
| 76 | <para> |
| 77 | <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>, |
| 78 | <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>, |
| 79 | <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>, |
| 80 | <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>, |
| 81 | <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>, |
| 82 | <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>, |
| 83 | <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry> |
| 84 | </para> |
| 85 | </refsect1> |
| 86 | <refsect1 id="Copyright"><title>Copyright</title> |
| 87 | <para> |
| 88 | Copyright <trademark class="copyright"></trademark> 1991-2006 |
| 89 | Silicon Graphics, Inc. This document is licensed under the SGI |
| 90 | Free Software B License. For details, see |
| 91 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. |
| 92 | </para> |
| 93 | </refsect1> |
| 94 | </refentry> |