TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
591 stars 156 forks source link

PNG textures rendered plain white with libpng16 #656

Open illwieckz opened 4 years ago

illwieckz commented 4 years ago

That's a bug I noticed a long time ago, but I did not find time to report it before.

At some point in the past years, PNG textures started to be rendered white. Other formats like TGA are not affected.

See how it looks:

white PNG textures

The bug may have started to be seen on my end when my system stopped to build GtkRadiant against libpng12 and started to build it against libpng16.

Speaking about libpng and radiant, it is known NetRadiant faced several issues related to the libpng 12 to 16 transition because of libpng shipping an implementation of zlib that may conflict with the standalone zlib used by radiant.

TTimo commented 4 years ago

That link doesn't work for me btw.

ensiform commented 4 years ago

Alternatively could use something not requiring libpng unless write png is needed. ioquake3 engine has a simple png reader that doesn't need any libs. Stb probably also has a basic one too.

https://github.com/ioquake/ioq3/blob/master/code/renderercommon/tr_image_png.c

illwieckz commented 4 years ago

I fixed the link.