GLTEXBUFFER(3G)

    .SH "NAME" glTexBuffer - attach a buffer object's data store to a buffer texture object
    .SH "C SPECIFICATION"

            .HP u void glTexBuffer(GLenum target, GLenum internalFormat, GLuint buffer);

    .SH "PARAMETERS"

        .PP target

                    Specifies the target to which the texture is bound for glTexBuffer. Must be GL_TEXTURE_BUFFER.

            .RE
            .PP internalFormat

                        Specifies the internal format of the data in the store belonging to buffer.

                .RE
                .PP buffer

                            Specifies the name of the buffer object whose storage to attach to the active buffer texture.

                    .RE

                .SH "DESCRIPTION"
                    .PP glTexBuffer attaches the data store of a specified buffer object to a specified texture object, and specify the storage format for the texture image found found in the buffer object. The texture object must be a buffer texture.
                    .PP If buffer is zero, any buffer object attached to the buffer texture is detached and no new buffer object is attached. If buffer is non-zero, it must be the name of an existing buffer object.
                    .PP internalformat specifies the storage format, and must be one of the following sized internal formats:
                    .PP internalformat specifies the storage format, and must be one of the following sized internal formats:
                    <xi:include></xi:include>
                    .PP When a buffer object is attached to a buffer texture, the buffer object's data store is taken as the texture's texel array. The number of texels in the buffer texture's texel array is given by $$ \left\lfloor { size \over { components \times sizeof(base\_type) } } \right\rfloor $$ where $size$ is the size of the buffer object in basic machine units (the value of GL_BUFFER_SIZE for buffer), and $components$ and $base\_type$ are the element count and base data type for elements, as specified in the table above. The number of texels in the texel array is then clamped to the value of the implementation-dependent limit GL_MAX_TEXTURE_BUFFER_SIZE. When a buffer texture is accessed in a shader, the results of a texel fetch are undefined if the specified texel coordinate is negative, or greater than or equal to the clamped number of texels in the texel array.

                .SH "ERRORS"
                    .PP GL_INVALID_ENUM is generated by glTexBuffer if target is not GL_TEXTURE_BUFFER.
                    .PP GL_INVALID_ENUM is generated if internalformat is not one of the sized internal formats described above.
                    .PP GL_INVALID_OPERATION is generated if buffer is not zero and is not the name of an existing buffer object.

                .SH "ASSOCIATED GETS"
                    .PP glGet() with argument GL_MAX_TEXTURE_BUFFER_SIZE
                    .PP glGet() with argument GL_TEXTURE_BINDING_BUFFER
                    .PP glGetTexLevelParameter() with argument GL_TEXTURE_BUFFER_DATA_STORE_BINDING

                .SH "VERSION SUPPORT"
                    .TS allbox tab(:); l l l l l. T{ glTexBuffer T}:T{ T}:T{ T}:T{ T}:T{ T}

                .SH "SEE ALSO"
                    .PP glGenBuffers(), glBindBuffer(), glBufferData(), glDeleteBuffers(), glGenTextures(), glBindTexture(), glDeleteTextures()

                .SH "COPYRIGHT"
                    .PP Copyright © 2010-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 © 2010-2015 Khronos Group