Merge pull request #13 from bl0ckeduser/patch-6

Win32: handle lack of libpng
This commit is contained in:
OV2 2011-11-18 07:05:20 -08:00
commit 060d457e08
1 changed files with 7 additions and 0 deletions

View File

@ -525,6 +525,7 @@ void CGLCG::setShaderVars(int pass)
} }
} }
#ifdef HAVE_LIBPNG
bool CGLCG::loadPngImage(const TCHAR *name, int &outWidth, int &outHeight, bool &outHasAlpha, GLubyte **outData) { bool CGLCG::loadPngImage(const TCHAR *name, int &outWidth, int &outHeight, bool &outHasAlpha, GLubyte **outData) {
png_structp png_ptr; png_structp png_ptr;
png_infop info_ptr; png_infop info_ptr;
@ -644,6 +645,12 @@ bool CGLCG::loadPngImage(const TCHAR *name, int &outWidth, int &outHeight, bool
/* That's it */ /* That's it */
return true; return true;
} }
#else
bool CGLCG::loadPngImage(const TCHAR *name, int &outWidth, int &outHeight, bool &outHasAlpha, GLubyte **outData) {
/* No PNG support */
return false;
}
#endif
bool CGLCG::loadTGA(const TCHAR *filename, STGA& tgaFile) bool CGLCG::loadTGA(const TCHAR *filename, STGA& tgaFile)
{ {