Retain screen without love.draw and canvas

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
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Retain screen without love.draw and canvas

Post by utunnels »

It seems even if I copy love.run from source code and remove love.graphics.clear from code, the screen still loses after I minimize the window.
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Retain screen without love.draw and canvas

Post by slime »

Yes, GPUs and drivers and window managers are not designed to be used like that.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: Retain screen without love.draw and canvas

Post by utunnels »

So my best bet is canvas?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Retain screen without love.draw and canvas

Post by raidho36 »

Just redraw your screen.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: Retain screen without love.draw and canvas

Post by utunnels »

OK.
I just thought it sometimes has thousands of print call since it a text and grid based interface.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Retain screen without love.draw and canvas

Post by raidho36 »

Roguelike, eh? Create a spritesheet with letters in it, and use spritebatch to render the map.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: Retain screen without love.draw and canvas

Post by utunnels »

Yeah, I'll try. Thanks.
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Retain screen without love.draw and canvas

Post by micha »

utunnels wrote:So my best bet is canvas?
Besides spritebatches, canvas is a natural and efficient solution to the problem. The main downside is, that canvases are not supported by all types of graphics cards. If you want to be sure that everyone can run your game, try to avoid canvases or make it optional.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 5 guests