<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"><!-- saved from url=(0013)about:internet -->
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glInterleavedArrays</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div class="refentry"><a id="glInterleavedArrays"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glInterleavedArrays — simultaneously specify and enable several interleaved arrays</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <strong class="fsfunc">glInterleavedArrays</strong>(</code></td><td>GLenum <var class="pdparam">format</var>, </td></tr><tr><td> </td><td>GLsizei <var class="pdparam">stride</var>, </td></tr><tr><td> </td><td>const GLvoid * <var class="pdparam">pointer</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>format</code></em></span></dt><dd><p>
                    Specifies the type of array to enable. Symbolic constants
                    <code class="constant">GL_V2F</code>,
                    <code class="constant">GL_V3F</code>,
                    <code class="constant">GL_C4UB_V2F</code>,
                    <code class="constant">GL_C4UB_V3F</code>,
                    <code class="constant">GL_C3F_V3F</code>,
                    <code class="constant">GL_N3F_V3F</code>,
                    <code class="constant">GL_C4F_N3F_V3F</code>,
                    <code class="constant">GL_T2F_V3F</code>,
                    <code class="constant">GL_T4F_V4F</code>,
                    <code class="constant">GL_T2F_C4UB_V3F</code>,
                    <code class="constant">GL_T2F_C3F_V3F</code>,
                    <code class="constant">GL_T2F_N3F_V3F</code>,
                    <code class="constant">GL_T2F_C4F_N3F_V3F</code>,
                    and
                    <code class="constant">GL_T4F_C4F_N3F_V4F</code>
                    are accepted.
                </p></dd><dt><span class="term"><em class="parameter"><code>stride</code></em></span></dt><dd><p>
                    Specifies the offset in bytes between each aggregate array element.
                </p></dd></dl></div></div><div class="refsect1"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glInterleavedArrays</code> lets you specify and enable individual color,
            normal,
            texture and vertex
            arrays whose elements are part of a larger aggregate array element.
            For some implementations, this is more efficient than specifying the arrays
            separately.
        </p><p>
            If <em class="parameter"><code>stride</code></em> is 0, the aggregate elements are stored consecutively.
            Otherwise, <em class="parameter"><code>stride</code></em> bytes occur between the beginning of one
            aggregate array element and the beginning of the next aggregate array
            element.
        </p><p>
            <em class="parameter"><code>format</code></em> serves as a ``key''
            describing the extraction of individual arrays from the aggregate array.
            If <em class="parameter"><code>format</code></em> contains a T, then texture coordinates are
            extracted from the interleaved array.  If C is present, color values
            are extracted. If N is present, normal coordinates are extracted.
            Vertex coordinates are always extracted.
        </p><p>
            The digits 2, 3, and 4 denote how many values are extracted.
            F indicates that values are extracted as floating-point values.
            Colors may also be extracted as 4 unsigned bytes if 4UB follows the
            C.  If a color is extracted as 4 unsigned bytes, the vertex
            array element which follows is located at the first possible
            floating-point aligned address.
        </p></div><div class="refsect1"><a id="notes"></a><h2>Notes</h2><p>
            <code class="function">glInterleavedArrays</code> is available only if the GL version is 1.1 or greater.
        </p><p>
            If <code class="function">glInterleavedArrays</code> is called while compiling a display list, it is not
            compiled into the list, and it is executed immediately.
        </p><p>
            Execution of <code class="function">glInterleavedArrays</code> is not allowed between the execution of
            <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>,
            but an error may or may not be generated. If no error is generated,
            the operation is undefined.
        </p><p>
            <code class="function">glInterleavedArrays</code> is typically implemented on the client side.
        </p><p>
            Vertex array parameters are client-side state and are therefore not
            saved or restored by <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a> and <a class="citerefentry" href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a>.
            Use <a class="citerefentry" href="glPushClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushClientAttrib</span></span></a> and <a class="citerefentry" href="glPopClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopClientAttrib</span></span></a> instead.
        </p><p>
            For OpenGL versions 1.3 and greater, or when the <code class="code">ARB_multitexture</code> extension is supported, <code class="function">glInterleavedArrays</code>
            only updates the texture coordinate array for the client active texture
            unit. The texture coordinate state for other client texture units is not
            updated, regardless of whether the client texture unit is enabled or not.
        </p><p>
            Secondary color values are not supported in interleaved vertex array formats.
        </p></div><div class="refsect1"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is not an accepted value.
        </p><p>
            <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>stride</code></em> is negative.
        </p></div><div class="refsect1"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glArrayElement.xml"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>,
            <a class="citerefentry" href="glClientActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glClientActiveTexture</span></span></a>,
            <a class="citerefentry" href="glColorPointer.xml"><span class="citerefentry"><span class="refentrytitle">glColorPointer</span></span></a>,
            <a class="citerefentry" href="glDrawArrays.xml"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>,
            <a class="citerefentry" href="glDrawElements.xml"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
            <a class="citerefentry" href="glEdgeFlagPointer.xml"><span class="citerefentry"><span class="refentrytitle">glEdgeFlagPointer</span></span></a>,
            <a class="citerefentry" href="glEnableClientState.xml"><span class="citerefentry"><span class="refentrytitle">glEnableClientState</span></span></a>,
            <a class="citerefentry" href="glGetPointerv.xml"><span class="citerefentry"><span class="refentrytitle">glGetPointerv</span></span></a>,
            <a class="citerefentry" href="glIndexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glIndexPointer</span></span></a>,
            <a class="citerefentry" href="glNormalPointer.xml"><span class="citerefentry"><span class="refentrytitle">glNormalPointer</span></span></a>,
            <a class="citerefentry" href="glSecondaryColorPointer.xml"><span class="citerefentry"><span class="refentrytitle">glSecondaryColorPointer</span></span></a>,
            <a class="citerefentry" href="glTexCoordPointer.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoordPointer</span></span></a>,
            <a class="citerefentry" href="glVertexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glVertexPointer</span></span></a>
        </p></div><div class="refsect1"><a id="Copyright"></a><h2>Copyright</h2><p>
            Copyright <span class="trademark"></span>© 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></body></html>