Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Let’s go back to the assembly line and take a closer look at the inputs. Every vertex that you hand over to OpenGL has one or more attributes, the most crucial being its position. Vertex attributes in OpenGL ES 1.1 can have any of the forms listed in Table 2-2.
| Attribute | OpenGL enumerant | OpenGL function call | Dimensionality | Types |
|---|---|---|---|---|
| Position | GL_VERTEX_ARRAY | glVertexPointer | 2, 3, 4 | byte, short, fixed, float |
| Normal | GL_NORMAL_ARRAY | glNormalPointer | 3 | byte, short, fixed, float |
| Color | GL_COLOR_ARRAY | glColorPointer | 4 | ubyte, fixed, float |
| Point Size | GL_POINT_SIZE_ARRAY_OES | glPointSizePointerOES | 1 | fixed, float |
| Texture Coordinate | GL_TEXTURE_COORD_ARRAY | glTexCoordPointer | 2, 3, 4 | byte, short, fixed, float |
| Generic Attribute (ES 2.0) | N/A | glVertexAttribPointer | 1, 2, 3, 4 | byte, ubyte, short, ushort, fixed, float |