[Solved] Max number of simultaneously active canvases

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Sasha264
Party member
Posts: 131
Joined: Mon Sep 08, 2014 7:57 am

[Solved] Max number of simultaneously active canvases

Post 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?
Last edited by Sasha264 on Sat Dec 10, 2022 10:05 am, edited 1 time in total.
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: Max number of simultaneously active canvases

Post 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
User avatar
Sasha264
Party member
Posts: 131
Joined: Mon Sep 08, 2014 7:57 am

Re: [Solved] Max number of simultaneously active canvases

Post by Sasha264 »

Nice!
Thank you, exactly what I needed :3
So, [Solved].
Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot], Semrush [Bot] and 21 guests