self:has_mipmaps
Client
Checks whether the image has a generated mipmap chain
Syntax
local result = self:has_mipmaps()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if the image has a mipmap chain, false otherwise |
Examples
local entity = core.image.create("assets/diffuse.png")
if entity:has_mipmaps() then
entity:set_filter(core.image.texture_filter.LINEAR_MIPMAP_ANISOTROPIC)
endlocal entity = core.image.create("assets/terrain/cliff_diffuse.png")
if entity:has_mipmaps() then
entity:set_filter(core.image.texture_filter.LINEAR_MIPMAP)
entity:compress(core.image.compression_mode.BPTC)
end