Difference between revisions of "love.graphics.copyBuffer"
(Created page) |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 20: | Line 20: | ||
== Notes == | == Notes == | ||
− | GraphicsBuffers created with the '''stream''' [[ | + | GraphicsBuffers created with the '''stream''' [[BufferDataUsage]] cannot be used as a copy destination. |
− | GraphicsBuffers created with the '''readback''' [[ | + | GraphicsBuffers created with the '''readback''' [[BufferDataUsage]] cannot be used as a copy source. |
− | Copying a GraphicsBuffer to itself is | + | Copying a GraphicsBuffer to itself is allowed when the source and destination offsets and size do not overlap. |
== See Also == | == See Also == |
Latest revision as of 00:15, 15 June 2024
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 BufferDataUsage cannot be used as a copy destination.
GraphicsBuffers created with the readback BufferDataUsage 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
- love.graphics
- love.graphics.copyBufferToTexture
- love.graphics.copyTextureToBuffer
- love.graphics.getSupported
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info