Page 1 of 1

png support broken?

Posted: Mon Mar 16, 2015 11:55 am
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)

Re: png support broken?

Posted: Mon Mar 16, 2015 12:16 pm
by Robin
Huh, it displays normally for me.

Welcome, by the way!

Re: png support broken?

Posted: Mon Mar 16, 2015 12:29 pm
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).

Re: png support broken?

Posted: Mon Mar 16, 2015 12:50 pm
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! :)

Re: png support broken?

Posted: Mon Mar 16, 2015 1:38 pm
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

Re: png support broken?

Posted: Mon Mar 16, 2015 2:10 pm
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)...)

Re: png support broken?

Posted: Mon Mar 16, 2015 2:35 pm
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.

Re: png support broken?

Posted: Mon Mar 16, 2015 6:15 pm
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" ...