<constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant> or <constant>GL_UNIFORM_BUFFER</constant>. Any of these targets may be used,
although the targets <constant>GL_COPY_READ_BUFFER</constant> and <constant>GL_COPY_WRITE_BUFFER</constant> are provided
specifically to allow copies between buffers without disturbing other GL state.
</para>
<para>
<parameter>readoffset</parameter>, <parameter>writeoffset</parameter> and <parameter>size</parameter> must all be greater than or equal to
zero. Furthermore, <parameter>readoffset</parameter> + <parameter>size</parameter> must not exceeed the size of the buffer
object bound to <parameter>readtarget</parameter>, and <parameter>readoffset</parameter> + <parameter>size</parameter> must not exceeed the
size of the buffer bound to <parameter>writetarget</parameter>. If the same buffer object is bound to both <parameter>readtarget</parameter>
and <parameter>writetarget</parameter>, then the ranges specified by <parameter>readoffset</parameter>, <parameter>writeoffset</parameter>
and <parameter>size</parameter> must not overlap.
</para>
</refsect1>
<refsect1id="notes"><title>Notes</title>
<para>
<function>glCopyBufferSubData</function> is available only if the GL version is 3.1 or greater.
</para>
</refsect1>
<refsect1id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_VALUE</constant> is generated if any of <parameter>readoffset</parameter>, <parameter>writeoffset</parameter>
or <parameter>size</parameter> is negative, if <parameter>readoffset</parameter> + <parameter>size</parameter> exceeds the
size of the buffer object bound to <parameter>readtarget</parameter> or if <parameter>writeoffset</parameter> + <parameter>size</parameter>
exceeds the size of the buffer object bound to <parameter>writetarget</parameter>.
</para>
<para>
<constant>GL_INVALID_VALUE</constant> is generated if the same buffer object is bound to both <parameter>readtarget</parameter>
and <parameter>writetarget</parameter> and the ranges [<parameter>readoffset</parameter>, <parameter>readoffset</parameter> +
<parameter>size</parameter>) and [<parameter>writeoffset</parameter>, <parameter>writeoffset</parameter> + <parameter>size</parameter>)
overlap.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if zero is bound to <parameter>readtarget</parameter> or <parameter>writetarget</parameter>.
</para>
<para>
<constant>GL_INVALID_OPERATION</constant> is generated if the buffer object bound to either <parameter>readtarget</parameter> or <parameter>writetarget</parameter>