Hi there, just recently discovered Löve and I think it's lövely.
There's something about CPU usage that's bugging me though. There has been a thread about this a while back, but the thread has since turned to other topics, so I figured I'd start a new one. Take the following code:
Code: Select all
function load()
love.graphics.setFont(love.graphics.newFont(love.default_font, 12))
end
function draw()
love.graphics.draw(love.timer.getFPS() .. ' fps', 100, 100)
end
If I run this with vsync disabled in my conf file, I get ~800 fps with full CPU usage; that's about what I would have expected, so no worries there. Now, when I enable vsync, I get a pretty steady 75 fps (which is my monitor's refresh rate), but still full CPU usage! That's definitely not what I would expect.
If I insert a function
Code: Select all
function update(dt)
love.timer.sleep(10)
end
then, with vsync disabled, I get ~90 fps with almost no CPU use. If I enable vsync, I get my 75 fps again, but with ~20% CPU use. Does the vsync code actually busy-wait for the vertical retrace? This is Win2k with a Radeon 9500. Might this be a driver issue?