Page 1 of 1

[Solved] Non-readable and MSAA textures cannot have mipmaps. (when the canvas is set to readable)

Posted: Tue Jan 24, 2023 1:16 pm
by Bigfoot71
Hi everyone ! :D

I tweak a bit on a sort of menu to configure the graphics of a demo, nothing very serious, but while tweaking precisely I came across this error:

Code: Select all

Error: main.lua:1: Non-readable and MSAA textures cannot have mipmaps.
stack traceback:
	[string "boot.lua"]:777: in function <[string "boot.lua"]:773>
	[C]: in function 'newCanvas'
	main.lua:1: in main chunk
	[C]: in function 'require'
	[string "boot.lua"]:570: in function <[string "boot.lua"]:380>
	[C]: in function 'xpcall'
	[string "boot.lua"]:787: in function <[string "boot.lua"]:780>
	[C]: in function 'xpcall'
Line one of the main because after encountering this problem I just did this:

Code: Select all

local canvas = love.graphics.newCanvas(800, 600, {msaa=2, mipmaps="auto", readable=true})
Does anyone know why? Does the term "Non-readable" mean match the `readable` parameter when creating a canvas?

Re: Non-readable and MSAA textures cannot have mipmaps. (when the canvas is set to readable)

Posted: Tue Jan 24, 2023 2:47 pm
by slime
As the error says, you can't have a canvas with both MSAA and mipmaps.

The error is basically saying "if the canvas is set to non-readable, or if the canvas has MSAA, then it can't have mipmaps."

Re: Non-readable and MSAA textures cannot have mipmaps. (when the canvas is set to readable)

Posted: Tue Jan 24, 2023 3:05 pm
by Bigfoot71
Ah thank you, I understood "if the canvas is not readable AND with msaa then there can be no mipmaps", wrong interpretation on my part...