BZFlag-Dev / bzflag

3D multi-player tank battle game
https://www.bzflag.org
Other
294 stars 79 forks source link

Implement libpng #79

Open blast007 opened 7 years ago

blast007 commented 7 years ago

We currently have our own code for both encoding (when creating screenshots) and decoding (for loading textures) PNG files. We should make use of libpng instead.

blast007 commented 7 years ago

PR #84 implemented libpng for reading textures and writing screenshots. Writing screenshots is roughly 2 to 3 times faster now, while still resulting in a similar file size.

From implementing libpng, I also became aware that some of our PNG files have some minor issues. Several libpng warnings are currently printed to stderr from just the textures included with the game. I am considering if we should hook into libpng's error/warning handling to show errors and warnings in the game client console (possibly in addition to stderr).