[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27257] trunk/blender: small png include adjustments (ifndef NOPNG ...).

Dalai Felinto dfelinto at gmail.com
Wed Mar 3 20:34:17 CET 2010


Revision: 27257
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27257
Author:   dfelinto
Date:     2010-03-03 20:34:17 +0100 (Wed, 03 Mar 2010)

Log Message:
-----------
small png include adjustments (ifndef NOPNG ...).
* gameplayer is now probably not going to build without PNG turned ON.

To fix that it would be necessary to use #ifndef NOPNG  around the GPC_Canvas::MakeScreenShot.
Since I don't this function it's working in 2.5 yet it's better to wait for that before doing it.

Modified Paths:
--------------
    trunk/blender/intern/elbeem/CMakeLists.txt
    trunk/blender/intern/smoke/intern/IMAGE.h
    trunk/blender/source/gameengine/GamePlayer/common/GPC_Canvas.cpp

Modified: trunk/blender/intern/elbeem/CMakeLists.txt
===================================================================
--- trunk/blender/intern/elbeem/CMakeLists.txt	2010-03-03 19:22:02 UTC (rev 27256)
+++ trunk/blender/intern/elbeem/CMakeLists.txt	2010-03-03 19:34:17 UTC (rev 27257)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC ${ZLIB_INC} extern)
+SET(INC ${ZLIB_INC} ${PNG_INC} extern)
 
 FILE(GLOB SRC intern/*.cpp)
 

Modified: trunk/blender/intern/smoke/intern/IMAGE.h
===================================================================
--- trunk/blender/intern/smoke/intern/IMAGE.h	2010-03-03 19:22:02 UTC (rev 27256)
+++ trunk/blender/intern/smoke/intern/IMAGE.h	2010-03-03 19:34:17 UTC (rev 27257)
@@ -74,12 +74,17 @@
 //////////////////////////////////////////////////////////////////////
 // PNG, POV-Ray, and PBRT output functions
 //////////////////////////////////////////////////////////////////////
+#ifndef NOPNG
 #ifdef WIN32
 #include "png.h"
 #else
 #include <png.h>
 #endif
+#endif // NOPNG
 
+/*
+  NOTE when someone decided to uncomment the following code, please remember to put it between #ifndef NOPNG #endif
+*/
 namespace IMAGE {
 	/*
   static int writePng(const char *fileName, unsigned char **rowsp, int w, int h)

Modified: trunk/blender/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/common/GPC_Canvas.cpp	2010-03-03 19:22:02 UTC (rev 27256)
+++ trunk/blender/source/gameengine/GamePlayer/common/GPC_Canvas.cpp	2010-03-03 19:34:17 UTC (rev 27257)
@@ -31,12 +31,13 @@
 #include <config.h>
 #endif
 
+#ifndef NOPNG
 #ifdef WIN32
-#include <windows.h>
 #include "png.h"
 #else
 #include <png.h>
 #endif
+#endif // NOPNG
 
 #include "RAS_IPolygonMaterial.h"
 #include "GPC_Canvas.h"





More information about the Bf-blender-cvs mailing list