Difference between revisions of "love.graphics.getTextureTypes"

(Created page)
 
m (0.11.0 -> 11.0)
 
Line 1: Line 1:
{{newin|[[0.11.0]]|110|type=function}}
+
{{newin|[[11.0]]|110|type=function}}
 
Gets the available [[TextureType|texture types]], and whether each is supported.
 
Gets the available [[TextureType|texture types]], and whether each is supported.
 
== Function ==
 
== Function ==

Latest revision as of 12:43, 29 December 2018

Available since LÖVE 11.0
This function is not supported in earlier versions.

Gets the available texture types, and whether each is supported.

Function

Synopsis

texturetypes = love.graphics.getTextureTypes( )

Arguments

None.

Returns

table texturetypes
A table containing TextureTypes as keys, and a boolean indicating whether the type is supported as values. Not all systems support all types.

Examples

Display the texture types on screen and whether they're supported

textypes = love.graphics.getTextureTypes()

function love.draw()
    local y = 0
    for name, supported in pairs(textypes) do
        local str = string.format("Supports texture type '%s': %s", name, tostring(supported))
        love.graphics.print(str, 10, y)
        y = y + 20
    end
end

See Also


Other Languages