'\" t .\" Title: glCopyBufferSubData .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 05/30/2012 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLCOPYBUFFERSUBDATA" "3G" "05/30/2012" "[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" glCopyBufferSubData \- copy part of the data store of a buffer object to the data store of another buffer object .SH "C SPECIFICATION" .HP \w'void\ glCopyBufferSubData('u .BI "void glCopyBufferSubData(GLenum\ " "readtarget" ", GLenum\ " "writetarget" ", GLintptr\ " "readoffset" ", GLintptr\ " "writeoffset" ", GLsizeiptr\ " "size" ");" .SH "PARAMETERS" .PP \fIreadtarget\fR .RS 4 Specifies the target from whose data store data should be read\&. .RE .PP \fIwritetarget\fR .RS 4 Specifies the target to whose data store data should be written\&. .RE .PP \fIreadoffset\fR .RS 4 Specifies the offset, in basic machine units, within the data store of \fIreadtarget\fR from which data should be read\&. .RE .PP \fIwriteoffset\fR .RS 4 Specifies the offset, in basic machine units, within the data store of \fIwritetarget\fR to which data should be written\&. .RE .PP \fIsize\fR .RS 4 Specifies the size, in basic machine units, of the data to be copied from \fIreadtarget\fR to \fIwritetarget\fR\&. .RE .SH "DESCRIPTION" .PP \fBglCopyBufferSubData\fR copies part of the data store attached to \fIreadtarget\fR to the data store attached to \fIwritetarget\fR\&. The number of basic machine units indicated by \fIsize\fR is copied from the source, at offset \fIreadoffset\fR to the destination at \fIwriteoffset\fR, also in basic machine units\&. .PP \fIreadtarget\fR and \fIwritetarget\fR must be \fBGL_ARRAY_BUFFER\fR, \fBGL_COPY_READ_BUFFER\fR, \fBGL_COPY_WRITE_BUFFER\fR, \fBGL_ELEMENT_ARRAY_BUFFER\fR, \fBGL_PIXEL_PACK_BUFFER\fR, \fBGL_PIXEL_UNPACK_BUFFER\fR, \fBGL_TEXTURE_BUFFER\fR, \fBGL_TRANSFORM_FEEDBACK_BUFFER\fR or \fBGL_UNIFORM_BUFFER\fR\&. Any of these targets may be used, although the targets \fBGL_COPY_READ_BUFFER\fR and \fBGL_COPY_WRITE_BUFFER\fR are provided specifically to allow copies between buffers without disturbing other GL state\&. .PP \fIreadoffset\fR, \fIwriteoffset\fR and \fIsize\fR must all be greater than or equal to zero\&. Furthermore, \fIreadoffset\fR + \fIsize\fR must not exceeed the size of the buffer object bound to \fIreadtarget\fR, and \fIreadoffset\fR + \fIsize\fR must not exceeed the size of the buffer bound to \fIwritetarget\fR\&. If the same buffer object is bound to both \fIreadtarget\fR and \fIwritetarget\fR, then the ranges specified by \fIreadoffset\fR, \fIwriteoffset\fR and \fIsize\fR must not overlap\&. .SH "NOTES" .PP \fBglCopyBufferSubData\fR is available only if the GL version is 3\&.1 or greater\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if any of \fIreadoffset\fR, \fIwriteoffset\fR or \fIsize\fR is negative, if \fIreadoffset\fR + \fIsize\fR exceeds the size of the buffer object bound to \fIreadtarget\fR or if \fIwriteoffset\fR + \fIsize\fR exceeds the size of the buffer object bound to \fIwritetarget\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if the same buffer object is bound to both \fIreadtarget\fR and \fIwritetarget\fR and the ranges [\fIreadoffset\fR, \fIreadoffset\fR + \fIsize\fR) and [\fIwriteoffset\fR, \fIwriteoffset\fR + \fIsize\fR) overlap\&. .PP \fBGL_INVALID_OPERATION\fR is generated if zero is bound to \fIreadtarget\fR or \fIwritetarget\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the buffer object bound to either \fIreadtarget\fR or \fIwritetarget\fR is mapped\&. .SH "SEE ALSO" .PP \fBglGenBuffers\fR(), \fBglBindBuffer\fR(), \fBglBufferData\fR(), \fBglBufferSubData\fR(), \fBglGetBufferSubData\fR() .SH "COPYRIGHT" .PP Copyright \(co 2010 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]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&.