21.06.2014 Views

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.8. VERTEX ARRAYS 42<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 />

An INVALID_VALUE error is generated if index is greater than or equal to<br />

MAX_VERTEX_ATTRIBS.<br />

The command<br />

void VertexAttribDivisor( uint index, uint divisor );<br />

modifies the rate at which generic vertex attributes advance when rendering multiple<br />

instances of primitives in a single draw call. If divisor is zero, the attribute at<br />

slot index advances once per vertex. If divisor is non-zero, the attribute advances<br />

once per divisor instances of the primitives being rendered. An attribute is referred<br />

to as instanced if its divisor value is non-zero.<br />

An INVALID_VALUE error is generated if index is greater than or equal to the<br />

value of MAX_VERTEX_ATTRIBS.<br />

The command<br />

void ClientActiveTexture( enum texture );<br />

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

CoordPointer command and the array affected by EnableClientState and DisableClientState<br />

with parameter TEXTURE_COORD_ARRAY. This command sets the<br />

client state variable CLIENT_ACTIVE_TEXTURE. Each texture coordinate set has<br />

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

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

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

Specifying an invalid texture generates the error INVALID_ENUM. Valid values<br />

of texture are the same as for the MultiTexCoord commands described in section<br />

2.7.<br />

The command<br />

void ArrayElementInstanced( int i, int instance );<br />

<strong>OpenGL</strong> <strong>4.2</strong> (<strong>Compatibility</strong> <strong>Profile</strong>) - <strong>April</strong> <strong>27</strong>, <strong>2012</strong>

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

Saved successfully!

Ooh no, something went wrong!