Pass:clear
EditClears a Buffer or Texture. This can only be called on a transfer pass, which can be created with lovr.graphics.getPass
.
Clears a range of a Buffer, setting the values to zero.
Arguments
Name | Type | Default | Description |
buffer | Buffer | The Buffer to clear. | |
index | number | 1 | The index of the first item to clear. |
count | number | nil |
The number of items to clear. If nil , clears to the end of the Buffer.
|
Returns
Nothing
Clears layers and mipmap levels in a Texture to a color.
Arguments
Name | Type | Default | Description |
texture | Texture | The Texture to clear. | |
color | Vec4 |
The color to clear the texture to. Can also be a Vec3 , table of numbers, or a hexcode.
| |
layer | number | 1 | The index of the first layer to clear. |
layers | number | nil |
The number of layers to clear. If nil , clears the remaining layers.
|
level | number | 1 | The index of the first mipmap level to clear. |
levels | number | nil |
The number of mipmap level to clear. If nil , clears the remaining mipmaps.
|
Returns
Nothing