read-framebuffer-to ( framebuffer-rect: framebuffer-rect gpu-data-ptr -- )
GPU-accelerated rendering ยป Framebuffer objects

Prev:read-framebuffer ( framebuffer-rect -- byte-array )
Next:read-framebuffer-image ( framebuffer-rect: framebuffer-rect -- image )


Vocabulary
gpu.framebuffers

Inputs
framebuffer-recta framebuffer-rect
gpu-data-ptra gpu-data-ptr


Outputs
None

Word description
Reads the rectangular region framebuffer-rect into gpu-data-ptr, which can reference either CPU memory (a byte-array or alien) or a GPU buffer-ptr. The format of the written data is determined by the component-order and component-type of the associated framebuffer-attachment.

Notes
User-created framebuffer objects require OpenGL 3.0 or one of the GL_ARB_framebuffer_object or GL_EXT_framebuffer_object extensions. Reading into a buffer-ptr requires OpenGL 2.1 or the GL_ARB_pixel_buffer_object extension.

See also
read-framebuffer, read-framebuffer-image

Definition