read-framebuffer ( framebuffer-rect -- byte-array ) (original) (raw)
Vocabulary
gpu.framebuffers
Inputs
| framebuffer-rect | a framebuffer-rect |
|---|
Outputs
| byte-array | a byte-array |
|---|
Word description
Reads the rectangular region framebuffer-rect into a new byte-array. The format of the byte array 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.
See also
read-framebuffer-image, read-framebuffer-to
Definition
USING: byte-arrays gpu.framebuffers.private kernel ;
: read-framebuffer ( framebuffer-rect -- byte-array )
dup framebuffer-rect-size
[ read-framebuffer-to ] keep ; inline