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 41<br />

integer values; such data are referred to as pure integers. Data for an array specified<br />

by VertexAttribLPointer must be specified as double-precision floating-point<br />

values. An INVALID_ENUM error will be generated by VertexAttribLPointer if<br />

type is not DOUBLE.<br />

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

comprise an array element. When size is BGRA, it indicates four values. The values<br />

within each array element are stored sequentially in memory. However, if size is<br />

BGRA, the first, second, third, and fourth values of each array element are taken<br />

from the third, second, first, and fourth values in memory respectively. If stride<br />

is specified as zero, then array elements are stored sequentially as well. The error<br />

INVALID_VALUE is generated if stride is negative. Otherwise pointers to the ith<br />

and (i + 1)st elements of an array differ by stride basic machine units (typically<br />

unsigned bytes), the pointer to the (i + 1)st element being greater. For each command,<br />

pointer specifies the location in memory of the first value of the first element<br />

of the array being specified.<br />

When values for a vertex shader attribute variable are sourced from an enabled<br />

generic vertex attribute array, the array must be specified by a command compatible<br />

with the data type of the variable. The values loaded into a shader attribute<br />

variable bound to generic attribute index are undefined if the array for index was<br />

not specified by:<br />

• VertexAttribPointer, for single-precision floating-point scalar, vector, and<br />

matrix types<br />

• VertexAttribIPointer with type BYTE, SHORT, or INT for signed integer<br />

scalar and vector types<br />

• VertexAttribIPointer with type UNSIGNED_BYTE, UNSIGNED_SHORT, or<br />

UNSIGNED_INT for unsigned integer scalar and vector types<br />

• VertexAttribLPointer, for double-precision floating-point scalar and vector<br />

types.<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, FOG_-<br />

COORD_ARRAY, or TEXTURE_COORD_ARRAY, for the vertex, normal, color,<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!