GLCOPYBUFFERSUBDATA(3G)

    .SH "NAME" glCopyBufferSubData - copy part of the data store of a buffer object to the data store of another buffer object
    .SH "C SPECIFICATION"

            .HP u void glCopyBufferSubData(GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size);

    .SH "PARAMETERS"

        .PP readtarget

                    Specifies the target from whose data store data should be read.

            .RE
            .PP writetarget

                        Specifies the target to whose data store data should be written.

                .RE
                .PP readoffset

                            Specifies the offset, in basic machine units, within the data store of readtarget from which data should be read.

                    .RE
                    .PP writeoffset

                                Specifies the offset, in basic machine units, within the data store of writetarget to which data should be written.

                        .RE
                        .PP size

                                    Specifies the size, in basic machine units, of the data to be copied from readtarget to writetarget.

                            .RE

                        .SH "DESCRIPTION"
                            .PP glCopyBufferSubData copies part of the data store attached to readtarget to the data store attached to writetarget. The number of basic machine units indicated by size is copied from the source, at offset readoffset to the destination at writeoffset, also in basic machine units.
                            .PP readTarget and writeTarget specify the targets to which the source and destination buffer objects are bound, and must each be one of the buffer binding targets in the following table:
                            <xi:include></xi:include>
                            .PP Any of these targets may be used, but the targets GL_COPY_READ_BUFFER and GL_COPY_WRITE_BUFFER are provided specifically to allow copies between buffers without disturbing other GL state.
                            .PP readoffset, writeoffset and size must all be greater than or equal to zero. Furthermore, readoffset + size must not exceeed the size of the buffer object bound to readtarget, and writeoffset + size must not exceeed the size of the buffer bound to writetarget. If the same buffer object is bound to both readtarget and writetarget, then the ranges specified by readoffset, writeoffset and size must not overlap.

                        .SH "ERRORS"
                            .PP GL_INVALID_VALUE is generated if any of readoffset, writeoffset or size is negative, if readoffset + size exceeds the size of the buffer object bound to readtarget or if writeoffset + size exceeds the size of the buffer object bound to writetarget.
                            .PP GL_INVALID_VALUE is generated if the same buffer object is bound to both readtarget and writetarget and the ranges [readoffset, readoffset + size) and [writeoffset, writeoffset + size) overlap.
                            .PP GL_INVALID_OPERATION is generated if zero is bound to readtarget or writetarget.
                            .PP GL_INVALID_OPERATION is generated if the buffer object bound to either readtarget or writetarget is mapped.

                        .SH "API VERSION SUPPORT"

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

                        .SH "SEE ALSO"
                            .PP glGenBuffers(), glBindBuffer(), glBufferData(), glBufferSubData(),

                        .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