[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16440] branches/soc-2008-mxcurioni: * Make sure freestyle branch compiles with SCons/msvc9 on Windows.
Nathan Letwory
jesterking at letwory.net
Tue Sep 9 20:03:45 CEST 2008
Revision: 16440
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16440
Author: jesterking
Date: 2008-09-09 20:03:44 +0200 (Tue, 09 Sep 2008)
Log Message:
-----------
* Make sure freestyle branch compiles with SCons/msvc9 on Windows. This was joint operation with mxcurioni :)
Modified Paths:
--------------
branches/soc-2008-mxcurioni/SConstruct
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_config.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLStrokeRenderer.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/FreestyleConfig.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PythonInterpreter.h
Modified: branches/soc-2008-mxcurioni/SConstruct
===================================================================
--- branches/soc-2008-mxcurioni/SConstruct 2008-09-09 17:27:01 UTC (rev 16439)
+++ branches/soc-2008-mxcurioni/SConstruct 2008-09-09 18:03:44 UTC (rev 16440)
@@ -493,7 +493,7 @@
Depends(blenderplayer,installtarget)
if not env['WITH_BF_GAMEENGINE']:
- blendernogame = env.Alias('blendernogame', B.game)
+ blendernogame = env.Alias('blendernogame', B.program_list)
Depends(blendernogame,installtarget)
Depends(nsiscmd, allinstall)
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp 2008-09-09 17:27:01 UTC (rev 16439)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp 2008-09-09 18:03:44 UTC (rev 16440)
@@ -19,6 +19,17 @@
//
///////////////////////////////////////////////////////////////////////////////
+
+#ifdef WIN32
+# include <GL/glew.h>
+# include <windows.h>
+#endif
+#ifdef __MACH__
+# include <OpenGL/gl.h>
+#else
+# include <GL/gl.h>
+#endif
+
#include "AppGLWidget.h"
#include "../image/Image.h"
#include "../system/TimeStamp.h"
@@ -32,16 +43,6 @@
#include "../system/StringUtils.h"
-#ifdef WIN32
-# include <windows.h>
-# include "GL/glew.h"
-#endif
-#ifdef __MACH__
-# include <OpenGL/gl.h>
-#else
-# include <GL/gl.h>
-#endif
-
AppCanvas::AppCanvas()
:Canvas()
{
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp 2008-09-09 17:27:01 UTC (rev 16439)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppConfig.cpp 2008-09-09 18:03:44 UTC (rev 16440)
@@ -25,101 +25,72 @@
using namespace std;
-namespace Config{
- Path* Path::_pInstance = 0;
- Path::Path(){
- // get the home directory
- _HomeDir = getEnvVar("HOME");
- // get the root directory
+namespace Config {
+Path* Path::_pInstance = 0;
+Path::Path() {
+ // get the home directory
+ _HomeDir = getEnvVar("HOME");
+ // get the root directory
//soc
setRootDir(getEnvVar("FREESTYLE_BLENDER_DIR"));
- _pInstance = this;
- }
- void Path::setRootDir(const string& iRootDir){
- _ProjectDir = iRootDir;
- _ModelsPath = "";
- _PatternsPath = _ProjectDir +
- string(DIR_SEP.c_str()) +
- "data" +
- string(DIR_SEP.c_str()) +
- "textures" +
- string(DIR_SEP.c_str()) +
- "variation_patterns" +
- string(DIR_SEP.c_str());
- _BrushesPath = _ProjectDir +
- string(DIR_SEP.c_str()) +
- "data" +
- string(DIR_SEP.c_str()) +
- "textures" +
- string(DIR_SEP.c_str()) +
- "brushes" +
- string(DIR_SEP.c_str());
- _PythonPath = _ProjectDir +
- string(DIR_SEP.c_str()) +
- "python" +
- string(PATH_SEP.c_str()) +
- _ProjectDir +
- string(DIR_SEP.c_str()) +
- "style_modules_blender" +
- string(DIR_SEP.c_str()) ;
- if (getenv("PYTHONPATH")) {
- _PythonPath += string(PATH_SEP.c_str()) + string(getenv("PYTHONPATH"));
- }
+ _pInstance = this;
+}
+void Path::setRootDir(const string& iRootDir) {
+ _ProjectDir = iRootDir;
+ _ModelsPath = "";
+ _PatternsPath = _ProjectDir + string(DIR_SEP.c_str()) + "data"
+ + string(DIR_SEP.c_str()) + "textures" + string(DIR_SEP.c_str())
+ + "variation_patterns" + string(DIR_SEP.c_str());
+ _BrushesPath = _ProjectDir + string(DIR_SEP.c_str()) + "data"
+ + string(DIR_SEP.c_str()) + "textures" + string(DIR_SEP.c_str())
+ + "brushes" + string(DIR_SEP.c_str());
+ _PythonPath = _ProjectDir + string(DIR_SEP.c_str()) + "python"
+ + string(PATH_SEP.c_str()) + _ProjectDir + string(DIR_SEP.c_str())
+ + "style_modules_blender" + string(DIR_SEP.c_str()) ;
+ if (getenv("PYTHONPATH")) {
+ _PythonPath += string(PATH_SEP.c_str()) + string(getenv("PYTHONPATH"));
+ }
#ifdef WIN32
- _BrowserCmd = "C:\\Program Files\\Internet Explorer\\iexplore.exe %s";
+ _BrowserCmd = "C:\\Program Files\\Internet Explorer\\iexplore.exe %s";
#else
- _BrowserCmd = "mozilla %s";
+ _BrowserCmd = "mozilla %s";
#endif
- _HelpIndexPath = _ProjectDir +
- string(DIR_SEP.c_str()) +
- "doc" +
- string(DIR_SEP.c_str()) +
- "html" +
- string(DIR_SEP.c_str()) +
- "index.html";
- _PapersDir = _ProjectDir +
- string(DIR_SEP.c_str()) +
- "data" +
- string(DIR_SEP.c_str()) +
- "textures" +
- string(DIR_SEP.c_str()) +
- "papers" +
- string(DIR_SEP.c_str());
- _EnvMapDir = _ProjectDir +
- string(DIR_SEP.c_str()) +
- "data" +
- string(DIR_SEP.c_str()) +
- "env_map" +
- string(DIR_SEP.c_str());
- _MapsDir = _ProjectDir +
- string(DIR_SEP.c_str()) +
- "data" +
- string(DIR_SEP.c_str()) +
- "maps" +
- string(DIR_SEP.c_str());
- }
- void Path::setHomeDir(const string& iHomeDir){
- _HomeDir = iHomeDir;
- }
- Path::~Path(){
- _pInstance = 0;
- }
- Path* Path::getInstance() {
- return _pInstance;
- }
- string Path::getEnvVar(const string& iEnvVarName){
- string value;
- if (!getenv( StringUtils::toAscii(iEnvVarName).c_str() ) ) {
- cerr << "Warning: You may want to set the $"<< StringUtils::toAscii(iEnvVarName)
- << " environment variable to use " << string(Config::APPLICATION_NAME) << "." << endl
- << " Otherwise, the current directory will be used instead." << endl;
- value = ".";
- }else{
- value = getenv( StringUtils::toAscii(iEnvVarName).c_str() );
- }
- return value;
- }
+ _HelpIndexPath = _ProjectDir + string(DIR_SEP.c_str()) + "doc"
+ + string(DIR_SEP.c_str()) + "html" + string(DIR_SEP.c_str())
+ + "index.html";
+ _PapersDir = _ProjectDir + string(DIR_SEP.c_str()) + "data"
+ + string(DIR_SEP.c_str()) + "textures" + string(DIR_SEP.c_str())
+ + "papers" + string(DIR_SEP.c_str());
+ _EnvMapDir = _ProjectDir + string(DIR_SEP.c_str()) + "data"
+ + string(DIR_SEP.c_str()) + "env_map" + string(DIR_SEP.c_str());
+ _MapsDir = _ProjectDir + string(DIR_SEP.c_str()) + "data"
+ + string(DIR_SEP.c_str()) + "maps" + string(DIR_SEP.c_str());
+}
+void Path::setHomeDir(const string& iHomeDir) {
+ _HomeDir = iHomeDir;
+}
+Path::~Path() {
+ _pInstance = 0;
+}
+Path* Path::getInstance() {
+ return _pInstance;
+}
+string Path::getEnvVar(const string& iEnvVarName) {
+ string value;
+ if (!getenv(StringUtils::toAscii(iEnvVarName).c_str() ) ) {
+ cerr << "Warning: You may want to set the $"
+ << StringUtils::toAscii(iEnvVarName)
+ << " environment variable to use "
+ << string(Config::APPLICATION_NAME) << "." << endl
+ << " Otherwise, the current directory will be used instead."
+ << endl;
+ value = ".";
+ } else {
+ value = getenv(StringUtils::toAscii(iEnvVarName).c_str() );
+ }
+ return value;
+}
} // End of namepace Config
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp 2008-09-09 17:27:01 UTC (rev 16439)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp 2008-09-09 18:03:44 UTC (rev 16440)
@@ -47,7 +47,11 @@
#ifdef __MACH__
# include <GLUT/glut.h>
#else
+# ifdef _WIN32
+# include <GL/glu.h>
+# else
# include <GL/glut.h>
+# endif
#endif
GLuint texture = 0;
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_config.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_config.h 2008-09-09 17:27:01 UTC (rev 16439)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_config.h 2008-09-09 18:03:44 UTC (rev 16440)
@@ -18,6 +18,11 @@
using namespace std;
+// Pi definition
+# ifndef M_PI
+# define M_PI 3.14159265
+# endif // M_PI
+
#include "AppGLWidget_point.h"
# ifdef WIN32
@@ -32,7 +37,11 @@
#ifdef __APPLE_CC__
#include <GLUT/glut.h>
#else
- #include <GL/glut.h>
+# ifdef WIN32
+# include <GL/glu.h>
+# else
+# include <GL/glut.h>
+# endif
#endif
#ifndef Q_UNUSED
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp 2008-09-09 17:27:01 UTC (rev 16439)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp 2008-09-09 18:03:44 UTC (rev 16440)
@@ -108,7 +108,7 @@
return -1;
}
- self->py_ss.ss = new SmoothingShader::SmoothingShader(i1, d2, d3, d4, d5, d6, d7, d8);
+ self->py_ss.ss = new SmoothingShader(i1, d2, d3, d4, d5, d6, d7, d8);
return 0;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp 2008-09-09 17:27:01 UTC (rev 16439)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp 2008-09-09 18:03:44 UTC (rev 16440)
@@ -31,7 +31,11 @@
#ifdef __MACH__
#include <GLUT/glut.h>
#else
-#include <GL/glut.h>
+# ifdef WIN32
+# include <GL/glu.h>
+# else
+# include <GL/glut.h>
+# endif
#endif
void GLDebugRenderer::visitIndexedFaceSet(IndexedFaceSet& iFaceSet)
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLStrokeRenderer.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLStrokeRenderer.h 2008-09-09 17:27:01 UTC (rev 16439)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLStrokeRenderer.h 2008-09-09 18:03:44 UTC (rev 16440)
@@ -35,14 +35,15 @@
# include "../stroke/StrokeRep.h"
-# ifdef WIN32
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list