toggleFullscreen

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
cgrossi
Prole
Posts: 21
Joined: Fri May 24, 2013 6:08 pm
Location: Brazil

toggleFullscreen

Post by cgrossi »

Hello.

In my game I have two canvases for the background, but when I change to full screen mode or return to window mode, those canvases aren't displayed anymore.. What can be happening?
Code games. You'll have fun!
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: toggleFullscreen

Post by raidho36 »

Canvases are still displayed, it's just they're empty since they get flushed on display mode change. This is system-realated and it's documented behavior. You must simply generate your canvaes picture again. If you can't really do it, you're pretty limited to dumping them to hdd/ram before mode change and reading them back once mode is changed.

Canvases were re-allocated to be empty just by pure luck. If you had a lot of data left in your VRAM after big heavy games' previous launches then you could've had canvases full of garbage (and you probably could see some pieces of that games' textures in them).
Automatik
Citizen
Posts: 57
Joined: Sun Feb 17, 2013 7:05 pm

Re: toggleFullscreen

Post by Automatik »

Canvases were re-allocated to be empty just by pure luck. If you had a lot of data left in your VRAM after big heavy games' previous launches then you could've had canvases full of garbage (and you probably could see some pieces of that games' textures in them).
Slime told me on IRC that it's false: "it would be [true], if LÖVE didn't fill the canvas with transparency when it loads it"
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: toggleFullscreen

Post by raidho36 »

Huh. This isn't generic behavior, but okay.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 0 guests