here is my code:
Code: Select all
-- main.lua
-- graphics
love.graphics.setDefaultFilter('nearest', 'nearest', 0)
love.graphics.setBackgroundColor(0.2, 0.2, 0.2)
-- canvas
local canvas = love.graphics.newCanvas(240, 135)
-- require
local gameStateManager = require('gameStateManager')
local playscene = require('playscene')
function love.load()
-- add scenes
gameStateManager:addScene('playscene', playscene)
-- set currentScene
gameStateManager:setCurrentScene('playscene')
-- load scenes
gameStateManager:load()
end
function love.keypressed(key)
if key == 'escape' then
love.event.quit()
end
end
function love.update(dt)
gameStateManager:update(dt)
end
function love.draw()
love.graphics.setCanvas(canvas)
love.graphics.clear(0, 0, 0, 0)
love.graphics.setBlendMode("alpha")
gameStateManager:draw()
love.graphics.print("FPS: " .. love.timer.getFPS(), 10, 10)
love.graphics.setCanvas()
love.graphics.setBlendMode("alpha", "premultiplied")
love.graphics.scale(8, 8)
love.graphics.draw(canvas, 0, 0)
end
i did try vsync on and off and doesn't seem to have any effect. also changing canvas size doesn't seem to help and checking my driver settings with vsync on and off. also i startet my game via command console to be sure my code editor doesn't do anything.
if someone has anything else what i can try would be well appreciated.
thanks in advance !
best regards
Lovingsoul1337