Canvas is no longer drawn after calling love.window.updateMode

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
ddabrahim
Party member
Posts: 182
Joined: Mon May 17, 2021 8:05 pm
Contact:

Canvas is no longer drawn after calling love.window.updateMode

Post by ddabrahim »

Hi everyone!

So after posting this question here and insist I don't need help with it just want to know why:
viewtopic.php?f=3&t=93782
I figured it is best if I try to reproduce it and ask for help because I have no idea what is happening here.

So as I have explained in the other topic, after I call updateMode, canvases are no longer drawn but if I resize the window it is continue to be drawn. So this problem got something to do with updateMode but I am not sure what is it. I was able to reproduce this in a minimal example:
canvas_draw_test.zip
(3.69 KiB) Downloaded 48 times
Could someone please have a look at it and help me to solve this problem?
I would appreciate any help.

Thank you.
Ross
Citizen
Posts: 97
Joined: Tue Mar 13, 2018 12:12 pm
Contact:

Re: Canvas is no longer drawn after calling love.window.updateMode

Post by Ross »

I answered in your other thread, but I'll put it here too:

If you look at the docs for love.window.updateMode, it says that "canvases will be cleared". So you need to re-fill your canvas after calling it. The canvas is drawn, it is just empty.
User avatar
ddabrahim
Party member
Posts: 182
Joined: Mon May 17, 2021 8:05 pm
Contact:

Re: Canvas is no longer drawn after calling love.window.updateMode

Post by ddabrahim »

Ah, thanks. I did not pay attention to that :P
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests