black image problem..

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
TheBreadCat
Prole
Posts: 22
Joined: Wed Jan 26, 2011 6:05 pm

black image problem..

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: black image problem..

Post by bartbes »

TheBreadCat wrote:

Code: Select all

   love.graphics.setColor(0,0,0,255)
That colors the image black.
TheBreadCat
Prole
Posts: 22
Joined: Wed Jan 26, 2011 6:05 pm

Re: black image problem..

Post by TheBreadCat »

but doesnt matter what i set it to, my cake wont show up :(
TheBreadCat
Prole
Posts: 22
Joined: Wed Jan 26, 2011 6:05 pm

Re: black image problem..

Post by TheBreadCat »

never mind got it :P
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 8 guests