Handbook
Glossary
copy-buffer ( to-buffer-ptr: buffer-ptr from-buffer-ptr: buffer-ptr size: integer -- )
GPU-accelerated rendering
ยป
Buffer objects
Prev:
read-buffer ( buffer-ptr: buffer-ptr size: integer -- data: byte-array )
Next:
with-mapped-buffer ( ..a buffer access quot: ( ..a alien -- ..b ) -- ..b )
Vocabulary
gpu
.
buffers
Inputs
to-buffer-ptr
a
buffer-ptr
from-buffer-ptr
a
buffer-ptr
size
an
integer
Outputs
None
Word description
Instructs the GPU to asynchronously copy
size
bytes from
from-buffer-ptr
into
to-buffer-ptr
.
Notes
This word requires that the graphics context support OpenGL 3.1 or the
GL_ARB_copy_buffer
extension.
See also
allocate-buffer
,
allocate-byte-array
,
buffer-size
,
update-buffer
,
read-buffer
,
with-mapped-buffer
Definition
USING:
accessors
opengl.gl
typed
;
IN:
gpu.buffers
TYPED::
copy-buffer
( to-buffer-ptr: buffer-ptr from-buffer-ptr: buffer-ptr size: integer -- )
GL_COPY_WRITE_BUFFER
to-buffer-ptr
buffer>>
glBindBuffer
GL_COPY_READ_BUFFER
from-buffer-ptr
buffer>>
glBindBuffer
GL_COPY_READ_BUFFER
GL_COPY_WRITE_BUFFER
from-buffer-ptr
offset>>
to-buffer-ptr
offset>>
size
glCopyBufferSubData
;