'\" t .\" Title: glVertexAttribPointer .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLVERTEXATTRIBPOINTE" "3G" "01/03/2018" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glVertexAttribPointer \- define an array of generic vertex attribute data .SH "C SPECIFICATION" .HP \w'void\ glVertexAttribPointer('u .BI "void glVertexAttribPointer(GLuint\ " "index" ", GLint\ " "size" ", GLenum\ " "type" ", GLboolean\ " "normalized" ", GLsizei\ " "stride" ", const\ GLvoid\ *\ " "pointer" ");" .HP \w'void\ glVertexAttribIPointer('u .BI "void glVertexAttribIPointer(GLuint\ " "index" ", GLint\ " "size" ", GLenum\ " "type" ", GLsizei\ " "stride" ", const\ GLvoid\ *\ " "pointer" ");" .HP \w'void\ glVertexAttribLPointer('u .BI "void glVertexAttribLPointer(GLuint\ " "index" ", GLint\ " "size" ", GLenum\ " "type" ", GLsizei\ " "stride" ", const\ GLvoid\ *\ " "pointer" ");" .SH "PARAMETERS" .PP \fIindex\fR .RS 4 Specifies the index of the generic vertex attribute to be modified\&. .RE .PP \fIsize\fR .RS 4 Specifies the number of components per generic vertex attribute\&. Must be 1, 2, 3, 4\&. Additionally, the symbolic constant \fBGL_BGRA\fR is accepted by \fBglVertexAttribPointer\fR\&. The initial value is 4\&. .RE .PP \fItype\fR .RS 4 Specifies the data type of each component in the array\&. The symbolic constants \fBGL_BYTE\fR, \fBGL_UNSIGNED_BYTE\fR, \fBGL_SHORT\fR, \fBGL_UNSIGNED_SHORT\fR, \fBGL_INT\fR, and \fBGL_UNSIGNED_INT\fR are accepted by \fBglVertexAttribPointer\fR and \fBglVertexAttribIPointer\fR\&. Additionally \fBGL_HALF_FLOAT\fR, \fBGL_FLOAT\fR, \fBGL_DOUBLE\fR, \fBGL_FIXED\fR, \fBGL_INT_2_10_10_10_REV\fR, \fBGL_UNSIGNED_INT_2_10_10_10_REV\fR and \fBGL_UNSIGNED_INT_10F_11F_11F_REV\fR are accepted by \fBglVertexAttribPointer\fR\&. \fBGL_DOUBLE\fR is also accepted by \fBglVertexAttribLPointer\fR and is the only token accepted by the \fItype\fR parameter for that function\&. The initial value is \fBGL_FLOAT\fR\&. .RE .PP \fInormalized\fR .RS 4 For \fBglVertexAttribPointer\fR, specifies whether fixed\-point data values should be normalized (\fBGL_TRUE\fR) or converted directly as fixed\-point values (\fBGL_FALSE\fR) when they are accessed\&. .RE .PP \fIstride\fR .RS 4 Specifies the byte offset between consecutive generic vertex attributes\&. If \fIstride\fR is 0, the generic vertex attributes are understood to be tightly packed in the array\&. The initial value is 0\&. .RE .PP \fIpointer\fR .RS 4 Specifies a offset of the first component of the first generic vertex attribute in the array in the data store of the buffer currently bound to the \fBGL_ARRAY_BUFFER\fR target\&. The initial value is 0\&. .RE .SH "DESCRIPTION" .PP \fBglVertexAttribPointer\fR, \fBglVertexAttribIPointer\fR and \fBglVertexAttribLPointer\fR specify the location and data format of the array of generic vertex attributes at index \fIindex\fR to use when rendering\&. \fIsize\fR specifies the number of components per attribute and must be 1, 2, 3, 4, or \fBGL_BGRA\fR\&. \fItype\fR specifies the data type of each component, and \fIstride\fR specifies the byte stride from one attribute to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays\&. .PP For \fBglVertexAttribPointer\fR, if \fInormalized\fR is set to \fBGL_TRUE\fR, it indicates that values stored in an integer format are to be mapped to the range [\-1,1] (for signed values) or [0,1] (for unsigned values) when they are accessed and converted to floating point\&. Otherwise, values will be converted to floats directly without normalization\&. .PP For \fBglVertexAttribIPointer\fR, only the integer types \fBGL_BYTE\fR, \fBGL_UNSIGNED_BYTE\fR, \fBGL_SHORT\fR, \fBGL_UNSIGNED_SHORT\fR, \fBGL_INT\fR, \fBGL_UNSIGNED_INT\fR are accepted\&. Values are always left as integer values\&. .PP \fBglVertexAttribLPointer\fR specifies state for a generic vertex attribute array associated with a shader attribute variable declared with 64\-bit double precision components\&. \fItype\fR must be \fBGL_DOUBLE\fR\&. \fIindex\fR, \fIsize\fR, and \fIstride\fR behave as described for \fBglVertexAttribPointer\fR and \fBglVertexAttribIPointer\fR\&. .PP If \fIpointer\fR is not NULL, a non\-zero named buffer object must be bound to the \fBGL_ARRAY_BUFFER\fR target (see \fBglBindBuffer\fR()), otherwise an error is generated\&. \fIpointer\fR is treated as a byte offset into the buffer object\*(Aqs data store\&. The buffer object binding (\fBGL_ARRAY_BUFFER_BINDING\fR) is saved as generic vertex attribute array state (\fBGL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\fR) for index \fIindex\fR\&. .PP When a generic vertex attribute array is specified, \fIsize\fR, \fItype\fR, \fInormalized\fR, \fIstride\fR, and \fIpointer\fR are saved as vertex array state, in addition to the current vertex array buffer object binding\&. .PP To enable and disable a generic vertex attribute array, call \fBglEnableVertexAttribArray\fR() and \fBglDisableVertexAttribArray\fR with \fIindex\fR\&. If enabled, the generic vertex attribute array is used when \fBglDrawArrays\fR(), \fBglMultiDrawArrays\fR(), \fBglDrawElements\fR(), \fBglMultiDrawElements\fR(), or \fBglDrawRangeElements\fR() is called\&. .SH "NOTES" .PP Each generic vertex attribute array is initially disabled and isn\*(Aqt accessed when \fBglDrawElements\fR(), \fBglDrawRangeElements\fR(), \fBglDrawArrays\fR(), \fBglMultiDrawArrays\fR(), or \fBglMultiDrawElements\fR() is called\&. .PP \fBGL_UNSIGNED_INT_10F_11F_11F_REV\fR is accepted for \fItype\fR only if the GL version is 4\&.4 or higher\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if \fIindex\fR is greater than or equal to \fBGL_MAX_VERTEX_ATTRIBS\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIsize\fR is not 1, 2, 3, 4 or (for \fBglVertexAttribPointer\fR), \fBGL_BGRA\fR\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fItype\fR is not an accepted value\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIstride\fR is negative\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIsize\fR is \fBGL_BGRA\fR and \fItype\fR is not \fBGL_UNSIGNED_BYTE\fR, \fBGL_INT_2_10_10_10_REV\fR or \fBGL_UNSIGNED_INT_2_10_10_10_REV\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fItype\fR is \fBGL_INT_2_10_10_10_REV\fR or \fBGL_UNSIGNED_INT_2_10_10_10_REV\fR and \fIsize\fR is not 4 or \fBGL_BGRA\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fItype\fR is \fBGL_UNSIGNED_INT_10F_11F_11F_REV\fR and \fIsize\fR is not 3\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglVertexAttribPointer\fR if \fIsize\fR is \fBGL_BGRA\fR and \fInoramlized\fR is \fBGL_FALSE\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if zero is bound to the \fBGL_ARRAY_BUFFER\fR buffer object binding point and the \fIpointer\fR argument is not \fBNULL\fR\&. .SH "ASSOCIATED GETS" .PP \fBglGet\fR() with argument \fBGL_MAX_VERTEX_ATTRIBS\fR .PP \fBglGetVertexAttrib\fR() with arguments \fIindex\fR and \fBGL_VERTEX_ATTRIB_ARRAY_ENABLED\fR .PP \fBglGetVertexAttrib\fR() with arguments \fIindex\fR and \fBGL_VERTEX_ATTRIB_ARRAY_SIZE\fR .PP \fBglGetVertexAttrib\fR() with arguments \fIindex\fR and \fBGL_VERTEX_ATTRIB_ARRAY_TYPE\fR .PP \fBglGetVertexAttrib\fR() with arguments \fIindex\fR and \fBGL_VERTEX_ATTRIB_ARRAY_NORMALIZED\fR .PP \fBglGetVertexAttrib\fR() with arguments \fIindex\fR and \fBGL_VERTEX_ATTRIB_ARRAY_STRIDE\fR .PP \fBglGetVertexAttrib\fR() with arguments \fIindex\fR and \fBGL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\fR .PP \fBglGet\fR() with argument \fBGL_ARRAY_BUFFER_BINDING\fR .PP \fBglGetVertexAttribPointerv\fR() with arguments \fIindex\fR and \fBGL_VERTEX_ATTRIB_ARRAY_POINTER\fR .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ \fBglVertexAttribIPointer\fR T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ \fBglVertexAttribLPointer\fR T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ \fBglVertexAttribPointer\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp 1 .SH "SEE ALSO" .PP \fBglBindAttribLocation\fR(), \fBglBindBuffer\fR(), \fBglDisableVertexAttribArray\fR, \fBglDrawArrays\fR(), \fBglDrawElements\fR(), \fBglDrawRangeElements\fR(), \fBglEnableVertexAttribArray\fR(), \fBglMultiDrawArrays\fR(), \fBglMultiDrawElements\fR(), \fBglVertexAttrib\fR() .SH "COPYRIGHT" .PP Copyright \(co 2003\-2005 3Dlabs Inc\&. Ltd\&. Copyright \(co 2010\-2014 Khronos Group\&. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1\&.0, 8 June 1999\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2003-2005 3Dlabs Inc. Ltd. .br Copyright \(co 2010-2014 Khronos Group .br