Page 1 of 1
Cannot create Canvas: Texture format cannot be rendered to on this system.
Posted: Wed Apr 01, 2020 6:41 pm
by sherlockholmes221b
I have really big terrain in my game. It's exactly 16384 chunks (128x128) and each chunk has 16384 (128x128) tiles. The problem is, that I use love canvases to load and display chunks. Every Canvas is 12800x12800 pixels. When I try to create the world, the game crashes on generating sixth canvas. Has anyone got an idea on how to fix it? I can resize the chunks, but if the game now crashes at 6th chunk, even the 0.5 scale won't do much.
Re: Cannot create Canvas: Texture format cannot be rendered to on this system.
Posted: Wed Apr 01, 2020 7:40 pm
by grump
sherlockholmes221b wrote: ↑Wed Apr 01, 2020 6:41 pm
Every Canvas is 12800x12800 pixels. When I try to create the world, the game crashes on generating sixth canvas.
6 RGBA8 Canvases of 12800x12800 pixels require ~4 GB of VRAM. Not a surprising result.
Re: Cannot create Canvas: Texture format cannot be rendered to on this system.
Posted: Wed Apr 01, 2020 7:56 pm
by zorg
i would rethink how you store your world, because that's not feasible even with modern computers.
i'm assuming all the 16k*16k tiles aren't all unique, so store those as indices, and have one or more smaller canvases that store the unique tile textures instead. And also only load in the nearest chunks, and "unload"/free up the ones that went out of range.