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=
"glEnableClientState">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glEnableClientState
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glEnableClientState
</refname>
17 <refpurpose>enable or disable client-side capability
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glEnableClientState
</function></funcdef>
23 <paramdef>GLenum
<parameter>cap
</parameter></paramdef>
27 <!-- eqn: ignoring delim $$ -->
28 <refsect1 id=
"parameters"><title>Parameters
</title>
31 <term><parameter>cap
</parameter></term>
34 Specifies the capability to enable.
36 <constant>GL_COLOR_ARRAY
</constant>,
37 <constant>GL_EDGE_FLAG_ARRAY
</constant>,
38 <constant>GL_FOG_COORD_ARRAY
</constant>,
39 <constant>GL_INDEX_ARRAY
</constant>,
40 <constant>GL_NORMAL_ARRAY
</constant>,
41 <constant>GL_SECONDARY_COLOR_ARRAY
</constant>,
42 <constant>GL_TEXTURE_COORD_ARRAY
</constant>, and
43 <constant>GL_VERTEX_ARRAY
</constant>
50 <refsynopsisdiv><title>C Specification
</title>
53 <funcdef>void
<function>glDisableClientState
</function></funcdef>
54 <paramdef>GLenum
<parameter>cap
</parameter></paramdef>
58 <refsect1 id=
"parameters2"><title>Parameters
</title>
61 <term><parameter>cap
</parameter></term>
64 Specifies the capability to disable.
70 <refsect1 id=
"description"><title>Description
</title>
72 <function>glEnableClientState
</function> and
<citerefentry><refentrytitle>glDisableClientState
</refentrytitle></citerefentry>
73 enable or disable individual client-side capabilities. By default, all
74 client-side capabilities are disabled.
76 <function>glEnableClientState
</function> and
<citerefentry><refentrytitle>glDisableClientState
</refentrytitle></citerefentry> take a
77 single argument,
<parameter>cap
</parameter>, which can assume one of the following
82 <term><constant>GL_COLOR_ARRAY
</constant></term>
85 If enabled, the color array is enabled for writing and used during
86 rendering when
<citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
87 <citerefentry><refentrytitle>glDrawRangeElements
</refentrytitle></citerefentry> <citerefentry><refentrytitle>glMultiDrawArrays
</refentrytitle></citerefentry>, or
88 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry> is called. See
<citerefentry><refentrytitle>glColorPointer
</refentrytitle></citerefentry>.
93 <term><constant>GL_EDGE_FLAG_ARRAY
</constant></term>
96 If enabled, the edge flag array is enabled for writing and used during
97 rendering when
<citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
98 <citerefentry><refentrytitle>glDrawRangeElements
</refentrytitle></citerefentry> <citerefentry><refentrytitle>glMultiDrawArrays
</refentrytitle></citerefentry>, or
99 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry> is called. See
<citerefentry><refentrytitle>glEdgeFlagPointer
</refentrytitle></citerefentry>.
104 <term><constant>GL_FOG_COORD_ARRAY
</constant></term>
107 If enabled, the fog coordinate array is enabled for writing and used during
108 rendering when
<citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
109 <citerefentry><refentrytitle>glDrawRangeElements
</refentrytitle></citerefentry> <citerefentry><refentrytitle>glMultiDrawArrays
</refentrytitle></citerefentry>, or
110 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry> is called. See
<citerefentry><refentrytitle>glFogCoordPointer
</refentrytitle></citerefentry>.
115 <term><constant>GL_INDEX_ARRAY
</constant></term>
118 If enabled, the index array is enabled for writing and used during
119 rendering when
<citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
120 <citerefentry><refentrytitle>glDrawRangeElements
</refentrytitle></citerefentry> <citerefentry><refentrytitle>glMultiDrawArrays
</refentrytitle></citerefentry>, or
121 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry> is called. See
<citerefentry><refentrytitle>glIndexPointer
</refentrytitle></citerefentry>.
126 <term><constant>GL_NORMAL_ARRAY
</constant></term>
129 If enabled, the normal array is enabled for writing and used during
130 rendering when
<citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
131 <citerefentry><refentrytitle>glDrawRangeElements
</refentrytitle></citerefentry> <citerefentry><refentrytitle>glMultiDrawArrays
</refentrytitle></citerefentry>, or
132 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry> is called. See
<citerefentry><refentrytitle>glNormalPointer
</refentrytitle></citerefentry>.
137 <term><constant>GL_SECONDARY_COLOR_ARRAY
</constant></term>
140 If enabled, the secondary color array is enabled for writing and used
141 during rendering when
<citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
142 <citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawRangeElements
</refentrytitle></citerefentry> <citerefentry><refentrytitle>glMultiDrawArrays
</refentrytitle></citerefentry>, or
143 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry> is called. See
<citerefentry><refentrytitle>glColorPointer
</refentrytitle></citerefentry>.
148 <term><constant>GL_TEXTURE_COORD_ARRAY
</constant></term>
151 If enabled, the texture coordinate array is enabled for writing and used
152 during rendering when
<citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
153 <citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawRangeElements
</refentrytitle></citerefentry> <citerefentry><refentrytitle>glMultiDrawArrays
</refentrytitle></citerefentry>, or
154 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry> is called. See
<citerefentry><refentrytitle>glTexCoordPointer
</refentrytitle></citerefentry>.
159 <term><constant>GL_VERTEX_ARRAY
</constant></term>
162 If enabled, the vertex array is enabled for writing and used during
163 rendering when
<citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
164 <citerefentry><refentrytitle>glDrawRangeElements
</refentrytitle></citerefentry> <citerefentry><refentrytitle>glMultiDrawArrays
</refentrytitle></citerefentry>, or
165 <citerefentry><refentrytitle>glMultiDrawElements
</refentrytitle></citerefentry> is called. See
<citerefentry><refentrytitle>glVertexPointer
</refentrytitle></citerefentry>.
171 <refsect1 id=
"notes"><title>Notes
</title>
173 <function>glEnableClientState
</function> is available only if the GL version is
1.1 or greater.
176 <constant>GL_FOG_COORD_ARRAY
</constant> and
<constant>GL_SECONDARY_COLOR_ARRAY
</constant> are available only if the GL version is
1.4 or
180 For OpenGL versions
1.3 and greater, or when
<code>ARB_multitexture
</code> is supported, enabling and disabling
181 <constant>GL_TEXTURE_COORD_ARRAY
</constant> affects the active client texture unit.
182 The active client texture unit is controlled with
183 <citerefentry><refentrytitle>glClientActiveTexture
</refentrytitle></citerefentry>.
186 <refsect1 id=
"errors"><title>Errors
</title>
188 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>cap
</parameter> is not an accepted value.
191 <function>glEnableClientState
</function> is not allowed between the execution of
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry> and the
192 corresponding
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>, but an error may or may not be generated. If
193 no error is generated, the behavior is undefined.
196 <refsect1 id=
"seealso"><title>See Also
</title>
198 <citerefentry><refentrytitle>glArrayElement
</refentrytitle></citerefentry>,
199 <citerefentry><refentrytitle>glClientActiveTexture
</refentrytitle></citerefentry>,
200 <citerefentry><refentrytitle>glColorPointer
</refentrytitle></citerefentry>,
201 <citerefentry><refentrytitle>glDrawArrays
</refentrytitle></citerefentry>,
202 <citerefentry><refentrytitle>glDrawElements
</refentrytitle></citerefentry>,
203 <citerefentry><refentrytitle>glEdgeFlagPointer
</refentrytitle></citerefentry>,
204 <citerefentry><refentrytitle>glFogCoordPointer
</refentrytitle></citerefentry>,
205 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>,
206 <citerefentry><refentrytitle>glGetPointerv
</refentrytitle></citerefentry>,
207 <citerefentry><refentrytitle>glIndexPointer
</refentrytitle></citerefentry>,
208 <citerefentry><refentrytitle>glInterleavedArrays
</refentrytitle></citerefentry>,
209 <citerefentry><refentrytitle>glNormalPointer
</refentrytitle></citerefentry>,
210 <citerefentry><refentrytitle>glSecondaryColorPointer
</refentrytitle></citerefentry>,
211 <citerefentry><refentrytitle>glTexCoordPointer
</refentrytitle></citerefentry>,
212 <citerefentry><refentrytitle>glVertexPointer
</refentrytitle></citerefentry>
215 <refsect1 id=
"Copyright"><title>Copyright
</title>
217 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
218 Silicon Graphics, Inc. This document is licensed under the SGI
219 Free Software B License. For details, see
220 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.