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
Before you make a thread asking for help, read this.
tobyhijzen
Prole
Posts: 6
Joined: Fri May 04, 2012 1:02 pm

Image is not rendered / displayed (all white)

Post by tobyhijzen » Fri May 04, 2012 1:25 pm

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

User avatar
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)

Post by nevon » Fri May 04, 2012 1:31 pm


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

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

Post by tobyhijzen » Fri May 04, 2012 1:36 pm

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.

User avatar
Nixola
Inner party member
Posts: 1942
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post by Nixola » Fri May 04, 2012 1:46 pm

Can you upload the .love here?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
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)

Post by tobyhijzen » Fri May 04, 2012 1:49 pm

Nixola wrote:Can you upload the .love here?
.love? which file do you mean? Aren't those for linux? I'm running windows.

User avatar
Nixola
Inner party member
Posts: 1942
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post by Nixola » Fri May 04, 2012 1:55 pm

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
lt = love.thread
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)

Post by tobyhijzen » Fri May 04, 2012 2:01 pm

here it is
Attachments
sonic.love
(155.11 KiB) Downloaded 254 times

User avatar
Nixola
Inner party member
Posts: 1942
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post by Nixola » Fri May 04, 2012 2:04 pm

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
lt = love.thread
li = love.image
lg = love.graphics

User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

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

Post by Boolsheet » Fri May 04, 2012 2:05 pm

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)

Post by tobyhijzen » Fri May 04, 2012 2:06 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests