Hi everyone!
Could someone please tell me what is the difference internally between the callback method love.resize and love.window.updateMode?
The problem is that when I update some values and then call updateMode to change window size, a canvas is no longer drawn on the screen. Everything else is fine except this one canvas is no longer drawn. If I debug it, the position, size, draw order, transparency, everything is fine yet not drawn on the screen.
But when I update the same values inside love.resize, everything is fine and the canvas is drawn with the updated values whenever I resize the window. But this is not what I would like to ask for help with, instead I would like to understand what is the difference between resizing a window and love.resize and calling updateMode so then maybe I can fix this myself.
I would appreciate if someone could explain it.
Thank you.
What is the difference between love.resize and love.window.updateMode?
Re: What is the difference between love.resize and love.window.updateMode?
This seems like comparing apples to worms to me, the two things are barely even related at all.
love.resize is one of the main engine callbacks, like love.load, love,update, love.draw, etc., that Löve calls for you, in this case, when the window is resized. You may fill out the contents of the function if you want, otherwise it does nothing.
love.window.updateMode is a function that you call yourself, when you want to change some properties of the window without changing properties that you don't specify (as opposed to .setMode that overrides all of them).
Actually, I expected love.resize to get called after you call love.window.updateMode, but that is not the case.
If you look at the docs for love.window.updateMode, it says that "canvases will be cleared". Maybe this is why it is not visible in your case?
love.resize is one of the main engine callbacks, like love.load, love,update, love.draw, etc., that Löve calls for you, in this case, when the window is resized. You may fill out the contents of the function if you want, otherwise it does nothing.
love.window.updateMode is a function that you call yourself, when you want to change some properties of the window without changing properties that you don't specify (as opposed to .setMode that overrides all of them).
Actually, I expected love.resize to get called after you call love.window.updateMode, but that is not the case.
If you look at the docs for love.window.updateMode, it says that "canvases will be cleared". Maybe this is why it is not visible in your case?
Re: What is the difference between love.resize and love.window.updateMode?
Well, they are not related but what I was thinking is that when I resize the window it works, but when I change the size of the window it doesn't.This seems like comparing apples to worms to me, the two things are barely even related at all.
Thanks a lot for the explanation. I did not pay attention to that updateMode did actually mentioned canvases are cleared
Who is online
Users browsing this forum: Bing [Bot] and 0 guests