Page 1 of 1

[Solved] Max number of simultaneously active canvases

Posted: Sat Dec 10, 2022 5:09 am
by Sasha264
Good day :3

Since love 0.9.0 there is a way to use multiple canvases.
As wiki says here love.graphics.setCanvas:
If love.graphics.isSupported("multicanvas") returns true, at least 4 simultaneously active canvases are supported.
Personally I used up to 3 canvases in several projects and it worked fine on a bunch of devices.
But now I want to use more then 4 of them, so there are some questions:
  1. How to find exact max number of simultaneously active canvases programmatically?
  2. Is there a web page or something with list of devices and information about that number? So I can check how much support I will lose if I use N canvases?

Re: Max number of simultaneously active canvases

Posted: Sat Dec 10, 2022 6:28 am
by Andlac028
1. See: love.graphics.getSystemLimits

Code: Select all

local systemLimits = love.graphics.getSystemLimits( )

print(systemLimits.multicanvas)
2. There is report from 2022 of system limits based on graphics cards and systems, and there are GL_MAX_DRAW_BUFFERS and GL_MAX_COLOR_ATTACHMENTS values. In LÖVE internaly, multicanvas in system limits is calculated as:

Code: Select all

max(min(MAX_DRAW_BUFFERS, MAX_COLOR_ATTACHMENTS), 1)
(see LÖVE source code)

But overall, vast majority of systems (above 99%) supports 8 simultaneously active canvases, so it is basically supported by most modern systems.

EDIT: I found report from 2022

Re: [Solved] Max number of simultaneously active canvases

Posted: Sat Dec 10, 2022 10:05 am
by Sasha264
Nice!
Thank you, exactly what I needed :3
So, [Solved].