Skip to content
Carl Hewett edited this page Apr 2, 2016 · 1 revision

A GPUBuffer is a chunk of memory stored on your graphics card. ObjectGeometries makes big use of them.

This buffer holds Vec3s.

Class GPUBuffer_vec3

setMutableData({Vec3} data)

Set the buffer's data as mutable. This replaces all of the current data. This data can be modified.

setImmutableData({Vec3} data)

Set the buffer's data as immutable. This replaces all of the current data. This data cannot be modified.

{Vec3} read()

Read the buffer's data. Beware! This copies the data, so it can be quite heavy.

modify(int offset, {Vec3} data)

Replace the buffer's data at the offset with new data. Only works if the data is immutable, see setMutableData().