ComputeBufferFromMemblock

Family: Compute · One form

What it does

ComputeBufferFromMemblock takes bufferID (an integer) and memblockID (an integer), and returns nothing. bufferID is the id of a Buffer object, obtained elsewhere in the Compute family.

Syntax

ComputeBufferFromMemblock(bufferID integer, memblockID integer)

Parameters

NameType
bufferIDinteger
memblockIDinteger

Every form returns

nothing

Example · generated

buffer = CreateComputeBuffer(10, "value")memblock = CreateMemblockFromFile("assets/data.dat")ComputeBufferFromMemblock(buffer, memblock)DO  Sync()LOOP

CreateComputeBuffer and CreateMemblockFromFile are there to give the call something to act on; ComputeBufferFromMemblock is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

14 commands in Compute