Page 1 of 2

Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 1:25 pm
by tobyhijzen
I am doing something very simple but it does not seem to work. I am trying to load an image and display it on the screen. But all i get is a white block the size of the image. Smaller images do work but this big image does not. It don't think it is my graphics card as i have a 1 gb GEFORCE GT 540M. But i can't figure out what is going wrong.
As my code shows i just do two things:
load the image
display the image
Any help is greatly appreciated

Code: Select all

function love.load()
   sprite=love.graphics.newImage("sonic.gif")
   --quad=love.graphics.newQuad(24,44,20,30,800,1130)
end

function love.draw()
   love.graphics.draw(sprite)
end

function love.update(dt)
end

function love.quit()
  print("Thanks for playing. Please play again soon!")
end
PS I'm running on windows

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 1:31 pm
by nevon

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 1:36 pm
by tobyhijzen
nevon wrote:Sounds like Power-of-Two Syndrome.
I'm running version 0.8.0 so that shouldn't be the problem.
Starting version 0.8.0, all images are auto-padded on systems that need it, this means we can forget about all this madness and celebrate.

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 1:46 pm
by Nixola
Can you upload the .love here?

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 1:49 pm
by tobyhijzen
Nixola wrote:Can you upload the .love here?
.love? which file do you mean? Aren't those for linux? I'm running windows.

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 1:55 pm
by Nixola
They're for LOVE, not for an OS ;)
You have to zip main.lua and sonic.gif (and every other file you need for your program, but NOT the folder they're in), rename the file from .zip to .love and you're done

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 2:01 pm
by tobyhijzen
here it is

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 2:04 pm
by Nixola
I can see that image, with 0.8.0...
(I suffer from the PO2 Syndrome)

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 2:05 pm
by Boolsheet
LÖVE currently doesn't catch the error when the graphics driver fails to load big images. Your graphics card/driver seems to be limited to 1024x1024 textures. It may be higher, but LÖVE will pad it to 2048 if the card doesn't support non-power-of-two textures and surely go over it.

You'll have to split the image up in smaller parts.

Re: Image is not rendered / displayed (all white)

Posted: Fri May 04, 2012 2:06 pm
by tobyhijzen
when i run the code i get the following: