Love.graphics.image comes up blank
Posted: Fri Oct 21, 2011 11:05 pm
Hi all,
I'm new to Love but have so far been able to make it work. Recently I tried to display an image to the screen with this code:
But when I drag the folder (containing the main.lua file and an image named test.png (see attached)) all I get is an empty white box.
I drew the png file in MSPaint.
Am I missing something fundamental or is MSPaint just the wrong program to use?
Thanks,
mg.
I'm new to Love but have so far been able to make it work. Recently I tried to display an image to the screen with this code:
Code: Select all
function love.load()
img = love.graphics.newImage("test.png")
end
function love.update(dt)
end
function love.draw()
love.graphics.draw(img, 0, 0)
end
I drew the png file in MSPaint.
Am I missing something fundamental or is MSPaint just the wrong program to use?
Thanks,
mg.