love.graphics.copyBuffer

Available since LÖVE 12.0
This function is not supported in earlier versions.

Copies the contents of one GraphicsBuffer to another.


This function requires the copybuffer GraphicsFeature to be supported. It is always supported when OpenGL 3.1+, OpenGL ES 3.0+, or newer graphics APIs are used.

Function

Synopsis

love.graphics.copyBuffer( source, dest, sourceoffset, destoffset, size )

Arguments

GraphicsBuffer source
The GraphicsBuffer to copy data from.
GraphicsBuffer dest
The GraphicsBuffer to copy data into.
number sourceoffset (0)
An offset in bytes from the start of the source GraphicsBuffer. Must be a multiple of 4.
number destoffset (0)
An offset in bytes from the start of the destination GraphicsBuffer. Must be a multiple of 4.
number size (all)
An optional size in bytes to copy. All data after the source offset will be copied by default. Must be a multiple of 4.

Returns

Nothing.

Notes

GraphicsBuffers created with the stream data usage cannot be used as a copy destination.

GraphicsBuffers created with the readback data usage cannot be used as a copy source.

Copying a GraphicsBuffer to itself is allowed when the source and destination offsets and size do not overlap.

See Also


Other Languages