First of all, I discovered love about six weeks ago, and am completely and utterly blown away by how awesome it is! Thang you Love developers for providing such a beautiful framework, with which anybody can make their own games easily.
My question: Has anybody experienced problems getting Vsync to work (fullscreen mode), in Love 0.8.0?
It is easy to spot whether Vsync, because the FPS counter will be at a rock-solid 60 fps.
Without Vsync, my builds usually run at ~200-600 fps or so, which sounds nice, but it is not, because there's ugly screen-tearing.
I am having mixed success, using fullscreen Vsync with the desktop resolution, and the exact same executable on different computers. All of the computers I tested on have flatscreen monitors that do report the optimum (=desktop) resolution at 60 Hz after I use Love to switch to fullscreen.
good results:
- On a macbook pro 2008, the vsync works perfectly.
- On an old HP desktop computer running Windows XP with an Nvidia Geforce card, vsync works perfectly.
- On my Gateway LT4009u netbook with intel GMA 3600 graphics chipset and Windows 7 it also works perfectly.
bad results:
- On a very new Dell computer running Windows 7 with on-board Intel HD graphics, the vsync does not work.
- Friends reported that on some of their computers, including one with an Nvidia card, Vsync also does not work. This means it is not an Intel HD graphics problem!
interesting findings:
- On the new Dell, if I go to Intel HD Graphics Control Panel -> 3D -> Custom Settings and change the Vertical Sync from "Use Application Settings" to "On", then Vsync works! So it is possible, but why doesn't it work when setting it with Love?
I tried both using
love.graphics.setMode( width, height, fullscreen, vsync, fsaa ) with vsync parameter set to true as well as setting vsync to true in conf.lua
The weird thing is that, on the machines where Vsync doesn't work, the return value of setMode gives success, the screen mode indeed switches to fullscreen, and the vsync variable is also reported as being true by love.graphics.getMode(), but then the fps is ~600 and there's tearing ?!
Any help would be appreciated!
Vsync in Love 0.8.0 fullscreen only works on some computers?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Vsync in Love 0.8.0 fullscreen only works on some comput
I am attaching a simple .love to test vsync on your machine.
This test should always run at your desktop resolution in fullscreen, report fps=60 and vsync=true.
On at least one of my computers this program reports fps=1000 and nevertheless reports vsync=true.
This test should always run at your desktop resolution in fullscreen, report fps=60 and vsync=true.
On at least one of my computers this program reports fps=1000 and nevertheless reports vsync=true.
Code: Select all
function love.load()
-- initialize GFX mode, without conf.lua
-- I get the exact same behaviour when using conf.lua instead
-- set the mode to 0,0 to prepare for finding the desktop resolution
-- for some reason, this command by itself is not enough?
love.graphics.setMode(0,0,true,true,0)
-- since above by itself doesn't work, read out the desktop resolution now
desktopWidth,desktopHeight=love.graphics.getMode()
-- set fullscreen mode with vsync at this resolution
love.graphics.setMode(desktopWidth,desktopHeight,true,true,0)
-- read back the reported screenmode
desktopWidth,desktopHeight,fullscreen,vsyncEnabled,fsaa=love.graphics.getMode()
--set screenfont and color
local f = love.graphics.newFont(14)
love.graphics.setFont(f)
love.graphics.setBackgroundColor(0,0,0,255)
end
function love.draw()
-- this reports fps:60 on some computers, and fps>>60 (no vsync) on others
love.graphics.setColor(255,255,255,255)
love.graphics.print("FPS: "..tostring(love.timer.getFPS()),1,1)
love.graphics.print("Reported values from love.graphics.getMode(): ",1,20)
love.graphics.print("ScreenWidth: "..desktopWidth, 1, 40)
love.graphics.print("ScreenHeight: "..desktopHeight, 1, 60)
love.graphics.print("Fullscreen: "..tostring(fullscreen), 1, 80)
love.graphics.print("Vsync: "..tostring(vsyncEnabled), 1, 100)
love.graphics.print("FSAA: "..fsaa, 1, 120)
love.graphics.print("Press Q to Quit",1,140)
end
function love.keypressed(key, unicode)
if key == 'q' then
love.event.quit()
end
end
- Attachments
-
- VsyncTest.love
- Vsync test, opens black fullscreen and prints diagnostics. q to quit
- (1011 Bytes) Downloaded 119 times
Re: Vsync in Love 0.8.0 fullscreen only works on some comput
That .love file is incorrectly packaged. You should compress the files, not the folder.
Also, vsync works on my machine, but I get lower CPU usage with it off. And I haven't noticed any tearing. I'm using a GeForce GTX 460 and Windows 8.1.
Also, vsync works on my machine, but I get lower CPU usage with it off. And I haven't noticed any tearing. I'm using a GeForce GTX 460 and Windows 8.1.
- Attachments
-
- test.love
- FTFY
- (995 Bytes) Downloaded 105 times
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Vsync in Love 0.8.0 fullscreen only works on some comput
It doesn't work then because you set your graphics driver to override whatever love's asking for.
Who is online
Users browsing this forum: No registered users and 49 guests