23.06.2013 Views

The OpenGL Graphics System: A Specification

The OpenGL Graphics System: A Specification

The OpenGL Graphics System: A Specification

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.8. VERTEX ARRAYS 26<br />

should be normalized when converted to floating-point. If normalized is TRUE,<br />

fixed-point data are converted as specified in table 2.9; otherwise, the fixed-point<br />

values are converted directly.<br />

<strong>The</strong> one, two, three, or four values in an array that correspond to a single vertex<br />

comprise an array element. <strong>The</strong> values within each array element are stored sequentially<br />

in memory. If stride is specified as zero, then array elements are stored<br />

sequentially as well. <strong>The</strong> error INVALID VALUE is generated if stride is negative.<br />

Otherwise pointers to the ith and (i + 1)st elements of an array differ by stride<br />

basic machine units (typically unsigned bytes), the pointer to the (i + 1)st element<br />

being greater. For each command, pointer specifies the location in memory of the<br />

first value of the first element of the array being specified.<br />

An individual array is enabled or disabled by calling one of<br />

void EnableClientState( enum array );<br />

void DisableClientState( enum array );<br />

with array set to VERTEX ARRAY, NORMAL ARRAY, COLOR ARRAY,<br />

SECONDARY COLOR ARRAY, INDEX ARRAY, EDGE FLAG ARRAY,<br />

FOG COORD ARRAY, or TEXTURE COORD ARRAY, for the vertex, normal, color,<br />

secondary color, color index, edge flag, fog coordinate, or texture coordinate array,<br />

respectively.<br />

An individual generic vertex attribute array is enabled or disabled by calling<br />

one of<br />

void EnableVertexAttribArray( uint index );<br />

void DisableVertexAttribArray( uint index );<br />

where index identifies the generic vertex attribute array to enable or disable.<br />

<strong>The</strong> error INVALID VALUE is generated if index is greater than or equal to<br />

MAX VERTEX ATTRIBS.<br />

<strong>The</strong> command<br />

void ClientActiveTexture( enum texture );<br />

is used to select the vertex array client state parameters to be modified by<br />

the TexCoordPointer command and the array affected by EnableClientState and<br />

DisableClientState with parameter TEXTURE COORD ARRAY. This command sets<br />

the client state variable CLIENT ACTIVE TEXTURE. Each texture coordinate set<br />

has a client state vector which is selected when this command is invoked. This<br />

state vector includes the vertex array state. This call also selects the texture<br />

coordinate set state used for queries of client state.<br />

Version 2.0 - October 22, 2004

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!