glInterleavedArrays

glInterleavedArrays

The glInterleavedArrays function simultaneously specifies and enables several interleaved arrays in a larger aggregate array.

void glInterleavedArrays(
GLenum format,
GLsizei stride,
const GLvoid *pointer
);
Parameters: 參數說明
format
The type of array to enable. The parameter can assume one of the following symbolic values: GL_V2F, GL_V3F, GL_C4UB_V2F, GL_C4UB_V3F, GL_C3F_V3F, GL_N3F_V3F, GL_C4F_N3F_V3F, GL_T2F_V3F, GL_T4F_V4F, GL_T2F_C4UB_V3F, GL_T2F_C3F_V3F, GL_T2F_N3F_V3F, GL_T2F_C4F_N3F_V3F, or GL_T4F_C4F_N3F_V4F.
stride
The offset in bytes between each aggregate array element.
pointer
A pointer to the first element of an aggregate array.
Remarks
With the glInterleavedArrays function you can simultaneously specify and enable several interleaved color, normal, texture, and vertex arrays whose elements are part of a larger aggregate array element. For some memory architectures this is more efficient than specifying the arrays separately.
If the stride parameter is zero then the aggregate array elements are stored consecutively; otherwise stride bytes occur between aggregate array elements.

熱門詞條

聯絡我們