Page 2 of 9
Re: push: a resolution-handling library
Posted: Mon Nov 02, 2015 6:22 pm
by slime
It would probably be beneficial to use [wiki]love.window.setFullscreen[/wiki] rather than [wiki]love.window.setMode[/wiki] when switching between fullscreen and windowed mode. The former function doesn't need to reload OpenGL objects or recreate the window, so it's more efficient and it leaves Canvases and shader extern/uniforms intact.
Re: push: a resolution-handling library
Posted: Mon Nov 02, 2015 6:47 pm
by Ulydev
slime wrote:It would probably be beneficial to use [wiki]love.window.setFullscreen[/wiki] rather than [wiki]love.window.setMode[/wiki] when switching between fullscreen and windowed mode. The former function doesn't need to reload OpenGL objects or recreate the window, so it's more efficient and it leaves Canvases and shader extern/uniforms intact.
Wow, I didn't know that was faster! Thanks slime
EDIT: I just tried it and it seems like it's keeping resolution too. It looks very blurry if I have a small window resolution...
Re: push: a resolution-handling library
Posted: Mon Nov 02, 2015 8:47 pm
by slime
For exclusive-fullscreen it uses the closest fullscreen mode to the windowed-mode resolution, yeah. Fullscreen-desktop mode always uses the resolution of the desktop, however.
Re: push: a resolution-handling library
Posted: Mon Nov 02, 2015 9:49 pm
by Ulydev
slime wrote:For exclusive-fullscreen it uses the closest fullscreen mode to the windowed-mode resolution, yeah. Fullscreen-desktop mode always uses the resolution of the desktop, however.
Thanks! It now works as expected.
Re: push: a resolution-handling library
Posted: Tue Nov 03, 2015 9:37 am
by padicao2010
Great!
Two suggestions:
1 Add LICENSE
2 Not change love.resize so roughly
Re: push: a resolution-handling library
Posted: Tue Nov 03, 2015 9:51 am
by zorg
padicao2010 wrote:Not change love.resize so roughly
From looking at the code, i did not see it even using love.resize anywhere, and even if it would, it would only do a few calculations with push:resize... so i don't see the problem.
I do agree with adding a license though.
Re: push: a resolution-handling library
Posted: Tue Nov 03, 2015 11:37 am
by padicao2010
zorg wrote:
From looking at the code, i did not see it even using love.resize anywhere, and even if it would, it would only do a few calculations with push:resize... so i don't see the problem.
Here, line 106
Code: Select all
function love.resize(w, h) return push:resize(w, h) end
Actually, it's not a big problem. I just commented it and write my resize with push:resize in my codes, for I have some other codes in love.resize.
Re: push: a resolution-handling library
Posted: Tue Nov 03, 2015 11:42 am
by zorg
I stand corrected, you are right
Ulydev: Redefining love.resize in the code is not really a good idea, why not let the user just put the push:resize callback themselves into love.resize on their own?
Re: push: a resolution-handling library
Posted: Tue Nov 03, 2015 12:07 pm
by Ulydev
Done!
Added a license and removed the love.resize definition. You'll now have to call push:resize(w, h) yourself.
Thank you guys for the suggestions!
Re: push: a resolution-handling library
Posted: Sun Nov 08, 2015 12:46 pm
by soulaymenc
awesome projet, really nice to see a lot of people making awesome libs for löve
keep up, i'll use it one day and i will tell you