'\" t .\" Title: glVertexAttribFormat .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets v1.79.2 .\" Date: 10/20/2024 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLVERTEXATTRIBFORMAT" "3G" "10/20/2024" "[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" glVertexAttribFormat, glVertexArrayAttribFormat \- specify the organization of vertex arrays .SH "C SPECIFICATION" .HP \w'void\ glVertexAttribFormat('u .BI "void glVertexAttribFormat(GLuint\ " "attribindex" ", GLint\ " "size" ", GLenum\ " "type" ", GLboolean\ " "normalized" ", GLuint\ " "relativeoffset" ");" .HP \w'void\ glVertexAttribIFormat('u .BI "void glVertexAttribIFormat(GLuint\ " "attribindex" ", GLint\ " "size" ", GLenum\ " "type" ", GLuint\ " "relativeoffset" ");" .HP \w'void\ glVertexAttribLFormat('u .BI "void glVertexAttribLFormat(GLuint\ " "attribindex" ", GLint\ " "size" ", GLenum\ " "type" ", GLuint\ " "relativeoffset" ");" .HP \w'void\ glVertexArrayAttribFormat('u .BI "void glVertexArrayAttribFormat(GLuint\ " "vaobj" ", GLuint\ " "attribindex" ", GLint\ " "size" ", GLenum\ " "type" ", GLboolean\ " "normalized" ", GLuint\ " "relativeoffset" ");" .HP \w'void\ glVertexArrayAttribIFormat('u .BI "void glVertexArrayAttribIFormat(GLuint\ " "vaobj" ", GLuint\ " "attribindex" ", GLint\ " "size" ", GLenum\ " "type" ", GLuint\ " "relativeoffset" ");" .HP \w'void\ glVertexArrayAttribLFormat('u .BI "void glVertexArrayAttribLFormat(GLuint\ " "vaobj" ", GLuint\ " "attribindex" ", GLint\ " "size" ", GLenum\ " "type" ", GLuint\ " "relativeoffset" ");" .SH "PARAMETERS" .PP \fIvaobj\fR .RS 4 Specifies the name of the vertex array object for \fBglVertexArrayAttrib{I, L}Format\fR functions\&. .RE .PP \fIattribindex\fR .RS 4 The generic vertex attribute array being described\&. .RE .PP \fIsize\fR .RS 4 The number of values per vertex that are stored in the array\&. .RE .PP \fItype\fR .RS 4 The type of the data stored in the array\&. .RE .PP \fInormalized\fR .RS 4 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\&. This parameter is ignored if \fItype\fR is \fBGL_FIXED\fR\&. .RE .PP \fIrelativeoffset\fR .RS 4 The distance between elements within the buffer\&. .RE .SH "DESCRIPTION" .PP \fBglVertexAttribFormat\fR, \fBglVertexAttribIFormat\fR and \fBglVertexAttribLFormat\fR, as well as \fBglVertexArrayAttribFormat\fR, \fBglVertexArrayAttribIFormat\fR and \fBglVertexArrayAttribLFormat\fR specify the organization of data in vertex arrays\&. The first three calls operate on the bound vertex array object, whereas the last three ones modify the state of a vertex array object with ID \fIvaobj\fR\&. \fIattribindex\fR specifies the index of the generic vertex attribute array whose data layout is being described, and must be less than the value of \fBGL_MAX_VERTEX_ATTRIBS\fR\&. .PP \fIsize\fR determines the number of components per vertex are allocated to the specified attribute and must be 1, 2, 3, 4, or GL_BGRA\&. \fItype\fR indicates the type of the data\&. If \fItype\fR is one of \fBGL_BYTE\fR, \fBGL_SHORT\fR, \fBGL_INT\fR, \fBGL_FIXED\fR, \fBGL_FLOAT\fR, \fBGL_HALF_FLOAT\fR, and \fBGL_DOUBLE\fR indicate types GLbyte, GLshort, GLint, GLfixed, GLfloat, GLhalf, and GLdouble, respectively; the values \fBGL_UNSIGNED_BYTE\fR, \fBGL_UNSIGNED_SHORT\fR, and \fBGL_UNSIGNED_INT\fR indicate types GLubyte, GLushort, and GLuint, respectively; the values \fBGL_INT_2_10_10_10_REV\fR and \fBGL_UNSIGNED_INT_2_10_10_10_REV\fR indicating respectively four signed or unsigned elements packed into a single GLuint; and the value \fBGL_UNSIGNED_INT_10F_11F_11F_REV\fR indicating three floating point values packed into a single GLuint\&. .PP \fBglVertexAttribLFormat\fR and \fBglVertexArrayAttribLFormat\fR is used to specify layout for data associated with a generic attribute variable declared as 64\-bit double precision components\&. For \fBglVertexAttribLFormat\fR and \fBglVertexArrayAttribLFormat\fR, \fItype\fR must be \fBGL_DOUBLE\fR\&. In contrast to \fBglVertexAttribFormat\fR or \fBglVertexArrayAttribFormat\fR, which will cause data declared as \fBGL_DOUBLE\fR to be converted to 32\-bit representation, \fBglVertexAttribLFormat\fR and \fBglVertexArrayAttribLFormat\fR cause such data to be left in its natural, 64\-bit representation\&. .PP For \fBglVertexAttribFormat\fR and \fBglVertexArrayAttribFormat\fR, if \fInormalized\fR is \fBGL_TRUE\fR, then integer data is normalized to the range [\-1, 1] or [0, 1] if it is signed or unsigned, respectively\&. If \fInormalized\fR is \fBGL_FALSE\fR then integer data is directly converted to floating point\&. .PP \fIrelativeoffset\fR is the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from\&. .PP \fBglVertexAttribFormat\fR and \fBglVertexArrayAttribFormat\fR should be used to describe vertex attribute layout for floating\-point vertex attributes, \fBglVertexAttribIFormat\fR and \fBglVertexArrayAttribIFormat\fR should be used to describe vertex attribute layout for integer vertex attribute, and \fBglVertexAttribLFormat\fR and \fBglVertexArrayAttribLFormat\fR should be used to describe the layout for 64\-bit vertex attributes\&. Data for an array specified by \fBglVertexAttribIFormat\fR and \fBglVertexArrayAttribIFormat\fR will always be left as integer values; such data are referred to as pure integers\&. .SH "NOTES" .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 \fIattribindex\fR is greater than or equal to the value of \fBGL_MAX_VERTEX_ATTRIBS\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIsize\fR is not one of the accepted values\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIrelativeoffset\fR is greater than the value of \fBGL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET\fR\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fItype\fR is not one of the accepted tokens\&. .PP \fBGL_INVALID_ENUM\fR is generated by \fBglVertexAttribIFormat\fR, \fBglVertexAttribLFormat\fR, \fBglVertexArrayAttribIFormat\fR and \fBglVertexArrayAttribLFormat\fR if \fItype\fR is \fBGL_UNSIGNED_INT_10F_11F_11F_REV\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglVertexAttribFormat\fR, \fBglVertexAttribIFormat\fR and \fBglVertexAttribLFormat\fR if no vertex array object is bound\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglVertexArrayAttribFormat\fR, \fBglVertexArrayAttribIFormat\fR and \fBglVertexArrayAttribLFormat\fR if \fIvaobj\fR is not the name of an existing vertex array object\&. .PP \fBGL_INVALID_OPERATION\fR is generated under any of the following conditions: .PP .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \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\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \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 neither 4 nor \fBGL_BGRA\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fItype\fR is \fBGL_UNSIGNED_INT_10F_11F_11F_REV\fR and \fIsize\fR is not 3\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIsize\fR is \fBGL_BGRA\fR and \fInormalized\fR is \fBGL_FALSE\fR\&. .RE .SH "ASSOCIATED GETS" .PP \fBglGet\fR() with arguments \fBGL_MAX_VERTEX_ATTRIB_BINDINGS\fR, or \fBGL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET\fR\&. .PP \fBglGetVertexAttrib\fR() with argument \fBGL_VERTEX_ATTRIB_RELATIVE_OFFSET\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 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{ \fBglVertexArrayAttribFormat\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{ \fBglVertexArrayAttribIFormat\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{ \fBglVertexArrayAttribLFormat\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{ \fBglVertexAttribFormat\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{ \fBglVertexAttribIFormat\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{ \fBglVertexAttribLFormat\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 \fBglBindVertexBuffer\fR(), \fBglVertexAttribBinding\fR(), \fBglVertexAttribPointer\fR(), \fBglVertexBindingDivisor\fR(), \fBglVertexAttribPointer\fR()\&. .SH "COPYRIGHT" .PP Copyright \(co 2013\-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]\fBhttps://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2013-2014 Khronos Group .br