Image is not rendered / displayed (all white)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
tobyhijzen
Prole
Posts: 6
Joined: Fri May 04, 2012 1:02 pm

Image is not rendered / displayed (all white)

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:
display the image
Any help is greatly appreciated

Code: Select all

function love.load()
sprite=love.graphics.newImage("sonic.gif")
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
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

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

tobyhijzen
Prole
Posts: 6
Joined: Fri May 04, 2012 1:02 pm

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

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.
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Can you upload the .love here?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
li = love.image
lg = love.graphics
tobyhijzen
Prole
Posts: 6
Joined: Fri May 04, 2012 1:02 pm

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

Nixola wrote:Can you upload the .love here?
.love? which file do you mean? Aren't those for linux? I'm running windows.
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

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
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
li = love.image
lg = love.graphics
tobyhijzen
Prole
Posts: 6
Joined: Fri May 04, 2012 1:02 pm

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

here it is
Attachments
sonic.love
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

I can see that image, with 0.8.0...
(I suffer from the PO2 Syndrome)
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
li = love.image
lg = love.graphics
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

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

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.
Shallow indentations.
tobyhijzen
Prole
Posts: 6
Joined: Fri May 04, 2012 1:02 pm

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

when i run the code i get the following:
Attachments
white.png (161.57 KiB) Viewed 8377 times

Who is online

Users browsing this forum: No registered users and 54 guests