Texture:hasUsage

Edit

Returns whether a Texture was created with a set of TextureUsage flags. Usage flags are specified when the Texture is created, and restrict what you can do with a Texture object. By default, only the sample usage is enabled. Applying a smaller set of usage flags helps LÖVR optimize things better.

supported = Texture:hasUsage(...)

Arguments

NameTypeDescription
...TextureUsage One or more usage flags.

Returns

NameTypeDescription
supportedboolean Whether the Texture has all the provided usage flags.

See also