png support broken?

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.
Post Reply
JohnnyTheBoy
Prole
Posts: 4
Joined: Mon Mar 16, 2015 11:43 am

png support broken?

Post by JohnnyTheBoy »

hello,

I am checking out LOVE and LUA in general and I seem to have some trouble with my png explosion sprites. Some of them work, some only display a black/white image with nothing in it. Am I missing something here? Is my libpng support broken or what? How can I fix this? If I do a release for windows (I'm developing in Archlinux), the problem is the same. Here is how that looks:

Image

Here is the .love (too big for uploading here)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: png support broken?

Post by Robin »

Huh, it displays normally for me.

Welcome, by the way!
Help us help you: attach a .love.
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: png support broken?

Post by micha »

I believe this is a graphics card issue, probably a power-of-2 problem. Love pads images with empty space, so that they have an po2-size. This might be too large for your graphics card. Try making the image more squarish (by wrapping the long line of images into multiple lines).
JohnnyTheBoy
Prole
Posts: 4
Joined: Mon Mar 16, 2015 11:43 am

Re: png support broken?

Post by JohnnyTheBoy »

ah, ok my machine is a laptop with intel graphics and 256M vram. I'll try that squaring and report back.
Robin wrote:Welcome, by the way!
thanks! :)
JohnnyTheBoy
Prole
Posts: 4
Joined: Mon Mar 16, 2015 11:43 am

Re: png support broken?

Post by JohnnyTheBoy »

a-ha! that worked like a charm, thanks for clearing that up. now how do I get these lines played in order ... but thats another topic.

cheers
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: png support broken?

Post by s-ol »

JohnnyTheBoy wrote:a-ha! that worked like a charm, thanks for clearing that up. now how do I get these lines played in order ... but thats another topic.

cheers
What lines? If you're trying to draw an image that contains thin lines, you should try the various combinations of filtermodes and integer coordinates (linear and drawing at floor(x), linear and drawing at floor(x)+0.5, nearest and drawing at floor(x)...)

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
slime
Solid Snayke
Posts: 3160
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: png support broken?

Post by slime »

The image dimensions are too large for your GPU - you can check at runtime via love.graphics.getSystemLimit("texturesize"). If either the width or height of the image is larger than the maximum texture size, your GPU won't be able to use it.

For very low-end GPUs, the max texture size is usually 2048x2048 or 4096x4096.
JohnnyTheBoy
Prole
Posts: 4
Joined: Mon Mar 16, 2015 11:43 am

Re: png support broken?

Post by JohnnyTheBoy »

S0lll0s wrote:What lines?
The lines that I get when I split and merge the png into a "more squareish" format. I found this and that, will fiddle around with it.
slime wrote:The image dimensions are too large for your GPU
Thanks, good to know! This intel gpu gives "8192" ...
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 2 guests