Page 1 of 1

black image problem..

Posted: Wed Jan 26, 2011 8:25 pm
by TheBreadCat

Code: Select all

function love.load()
   local f = love.graphics.newFont(12)
   cake = love.graphics.newImage("cake.jpg")
   love.graphics.setFont(f)
   love.graphics.setColor(0,0,0,255)
   love.graphics.setBackgroundColor(0,0,0)
end

function love.update(dt)
	love.graphics.draw(cake , p.x, p.y)
end
im trying to draw a jpg.
but its just black..
help please.

Re: black image problem..

Posted: Wed Jan 26, 2011 8:32 pm
by bartbes
TheBreadCat wrote:

Code: Select all

   love.graphics.setColor(0,0,0,255)
That colors the image black.

Re: black image problem..

Posted: Wed Jan 26, 2011 8:36 pm
by TheBreadCat
but doesnt matter what i set it to, my cake wont show up :(

Re: black image problem..

Posted: Wed Jan 26, 2011 8:38 pm
by TheBreadCat
never mind got it :P