Pass:clear

Edit

Clears 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

NameTypeDefaultDescription
bufferBuffer The Buffer to clear.
indexnumber1 The index of the first item to clear.
countnumbernil 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

NameTypeDefaultDescription
textureTexture The Texture to clear.
colorVec4 The color to clear the texture to. Can also be a Vec3, table of numbers, or a hexcode.
layernumber1 The index of the first layer to clear.
layersnumbernil The number of layers to clear. If nil, clears the remaining layers.
levelnumber1 The index of the first mipmap level to clear.
levelsnumbernil The number of mipmap level to clear. If nil, clears the remaining mipmaps.

Returns

Nothing

See also