Difference between revisions of "GraphicsBuffer:clear"
(Created page) |
m |
||
Line 1: | Line 1: | ||
{{newin|[[12.0]]|120|type=function}} | {{newin|[[12.0]]|120|type=function}} | ||
Clears the entire GraphicsBuffer or a specified byte range within it to zero. | Clears the entire GraphicsBuffer or a specified byte range within it to zero. | ||
+ | |||
+ | This can be more efficient than calling [[GraphicsBuffer:setArrayData]] when setting the buffer's contents to zero is desired. | ||
+ | |||
+ | Note that the array element count variants of [[love.graphics.newBuffer]] and friends will initialize the buffer's contents to zero when it's first created. | ||
== Function == | == Function == |
Revision as of 21:26, 25 March 2023
Available since LÖVE 12.0 |
This function is not supported in earlier versions. |
Clears the entire GraphicsBuffer or a specified byte range within it to zero.
This can be more efficient than calling GraphicsBuffer:setArrayData when setting the buffer's contents to zero is desired.
Note that the array element count variants of love.graphics.newBuffer and friends will initialize the buffer's contents to zero when it's first created.
Contents
Function
Clears the entire GraphicsBuffer's contents to zero.
Synopsis
GraphicsBuffer:clear( )
Arguments
None.
Returns
Nothing.
Function
Clears a specified byte range within the GraphicsBuffer to zero.
Synopsis
GraphicsBuffer:clear( offset, size )
Arguments
number offset
- The offset in bytes within the Buffer.
number size
- The size in bytes to clear to zero.
Returns
Nothing.
See Also
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