From bdc68a6283925f7152135192bbe065b000b0bd80 Mon Sep 17 00:00:00 2001 From: bl0ckeduser Date: Thu, 17 Nov 2011 00:01:48 -0500 Subject: [PATCH] Win32: handle lack of libpng --- win32/CGLCG.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/win32/CGLCG.cpp b/win32/CGLCG.cpp index 1667dfae..8ca7f4a2 100644 --- a/win32/CGLCG.cpp +++ b/win32/CGLCG.cpp @@ -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) { png_structp png_ptr; png_infop info_ptr; @@ -644,6 +645,12 @@ bool CGLCG::loadPngImage(const TCHAR *name, int &outWidth, int &outHeight, bool /* That's it */ 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) {