GLVERTEXATTRIBFORMAT(3G)

    .SH "NAME" glVertexAttribFormat - specify the organization of vertex arrays
    .SH "C SPECIFICATION"

            .HP u void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);

            .HP u void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);

    .SH "PARAMETERS"

        .PP attribindex

                    The generic vertex attribute array being described.

            .RE
            .PP size

                        The number of values per vertex that are stored in the array.

                .RE
                .PP type

                            The type of the data stored in the array.

                    .RE
                    .PP normalized

                                Specifies whether fixed-point data values should be normalized (GL_TRUE) or converted directly as fixed-point values (GL_FALSE) when they are accessed. This parameter is ignored if type is GL_FIXED.

                        .RE
                        .PP relativeoffset

                                    An offset to the first element relative to the start of the vertex buffer binding.

                            .RE

                        .SH "DESCRIPTION"
                            .PP glVertexAttribFormat and glVertexAttribIFormat specify the organization of data in vertex arrays. attribindex specifies the index of the generic vertex attribute array whose data layout is being described, and must be less than the value of GL_MAX_VERTEX_ATTRIBS.
                            .PP size determines the number of components per vertex are allocated to the specifed attribute and must be 1, 2, 3 or 4. type indicates the type of the data. If type is one of GL_BYTE, GL_SHORT, GL_INT, GL_FIXED, GL_FLOAT and GL_HALF_FLOAT indicate types GLbyte, GLshort, GLint, GLfixed, GLfloat, and GLhalf respectively; the values GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, and GL_UNSIGNED_INT indicate types GLubyte, GLushort, and GLuint, respectively; the values GL_INT_2_10_10_10_REV and GL_UNSIGNED_INT_2_10_10_10_REV indicating respectively four signed or unsigned elements packed into a single GLuint.
                            .PP For glVertexAttribFormat, if normalized is GL_TRUE, then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If normalized is GL_FALSE then integer data is directly converted to floating point.
                            .PP relativeoffset is the byte offset of the first element relative to the start of the vertex buffer binding this attribute fetches from.
                            .PP glVertexAttribFormat should be used to describe vertex attribute layout for floating-point vertex attributes and glVertexAttribIFormat should be used to describe vertex attribute layout for integer vertex attributes. Data for an array specified by glVertexAttribIFormat will always be left as integer values; such data are referred to as pure integers.

                        .SH "ERRORS"
                            .PP GL_INVALID_VALUE is generated if attribindex is greater than or equal to the value of GL_MAX_VERTEX_ATTRIBS.
                            .PP GL_INVALID_VALUE is generated if size is not one of the accepted values.
                            .PP GL_INVALID_VALUE is generated if relativeoffset is greater than the value of GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET.
                            .PP GL_INVALID_ENUM is generated if type is not one of the accepted tokens.
                            .PP GL_INVALID_OPERATION is generated if no vertex array object is bound.

                        .SH "ASSOCIATED GETS"
                            .PP glGet() with arguments GL_MAX_VERTEX_ATTRIB_BINDINGS, or GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET.
                            .PP glGetVertexAttrib() with argument GL_VERTEX_ATTRIB_RELATIVE_OFFSET.

                        .SH "API VERSION SUPPORT"

                            .TS allbox tab(:); l l l l l l l l l l. T{ glVertexAttribFormat T}:T{ T}:T{ T}:T{ T}:T{ T} T{ glVertexAttribIFormat T}:T{ T}:T{ T}:T{ T}:T{ T}

                        .SH "SEE ALSO"
                            .PP glBindVertexBuffer(), glVertexAttribBinding(), glVertexAttribPointer(), glVertexBindingDivisor(), glVertexAttribPointer().

                        .SH "COPYRIGHT"
                            .PP Copyright © 2012-2015 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. http://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2012-2015 Khronos Group