Available since LÖVE 0.9.2
This function is not supported in earlier versions.
Gets the available Canvas formats, and whether each is supported.
formats = love.graphics.getCanvasFormats( )
None.
table formats
local formats = love.graphics.getCanvasFormats() if formats.rgba16f then canvas = love.graphics.newCanvas(800, 600, "rgba16f") else -- The 'rgba16f' format isn't supported. We could have some fallback code, or trigger a message telling the user their system is unsupported. end
canvasformats = love.graphics.getCanvasFormats() function love.draw() local y = 0 for formatname, formatsupported in pairs(canvasformats) do local str = string.format("Supports format '%s': %s", formatname, tostring(formatsupported)) love.graphics.print(str, 10, y) y = y + 20 end end
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.graphics.getCanvasFormats