self:is_compressed
Client
Checks whether the texture has been GPU block-compressed
Syntax
local result = self:is_compressed()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if the texture is GPU block-compressed, false otherwise |
Examples
local entity = core.texture.create("assets/diffuse.png")
if not entity:is_compressed() then
entity:compress(core.texture.compression_mode.S3TC)
endlocal entity = core.texture.create("assets/sprite.png")
if not entity:is_compressed() then
entity:convert(core.texture.texel_format.RGBA8)
end