glVertexAttrib2f Function
GL_APICALL void GL_APIENTRY glVertexAttrib2f(
GLuint indx,
GLfloat x,
GLfloat y
);
| Name | Description | |
|---|---|---|
| in | indx | Vertex attribute index number |
| in | x | Vertex attribute value |
| in | y | Vertex attribute value |
Sets vertex attributes using GLfloat-type values.
Set index to a value that is greater than 0 and at least one less than the value that can be obtained by glGetIntegerv with GL_MAX_VERTEX_ATTRIBS specified. Call this function when using the same vertex attribute values for all vertices. The values set by this function are used when a vertex attribute array has been disabled by glDisableVertexAttribArray.
The values specified by x and y are given as the x and y components, respectively, to the vertex shader's input registers. Values of 0 and 1 are respectively given for z and w.
This function generates the following errors.
| GL_INVALID_VALUE | The index argument was set to an invalid value. |
|---|
CONFIDENTIAL