Page 1 of 1

Canvas support 99% ?

Posted: Mon Dec 28, 2020 3:57 pm
by gcmartijn
How many devices will support the Canvas functions Using the latest love version?

https://love2d.org/wiki/Canvas

For now my target is MacOs/Windows/iOS/latest android and if everything goes very goed (keep on dreaming, nintendo switch and maybe other consoles when possible in the future).

Maybe I want to try/use this example here https://github.com/a327ex/STALKER-X

Code: Select all

function love.load()
    love.graphics.setDefaultFilter('nearest', 'nearest') -- scale everything with nearest neighbor
    canvas = love.graphics.newCanvas(400, 300)
end

function love.draw()
    love.graphics.setCanvas(canvas)
    love.graphics.clear()
    -- draw the game here
    love.graphics.setCanvas()
    
    -- Draw the 400x300 canvas scaled by 2 to a 800x600 screen
    love.graphics.setColor(1, 1, 1, 1)
    love.graphics.setBlendMode('alpha', 'premultiplied')
    love.graphics.draw(canvas, 0, 0, 0, 2, 2)
    love.graphics.setBlendMode('alpha')
end

Now I did ask this question, are there other functions that are not supported for all systems so I can try to avoid them ?

Re: Canvas support 99% ?

Posted: Mon Dec 28, 2020 4:04 pm
by slime
Canvases have guaranteed support on all systems that can run LÖVE, in version 0.10 and newer.
gcmartijn wrote: Mon Dec 28, 2020 3:57 pm Now I did ask this question, are there other functions that are not supported for all systems so I can try to avoid them ?
There are a few – see the GraphicsFeature, love.graphics.getTextureType, love.graphics.getImageFormats, love.graphics.getCanvasFormats, and GraphicsLimit wiki pages.

Re: Canvas support 99% ?

Posted: Mon Dec 28, 2020 5:56 pm
by gcmartijn
Oke thanks.

And is there are list what devices or systems love support at the moment ?
For example what minimum iOS version ? Or recommended version.
Or what iPad version. I'm far from deployment but its good to know if something can work on a 'old' iPad 4 with a old iOS version or not.

Would be nice to have a table to know what targets are 100% working to ignore the others.

Re: Canvas support 99% ?

Posted: Mon Dec 28, 2020 6:05 pm
by slime
love theoretically supports iOS 8 and newer, but the iOS App Store might only let you (or any app developer) deploy to iOS 9 and newer. macOS and Windows requirements are mostly listed on the front page (macOS 10.7+, Windows Vista+) - love requires at least OpenGL ES 2 or OpenGL 2 on all platforms, which encompasses most computers from the past 15 years that can run a graphical operating system and most phones from the past 6-10 years.

Re: Canvas support 99% ?

Posted: Mon Dec 28, 2020 6:39 pm
by gcmartijn
oke good to know.

Re: Canvas support 99% ?

Posted: Tue Dec 29, 2020 7:52 am
by zorg
Less officially, for switch homebrew, there's LövePotion, but that has its own set of limitations.