Vocabulary
gpu.buffers

Inputs
buffera buffer
accessa buffer-access-mode
quota quotation with stack effect ( ..a alien -- ..b )


Outputs
None

Word description
Maps buffer into CPU address space with access for the dynamic extent of quot. quot is called with a pointer to the mapped memory on top of the stack.

See also
allocate-buffer, allocate-byte-array, buffer-size, update-buffer, read-buffer, copy-buffer

Definition


:: with-mapped-buffer
( ..a buffer access quot: ( ..a alien -- ..b ) -- ..b )
buffer bind-buffer :> target target access gl-access
glMapBuffer quot call target glUnmapBuffer drop ; inline