diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-05-18 17:01:52 +0400 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-05-18 17:01:52 +0400 |
commit | 55655a065943d67dbdb584e8426a60793e65d6f1 (patch) | |
tree | 69569ab6eb32859b5d9c30e0d9b7237e9b22666d /source/blender/freestyle/intern | |
parent | 29b2db85181414b2581dd303a654b8d61ac80fbd (diff) |
soc-2008-mxcurioni: towards Freestyle's first render: controller, config, appglwidget corrected. Freestyle is called but cannot be linked (ImBuf issues). This is an unstable commit.
Diffstat (limited to 'source/blender/freestyle/intern')
27 files changed, 2928 insertions, 1494 deletions
diff --git a/source/blender/freestyle/intern/AUTHORS.TXT b/source/blender/freestyle/intern/AUTHORS.TXT deleted file mode 100755 index 27cdb70d5ec..00000000000 --- a/source/blender/freestyle/intern/AUTHORS.TXT +++ /dev/null @@ -1,6 +0,0 @@ -Authors -------- -Frédo Durand <fredo@mit.edu> -Stéphane Grabli <stephane.grabli@imag.fr> -François Sillion <francois.sillion@imag.fr> -Emmanuel Turquin <emmanuel.turquin@imag.fr> diff --git a/source/blender/freestyle/intern/BUGS.TXT b/source/blender/freestyle/intern/BUGS.TXT deleted file mode 100755 index c5bad029a47..00000000000 --- a/source/blender/freestyle/intern/BUGS.TXT +++ /dev/null @@ -1,11 +0,0 @@ -* Application doesn't exit properly (eg style window still hangs out) -* macosx: Window bar is unaccessible. -* macosx: Build leds to an application that is half-bundle (for the executable) half UNIX-style (for libraries). -* Strokes Strips are sometimes incorrect -* TVertex sometimes points towards NULL ViewEdges -* Some points are found to be outside of the grid. (for big models and mostly in release mode). Probably due to precision problems. -* Operators::recursiveChains() and ViewEdgeIterator change ViewEdgeIterator so that it supports the copy of specialized types in a transparent way. It works here only because we're never copying it and because it is passed as a reference. -* Functions0D takes a Interface0DIterator& insted of a const Interface0DIterator& as argument. dangerous. -* crashes on big models - - diff --git a/source/blender/freestyle/intern/CHANGELOG.TXT b/source/blender/freestyle/intern/CHANGELOG.TXT deleted file mode 100755 index cb9f088bc1f..00000000000 --- a/source/blender/freestyle/intern/CHANGELOG.TXT +++ /dev/null @@ -1,47 +0,0 @@ -2008-03-06 - freestyle-2.2.0 - * Fixed a bug related to the ViewShape IDs that caused the ray casting to crash. - * Fixed a bug in the style module insertion. - -2008-03-02 - freestyle-2.1.1 - * Added the management of texture coordinates in the scene graph and the rendering. - * The reps in the scene graph are now assigned ids based on the lib3ds nodes ids. These ids are transmitted to the WingedEdge Shapes. -2007-10-05 - freestyle-2.0.1 - - * Enforced node construction from lib3ds (thanks to Thomas Netter) - * Reverted to not using bundles by default on MacOSX. Activating bundles can be made by uncommenting the lib_bundle line of the CONFIG variable in Config.pri - * Added a NodeCamera to the scene graph. - * Made sure the display lists were compiled AND executed (GL_COMPILE -> GL_COMPILE_AND_EXECUTE) for IndexedFaceSet. - * Added a visitor to deallocate memory on the graphics card (display lists right now). - * Modified the grid to use a visitor pattern for ray casting and grid traversal. - - - -2007-05-06 - freestyle-2.0.0 - - * Switched to Qt 4.2.3, swig 1.3.31, visual c++ 2005, gcc 4.0.1, qglviewer 2.2.5-1 - * Added texture coordinates to scene graph - * Made the grid more robust - * Now compiles on MacOSX - * Fixed the brush texture problem: the full path to the texture was used instead of the base name and that was breaking the search path algorithm - - -2006-06-18 - freestyle-1.0.2 - - * Fixed a bug related to the loading of OpenGL extensions. - - -2005-07-25 - freestyle-1.0.1 - - * Upgrade to QGLViewer 2.0.4 - * Added the FREESTYLE_DIR environment variable. - It must be set to the freestyle directory for - all releases except the pre-compiled windows version. - * Fixed the unix path separator. - * Added the "Help>Control bindings" menu action. - * Fixed the style modules according to Python 2.4 standards. - - -2005-04-05 - freestyle-1.0.0 - - * Initial release - diff --git a/source/blender/freestyle/intern/COPYRIGHT.TXT b/source/blender/freestyle/intern/COPYRIGHT.TXT deleted file mode 100755 index cd37bd16786..00000000000 --- a/source/blender/freestyle/intern/COPYRIGHT.TXT +++ /dev/null @@ -1,9 +0,0 @@ -Freestyle - -Copyright (c) 2001-2007 by the following: - - -Frédo Durand <fredo@mit.edu> -Stéphane Grabli <stephane.grabli@gmail.com> -François Sillion <francois.sillion@imag.fr> -Emmanuel Turquin <emmanuel.turquin@imag.fr> diff --git a/source/blender/freestyle/intern/Config.pri b/source/blender/freestyle/intern/Config.pri deleted file mode 100755 index 68763dba502..00000000000 --- a/source/blender/freestyle/intern/Config.pri +++ /dev/null @@ -1,176 +0,0 @@ -# This file should be viewed as a -*- mode: Makefile -*- - -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# A p p l i c a t i o n & L i b r a r i e s # -# b u i l d c o n f i g u r a t i o n # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -# -# APPLICATION -# -####################################### - -APPNAME = Freestyle -APPVERSION_MAJ = 2 -APPVERSION_MID = 2 -APPVERSION_MIN = 0 -APPVERSION = $${APPVERSION_MAJ}.$${APPVERSION_MID}.$${APPVERSION_MIN} - -PYTHON_VERSION_MAJ = 2 -PYTHON_VERSION_MIN = 5 - -LIB3DS_VERSION_MAJ = 1 -LIB3DS_VERSION_MIN = 30 - -# -# CONFIG -# -####################################### - -CONFIG -= debug release ReleaseBuild Release build_pass precompile_header debug_and_release debug_and_release_target -CONFIG *= qt shared stl exceptions rtti thread -CONFIG *= release # debug or release -CONFIG *= warn_off # warn_off or warn_on -mac:CONFIG += x86 -#mac:CONFIG += ppc -#mac:CONFIG *= lib_bundle - -#mac:QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk -#message($$CONFIG) -#CONFIG *= static -#CONFIG *= profiling - - - -QT += opengl - -# -# LIBRARIES -# -####################################### - -debug{ - LIB_GEOMETRY = $${APPNAME}Geometry_d - LIB_IMAGE = $${APPNAME}Image_d - LIB_RENDERING = $${APPNAME}Rendering_d - LIB_SCENE_GRAPH = $${APPNAME}SceneGraph_d - LIB_SYSTEM = $${APPNAME}System_d - LIB_VIEW_MAP = $${APPNAME}ViewMap_d - LIB_STROKE = $${APPNAME}Stroke_d - LIB_WINGED_EDGE = $${APPNAME}WingedEdge_d -}else{ - LIB_GEOMETRY = $${APPNAME}Geometry - LIB_IMAGE = $${APPNAME}Image - LIB_RENDERING = $${APPNAME}Rendering - LIB_SCENE_GRAPH = $${APPNAME}SceneGraph - LIB_SYSTEM = $${APPNAME}System - LIB_VIEW_MAP = $${APPNAME}ViewMap - LIB_STROKE = $${APPNAME}Stroke - LIB_WINGED_EDGE = $${APPNAME}WingedEdge -} - -LIBVERSION = $${APPVERSION_MAJ}.$${APPVERSION_MID} - - -# -# FLAGS -# -####################################### - -win32:QMAKE_CXXFLAGS *= /GR /GX -win32:QMAKE_CFLAGS *= /GR /GX -irix-n32:QMAKE_CFLAGS *= -LANG:std -irix-n32:QMAKE_CXXFLAGS *= -LANG:std -linux-g++:QMAKE_CFLAGS *= -Wno-deprecated -linux-g++:QMAKE_CXXFLAGS *= -Wno-deprecated -cygwin-g++:QMAKE_CFLAGS *= -Wno-deprecated -cygwin-g++:QMAKE_CXXFLAGS *= -Wno-deprecated -mno-win32 -mac:QMAKE_CFLAGS *= -Wno-deprecated -mac:QMAKE_CXXFLAGS *= -Wno-deprecated - -linux-g++:QMAKE_CFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 -linux-g++:QMAKE_CXXFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 -cygwin-g++:QMAKE_CFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 -cygwin-g++:QMAKE_CXXFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 -mac:QMAKE_CFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 -mac:QMAKE_CXXFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 - -profiling { - linux-g++:QMAKE_CFLAGS_DEBUG = -pg - linux-g++:QMAKE_CXXFLAGS_DEBUG = -pg - linux-g++:QMAKE_LFLAGS_DEBUG = -pg - cygwin-g++:QMAKE_CFLAGS_DEBUG = -pg - cygwin-g++:QMAKE_CXXFLAGS_DEBUG = -pg - cygwin-g++:QMAKE_LFLAGS_DEBUG = -pg - mac:QMAKE_CFLAGS_DEBUG = -pg - mac:QMAKE_CXXFLAGS_DEBUG = -pg - mac:QMAKE_LFLAGS_DEBUG = -pg -} - -# -# DEFINES -# -####################################### - -win32:DEFINES *= WIN32 QT_DLL QT_THREAD_SUPPORT -linux-g++:DEFINES *= LINUX -cygwin-g++:DEFINES *= CYGWIN -irix-n32:DEFINES *= IRIX -mac:DEFINES *= MACOSX - -# -# BUILD DIRECTORIES (RELATIVE) -# -####################################### - -release { - win32 { - REL_OBJECTS_DIR = \\win32\\release\\obj - REL_DESTDIR = \\win32\\release - } - linux-g++ { - REL_OBJECTS_DIR = linux-g++/release/obj - REL_DESTDIR = linux-g++/release - } - cygwin-g++ { - REL_OBJECTS_DIR = cygwin-g++/release/obj - REL_DESTDIR = cygwin-g++/release - } - irix-n32 { - REL_OBJECTS_DIR = irix-n32/release/obj - REL_DESTDIR = irix-n32/release - } - mac { - REL_OBJECTS_DIR = macosx/release/obj - REL_DESTDIR = macosx/release - } -} -debug { - win32 { - REL_OBJECTS_DIR = \\win32\\debug\\obj - REL_DESTDIR = \\win32\\debug - } - linux-g++ { - REL_OBJECTS_DIR = linux-g++/debug/obj - REL_DESTDIR = linux-g++/debug - } - cygwin-g++ { - REL_OBJECTS_DIR = cygwin-g++/debug/obj - REL_DESTDIR = cygwin-g++/debug - } - irix-n32 { - REL_OBJECTS_DIR = irix-n32/debug/obj - REL_DESTDIR = irix-n32/debug - } - mac { - REL_OBJECTS_DIR = macosx/debug/obj - REL_DESTDIR = macosx/debug - } -} - -# -# INSTALL -# -####################################### - -#QMAKE_COPY_FILE = $${QMAKE_COPY} -P diff --git a/source/blender/freestyle/intern/Freestyle-vc7-debug.sln b/source/blender/freestyle/intern/Freestyle-vc7-debug.sln deleted file mode 100755 index 937f3f9faf9..00000000000 --- a/source/blender/freestyle/intern/Freestyle-vc7-debug.sln +++ /dev/null @@ -1,113 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Freestyle_d", "app\app_d.vcproj", "{0BC94A80-9E3E-40D8-B2CF-6594F96361C5}" - ProjectSection(ProjectDependencies) = postProject - {DFCED64E-AEFA-4D06-8609-DE23A69D0361} = {DFCED64E-AEFA-4D06-8609-DE23A69D0361} - {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} = {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} - {FA76B552-8A89-4A50-92F7-A77935515005} = {FA76B552-8A89-4A50-92F7-A77935515005} - {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} - {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C} = {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C} - {4C44396A-8016-4360-8F5C-35CA6CC282BD} = {4C44396A-8016-4360-8F5C-35CA6CC282BD} - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} - {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleGeometry_d", "geometry\geometry_d.vcproj", "{3E1C0A57-8206-402F-A12E-3B100F121DDE}" - ProjectSection(ProjectDependencies) = postProject - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleImage_d", "image\image_d.vcproj", "{4C44396A-8016-4360-8F5C-35CA6CC282BD}" - ProjectSection(ProjectDependencies) = postProject - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleRendering_d", "rendering\rendering_d.vcproj", "{9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}" - ProjectSection(ProjectDependencies) = postProject - {DFCED64E-AEFA-4D06-8609-DE23A69D0361} = {DFCED64E-AEFA-4D06-8609-DE23A69D0361} - {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} - {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSceneGraph_d", "scene_graph\scene_graph_d.vcproj", "{858093EF-6B95-4D0F-AA0A-CF187C6F369F}" - ProjectSection(ProjectDependencies) = postProject - {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleStroke_d", "stroke\stroke_d.vcproj", "{DFCED64E-AEFA-4D06-8609-DE23A69D0361}" - ProjectSection(ProjectDependencies) = postProject - {FA76B552-8A89-4A50-92F7-A77935515005} = {FA76B552-8A89-4A50-92F7-A77935515005} - {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSystem_d", "system\system_d.vcproj", "{AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleViewMap_d", "view_map\view_map_d.vcproj", "{FA76B552-8A89-4A50-92F7-A77935515005}" - ProjectSection(ProjectDependencies) = postProject - {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} = {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} - {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} - {4C44396A-8016-4360-8F5C-35CA6CC282BD} = {4C44396A-8016-4360-8F5C-35CA6CC282BD} - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleWingedEdge_d", "winged_edge\winged_edge_d.vcproj", "{AF37DD50-8CD3-4339-AB32-C6F8F770CB30}" - ProjectSection(ProjectDependencies) = postProject - {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} - {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Debug.ActiveCfg = Debug|Win32 - {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Debug.Build.0 = Debug|Win32 - {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Release.ActiveCfg = Debug|Win32 - {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Release.Build.0 = Debug|Win32 - {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Debug.ActiveCfg = Debug|Win32 - {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Debug.Build.0 = Debug|Win32 - {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Release.ActiveCfg = Debug|Win32 - {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Release.Build.0 = Debug|Win32 - {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Debug.ActiveCfg = Debug|Win32 - {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Debug.Build.0 = Debug|Win32 - {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Release.ActiveCfg = Debug|Win32 - {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Release.Build.0 = Debug|Win32 - {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Debug.ActiveCfg = Debug|Win32 - {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Debug.Build.0 = Debug|Win32 - {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Release.ActiveCfg = Debug|Win32 - {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Release.Build.0 = Debug|Win32 - {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Debug.ActiveCfg = Debug|Win32 - {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Debug.Build.0 = Debug|Win32 - {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Release.ActiveCfg = Debug|Win32 - {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Release.Build.0 = Debug|Win32 - {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Debug.ActiveCfg = Debug|Win32 - {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Debug.Build.0 = Debug|Win32 - {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Release.ActiveCfg = Debug|Win32 - {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Release.Build.0 = Debug|Win32 - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Debug.ActiveCfg = Debug|Win32 - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Debug.Build.0 = Debug|Win32 - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Release.ActiveCfg = Debug|Win32 - {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Release.Build.0 = Debug|Win32 - {FA76B552-8A89-4A50-92F7-A77935515005}.Debug.ActiveCfg = Debug|Win32 - {FA76B552-8A89-4A50-92F7-A77935515005}.Debug.Build.0 = Debug|Win32 - {FA76B552-8A89-4A50-92F7-A77935515005}.Release.ActiveCfg = Release|Win32 - {FA76B552-8A89-4A50-92F7-A77935515005}.Release.Build.0 = Release|Win32 - {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Debug.ActiveCfg = Debug|Win32 - {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Debug.Build.0 = Debug|Win32 - {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Release.ActiveCfg = Debug|Win32 - {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Release.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/source/blender/freestyle/intern/Freestyle-vc7-release.sln b/source/blender/freestyle/intern/Freestyle-vc7-release.sln deleted file mode 100755 index 74d5dc77f86..00000000000 --- a/source/blender/freestyle/intern/Freestyle-vc7-release.sln +++ /dev/null @@ -1,111 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Freestyle", "app\app.vcproj", "{0BC94A80-9E3E-40D8-B2CF-6594F96361C5}"
- ProjectSection(ProjectDependencies) = postProject
- {DFCED64E-AEFA-4D06-8609-DE23A69D0361} = {DFCED64E-AEFA-4D06-8609-DE23A69D0361}
- {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} = {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}
- {FA76B552-8A89-4A50-92F7-A77935515005} = {FA76B552-8A89-4A50-92F7-A77935515005}
- {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE}
- {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C} = {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}
- {4C44396A-8016-4360-8F5C-35CA6CC282BD} = {4C44396A-8016-4360-8F5C-35CA6CC282BD}
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}
- {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleGeometry", "geometry\geometry.vcproj", "{3E1C0A57-8206-402F-A12E-3B100F121DDE}"
- ProjectSection(ProjectDependencies) = postProject
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleImage", "image\image.vcproj", "{4C44396A-8016-4360-8F5C-35CA6CC282BD}"
- ProjectSection(ProjectDependencies) = postProject
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleRendering", "rendering\rendering.vcproj", "{9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}"
- ProjectSection(ProjectDependencies) = postProject
- {DFCED64E-AEFA-4D06-8609-DE23A69D0361} = {DFCED64E-AEFA-4D06-8609-DE23A69D0361}
- {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE}
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}
- {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSceneGraph", "scene_graph\scene_graph.vcproj", "{858093EF-6B95-4D0F-AA0A-CF187C6F369F}"
- ProjectSection(ProjectDependencies) = postProject
- {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE}
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleStroke", "stroke\stroke.vcproj", "{DFCED64E-AEFA-4D06-8609-DE23A69D0361}"
- ProjectSection(ProjectDependencies) = postProject
- {FA76B552-8A89-4A50-92F7-A77935515005} = {FA76B552-8A89-4A50-92F7-A77935515005}
- {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE}
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSystem", "system\system.vcproj", "{AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleViewMap", "view_map\view_map.vcproj", "{FA76B552-8A89-4A50-92F7-A77935515005}"
- ProjectSection(ProjectDependencies) = postProject
- {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} = {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}
- {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE}
- {4C44396A-8016-4360-8F5C-35CA6CC282BD} = {4C44396A-8016-4360-8F5C-35CA6CC282BD}
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleWingedEdge", "winged_edge\winged_edge.vcproj", "{AF37DD50-8CD3-4339-AB32-C6F8F770CB30}"
- ProjectSection(ProjectDependencies) = postProject
- {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE}
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}
- {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Debug.ActiveCfg = Debug|Win32
- {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Debug.Build.0 = Debug|Win32
- {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Release.ActiveCfg = Release|Win32
- {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Release.Build.0 = Release|Win32
- {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Debug.ActiveCfg = Debug|Win32
- {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Debug.Build.0 = Debug|Win32
- {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Release.ActiveCfg = Release|Win32
- {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Release.Build.0 = Release|Win32
- {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Debug.ActiveCfg = Debug|Win32
- {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Debug.Build.0 = Debug|Win32
- {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Release.ActiveCfg = Release|Win32
- {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Release.Build.0 = Release|Win32
- {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Debug.ActiveCfg = Debug|Win32
- {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Debug.Build.0 = Debug|Win32
- {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Release.ActiveCfg = Release|Win32
- {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Release.Build.0 = Release|Win32
- {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Debug.ActiveCfg = Debug|Win32
- {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Debug.Build.0 = Debug|Win32
- {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Release.ActiveCfg = Release|Win32
- {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Release.Build.0 = Release|Win32
- {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Debug.ActiveCfg = Debug|Win32
- {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Debug.Build.0 = Debug|Win32
- {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Release.ActiveCfg = Release|Win32
- {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Release.Build.0 = Release|Win32
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Debug.ActiveCfg = Debug|Win32
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Debug.Build.0 = Debug|Win32
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Release.ActiveCfg = Release|Win32
- {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Release.Build.0 = Release|Win32
- {FA76B552-8A89-4A50-92F7-A77935515005}.Debug.ActiveCfg = Debug|Win32
- {FA76B552-8A89-4A50-92F7-A77935515005}.Debug.Build.0 = Debug|Win32
- {FA76B552-8A89-4A50-92F7-A77935515005}.Release.ActiveCfg = Release|Win32
- {FA76B552-8A89-4A50-92F7-A77935515005}.Release.Build.0 = Release|Win32
- {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Debug.ActiveCfg = Debug|Win32
- {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Debug.Build.0 = Debug|Win32
- {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Release.ActiveCfg = Release|Win32
- {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/source/blender/freestyle/intern/Freestyle-vc8-debug.sln b/source/blender/freestyle/intern/Freestyle-vc8-debug.sln deleted file mode 100755 index 097ca30a174..00000000000 --- a/source/blender/freestyle/intern/Freestyle-vc8-debug.sln +++ /dev/null @@ -1,87 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSystem_d", "system\system_d.vcproj", "{AAAAA9BB-8C01-3BC3-9808-AB6717F08393}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleGeometry_d", "geometry\geometry_d.vcproj", "{5F60164C-8544-3259-A8CB-24636A092489}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleImage_d", "image\image_d.vcproj", "{28F6AC11-2A9B-3886-97DD-82FB353409CB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSceneGraph_d", "scene_graph\scene_graph_d.vcproj", "{C98C60D8-9836-30A5-BEA9-0D320E5AF308}"
- ProjectSection(ProjectDependencies) = postProject
- {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}
- {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleWingedEdge_d", "winged_edge\winged_edge_d.vcproj", "{E46825D6-9581-3D8A-96FE-7C90BC188602}"
- ProjectSection(ProjectDependencies) = postProject
- {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489}
- {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}
- {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleViewMap_d", "view_map\view_map_d.vcproj", "{6769BAB7-2894-3453-B07A-58C32D6646E3}"
- ProjectSection(ProjectDependencies) = postProject
- {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308}
- {E46825D6-9581-3D8A-96FE-7C90BC188602} = {E46825D6-9581-3D8A-96FE-7C90BC188602}
- {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}
- {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleStroke_d", "stroke\stroke_d.vcproj", "{EDA5F096-B8D0-336F-82DB-501B2F00C1CD}"
- ProjectSection(ProjectDependencies) = postProject
- {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489}
- {6769BAB7-2894-3453-B07A-58C32D6646E3} = {6769BAB7-2894-3453-B07A-58C32D6646E3}
- {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}
- {E46825D6-9581-3D8A-96FE-7C90BC188602} = {E46825D6-9581-3D8A-96FE-7C90BC188602}
- {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleRendering_d", "rendering\rendering_d.vcproj", "{D5EA771F-A1FF-3F68-A391-98EEEB407E78}"
- ProjectSection(ProjectDependencies) = postProject
- {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489}
- {EDA5F096-B8D0-336F-82DB-501B2F00C1CD} = {EDA5F096-B8D0-336F-82DB-501B2F00C1CD}
- {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}
- {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Freestyle_d", "app\app_d.vcproj", "{606D6459-D5F6-3A09-8962-50E8551545AB}"
- ProjectSection(ProjectDependencies) = postProject
- {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308}
- {E46825D6-9581-3D8A-96FE-7C90BC188602} = {E46825D6-9581-3D8A-96FE-7C90BC188602}
- {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}
- {6769BAB7-2894-3453-B07A-58C32D6646E3} = {6769BAB7-2894-3453-B07A-58C32D6646E3}
- {EDA5F096-B8D0-336F-82DB-501B2F00C1CD} = {EDA5F096-B8D0-336F-82DB-501B2F00C1CD}
- {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489}
- {D5EA771F-A1FF-3F68-A391-98EEEB407E78} = {D5EA771F-A1FF-3F68-A391-98EEEB407E78}
- {28F6AC11-2A9B-3886-97DD-82FB353409CB} = {28F6AC11-2A9B-3886-97DD-82FB353409CB}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}.Debug|Win32.ActiveCfg = Debug|Win32
- {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}.Debug|Win32.Build.0 = Debug|Win32
- {5F60164C-8544-3259-A8CB-24636A092489}.Debug|Win32.ActiveCfg = Debug|Win32
- {5F60164C-8544-3259-A8CB-24636A092489}.Debug|Win32.Build.0 = Debug|Win32
- {28F6AC11-2A9B-3886-97DD-82FB353409CB}.Debug|Win32.ActiveCfg = Debug|Win32
- {28F6AC11-2A9B-3886-97DD-82FB353409CB}.Debug|Win32.Build.0 = Debug|Win32
- {C98C60D8-9836-30A5-BEA9-0D320E5AF308}.Debug|Win32.ActiveCfg = Debug|Win32
- {C98C60D8-9836-30A5-BEA9-0D320E5AF308}.Debug|Win32.Build.0 = Debug|Win32
- {E46825D6-9581-3D8A-96FE-7C90BC188602}.Debug|Win32.ActiveCfg = Debug|Win32
- {E46825D6-9581-3D8A-96FE-7C90BC188602}.Debug|Win32.Build.0 = Debug|Win32
- {6769BAB7-2894-3453-B07A-58C32D6646E3}.Debug|Win32.ActiveCfg = Debug|Win32
- {6769BAB7-2894-3453-B07A-58C32D6646E3}.Debug|Win32.Build.0 = Debug|Win32
- {EDA5F096-B8D0-336F-82DB-501B2F00C1CD}.Debug|Win32.ActiveCfg = Debug|Win32
- {EDA5F096-B8D0-336F-82DB-501B2F00C1CD}.Debug|Win32.Build.0 = Debug|Win32
- {D5EA771F-A1FF-3F68-A391-98EEEB407E78}.Debug|Win32.ActiveCfg = Debug|Win32
- {D5EA771F-A1FF-3F68-A391-98EEEB407E78}.Debug|Win32.Build.0 = Debug|Win32
- {606D6459-D5F6-3A09-8962-50E8551545AB}.Debug|Win32.ActiveCfg = Debug|Win32
- {606D6459-D5F6-3A09-8962-50E8551545AB}.Debug|Win32.Build.0 = Debug|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/source/blender/freestyle/intern/Freestyle-vc8-release.sln b/source/blender/freestyle/intern/Freestyle-vc8-release.sln deleted file mode 100755 index 82b22ff0c3e..00000000000 --- a/source/blender/freestyle/intern/Freestyle-vc8-release.sln +++ /dev/null @@ -1,87 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Freestyle", "app\app.vcproj", "{B56F2464-158F-32C1-A9F7-EE85397706EC}"
- ProjectSection(ProjectDependencies) = postProject
- {555B73B2-B07B-3865-9D41-0FB69091E0C9} = {555B73B2-B07B-3865-9D41-0FB69091E0C9}
- {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759} = {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759}
- {9A93A87D-09E4-3492-A68C-A7B1A38DE002} = {9A93A87D-09E4-3492-A68C-A7B1A38DE002}
- {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46}
- {A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5} = {A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5}
- {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE}
- {0FDD8610-0785-3089-900D-53F786E9AC9B} = {0FDD8610-0785-3089-900D-53F786E9AC9B}
- {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleGeometry", "geometry\geometry.vcproj", "{1D57A40D-AE4B-3E40-A023-4F37C9D7446C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleImage", "image\image.vcproj", "{A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleRendering", "rendering\rendering.vcproj", "{0FDD8610-0785-3089-900D-53F786E9AC9B}"
- ProjectSection(ProjectDependencies) = postProject
- {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}
- {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE}
- {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46}
- {9A93A87D-09E4-3492-A68C-A7B1A38DE002} = {9A93A87D-09E4-3492-A68C-A7B1A38DE002}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSceneGraph", "scene_graph\scene_graph.vcproj", "{35891119-E049-35BB-AB8E-8536817F5CEE}"
- ProjectSection(ProjectDependencies) = postProject
- {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46}
- {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleStroke", "stroke\stroke.vcproj", "{9A93A87D-09E4-3492-A68C-A7B1A38DE002}"
- ProjectSection(ProjectDependencies) = postProject
- {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}
- {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE}
- {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46}
- {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759} = {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759}
- {555B73B2-B07B-3865-9D41-0FB69091E0C9} = {555B73B2-B07B-3865-9D41-0FB69091E0C9}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSystem", "system\system.vcproj", "{3804962B-1D5B-382E-B69E-96FFB2372A46}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleViewMap", "view_map\view_map.vcproj", "{F6589FA0-9FA2-31F9-BD0F-FFE303DE8759}"
- ProjectSection(ProjectDependencies) = postProject
- {555B73B2-B07B-3865-9D41-0FB69091E0C9} = {555B73B2-B07B-3865-9D41-0FB69091E0C9}
- {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46}
- {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE}
- {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleWingedEdge", "winged_edge\winged_edge.vcproj", "{555B73B2-B07B-3865-9D41-0FB69091E0C9}"
- ProjectSection(ProjectDependencies) = postProject
- {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}
- {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE}
- {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B56F2464-158F-32C1-A9F7-EE85397706EC}.Release|Win32.ActiveCfg = Release|Win32
- {B56F2464-158F-32C1-A9F7-EE85397706EC}.Release|Win32.Build.0 = Release|Win32
- {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}.Release|Win32.ActiveCfg = Release|Win32
- {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}.Release|Win32.Build.0 = Release|Win32
- {A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5}.Release|Win32.ActiveCfg = Release|Win32
- {A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5}.Release|Win32.Build.0 = Release|Win32
- {0FDD8610-0785-3089-900D-53F786E9AC9B}.Release|Win32.ActiveCfg = Release|Win32
- {0FDD8610-0785-3089-900D-53F786E9AC9B}.Release|Win32.Build.0 = Release|Win32
- {35891119-E049-35BB-AB8E-8536817F5CEE}.Release|Win32.ActiveCfg = Release|Win32
- {35891119-E049-35BB-AB8E-8536817F5CEE}.Release|Win32.Build.0 = Release|Win32
- {9A93A87D-09E4-3492-A68C-A7B1A38DE002}.Release|Win32.ActiveCfg = Release|Win32
- {9A93A87D-09E4-3492-A68C-A7B1A38DE002}.Release|Win32.Build.0 = Release|Win32
- {3804962B-1D5B-382E-B69E-96FFB2372A46}.Release|Win32.ActiveCfg = Release|Win32
- {3804962B-1D5B-382E-B69E-96FFB2372A46}.Release|Win32.Build.0 = Release|Win32
- {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759}.Release|Win32.ActiveCfg = Release|Win32
- {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759}.Release|Win32.Build.0 = Release|Win32
- {555B73B2-B07B-3865-9D41-0FB69091E0C9}.Release|Win32.ActiveCfg = Release|Win32
- {555B73B2-B07B-3865-9D41-0FB69091E0C9}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/source/blender/freestyle/intern/INSTALL.TXT b/source/blender/freestyle/intern/INSTALL.TXT deleted file mode 100755 index 4fab1275116..00000000000 --- a/source/blender/freestyle/intern/INSTALL.TXT +++ /dev/null @@ -1,79 +0,0 @@ -Install -------- - -* UNIX/LINUX - -(for a more detailed description, see doc/linuxinstall.html) - - This is quite straightforward, provided that you have all the -needed libraries properly installed (see Requirements section in -the README.TXT file). -First, set the FREESTYLE-DIR environment variable to your -freestyle directory and then, simply type: - -$> cd "$FREESTYLE_DIR"/src -$> qmake -$> make - -Note: The SWIG wrapper hasn't been included in the qmake build -cycle yet and thus has to be compiled separately, by hand: - -$> cd "$FREESTYLE_DIR"/src/swig -$> make - -And to run the app: - -$> export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./lib" -$> cd "$FREESTYLE_DIR"/build/linux-g++/release/ -$> ./Freestyle - - -* WINDOWS - - - If you downloaded the binary version: - -1) unzip the package -2) run vcredist_x86.exe -3) run Freestyle.exe - -- Compilation Instructions: - -(for a more detailed description, including the cygwin -compilation instructions, see doc/wininstall.html) - -1) launch 'makedsp.vcnet.debug.bat' in the 'src' subdir of your FREESTYLE_DIR to generate - a .vcproj file for each sub-project -2) open 'src/Freestyle-vc8-debug.sln' with Visual Studio (tested with VC++ 8 express edition) -3) compile the whole project using 'build solution' in the 'build' menu -4) run the app and enjoy ;) - -* MAC OS X - -(for a more detailed description, see doc/macosxinstall.html) - - This is quite straightforward, provided that you have all the -needed libraries properly installed (see Requirements section in -the README.TXT file). -First, set the FREESTYLE-DIR environment variable to your -freestyle directory and then, simply type: - -$> cd "$FREESTYLE_DIR"/src -$> qmake -$> make - -Note: The SWIG wrapper hasn't been included in the qmake build -cycle yet and thus has to be compiled separately, by hand: - -$> cd "$FREESTYLE_DIR"/src/swig -$> make - -And to run the app: - -$> build_bundle.macosx.py -$> cd "$FREESTYLE_DIR"/ -$> open Freestyle.App - - -* IRIX - -Not tested yet... diff --git a/source/blender/freestyle/intern/LICENSE.TXT b/source/blender/freestyle/intern/LICENSE.TXT deleted file mode 100755 index 5b6e7c66c27..00000000000 --- a/source/blender/freestyle/intern/LICENSE.TXT +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/source/blender/freestyle/intern/Makefile.pro b/source/blender/freestyle/intern/Makefile.pro deleted file mode 100755 index 0e64bb342c3..00000000000 --- a/source/blender/freestyle/intern/Makefile.pro +++ /dev/null @@ -1,18 +0,0 @@ -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# W A R N I N G ! ! ! # -# a u t h o r i z e d p e r s o n a l o n l y # -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -TEMPLATE = subdirs -SUBDIRS = system \ - image \ - geometry \ - scene_graph \ - winged_edge \ - view_map \ - stroke \ - rendering \ -# swig \ - app - - diff --git a/source/blender/freestyle/intern/README.TXT b/source/blender/freestyle/intern/README.TXT deleted file mode 100755 index b0d026c8b9b..00000000000 --- a/source/blender/freestyle/intern/README.TXT +++ /dev/null @@ -1,51 +0,0 @@ -Freestyle, a procedural line drawing system -http://freestyle.sourceforge.net - -INTRODUCTION ------------- -Freestyle is a software for Non-Photorealistic Line Drawing rendering -from 3D scenes. It is designed as a programmable interface to allow -maximum control over the style of the final drawing: the user -"programs" how the silhouettes and other feature lines from the 3D -model should be turned into stylized strokes using a set of -programmable operators dedicated to style description. This -programmable approach, inspired by the shading languages available in -photorealistic renderers such as Pixar's RenderMan, overcomes the -limitations of integrated software with access to a limited number of -parameters and permits the design of an infinite variety of rich and -complex styles. The system currently focuses on pure line drawing as a -first step. The style description language is Python augmented with -our set of operators. Freestyle was developed in the framework of a -research project dedicated to the study of stylized line drawing -rendering from 3D scenes. Details about this research can be found at: - -http://artis.imag.fr/Projects/Style - -This software is distributed under -the terms of the GPL License. - -INSTALL -------- -Please see the file INSTALL.TXT for instructions on installation. - -REQUIREMENTS ------------- -- OpenGL >= 1.2 -- libQGLViewer = 2.2.5-1 -- lib3ds = 1.2 -- Qt = 4.2.3 -- SWIG = 1.3.31 -- Python = 2.5 - -For Linux and MacOSX: -- g++ = 4.0 or 4.1 - -For Windows: -- Visual Studio = 2003 or 2005 - -CONTACTING THE AUTHORS ----------------------- -See the AUTHORS.TXT file for contact information. - -Thank you for your interest in this project, we hope you enjoy using it. ---- diff --git a/source/blender/freestyle/intern/THANKS.TXT b/source/blender/freestyle/intern/THANKS.TXT deleted file mode 100755 index 3147715a63f..00000000000 --- a/source/blender/freestyle/intern/THANKS.TXT +++ /dev/null @@ -1,6 +0,0 @@ -The following is an incomplete list of people that have contributed to this -project in some way or another, in no particular order... - -* Thomas Netter (lib3ds fix) -* Gilles Debunne, creator and maintainer of the great libQGLViewer. -* Mark Rose, for his work on the SWIG director feature, and his help. diff --git a/source/blender/freestyle/intern/TODO.TXT b/source/blender/freestyle/intern/TODO.TXT deleted file mode 100755 index 2e24752e026..00000000000 --- a/source/blender/freestyle/intern/TODO.TXT +++ /dev/null @@ -1,9 +0,0 @@ -sgrabli: --------- - -* Update help and make it display correctly -* Recode the ViewMap building - the Y junctions are not detected for smooth objects right now. -* Check the strokes strippification code. It seems some parts are inverted. -* Fix the pbuffer so that ATI cards are supported - -* Merge Chain and Stroke classes (to Stroke) and improve the base of operators (select, chain, split, shade) consquently (also think about a way to easily specify the pipeline synchronization mode). diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp new file mode 100755 index 00000000000..c9ea2d1391d --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp @@ -0,0 +1,404 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "AppGLWidget.h" +#include "../image/Image.h" +#include "../system/TimeStamp.h" +#include "Controller.h" +#include "../stroke/StrokeRenderer.h" +#include "AppCanvas.h" +#include "../rendering/GLRenderer.h" +#include "../rendering/GLStrokeRenderer.h" +#include "../rendering/GLUtils.h" +#include "AppConfig.h" +#include "../system/StringUtils.h" + +#ifdef WIN32 +# include <windows.h> +# include "../rendering/extgl.h" +#endif +#ifdef __MACH__ +# include <OpenGL/gl.h> +#else +# include <GL/gl.h> +#endif + +AppCanvas::AppCanvas() +:Canvas() +{ + _pViewer = 0; + _blendEquation = true; + _MapsPath = StringUtils::toAscii( Config::Path::getInstance()->getMapsDir() ).c_str(); +} + +AppCanvas::AppCanvas(AppGLWidget* iViewer) +:Canvas() +{ + _pViewer = iViewer; + _blendEquation = true; +} + +AppCanvas::AppCanvas(const AppCanvas& iBrother) +:Canvas(iBrother) +{ + _pViewer = iBrother._pViewer; + _blendEquation = iBrother._blendEquation; +} + +AppCanvas::~AppCanvas() +{ + _pViewer = 0; +} + +void AppCanvas::SetViewer(AppGLWidget *iViewer) +{ + _pViewer = iViewer; +} + +int AppCanvas::width() const +{ + return _pViewer->width(); +} + +int AppCanvas::height() const +{ + return _pViewer->height(); +} + +BBox<Vec3r> AppCanvas::scene3DBBox() const +{ + return _pViewer->scene3DBBox(); +} + +void AppCanvas::preDraw() +{ + Canvas::preDraw(); + + _pViewer->prepareCanvas(); + glClearColor(0,0,0,0); + glClear(GL_COLOR_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + glDisable(GL_DEPTH_TEST); + glEnable(GL_TEXTURE_2D); + glEnable(GL_BLEND); +} + +void AppCanvas::init() +{ +#ifdef WIN32 + static bool firsttime = true; + if (firsttime) + { + if (extgl_Initialize() != 0) + cerr << "Error: problem occurred while initializing GL extensions" << endl; + else + cout << "GL extensions initialized" << endl; + + if(!glutils_extgl_GetProcAddress("glBlendEquation")){ + _blendEquation = false; + cout << "glBlendEquation unavailable on this hardware -> switching to strokes basic rendering mode" << endl; + } + firsttime=false; + } +#endif + + _Renderer = new GLStrokeRenderer; + if(!StrokeRenderer::loadTextures()) + { + cerr << "unable to load stroke textures" << endl; + return; + } +} + +void AppCanvas::postDraw() +{ + //inverse frame buffer + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); + _pViewer->releaseCanvas(); + + Canvas::postDraw(); +} + +void AppCanvas::Erase() +{ + Canvas::Erase(); + //_pViewer->clear(); +} + +#include "../image/GaussianFilter.h" +void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const +{ + //static unsigned number = 0; + float *rgb = new float[3*w*h]; + _pViewer->readPixels(x,y,w,h,AppGLWidget::RGB,rgb); + oImage.setArray(rgb, width(), height(), w,h, x, y, false); + // FIXME + // QImage qtmp(w, h, 32); + // for(unsigned py=0;py<h;++py){ + // for(unsigned px=0;px<w;++px){ + // int r = (int)255*(oImage.getR(x+px,y+py)); + // int g = (int)255*(oImage.getG(x+px,y+py)); + // int b = (int)255*(oImage.getB(x+px,y+py)); + // qtmp.setPixel(px,py,qRgb(r,g,b)); + // } + // } + // qtmp.save("densityQuery"+QString::number(number)+".png", "PNG"); + // if(number == 1090){ + // RGBImage img; + // float *rgbtmp = new float[3*width()*height()]; + // _pViewer->readPixels(0,0,width(),height(),AppGLWidget::RGB,rgbtmp); + // img.setArray(rgbtmp, width(), height(), width(), height(), 0, 0, false); + // QImage qtmp(width(), height(), 32); + // for(unsigned py=0;py<height();++py){ + // for(unsigned px=0;px<width();++px){ + // int r = (int)255*(img.getR(px,py)); + // int g = (int)255*(img.getG(px,py)); + // int b = (int)255*(img.getB(px,py)); + // qtmp.setPixel(px,height()-1-py,qRgb(r,g,b)); + // } + // } + // qtmp.save("densityQuery"+QString::number(number)+".png", "PNG"); + // + // GaussianFilter filter; + // filter.SetSigma(4.0); + // int bound = filter.getBound(); + // QImage qtmp2(width(), height(), 32); + // for(int py2=0;py2<height();++py2){ + // for(int px2=0;px2<width();++px2){ + // if( (px2-bound < 0) || (px2+bound>width()) + // || (py2-bound < 0) || (py2+bound>height())) + // continue; + // int g = 255*filter.getSmoothedPixel<RGBImage>(&img, px2,py2); + // qtmp2.setPixel(px2,height()-1-py2,qRgb(g,g,g)); + // } + // } + // qtmp2.save("blurredCausalDensity"+QString::number(number)+".png", "PNG"); + // } + // cout << number << endl; + // ++number; +} + +void AppCanvas::readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const +{ + float *rgb = new float[w*h]; + _pViewer->readPixels(x,y,w,h,AppGLWidget::DEPTH,rgb); + oImage.setArray(rgb, width(), height(), w,h, x, y, false); +} + +void AppCanvas::update() +{ +// static int counter = 0; +// char fileName[100] = "framebuffer"; +// char number[10]; +// + _pViewer->updateGL(); + _pViewer->swapBuffers(); + //QImage fb = _pViewer->grabFrameBuffer(); + // sprintf(number, "%3d", counter); + // strcat(fileName, number); + // strcat(fileName, ".bmp"); + // fb.save(fileName, "BMP"); + //counter++; +} + +void AppCanvas::Render(const StrokeRenderer *iRenderer) +{ + if(!_blendEquation){ + RenderBasic(iRenderer); + return; + } + + glClearColor(1,1,1,1); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + + if(_pViewer->draw3DsceneEnabled()) + { + glClearColor(1,1,1,0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glEnable(GL_LIGHTING); + glEnable(GL_DEPTH_TEST); + _pViewer->Set3DContext(); + _pViewer->DrawScene(_pViewer->glRenderer()); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + } + + + glDisable(GL_DEPTH_TEST); + glBlendEquation(GL_ADD); + + glBlendFunc(GL_DST_COLOR, GL_ZERO); + + if(_drawPaper) + { + glEnable(GL_BLEND); + glEnable(GL_TEXTURE_2D); + float zfar = _pViewer->zfar(); + zfar = zfar+0.1*zfar; + //draw background paper // FIXME + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glBindTexture(GL_TEXTURE_2D, StrokeRenderer::_textureManager->getPaperTextureIndex(_paperTextureIndex)); + glColor4f(1,1,1,0.0); + glBegin(GL_TRIANGLE_STRIP); + { + glTexCoord2f(0,0); glVertex3f(0, 0, -1); + glTexCoord2f(4,0); glVertex3f(2048, 0, -1); + glTexCoord2f(0,4); glVertex3f(0, 2048, -1); + glTexCoord2f(4,4); glVertex3f(2048, 2048, -1); + } + glEnd(); + } + + glPushAttrib(GL_COLOR_BUFFER_BIT); + glBlendEquation(GL_FUNC_SUBTRACT); + glBlendFunc(GL_ONE, GL_ONE); + + glDisable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glColor4f(1,1,1,1); + glBegin(GL_TRIANGLE_STRIP); + { + glVertex2f(0, 0); + glVertex2f(2048, 0); + glVertex2f(0, 2048); + glVertex2f(2048, 2048); + } + glEnd(); + glPopAttrib(); + + glDisable(GL_DEPTH_TEST); + glBlendEquation(GL_ADD); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + Canvas::Render(iRenderer); + // + glPushAttrib(GL_COLOR_BUFFER_BIT); + glBlendEquation(GL_FUNC_SUBTRACT); + glBlendFunc(GL_ONE, GL_ONE); + + glDisable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glColor3f(1,1,1); + glBegin(GL_TRIANGLE_STRIP); + { + glVertex2f(0, 0); + glVertex2f(2048, 0); + glVertex2f(0, 2048); + glVertex2f(2048, 2048); + } + glEnd(); + glPopAttrib(); + + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); +} + +void AppCanvas::RenderBasic(const StrokeRenderer *iRenderer) +{ + glClearColor(1,1,1,1); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + + if(_pViewer->draw3DsceneEnabled()) + { + glClearColor(1,1,1,0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glEnable(GL_LIGHTING); + glEnable(GL_DEPTH_TEST); + _pViewer->Set3DContext(); + _pViewer->DrawScene(_pViewer->glRenderer()); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + } + + glBlendFunc(GL_DST_COLOR, GL_ZERO); + if(_drawPaper) + { + glEnable(GL_BLEND); + glEnable(GL_TEXTURE_2D); + float zfar = _pViewer->zfar(); + zfar = zfar+0.1*zfar; + //draw background paper // FIXME + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glBindTexture(GL_TEXTURE_2D, StrokeRenderer::_textureManager->getPaperTextureIndex(_paperTextureIndex)); + glColor4f(1,1,1,0.0); + glBegin(GL_TRIANGLE_STRIP); + { + glTexCoord2f(0,0); glVertex3f(0, 0, -1); + glTexCoord2f(4,0); glVertex3f(2048, 0, -1); + glTexCoord2f(0,4); glVertex3f(0, 2048, -1); + glTexCoord2f(4,4); glVertex3f(2048, 2048, -1); + } + glEnd(); + } + + glDisable(GL_DEPTH_TEST); + glPushAttrib(GL_COLOR_BUFFER_BIT); + glEnable(GL_BLEND); + glPopAttrib(); + + glDisable(GL_DEPTH_TEST); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + Canvas::RenderBasic(iRenderer); + + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); +} + + +void AppCanvas::RenderStroke(Stroke *iStroke) { + iStroke->Render(_Renderer); + if(_pViewer->getRecordFlag()){ + //Sleep(1000); + _pViewer->saveSnapshot(true); + } +} diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.h b/source/blender/freestyle/intern/app_blender/AppCanvas.h new file mode 100755 index 00000000000..773bfc7f539 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.h @@ -0,0 +1,55 @@ +#ifndef ARTCANVAS_H +#define ARTCANVAS_H + +#include "../stroke/Canvas.h" + +//class AppGLWidget; +class AppCanvas : public Canvas +{ +private: + mutable AppGLWidget *_pViewer; + bool _blendEquation; +public: + AppCanvas(); + AppCanvas(AppGLWidget *iViewer); + AppCanvas(const AppCanvas& iBrother); + virtual ~AppCanvas(); + + /*! operations that need to be done before a draw */ + virtual void preDraw(); + + /*! operations that need to be done after a draw */ + virtual void postDraw(); + + /*! Erases the layers and clears the canvas */ + virtual void Erase(); + + /* init the canvas */ + virtual void init(); + + /*! Reads a pixel area from the canvas */ + virtual void readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const; + /*! Reads a depth pixel area from the canvas */ + virtual void readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const; + + virtual BBox<Vec3r> scene3DBBox() const ; + + /*! update the canvas (display) */ + virtual void update() ; + + /*! Renders the created strokes */ + virtual void Render(const StrokeRenderer *iRenderer); + virtual void RenderBasic(const StrokeRenderer *iRenderer); + virtual void RenderStroke(Stroke *iStroke) ; + + /*! accessors */ + virtual int width() const ; + virtual int height() const ; + inline const AppGLWidget * viewer() const {return _pViewer;} + + /*! modifiers */ + void SetViewer(AppGLWidget *iViewer) ; +}; + + +#endif diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp new file mode 100755 index 00000000000..44e25ee1321 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -0,0 +1,611 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include <iostream> +#include "../stroke/Canvas.h" +#include "AppGLWidget.h" +#include "../scene_graph/NodeLight.h" +#include "../rendering/GLRenderer.h" +#include "../rendering/GLSelectRenderer.h" +#include "../rendering/GLBBoxRenderer.h" +#include "../rendering/GLMonoColorRenderer.h" +#include "Controller.h" +#include "../view_map/Silhouette.h" +#include "../view_map/ViewMap.h" +#include "../scene_graph/LineRep.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/VertexRep.h" +#include "AppConfig.h" + +#include "../system/StringUtils.h" +#include "BLI_blenlib.h" +#include "IMB_imbuf.h" +#include "IMB_imbuf_types.h" + +// glut.h must be included last to avoid a conflict with stdlib.h on vc .net 2003 and 2005 +#ifdef __MACH__ +# include <GLUT/glut.h> +#else +# include <GL/glut.h> +#endif + +GLuint texture = 0; + +bool AppGLWidget::_frontBufferFlag = false; +bool AppGLWidget::_backBufferFlag = true; + +AppGLWidget::AppGLWidget(const char *iName) +{ + _Fovy = 30.f; + //_SceneDepth = 2.f; + _RenderStyle = LINE; + //_ModelRootNode->SetBBox(BBox<Vec3f>(Vec3f(-10.f, -10.f, -10.f), Vec3f(10.f, 10.f, 10.f))); + _ModelRootNode = new NodeDrawingStyle; + _SilhouetteRootNode = new NodeDrawingStyle; + _DebugRootNode = new NodeDrawingStyle; + + _RootNode.AddChild(_ModelRootNode); + _SilhouetteRootNode->SetStyle(DrawingStyle::LINES); + _SilhouetteRootNode->SetLightingEnabled(false); + _SilhouetteRootNode->SetLineWidth(2.f); + _SilhouetteRootNode->SetPointSize(3.f); + + _RootNode.AddChild(_SilhouetteRootNode); + + _DebugRootNode->SetStyle(DrawingStyle::LINES); + _DebugRootNode->SetLightingEnabled(false); + _DebugRootNode->SetLineWidth(1.f); + + _RootNode.AddChild(_DebugRootNode); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + + _camera->setZNearCoefficient(0.1); + + // 2D Scene + // _pFENode = new NodeDrawingStyle; + // _pFENode->SetStyle(DrawingStyle::LINES); + // _pFENode->SetLightingEnabled(false); + // _pFENode->SetLineWidth(1.f); + // + // _p2DNode.AddChild(_pFENode); + // + // _pVisibleSilhouetteNode = new NodeDrawingStyle; + // _pVisibleSilhouetteNode->SetStyle(DrawingStyle::LINES); + // _pVisibleSilhouetteNode->SetLightingEnabled(false); + // _pVisibleSilhouetteNode->SetLineWidth(3.f); + // + // _p2DNode.AddChild(_pVisibleSilhouetteNode); + // + _p2DSelectionNode = new NodeDrawingStyle; + _p2DSelectionNode->SetLightingEnabled(false); + _p2DSelectionNode->SetStyle(DrawingStyle::LINES); + _p2DSelectionNode->SetLineWidth(5.f); + + _p2DNode.AddChild(_p2DSelectionNode); + + _pGLRenderer = new GLRenderer; + _pSelectRenderer = new GLSelectRenderer; + _pBBoxRenderer = new GLBBoxRenderer; + _pMonoColorRenderer = new GLMonoColorRenderer; + _pDebugRenderer = new GLDebugRenderer; + + _pMainWindow = NULL; + _cameraStateSaved = false; + _drawBBox = false; + _silhouette = false; + _fedges = false; + _debug = false; + _selection_mode = false; + _Draw2DScene = true; + _Draw3DScene = true; + _drawEnvMap = false; + _currentEnvMap = 1; + _maxId = 0; + _blendFunc = 0; + + const string sep(Config::DIR_SEP); + const string filename = Config::Path::getInstance()->getHomeDir() + sep + + Config::OPTIONS_DIR + sep + Config::OPTIONS_QGLVIEWER_FILE; + setStateFileName(filename); + + //get camera frame: + //qglviewer::Camera * cam = camera(); + //qglviewer::ManipulatedFrame * fr = cam->frame() ; + + //soc _enableupdateSilhouettes = false; + + _captureMovie = false; + // _frontBufferFlag = false; + // _backBufferFlag = true; + _record = false; + +_camera = new Camera; + +} + +AppGLWidget::~AppGLWidget() +{ + int ref = _RootNode.destroy(); + + _Light.destroy(); + ref = _p2DNode.destroy(); + + if(NULL != _pGLRenderer) + { + delete _pGLRenderer; + _pGLRenderer = NULL; + } + + if(NULL != _pSelectRenderer) + { + delete _pSelectRenderer; + _pSelectRenderer = NULL; + } + + if(NULL != _pBBoxRenderer) + { + delete _pBBoxRenderer; + _pBBoxRenderer = NULL; + } + + if(NULL != _pMonoColorRenderer) + { + delete _pMonoColorRenderer; + _pMonoColorRenderer = NULL; + } + + if(NULL != _pDebugRenderer) + { + delete _pDebugRenderer; + _pDebugRenderer = NULL; + } + + makeCurrent(); + //saveToFile(filename); +} + + + +void AppGLWidget::LoadEnvMap(const char *filename) +{ + GLuint textureId; + //sgiImage img; + //cout << filename << endl; + ImBuf *image = IMB_loadiffname(filename, 0); + + //data = img.read(filename); // tres beau bleu gris mauve!! + // allocate a texture name + glGenTextures( 1, &textureId ); + if(textureId > (GLuint) _maxId) + _maxId = textureId; + + // select our current texture + glBindTexture( GL_TEXTURE_2D, textureId ); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + GL_NEAREST); + + glTexImage2D(GL_TEXTURE_2D, 0,GL_RGBA, image->x, image->y, 0, + GL_RGBA, GL_UNSIGNED_BYTE, image->rect ); +} + +void AppGLWidget::init() +{ + //setShortcut(QGLViewer::EXIT_VIEWER, 0); +// setShortcut(QGLViewer::DISPLAY_Z_BUFFER, 0); + //setShortcut(QGLViewer::STEREO, 0); + //setShortcut(QGLViewer::ANIMATION, 0); + //setShortcut(QGLViewer::EDIT_CAMERA, 0); + + //restoreStateFromFile(); + + //trackball().fitBBox(_ModelRootNode->bbox().getMin(), _ModelRootNode->bbox().getMax(), _Fovy); + + glClearColor(1,1,1,0); + glShadeModel(GL_SMOOTH); + + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + glEnable(GL_DEPTH_TEST); + + // open and read texture data + Config::Path * cpath = Config::Path::getInstance(); + string envmapDir = cpath->getEnvMapDir(); + LoadEnvMap( StringUtils::toAscii(envmapDir + string("gray00.png")).c_str() ); + //LoadEnvMap(Config::ENV_MAP_DIR + "gray01.bmp"); + LoadEnvMap( StringUtils::toAscii(envmapDir + string("gray02.png")).c_str() ); + LoadEnvMap( StringUtils::toAscii(envmapDir + string("gray03.png")).c_str() ); + LoadEnvMap( StringUtils::toAscii(envmapDir + string("brown00.png")).c_str() ); + glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP) ; + glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP) ; + + // gl settings for Environmental Texturing: + glColor3f(1, 1, 1); + + // Use GL auto-computed enviroment texture coordinates + //glEnable(GL_TEXTURE_GEN_S); + //glEnable(GL_TEXTURE_GEN_T); + + // Bind the texture to use + //glBindTexture(GL_TEXTURE_2D,texture); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + //glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + + // parametres de melange + //glBlendFunc(GL_ONE, GL_ONE); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + //glBlendEquatio(GL_FUNC_ADD); + + //glEnable(GL_BLEND); + NodeLight *light = new NodeLight; + _Light.AddChild(light); + + // Change QGLViewer's default shortcut for snapshots + //setShortcut(QGLViewer::SAVE_SCREENSHOT, Qt::CTRL + Qt::Key_W); + // setShortcutKey (QGLViewer::SAVE_SCREENSHOT, Key_W); + // setShortcutStateKey(QGLViewer::SAVE_SCREENSHOT, ControlButton); + + cout << "Renderer (GL) : " << glGetString(GL_RENDERER) << endl + << "Vendor (GL) : " << glGetString(GL_VENDOR) << endl << endl; +} + +void AppGLWidget::draw() +{ + if (true == _Draw3DScene) + { + if (true == _selection_mode) { + _pSelectRenderer->setSelectRendering(false); + _pSelectRenderer->resetColor(); + DrawScene(_pSelectRenderer); + } else + DrawScene(_pGLRenderer); + + if (true == _silhouette) + DrawSilhouette(); + + if (true == _drawBBox) { + glPushAttrib(GL_ALL_ATTRIB_BITS); + _ModelRootNode->accept(*_pBBoxRenderer); + glPopAttrib(); + } + + if (true == _debug) { + glPushAttrib(GL_ALL_ATTRIB_BITS); + _DebugRootNode->accept(*_pDebugRenderer); + glPopAttrib(); + } + } + + if (true == _Draw2DScene) { + Draw2DScene(_pGLRenderer); + Set3DContext(); + } + if(_record){ + saveSnapshot(true); + } +} + +void AppGLWidget::DrawScene(SceneVisitor *iRenderer) +{ + glPushAttrib(GL_ALL_ATTRIB_BITS); + + if(_drawEnvMap) + { + _ModelRootNode->SetLightingEnabled(false); + glEnable(GL_COLOR_MATERIAL); + + glEnable(GL_TEXTURE_2D); + // Bind the texture to use + glBindTexture(GL_TEXTURE_2D,_currentEnvMap); + switch(_blendFunc) + { + case 0: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + break; + case 1: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE) ; + glDisable(GL_BLEND); + break; + // case 2: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + // glEnable(GL_BLEND); + // break; + // case 3: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR); + // glEnable(GL_BLEND); + // break; + // case 4: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA); + // glEnable(GL_BLEND); + // break; + default: + break; + } + + glEnable(GL_TEXTURE_GEN_S); + glEnable(GL_TEXTURE_GEN_T); + } + + // FIXME + // //_ModelRootNode->SetLightingEnabled(true); + // if(_ModelRootNode->style() == DrawingStyle::LINES){ + // glPushAttrib(GL_ALL_ATTRIB_BITS); + // //glDisable(GL_COLOR_MATERIAL); + // _ModelRootNode->SetStyle(DrawingStyle::FILLED); + // _ModelRootNode->SetLightingEnabled(true); + // _ModelRootNode->accept(*iRenderer); + // _ModelRootNode->SetStyle(DrawingStyle::LINES); + // _ModelRootNode->SetLightingEnabled(false); + // _ModelRootNode->accept(*iRenderer); + // glPopAttrib(); + // } + // else + _ModelRootNode->accept(*iRenderer); + + glDisable(GL_TEXTURE_GEN_S); + glDisable(GL_TEXTURE_GEN_T); + glDisable(GL_TEXTURE_2D); + glDisable(GL_COLOR_MATERIAL); + _ModelRootNode->SetLightingEnabled(true); + + if(_fedges == true) + _SilhouetteRootNode->accept(*iRenderer); + + // FIXME: deprecated +// if(_debug == true) +// _DebugRootNode->accept(*iRenderer); + + glPopAttrib(); +} + +void AppGLWidget::prepareCanvas() +{ + makeCurrent(); + glPushAttrib(GL_ALL_ATTRIB_BITS); + + if(_frontBufferFlag){ + if(_backBufferFlag) + glDrawBuffer(GL_FRONT_AND_BACK); + else + glDrawBuffer(GL_FRONT); + } + else if(_backBufferFlag) + glDrawBuffer(GL_BACK); + + // Projection Matrix + //================== + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glOrtho(0,width(), 0, height(), -1.0, 1.0); + + //Modelview Matrix + //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + +void AppGLWidget::releaseCanvas() +{ + makeCurrent(); + glDrawBuffer(GL_BACK); + glPopAttrib(); +} + +void AppGLWidget::Draw2DScene(SceneVisitor *iRenderer) +{ + static bool first = 1; + glPushAttrib(GL_ALL_ATTRIB_BITS); + +// // Projection Matrix +// //================== + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0,width(), 0, height(), -1.0, 1.0); + +// //Modelview Matrix +// //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + // glBegin(GL_LINE_LOOP); + // glVertex2f(0,0); + // glVertex2f(100,0); + // glVertex2f(100,100); + // glVertex2f(0,100); + // glEnd(); + + //glDrawBuffer(GL_FRONT_AND_BACK); + // Draw visible silhouette + //_pVisibleSilhouetteNode->Render(iRenderer); + Canvas * canvas = Canvas::getInstance(); + if((canvas) && (!canvas->isEmpty())) + { + if (first) + { + canvas->init(); + first = false; + } + canvas->Render(canvas->renderer()); + } + + glLoadIdentity(); + // glColor3f(0.f,1.f,0.f); + // glLineWidth(5.f); + //glPolygonOffset(0.5f, 0.5f); + glPushAttrib(GL_DEPTH_BUFFER_BIT); + glDisable(GL_DEPTH_TEST); + _p2DSelectionNode->accept(*iRenderer); + glPopAttrib(); + // Draw Feature edges + // if(_fedges == true) + // { + // _pFENode->Render(iRenderer); + // } + + glPopAttrib(); +} + +void AppGLWidget::DrawSilhouette() +{ + glPushAttrib(GL_ALL_ATTRIB_BITS); + + glDepthFunc(GL_LESS); + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + DrawScene(_pMonoColorRenderer); + + glCullFace(GL_FRONT); + glDepthFunc(GL_LEQUAL); + glEnable(GL_POLYGON_OFFSET_FILL); + glLineWidth(3.0); + //glPolygonOffset(10.f, 10.f); + glPolygonOffset(0.5f, 0.5f); + + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + _pMonoColorRenderer->setColor(0.f, 0.f, 0.f); + DrawScene(_pMonoColorRenderer); + + //Restore old context + glPopAttrib(); + +} + +void AppGLWidget::ReInitRenderers() +{ + // Debug Renderer + if(NULL != _pDebugRenderer) + _pDebugRenderer->ReInit(rabs(_ModelRootNode->bbox().getMax()[1] - + _ModelRootNode->bbox().getMin()[1])); +} + +void AppGLWidget::setFrontBufferFlag(bool iBool){ + _frontBufferFlag = iBool; +} +bool AppGLWidget::getFrontBufferFlag() { + return _frontBufferFlag; +} +void AppGLWidget::setBackBufferFlag(bool iBool){ + _backBufferFlag = iBool; +} +bool AppGLWidget::getBackBufferFlag() { + return _backBufferFlag; +} + +//void AppGLWidget::DrawLines() +//{ +// //Antialiasing: +// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +// glEnable(GL_BLEND); +// glEnable(GL_LINE_SMOOTH); +// glPolygonMode(GL_FRONT, GL_LINE); +// +// glColor3f(0.f, 0.f, 0.f); +// glLineWidth(2.f); +// +// DrawScene(); +//} +// +//void AppGLWidget::DrawSurfacic() +//{ +// glPolygonMode(GL_FRONT, GL_FILL); +// glShadeModel(GL_SMOOTH); +// +// glEnable(GL_LIGHTING); +// glEnable(GL_LIGHT0); +// +// +// GLreal diffuseV[] = {0.5, 0.7, 0.5, 1.0}; +// glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuseV); +// +// //glColor3f(0.f, 0.f, 0.f); +// +// DrawScene(); +// +// glDisable(GL_LIGHTING); +//} +// +//void AppGLWidget::DrawDepthBuffer() +//{ +// GLint w = width(); +// GLint h = height(); +// +// glPolygonMode(GL_FRONT, GL_FILL); +// +// //Disable the writing in the frame buffer +// glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); +// +// //This rendering will only fills the depth buffer +// DrawScene(); +// +// //Re-enable the frame buffer writing +// glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); +// +// +// GLreal *zPixels = new real[w*h]; +// GLreal *colorPixels = new real[4*w*h]; +// +// // glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK +// glReadPixels(0,0,w, h, GL_DEPTH_COMPONENT, GL_real, (GLreal*)zPixels); +// +// real *tmpZ = zPixels; +// real *tmpColor = colorPixels; +// +// for(int i=0; i<h; i++) +// { +// for(int j=0; j<w; j++) +// { +// //fprintf(test, " %.5f ", pixels[i*w+j]); +// tmpColor[0] = *tmpZ; +// tmpColor[1] = *tmpZ; +// tmpColor[2] = *tmpZ; +// tmpColor[3] = 1.f; +// +// tmpColor += 4; +// tmpZ++; +// } +// } +// glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); +// // glDrawBuffer(GL_FRONT_AND_BACK); +// //glRasterPos2i(0, 0); +// //glLoadIdentity(); +// glDrawPixels(w, h, GL_RGBA, GL_real, (GLreal *)colorPixels); +// +// delete [] zPixels; +// delete [] colorPixels; +//} + diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h new file mode 100755 index 00000000000..0d10049ee15 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -0,0 +1,593 @@ +// +// Filename : AppConfig.h +// Author : Stephane Grabli +// Purpose : Configuration file +// Date of creation : 26/02/2003 +// +/////////////////////////////////////////////////////////////////////////////// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ARTGLWIDGET_H +# define ARTGLWIDGET_H + +# ifndef WIN32 +# include <algorithm> +using namespace std; +# define __min(x,y) (min(x,y)) +# define __max(x,y) (max(x,y)) +# endif // WIN32 + + +//# include <qstringlist.h> +# include "../geometry/Geom.h" +# include "../geometry/BBox.h" +# include "../scene_graph/NodeDrawingStyle.h" +# include "../system/TimeUtils.h" +# include "../system/Precision.h" +# include "AppConfig.h" +# include "../rendering/GLDebugRenderer.h" +//# include <QGLViewer/qglviewer.h> + +using namespace Geometry; + +typedef enum {SURFACIC, LINE, DEPTHBUFFER} RenderStyle; + +class FEdge; +class QMainWindow; +class GLRenderer; +class GLSelectRenderer; +class GLBBoxRenderer; +class GLMonoColorRenderer; +class GLDebugRenderer; + +class Vec{ +public: + Vec() {}; + Vec(float _x, float _y, float _z): x(_x), y(_y), z(_z) {}; + ~Vec() {} + + float operator[] (unsigned i) { + switch(i){ + case 0: return x; break; + case 1: return y; break; + case 2: return z; break; + } + return 0.0; + } + + + float x,y,z; +}; + +class Quaternion{ +public: + Quaternion( float _x, float _y, float _z, float _s): x(_x), y(_y), z(_z), s(_s){}; + ~Quaternion() {} + + float operator[] (unsigned i) { + switch(i){ + case 0: return x; break; + case 1: return y; break; + case 2: return z; break; + case 3: return s; break; + } + return 0.0; + } + + float x,y,z,s; +}; + +class Camera { + private: + float _position[3]; + float _orientation[3]; + + public: + Camera(){}; + ~Camera() {}; + + void setZNearCoefficient(float f) {} + void playPath(int i) {} + + void loadProjectionMatrix() {} + void loadModelViewMatrix() {} + real distanceToSceneCenter() { return 0;} + void showEntireScene() {} + real zFar() {return 0;} + real zNear() {return 0;} + void setPosition(Vec v) {} + void setOrientation(Quaternion q) {} + float* position() { return _position; } + float* orientation() { return _orientation; } + void getWorldCoordinatesOf(float *src, float *vp_tmp) {} + +}; + + +//class AppGLWidget : public QGLViewer +class AppGLWidget +{ + //Q_OBJECT + + +public: + + AppGLWidget(const char *iName = 0); + virtual ~AppGLWidget(); + +public: + + inline void swapBuffers() {} + inline void updateGL() {} + inline void makeCurrent() {} + inline void setSceneBoundingBox(Vec &min_, Vec &max_) {} + inline void saveSnapshot(bool b) {} + inline real width() { return _width; } + inline real height() { return _height; } + void setStateFileName(const string& name) { stateFileName_ = name; }; + + +Camera * _camera; + + // captures a frame animation that was previously registered + void captureMovie(); + + /*! Sets the rendering style. + iStyle + The style used to render. Can be: + SURFACIC : usual rendering + LINES : line rendering + DEPTHBUFFER : grey-levels rendering of the depth buffer + */ + inline void SetRenderStyle(RenderStyle iStyle) + { + _RenderStyle = iStyle; + } + + /*! Sets the model to draw in the viewer + * iModel + * The Root Node of the model + */ + inline void SetModel(NodeGroup *iModel) + { + if(0 != _ModelRootNode->numberOfChildren()) + { + _ModelRootNode->DetachChildren(); + _ModelRootNode->clearBBox(); + } + + AddModel(iModel); + } + + /*! Adds a model for displaying in the viewer */ + inline void AddModel(NodeGroup *iModel) + { + _ModelRootNode->AddChild(iModel); + + _ModelRootNode->UpdateBBox(); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + + // DEBUG: + ReInitRenderers(); + + } + + inline void AddSilhouette(NodeGroup* iSilhouette) + { + _SilhouetteRootNode->AddChild(iSilhouette); + //ToggleSilhouette(true); + updateGL(); + } + + inline void Add2DSilhouette(NodeGroup *iSilhouette) + { + //_pFENode->AddChild(iSilhouette); + //ToggleSilhouette(true); + updateGL(); + } + + inline void Add2DVisibleSilhouette(NodeGroup *iVSilhouette) + { + //_pVisibleSilhouetteNode->AddChild(iVSilhouette); + updateGL(); + } + + inline void SetDebug(NodeGroup* iDebug) + { + if(0 != _DebugRootNode->numberOfChildren()) + { + _DebugRootNode->DetachChildren(); + _DebugRootNode->clearBBox(); + } + + AddDebug(iDebug); + } + + inline void AddDebug(NodeGroup* iDebug) + { + _DebugRootNode->AddChild(iDebug); + updateGL(); + } + + inline void DetachModel(Node *iModel) + { + _ModelRootNode->DetachChild(iModel); + _ModelRootNode->UpdateBBox(); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + } + + inline void DetachModel() + { + _ModelRootNode->DetachChildren(); + _ModelRootNode->clearBBox(); + + // 2D Scene + //_p2DNode.DetachChildren(); + //_pFENode->DetachChildren(); + //_pVisibleSilhouetteNode->DetachChildren(); + updateGL(); + } + + inline void DetachSilhouette() + { + _SilhouetteRootNode->DetachChildren(); + //_pFENode->DetachChildren(); + //_pVisibleSilhouetteNode->DetachChildren(); + _p2DSelectionNode->destroy(); + //updateGL(); //FIXME + } + + inline void DetachVisibleSilhouette() + { + //_pVisibleSilhouetteNode->DetachChildren(); + _p2DSelectionNode->destroy(); + updateGL(); + } + + inline void DetachDebug() + { + _DebugRootNode->DetachChildren(); + updateGL(); + } + + void SetMainWindow(QMainWindow *iMainWindow) ; + + inline void Set3DContext() + { + // GL_PROJECTION matrix + _camera->loadProjectionMatrix(); + // GL_MODELVIEW matrix + _camera->loadModelViewMatrix(); + } + + inline void RetriveModelViewMatrix(float *p) + { + makeCurrent(); + glGetFloatv(GL_MODELVIEW_MATRIX, p); + } + inline void RetriveModelViewMatrix(real *p) + { + makeCurrent(); + glGetDoublev(GL_MODELVIEW_MATRIX, p); + } + + inline void RetrieveProjectionMatrix(float *p) + { + makeCurrent(); + glGetFloatv(GL_PROJECTION_MATRIX, p); + + } + inline void RetrieveProjectionMatrix(real *p) + { + makeCurrent(); + glGetDoublev(GL_PROJECTION_MATRIX, p); + + } + + inline void RetrieveViewport(int *p) + { + makeCurrent(); + glGetIntegerv(GL_VIEWPORT,(GLint *)p); + } + + inline real GetFocalLength() const + { + real Near = __max(0.1,(real)(-2.f*_maxAbs+_camera->distanceToSceneCenter())); + return Near; + } + + inline real GetAspect() const + { + return ((real) _width/(real) _height); + } + + inline real GetFovyRadian() const + { + return _Fovy/180.0 * M_PI; + } + + inline real GetFovyDegrees() const + { + return _Fovy; + } + + inline void FitBBox() + { + Vec min_(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1], + _ModelRootNode->bbox().getMin()[2]); + Vec max_(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1], + _ModelRootNode->bbox().getMax()[2]); + setSceneBoundingBox(min_, max_); + _camera->showEntireScene(); + } + + inline void ToggleSilhouette(bool enabled) + { + _fedges = enabled; + updateGL(); + } + + // Reinit the renderers which need to be informed + // when a model is added to the scene. + void ReInitRenderers(); + + inline void SetSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->SetSelectedFEdge(iFEdge); } + + inline GLDebugRenderer* debugRenderer() { return _pDebugRenderer; } + inline void toggle3D() { _Draw3DScene == true ? _Draw3DScene = false : _Draw3DScene = true; updateGL();} + + /*! glReadPixels */ + typedef enum{ + RGB, + DEPTH + } PixelFormat; + void readPixels(int x, + int y, + int width, + int height, + PixelFormat format, + float *pixels) + { + makeCurrent(); + //glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK + glReadBuffer(GL_BACK); + GLenum glformat; + switch(format) + { + case RGB: + glformat = GL_RGB; + break; + case DEPTH: + glformat = GL_DEPTH_COMPONENT; + break; + default: + break; + } + glReadPixels(x,y,width, height, glformat, GL_FLOAT, (GLfloat*)pixels); + } + + void clear() { makeCurrent(); glClear(GL_COLOR_BUFFER_BIT ); } + + void prepareCanvas(); + void releaseCanvas(); + + typedef enum { + FRONT, + BACK + } GLBuffer; + + void setReadPixelsBuffer(int iBuffer) + { + makeCurrent(); + switch(iBuffer) + { + case FRONT: + glReadBuffer(GL_FRONT); + break; + case BACK: + glReadBuffer(GL_BACK); + break; + default: + break; + } + } + + BBox<Vec3r> scene3DBBox() const { return _ModelRootNode->bbox(); } + + inline real znear() const { + return _camera->zNear(); + } + + inline real zfar() const { + return _camera->zFar(); + } + + inline bool draw3DsceneEnabled() const { return _Draw3DScene; } + + inline bool getRecordFlag() const {return _record;} + + void setCameraState(const float* position, const float* orientation) { + _camera->setPosition(Vec(position[0], position[1], position[2])); + _camera->setOrientation(Quaternion(orientation[0], orientation[1], orientation[2], orientation[3])); + } + + void getCameraState(float* position, float* orientation) const { + float* pos = _camera->position(); + float* orient = _camera->orientation(); + int i; + for(i=0;i<3;++i){ + position[i] = pos[i]; + } + for(i=0;i<4;++i){ + orientation[i] = orient[i]; + } + } + + void saveCameraState() { + getCameraState(_cameraPosition, _cameraOrientation); + _cameraStateSaved = true; + } + + void setUpdateMode(bool b) { + _enableUpdateSilhouettes = b; + } + + bool getUpdateMode() const { + return _enableUpdateSilhouettes; + } + static void setFrontBufferFlag(bool iBool); + static bool getFrontBufferFlag(); + static void setBackBufferFlag(bool iBool); + static bool getBackBufferFlag(); + +protected: + virtual void init(); + virtual void draw(); + + /*! Loads an envmap */ + void LoadEnvMap(const char *filename); + +public: + /*! Core scene drawing */ + void DrawScene(SceneVisitor *iRenderer); + + /*! 2D Scene Drawing */ + void Draw2DScene(SceneVisitor *iRenderer); + + /*! Draws scene silhouettes in real time */ + void DrawSilhouette(); + + /*! Draws the Scene in lines style */ + // void DrawLines(); + // /*! Draws the scene in surfacic style */ + // void DrawSurfacic(); + // /*! Draws the scene as a depth buffer image */ + // void DrawDepthBuffer(); + + GLRenderer* glRenderer() {return _pGLRenderer;} + +protected: + + + //QString shortcutBindingsString() const; + + /*! fabs or abs */ + inline int rabs(int x) {return abs(x);} + inline real rabs(real x) {return fabs(x);} + + +protected: + float _Fovy; + //float _SceneDepth; + //BBox<Vec3f> _BBox; + + RenderStyle _RenderStyle; + + //The root node container + NodeGroup _RootNode; + NodeDrawingStyle *_ModelRootNode; + NodeDrawingStyle *_SilhouetteRootNode; + NodeDrawingStyle *_DebugRootNode; + + bool _silhouette; + bool _fedges; + bool _debug; + bool _selection_mode; + + //a Universal light: + NodeGroup _Light; + + real _minBBox; + real _maxBBox; + real _maxAbs; + + real _minAbs; + bool _drawBBox; + + // OpenGL Renderer + GLRenderer *_pGLRenderer; + GLSelectRenderer *_pSelectRenderer; + GLBBoxRenderer *_pBBoxRenderer; + GLMonoColorRenderer *_pMonoColorRenderer; + GLDebugRenderer *_pDebugRenderer; + + QMainWindow *_pMainWindow; + + Chronometer _Chrono; + + // 2D Scene + bool _Draw2DScene; + bool _Draw3DScene; NodeGroup _p2DNode; + //NodeDrawingStyle *_pFENode; // Feature edges node + //NodeDrawingStyle *_pVisibleSilhouetteNode; + NodeDrawingStyle *_p2DSelectionNode; + + // EnvMap + bool _drawEnvMap; + int _currentEnvMap; + int _maxId; + int _blendFunc; + + // Each time we compute the view map, the camera state is + // saved in order to be able to restore it later + bool _cameraStateSaved; + float _cameraPosition[3]; + float _cameraOrientation[4]; + + // interactive silhouette update + bool _enableUpdateSilhouettes; + //capture movie + bool _captureMovie; + // 2D drawing buffers + static bool _frontBufferFlag; + static bool _backBufferFlag; + + bool _record; + + +real _width, _height; +Vec _min,_max; +string stateFileName_; +}; + +#endif // ARTGLWIDGET_H diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp new file mode 100755 index 00000000000..edc1b7f663a --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -0,0 +1,1050 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +// Must be included before any QT header, because of moc +#include "../system/PythonInterpreter.h" + +#include <string> +#include <fstream> +#include <float.h> + +#include "AppGLWidget.h" +#include "AppCanvas.h" +#include "AppConfig.h" + + +#include "../system/StringUtils.h" +#include "../scene_graph/MaxFileLoader.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/NodeTransform.h" +#include "../scene_graph/NodeDrawingStyle.h" +#include "../winged_edge/WingedEdgeBuilder.h" +#include "../winged_edge/WEdge.h" +#include "../scene_graph/VertexRep.h" +#include "../winged_edge/WXEdgeBuilder.h" +#include "../scene_graph/ScenePrettyPrinter.h" +#include "../winged_edge/WFillGrid.h" + +#include "../view_map/ViewMapTesselator.h" +#include "../stroke/StrokeTesselator.h" +#include "../view_map/ViewMapIO.h" +#include "Controller.h" +#include "../view_map/ViewMap.h" +#include "../winged_edge/Curvature.h" +//#include "QGLBasicWidget.h" +//#include <qimage.h> +#include "../image/Image.h" +#include "../view_map/SteerableViewMap.h" +#include "../stroke/PSStrokeRenderer.h" +#include "../stroke/TextStrokeRenderer.h" +#include "../stroke/StyleModule.h" + +#ifndef WIN32 +//# include "GLXOffscreenBuffer.h" +//# include "GLXOffscreenBuffer.h" +#endif + +#include "../system/StringUtils.h" + + +Controller::Controller() +{ + const string sep(Config::DIR_SEP.c_str()); + const string filename = Config::Path::getInstance()->getHomeDir() + sep + + Config::OPTIONS_DIR + sep + Config::OPTIONS_CURRENT_DIRS_FILE; + //_current_dirs = new ConfigIO(filename, Config::APPLICATION_NAME + "CurrentDirs", true); + + _RootNode = new NodeGroup; + _RootNode->addRef(); + + _SilhouetteNode = NULL; + //_ProjectedSilhouette = NULL; + //_VisibleProjectedSilhouette = NULL; + + _DebugNode = new NodeGroup; + _DebugNode->addRef(); + + _winged_edge = NULL; + + _pView = NULL; + + _edgeTesselationNature = (Nature::SILHOUETTE | Nature::BORDER | Nature::CREASE); + + _SceneNumFaces = 0; + _minEdgeSize = DBL_MAX; + _bboxDiag = 0; + + _ViewMap = 0; + + _Canvas = 0; + + _VisibilityAlgo = ViewMapBuilder::ray_casting; + //_VisibilityAlgo = ViewMapBuilder::ray_casting_fast; + + _Canvas = new AppCanvas; + + _inter = new PythonInterpreter; + _EnableQI = true; + _ComputeRidges = true; + _ComputeSteerableViewMap = false; + _ComputeSuggestive = true; + _sphereRadius = 1.0; +} + +Controller::~Controller() +{ + if(NULL != _RootNode) + { + int ref = _RootNode->destroy(); + if(0 == ref) + delete _RootNode; + } + + if(NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + delete _DebugNode; + } + + if(_winged_edge) { + delete _winged_edge; + _winged_edge = NULL; + } + + if(0 != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + if(0 != _Canvas) + { + delete _Canvas; + _Canvas = 0; + } + + if (_inter) { + delete _inter; + _inter = NULL; + } + + //delete _current_dirs; +} + +void Controller::SetView(AppGLWidget *iView) +{ + if(NULL == iView) + return; + + _pView = iView; + _Canvas->SetViewer(_pView); +} + + +int Controller::Load3DSFile(const char *iFileName) +{ + if (_pView) + _pView->setUpdateMode(false); + + MaxFileLoader loader3DS(iFileName); + //_RootNode->AddChild(BuildSceneTest()); + + _Chrono.start(); + + NodeGroup *maxScene = loader3DS.Load(); + + if (maxScene == NULL) { + return 1; + } + + printf("Mesh cleaning : %lf\n", _Chrono.stop()); + _SceneNumFaces += loader3DS.numFacesRead(); + + if(loader3DS.minEdgeSize() < _minEdgeSize) + { + _minEdgeSize = loader3DS.minEdgeSize(); + _EPSILON = _minEdgeSize*1e-6; + if(_EPSILON < DBL_MIN) + _EPSILON = 0.0; + } + + cout << "Epsilon computed : " << _EPSILON << endl; + + // DEBUG +// ScenePrettyPrinter spp; +// maxScene->accept(spp); + + _RootNode->AddChild(maxScene); + _RootNode->UpdateBBox(); // FIXME: Correct that by making a Renderer to compute the bbox + + _pView->SetModel(_RootNode); + _pView->FitBBox(); + + _Chrono.start(); + + + WXEdgeBuilder wx_builder; + maxScene->accept(wx_builder); + _winged_edge = wx_builder.getWingedEdge(); + + printf("WEdge building : %lf\n", _Chrono.stop()); + + _Chrono.start(); + + _Grid.clear(); + Vec3r size; + for(unsigned int i=0; i<3; i++) + { + size[i] = fabs(_RootNode->bbox().getMax()[i] - _RootNode->bbox().getMin()[i]); + size[i] += size[i]/10.0; // let make the grid 1/10 bigger to avoid numerical errors while computing triangles/cells intersections + if(size[i]==0){ + cout << "Warning: the bbox size is 0 in dimension "<<i<<endl; + } + } + _Grid.configure(Vec3r(_RootNode->bbox().getMin() - size / 20.0), size, + _SceneNumFaces); + + // Fill in the grid: + WFillGrid fillGridRenderer(&_Grid, _winged_edge); + fillGridRenderer.fillGrid(); + + printf("Grid building : %lf\n", _Chrono.stop()); + + // DEBUG +// _Grid.displayDebug(); + + _pView->SetDebug(_DebugNode); + + //delete stuff + // if(0 != ws_builder) + // { + // delete ws_builder; + // ws_builder = 0; + // } + _pView->updateGL(); + + + //soc QFileInfo qfi(iFileName); + //soc string basename((const char*)qfi.fileName().toAscii().data()); + char cleaned[FILE_MAX]; + BLI_strncpy(cleaned, iFileName, FILE_MAX); + BLI_cleanup_file(NULL, cleaned); + string basename = StringUtils::toAscii( string(cleaned) ); + + _ListOfModels.push_back(basename); + + cout << "Triangles nb : " << _SceneNumFaces << endl; + _bboxDiag = (_RootNode->bbox().getMax()-_RootNode->bbox().getMin()).norm(); + cout << "Bounding Box : " << _bboxDiag << endl; + return 0; +} + +void Controller::CloseFile() +{ + WShape::SetCurrentId(0); + _pView->DetachModel(); + _ListOfModels.clear(); + if(NULL != _RootNode) + { + int ref = _RootNode->destroy(); + if(0 == ref) + _RootNode->addRef(); + + _RootNode->clearBBox(); + } + + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + { + delete _SilhouetteNode; + _SilhouetteNode = NULL; + } + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _ProjectedSilhouette; + // _ProjectedSilhouette = NULL; + // } + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = NULL; + // } + // } + + _pView->DetachDebug(); + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + _DebugNode->addRef(); + } + + if(_winged_edge) { + delete _winged_edge; + _winged_edge = NULL; + } + + // We deallocate the memory: + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + // clears the canvas + _Canvas->Erase(); + + // clears the grid + _Grid.clear(); + _SceneNumFaces = 0; + _minEdgeSize = DBL_MAX; + // _pView2D->DetachScene(); + // if(NULL != _SRoot) + // { + // int ref = _SRoot->destroy(); + // if(0 == ref) + // { + // //_SRoot->addRef(); + // delete _SRoot; + // _SRoot = NULL; + // } + // } +} + +// static const streamsize buffer_size = 512 * 1024; + +void Controller::SaveViewMapFile(const char *oFileName) +{ + if (!_ViewMap) + return; + + ofstream ofs(oFileName, ios::binary); + if (!ofs.is_open()) { + cerr << "Error: Cannot save this file" << endl; + return; + } +// char buffer[buffer_size]; +// #if defined(__GNUC__) && (__GNUC__ < 3) +// ofs.rdbuf()->setbuf(buffer, buffer_size); +// # else +// ofs.rdbuf()->pubsetbuf(buffer, buffer_size); +// #endif + _Chrono.start(); + + ofs << Config::VIEWMAP_MAGIC << endl << Config::VIEWMAP_VERSION << endl; + + // Write the models filenames + ofs << _ListOfModels.size() << endl; + for (vector<string>::const_iterator i = _ListOfModels.begin(); i != _ListOfModels.end(); i++) + ofs << *i << "\n"; + + // Save the camera position + float position[3]; + float orientation[4]; + _pView->getCameraState(position, orientation); + ofs.write((char*)position, 3 * sizeof(*position)); + ofs.write((char*)orientation, 4 * sizeof(*orientation)); + + // Write ViewMap + if (ViewMapIO::save(ofs, _ViewMap, 0)) { + _Chrono.stop(); + cerr << "Error: Cannot save this file" << endl; + return; + } + + real d = _Chrono.stop(); + cout << "ViewMap saving : " << d << endl; +} + +void Controller::LoadViewMapFile(const char *iFileName, bool only_camera) +{ + ifstream ifs(iFileName, ios::binary); + if (!ifs.is_open()) { + cerr << "Error: Cannot load this file" << endl; + return; + } +// char buffer[buffer_size]; +// #if defined(__GNUC__) && (__GNUC__ < 3) +// ifs.rdbuf()->setbuf(buffer, buffer_size); +// # else +// ifs.rdbuf()->pubsetbuf(buffer, buffer_size); +// #endif + + // Test File Magic and version + char tmp_buffer[256]; + string test; + + ifs.getline(tmp_buffer, 255); + test = tmp_buffer; + if (test != Config::VIEWMAP_MAGIC) { + cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION << " file" << endl; + return; + } + ifs.getline(tmp_buffer, 255); + test = tmp_buffer; + if (test != Config::VIEWMAP_VERSION && !only_camera) { + cerr << "Error: This version of the ." << Config::VIEWMAP_EXTENSION << " file format is no longer supported" << endl; + return; + } + + // Read the models filenames and open them (if not already done) + string tmp; + vector<string> tmp_vec; + unsigned models_nb, i; + + ifs.getline(tmp_buffer, 255); + models_nb = atoi(tmp_buffer); + for (i = 0; i < models_nb; i++) { + ifs.getline(tmp_buffer, 255); + tmp = tmp_buffer; + tmp_vec.push_back(tmp); + } + if (_ListOfModels != tmp_vec && !only_camera) { + CloseFile(); + vector<string> pathnames; + int err = 0; + for (vector<string>::const_iterator i = tmp_vec.begin(); i != tmp_vec.end(); i++) + { + pathnames.clear(); + StringUtils::getPathName(ViewMapIO::Options::getModelsPath(), *i, pathnames); + for (vector<string>::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) + if (!(err = Load3DSFile(j->c_str()))) + break; + if (err) { + cerr << "Error: cannot find model \"" << *i << "\" - check the path in the Options" << endl; + return; + } + } + } + + // Set the camera position + float position[3]; + float orientation[4]; + ifs.read((char*)position, 3 * sizeof(*position)); + ifs.read((char*)orientation, 4 * sizeof(*orientation)); + _pView->setCameraState(position, orientation); + _pView->saveCameraState(); + + if (only_camera) { + return; + } + + // Reset ViewMap + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // delete _ProjectedSilhouette; + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = 0; + // } + // } + _ViewMap = new ViewMap(); + + // Read ViewMap + _Chrono.start(); + if (ViewMapIO::load(ifs, _ViewMap, 0)) { + _Chrono.stop(); + + cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION << " file" << endl; + return; + } + + // Update display + ViewMapTesselator3D sTesselator3d; + //ViewMapTesselator2D sTesselator2d; + //sTesselator2d.SetNature(_edgeTesselationNature); + sTesselator3d.SetNature(_edgeTesselationNature); + + // Tesselate the 3D edges: + _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); + _SilhouetteNode->addRef(); + + // Tesselate 2D edges + // _ProjectedSilhouette = sTesselator2d.Tesselate(_ViewMap); + // _ProjectedSilhouette->addRef(); + // + _pView->AddSilhouette(_SilhouetteNode); + //_pView->Add2DSilhouette(_ProjectedSilhouette); + + // Update options window + //_pOptionsWindow->updateViewMapFormat(); + + real d = _Chrono.stop(); + cout << "ViewMap loading : " << d << endl; + + // Compute the Directional ViewMap: + if(_ComputeSteerableViewMap){ + ComputeSteerableViewMap(); + } + + // Reset Style modules modification flags + resetModified(true); +} + +void Controller::ComputeViewMap() +{ + + if (!_ListOfModels.size()) + return; + + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + _pView->DetachDebug(); + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + _DebugNode->addRef(); + } + + + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // delete _ProjectedSilhouette; + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = 0; + // } + // } + + // retrieve the 3D viewpoint and transformations information + //---------------------------------------------------------- + // Save the viewpoint context at the view level in order + // to be able to restore it later: + _pView->saveCameraState(); + + // Restore the context of view: + // we need to perform all these operations while the + // 3D context is on. + _pView->Set3DContext(); + float src[3] = { 0, 0, 0 }; + float vp_tmp[3] = { 0, 0, 0 }; + _pView->_camera->getWorldCoordinatesOf(src, vp_tmp); + Vec3r vp(vp_tmp[0], vp_tmp[1], vp_tmp[2]); + + real mv[4][4]; + _pView->RetriveModelViewMatrix((real *)mv); + // retrieve the projection matrix: + real proj[4][4]; + _pView->RetrieveProjectionMatrix((real *)proj); + int viewport[4]; + _pView->RetrieveViewport(viewport); + real focalLength = _pView->GetFocalLength(); + + // Flag the WXEdge structure for silhouette edge detection: + //---------------------------------------------------------- + + _Chrono.start(); + + edgeDetector.SetViewpoint(Vec3r(vp)); + edgeDetector.enableRidgesAndValleysFlag(_ComputeRidges); + edgeDetector.enableSuggestiveContours(_ComputeSuggestive); + edgeDetector.setSphereRadius(_sphereRadius); + edgeDetector.setSuggestiveContourKrDerivativeEpsilon(_suggestiveContourKrDerivativeEpsilon); + edgeDetector.processShapes(*_winged_edge); + + real duration = _Chrono.stop(); + printf("Feature lines : %lf\n", duration); + + // Builds the view map structure from the flagged WSEdge structure: + //---------------------------------------------------------- + ViewMapBuilder vmBuilder; + vmBuilder.SetEnableQI(_EnableQI); + vmBuilder.SetViewpoint(Vec3r(vp)); + + vmBuilder.SetTransform(mv, proj, viewport, focalLength, _pView->GetAspect(), _pView->GetFovyRadian()); + vmBuilder.SetFrustum(_pView->znear(), _pView->zfar()); + + vmBuilder.SetGrid(&_Grid); + + // Builds a tesselated form of the silhouette for display purpose: + //--------------------------------------------------------------- + ViewMapTesselator3D sTesselator3d; + //ViewMapTesselator2D sTesselator2d; + //sTesselator2d.SetNature(_edgeTesselationNature); + sTesselator3d.SetNature(_edgeTesselationNature); + + _Chrono.start(); + // Build View Map + _ViewMap = vmBuilder.BuildViewMap(*_winged_edge, _VisibilityAlgo, _EPSILON); + _ViewMap->setScene3dBBox(_RootNode->bbox()); + + //Tesselate the 3D edges: + _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); + _SilhouetteNode->addRef(); + + // Tesselate 2D edges + // _ProjectedSilhouette = sTesselator2d.Tesselate(_ViewMap); + // _ProjectedSilhouette->addRef(); + + duration = _Chrono.stop(); + printf("ViewMap building : %lf\n", duration); + + + _pView->AddSilhouette(_SilhouetteNode); + //_pView->AddSilhouette(_WRoot); + //_pView->Add2DSilhouette(_ProjectedSilhouette); + //_pView->Add2DVisibleSilhouette(_VisibleProjectedSilhouette); + _pView->AddDebug(_DebugNode); + + // Draw the steerable density map: + //-------------------------------- + if(_ComputeSteerableViewMap){ + ComputeSteerableViewMap(); + } + // Reset Style modules modification flags + resetModified(true); +} + +void Controller::ComputeSteerableViewMap(){ +//soc + // if((!_Canvas) || (!_ViewMap)) + // return; + // + // // Build 4 nodes containing the edges in the 4 directions + // NodeGroup *ng[Canvas::NB_STEERABLE_VIEWMAP]; + // unsigned i; + // real c = 32.f/255.f; // see SteerableViewMap::readSteerableViewMapPixel() for information about this 32. + // for(i=0; i<Canvas::NB_STEERABLE_VIEWMAP; ++i){ + // ng[i] = new NodeGroup; + // } + // NodeShape *completeNS = new NodeShape; + // completeNS->material().SetDiffuse(c,c,c,1); + // ng[Canvas::NB_STEERABLE_VIEWMAP-1]->AddChild(completeNS); + // SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + // svm->Reset(); + // + // ViewMap::fedges_container& fedges = _ViewMap->FEdges(); + // LineRep * fRep; + // NodeShape *ns; + // for(ViewMap::fedges_container::iterator f=fedges.begin(), fend=fedges.end(); + // f!=fend; + // ++f){ + // if((*f)->viewedge()->qi() != 0) + // continue; + // fRep = new LineRep((*f)->vertexA()->point2d(),(*f)->vertexB()->point2d()) ; + // completeNS->AddRep(fRep); // add to the complete map anyway + // double *oweights = svm->AddFEdge(*f); + // for(i=0; i<Canvas::NB_STEERABLE_VIEWMAP-1; ++i){ + // ns = new NodeShape; + // double wc = oweights[i]*c; + // if(oweights[i] == 0) + // continue; + // ns->material().SetDiffuse(wc, wc, wc, 1); + // ns->AddRep(fRep); + // ng[i]->AddChild(ns); + // } + // } + // + // GrayImage *img[Canvas::NB_STEERABLE_VIEWMAP]; + // //#ifdef WIN32 + // QGLBasicWidget offscreenBuffer(_pView, "SteerableViewMap", _pView->width(), _pView->height()); + // QPixmap pm; + // QImage qimg; + // for(i=0; i<Canvas::NB_STEERABLE_VIEWMAP; ++i){ + // offscreenBuffer.AddNode(ng[i]); + // //img[i] = new GrayImage(_pView->width(), _pView->height()); + // //offscreenBuffer.readPixels(0,0,_pView->width(), _pView->height(), img[i]->getArray()); + // pm = offscreenBuffer.renderPixmap(_pView->width(), _pView->height()); + // + // if(pm.isNull()) + // cout << "BuildViewMap Warning: couldn't render the steerable ViewMap" << endl; + // //pm.save(QString("steerable")+QString::number(i)+QString(".bmp"), "BMP"); + // // FIXME!! Lost of time ! + // qimg = pm.toImage(); + // // FIXME !! again! + // img[i] = new GrayImage(_pView->width(), _pView->height()); + // for(unsigned y=0;y<img[i]->height();++y){ + // for(unsigned x=0;x<img[i]->width();++x){ + // //img[i]->setPixel(x,y,(float)qGray(qimg.pixel(x,y))/255.f); + // img[i]->setPixel(x,y,(float)qGray(qimg.pixel(x,y))); + // // float c = qGray(qimg.pixel(x,y)); + // // img[i]->setPixel(x,y,qGray(qimg.pixel(x,y))); + // } + // } + // offscreenBuffer.DetachNode(ng[i]); + // ng[i]->destroy(); + // delete ng[i]; + // // check + // // qimg = QImage(_pView->width(), _pView->height(), 32); + // // for(y=0;y<img[i]->height();++y){ + // // for(unsigned x=0;x<img[i]->width();++x){ + // // float v = img[i]->pixel(x,y); + // // qimg.setPixel(x,y,qRgb(v,v,v)); + // // } + // // } + // // qimg.save(QString("newsteerable")+QString::number(i)+QString(".bmp"), "BMP"); + // } + // + // + // svm->buildImagesPyramids(img,false,0,1.f); +} + +void Controller::saveSteerableViewMapImages(){ + SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + if(!svm){ + cerr << "the Steerable ViewMap has not been computed yet" << endl; + return; + } + svm->saveSteerableViewMap(); +} + +void Controller::toggleVisibilityAlgo() +{ + if(_VisibilityAlgo == ViewMapBuilder::ray_casting) { + _VisibilityAlgo = ViewMapBuilder::ray_casting_fast; + } + else if (_VisibilityAlgo == ViewMapBuilder::ray_casting_fast) { + _VisibilityAlgo = ViewMapBuilder::ray_casting_very_fast; + } + else { + _VisibilityAlgo = ViewMapBuilder::ray_casting; + } +} + +void Controller::setQuantitativeInvisibility(bool iBool) +{ + _EnableQI = iBool; +} + +bool Controller::getQuantitativeInvisibility() const +{ + return _EnableQI; +} + +void Controller::setComputeRidgesAndValleysFlag(bool iBool){ + _ComputeRidges = iBool; +} + +bool Controller::getComputeRidgesAndValleysFlag() const { + return _ComputeRidges; +} +void Controller::setComputeSuggestiveContoursFlag(bool b){ + _ComputeSuggestive = b; +} + +bool Controller::getComputeSuggestiveContoursFlag() const { + return _ComputeSuggestive; +} +void Controller::setComputeSteerableViewMapFlag(bool iBool){ + _ComputeSteerableViewMap = iBool; +} + +bool Controller::getComputeSteerableViewMapFlag() const { + return _ComputeSteerableViewMap; +} +void Controller::setFrontBufferFlag(bool iBool) +{ + AppGLWidget::setFrontBufferFlag(iBool); +} + +bool Controller::getFrontBufferFlag() const +{ + return AppGLWidget::getFrontBufferFlag(); +} + +void Controller::setBackBufferFlag(bool iBool) +{ + AppGLWidget::setBackBufferFlag(iBool); +} + +bool Controller::getBackBufferFlag() const +{ + return AppGLWidget::getBackBufferFlag(); +} + +void Controller::DrawStrokes() +{ + if(_ViewMap == 0) + return; + + _Chrono.start(); + _Canvas->Draw(); + real d = _Chrono.stop(); + cout << "Strokes drawing : " << d << endl; + resetModified(); +} + +void Controller::InsertStyleModule(unsigned index, const char *iFileName) +{ + // QFileInfo fi(iFileName); + // string ext = fi.suffix(); + // if (ext != "py") { + // cerr << "Error: Cannot load \"" << fi.fileName().toAscii().data() + // << "\", unknown extension" << endl; + // return; + // } + + if( !BLI_testextensie(iFileName, ".py") ) { + cerr << "Error: Cannot load \"" << StringUtils::toAscii( string(iFileName) ) + << "\", unknown extension" << endl; + return; + } + + StyleModule* sm = new StyleModule(iFileName, _inter); + _Canvas->InsertStyleModule(index, sm); + +} + +void Controller::AddStyleModule(const char *iFileName) +{ + //_pStyleWindow->Add(iFileName); +} + +void Controller::RemoveStyleModule(unsigned index) +{ + _Canvas->RemoveStyleModule(index); +} + +void Controller::Clear() +{ + _Canvas->Clear(); +} + +void Controller::ReloadStyleModule(unsigned index, const char * iFileName) +{ + StyleModule* sm = new StyleModule(iFileName, _inter); + _Canvas->ReplaceStyleModule(index, sm); +} + +void Controller::SwapStyleModules(unsigned i1, unsigned i2) +{ + _Canvas->SwapStyleModules(i1, i2); +} + + +void Controller::toggleLayer(unsigned index, bool iDisplay) +{ + _Canvas->SetVisible(index, iDisplay); + _pView->updateGL(); +} + +void Controller::setModified(unsigned index, bool iMod) +{ + //_pStyleWindow->setModified(index, iMod); + _Canvas->setModified(index, iMod); + updateCausalStyleModules(index + 1); +} + +void Controller::updateCausalStyleModules(unsigned index) { + vector<unsigned> vec; + _Canvas->causalStyleModules(vec, index); + for (vector<unsigned>::const_iterator it = vec.begin(); it != vec.end(); it++) { + //_pStyleWindow->setModified(*it, true); + _Canvas->setModified(*it, true); + } +} + +void Controller::saveSnapshot(bool b) { + _pView->saveSnapshot(b); +} + +void Controller::resetModified(bool iMod) +{ + //_pStyleWindow->resetModified(iMod); + _Canvas->resetModified(iMod); +} + +FEdge* Controller::SelectFEdge(real x, real y) +{ + if (!_ViewMap) + return NULL; + + FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); + //ViewEdge *selection = fedge->viewedge(); + _pView->SetSelectedFEdge(fedge); + _Canvas->SetSelectedFEdge(fedge); + return fedge; +} + +ViewEdge* Controller::SelectViewEdge(real x, real y) +{ + if (!_ViewMap) + return NULL; + + FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); + ViewEdge *selection = fedge->viewedge(); + _pView->SetSelectedFEdge(fedge); + _Canvas->SetSelectedFEdge(fedge); + return selection; +} + +NodeGroup * Controller::BuildRep(vector<ViewEdge*>::iterator vedges_begin, + vector<ViewEdge*>::iterator vedges_end) +{ + ViewMapTesselator2D tesselator2D; + Material mat; + mat.SetDiffuse(1,1,0.3,1); + tesselator2D.SetMaterial(mat); + + return (tesselator2D.Tesselate(vedges_begin, vedges_end)); +} + +void Controller::toggleEdgeTesselationNature(Nature::EdgeNature iNature) +{ + _edgeTesselationNature ^= (iNature); + ComputeViewMap(); +} + +void Controller::setModelsDir(const string& dir) { + //_current_dirs->setValue("models/dir", dir); +} + +string Controller::getModelsDir() const { + string dir = "."; + //_current_dirs->getValue("models/dir", dir); + return dir; +} + +void Controller::setModulesDir(const string& dir) { + //_current_dirs->setValue("modules/dir", dir); +} + +string Controller::getModulesDir() const { + string dir = "."; + //_current_dirs->getValue("modules/dir", dir); + return dir; +} + +void Controller::setPapersDir(const string& dir) { + //_current_dirs->setValue("papers/dir", dir); +} + +string Controller::getPapersDir() const { + string dir = Config::Path::getInstance()->getPapersDir(); + //_current_dirs->getValue("papers/dir", dir); + return dir; +} + +void Controller::setHelpIndex(const string& index) { + _help_index = index; +} + +string Controller::getHelpIndex() const { + return _help_index; +} + +void Controller::setBrowserCmd(const string& cmd) { + _browser_cmd = cmd; +} + +string Controller::getBrowserCmd() const { + return _browser_cmd; +} + +void Controller::resetInterpreter() { + if (_inter) + _inter->reset(); +} + + +void Controller::displayDensityCurves(int x, int y){ + SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + if(!svm) + return; + + unsigned i,j; + typedef vector<Vec3r> densityCurve; + vector<densityCurve> curves(svm->getNumberOfOrientations()+1); + vector<densityCurve> curvesDirection(svm->getNumberOfPyramidLevels()); + + // collect the curves values + unsigned nbCurves = svm->getNumberOfOrientations()+1; + unsigned nbPoints = svm->getNumberOfPyramidLevels(); + if(!nbPoints) + return; + + // build the density/nbLevels curves for each orientation + for(i=0;i<nbCurves; ++i){ + for(j=0; j<nbPoints; ++j){ + curves[i].push_back(Vec3r(j, svm->readSteerableViewMapPixel(i, j, x, y), 0)); + } + } + // build the density/nbOrientations curves for each level + for(i=0;i<nbPoints; ++i){ + for(j=0; j<nbCurves; ++j){ + curvesDirection[i].push_back(Vec3r(j, svm->readSteerableViewMapPixel(j, i, x, y), 0)); + } + } + + // display the curves + // for(i=0; i<nbCurves; ++i) + // _pDensityCurvesWindow->SetOrientationCurve(i, Vec2d(0,0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); + // for(i=1; i<=8; ++i) + // _pDensityCurvesWindow->SetLevelCurve(i, Vec2d(0,0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); + // _pDensityCurvesWindow->show(); +} diff --git a/source/blender/freestyle/intern/app_blender/Controller.h b/source/blender/freestyle/intern/app_blender/Controller.h new file mode 100755 index 00000000000..55ef1968129 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/Controller.h @@ -0,0 +1,213 @@ +// +// Filename : Controller.h +// Author : Stephane Grabli +// Purpose : The spinal tap of the system +// Date of creation : 01/07/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CONTROLLER_H +# define CONTROLLER_H + +# include <string> +//# include "ConfigIO.h" +# include "../geometry/FastGrid.h" +# include "../geometry/HashGrid.h" +# include "../view_map/ViewMapBuilder.h" +# include "../system/TimeUtils.h" +# include "../system/Precision.h" +# include "../system/Interpreter.h" +# include "../view_map/FEdgeXDetector.h" + +class AppGLWidget; +class NodeGroup; +class WShape; +class SShape; +class ViewMap; +class ViewEdge; +class AppCanvas; +class InteractiveShader; +class Shader; + +class Controller +{ +public: + Controller() ; + ~Controller() ; + + void SetView(AppGLWidget *iView); + + int Load3DSFile(const char *iFileName); + void CloseFile(); + void LoadViewMapFile(const char *iFileName, bool only_camera = false); + void SaveViewMapFile(const char *iFileName); + void ComputeViewMap(); + void ComputeSteerableViewMap(); + void saveSteerableViewMapImages(); + void toggleEdgeTesselationNature(Nature::EdgeNature iNature); + void DrawStrokes(); + void SwapStyleModules(unsigned i1, unsigned i2); + void InsertStyleModule(unsigned index, const char *iFileName); + void AddStyleModule(const char *iFileName); + void RemoveStyleModule(unsigned index); + void ReloadStyleModule(unsigned index, const char * iFileName); + void Clear(); + void toggleLayer(unsigned index, bool iDisplay); + void setModified(unsigned index, bool iMod); + void resetModified(bool iMod=false); + void updateCausalStyleModules(unsigned index); + void saveSnapshot(bool b = false); + void displayDensityCurves(int x, int y); + + + ViewEdge * SelectViewEdge(real x, real y); + FEdge * SelectFEdge(real x, real y); + NodeGroup* BuildRep(vector<ViewEdge*>::iterator vedges_begin, + vector<ViewEdge*>::iterator vedges_end) ; + + NodeGroup* debugNode() {return _DebugNode;} + AppGLWidget * view() {return _pView;} + NodeGroup* debugScene() {return _DebugNode;} + Grid& grid() {return _Grid;} + + void toggleVisibilityAlgo(); + + void setQuantitativeInvisibility(bool iBool); // if true, we compute quantitativeInvisibility + bool getQuantitativeInvisibility() const; + + void setFrontBufferFlag(bool b); + bool getFrontBufferFlag() const; + void setBackBufferFlag(bool b); + bool getBackBufferFlag() const; + + void setComputeRidgesAndValleysFlag(bool b); + bool getComputeRidgesAndValleysFlag() const ; + void setComputeSuggestiveContoursFlag(bool b); + bool getComputeSuggestiveContoursFlag() const ; + + void setComputeSteerableViewMapFlag(bool iBool); + bool getComputeSteerableViewMapFlag() const; + void setSphereRadius(real s){_sphereRadius=s;} + real getSphereRadius() const {return _sphereRadius;} + void setSuggestiveContourKrDerivativeEpsilon(real dkr){_suggestiveContourKrDerivativeEpsilon=dkr;} + real getSuggestiveContourKrDerivativeEpsilon() const {return _suggestiveContourKrDerivativeEpsilon;} + + void setModelsDir(const string& dir); + string getModelsDir() const; + void setModulesDir(const string& dir); + string getModulesDir() const; + void setPapersDir(const string& dir); + string getPapersDir() const; + void setHelpIndex(const string& dir); + string getHelpIndex() const; + void setBrowserCmd(const string& cmd); + string getBrowserCmd() const; + + void resetInterpreter(); + +private: + + // Main Window: + //AppMainWindow *_pMainWindow; + + // List of models currently loaded + vector<string> _ListOfModels; + + // Current directories + //ConfigIO* _current_dirs; + + //View + // 3D + AppGLWidget *_pView; + + // 2D + //Viewer2DWindow *_pView2DWindow; + //Viewer2D *_pView2D; + + //Model + // Drawing Structure + NodeGroup *_RootNode; + + // Winged-Edge structure + WingedEdge* _winged_edge; + + ViewMap * _ViewMap; + + // Silhouette structure: + //std::vector<SShape*> _SShapes; + //NodeGroup *_SRoot; + + // Silhouette + NodeGroup *_SilhouetteNode; + NodeGroup *_ProjectedSilhouette; + NodeGroup *_VisibleProjectedSilhouette; + + // more Debug info + NodeGroup *_DebugNode; + + // debug + // NodeUser<ViewMap> *_ViewMapNode; // FIXME + + // Chronometer: + Chronometer _Chrono; + + // edges tesselation nature + int _edgeTesselationNature; + + FastGrid _Grid; + //HashGrid _Grid; + + unsigned int _SceneNumFaces; + real _minEdgeSize; + real _EPSILON; + real _bboxDiag; + + AppCanvas *_Canvas; + + //AppStyleWindow *_pStyleWindow; + //AppOptionsWindow *_pOptionsWindow; + //AppDensityCurvesWindow *_pDensityCurvesWindow; + + ViewMapBuilder::visibility_algo _VisibilityAlgo; + + // Script Interpreter + Interpreter* _inter; + + string _help_index; + string _browser_cmd; + + bool _EnableQI; + bool _ComputeRidges; + bool _ComputeSuggestive; + real _sphereRadius; + real _suggestiveContourKrDerivativeEpsilon; + + bool _ComputeSteerableViewMap; + + FEdgeXDetector edgeDetector; +}; + +extern Controller *g_pController; + +#endif // CONTROLLER_H diff --git a/source/blender/freestyle/intern/build_bundle.macosx.py b/source/blender/freestyle/intern/build_bundle.macosx.py deleted file mode 100755 index e97153f269c..00000000000 --- a/source/blender/freestyle/intern/build_bundle.macosx.py +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/python - -import os,sys,string - -install_dependencies=["GLUT",\ - "QtCore", "QtGui", "QtXml", \ - "libQGLViewer", "FreestyleSystem", "FreestyleRendering",\ - "FreestyleImage","FreestyleGeometry", "FreestyleSceneGraph", "FreestyleWingedEdge",\ - "FreestyleViewMap", "FreestyleStroke"] - -if not("FREESTYLE_DIR" in os.environ): - print "FREESTYLE_DIR must be set to your Freestyle directory" - sys.exit() - -src_dir_path=os.environ['FREESTYLE_DIR'] -dest_dir_path=os.path.join(os.environ['FREESTYLE_DIR'], "freestyle.2.0.0-macosx-x86") -bundle_name="Freestyle.app" -bundle_path=os.path.join(dest_dir_path,bundle_name) -frameworks_path=os.path.join(bundle_path,"Contents/Frameworks") -exe_path=os.path.join(bundle_path, "Contents/MacOS") -original_lib_path=os.path.join(src_dir_path,"build/macosx/release/lib") -original_exe_path=os.path.join(src_dir_path,"build/macosx/release",bundle_name,"Contents/MacOS") - - - -# Builds a dictionary of dependencies for -# a given binary -# The table format is: -# "dependency name" "dependency path" -def buildDependenciesTable(binary_file, dep_table): - cmd="otool -L %s" % binary_file - #print cmd - #otool_output = os.system(cmd) - otool_output = os.popen(cmd).read().split('\n') - for dep_text in otool_output: - if (dep_text.count(":") == 0): - dep = dep_text.split(' ')[0].lstrip() - dep_base_name=os.path.basename(dep) - dep_table[dep_base_name] = dep - - -def fixPaths(dep_table): - for k,v in dep_table.items(): - if(k.count("Freestyle")): - dep_table[k] = os.path.join(src_dir_path, "build/macosx/release/lib",v) - if(k.count("QGLViewer")): - dep_table[k] = os.path.join("/usr/lib", v) - -def extractFrameworkBaseDir(framework_lib): - parts=framework_lib.split("/") - head="/" - tail="" - in_head=True - for p in parts: - if(in_head == True): - head=os.path.join(head,p) - else: - tail=os.path.join(tail,p) - if(p.count(".framework") != 0): - in_head=False - return (head,tail) - -def installDependencies(dep_table, install_dependencies, new_dep_table): - for k,v in dep_table.items(): - for d in install_dependencies: - if(k.count(d)!=0): - framework_dir_path=v - cp_option="" - head="" - tail="" - if(v.count("framework")): - (head,tail) = extractFrameworkBaseDir(v) - framework_dir_path=head - cp_option="-R" - lib_name=os.path.split(framework_dir_path)[1] - target=os.path.join(frameworks_path,lib_name) - # update new table - if(tail != ""): - new_dep_table[k] = os.path.join("@executable_path/../Frameworks",lib_name,tail) - else: - new_dep_table[k] = os.path.join("@executable_path/../Frameworks",lib_name) - if(os.path.exists(target) != True): - cmd = "cp %s %s %s" % (cp_option, framework_dir_path,frameworks_path) - print "Installing dependency:",lib_name - os.system(cmd) - -def updatePathsToDependencies(binary_file, install_dependencies, dep_table, new_dep_table): - # executable: - f_dep_table={} - buildDependenciesTable(binary_file,f_dep_table) - for k,v in f_dep_table.items(): - # is k in install_dependencies? - for ld in install_dependencies: - if(k.count(ld) != 0): - #print new_dep_table - cmd="install_name_tool -change %s %s %s" % (v,new_dep_table[k], binary_file) - os.system(cmd) - # check - cmd="otool -L %s" % binary_file - os.system(cmd) - -def cleanDir(dir, to_delete): - os.chdir(dir) - #print os.getcwd() - for d in os.listdir("."): - #print d - if(d == "Headers"): - cmd="rm -rf Headers" - to_delete.append(os.path.join(dir,d)) - #os.system(cmd) - elif(d.count("debug") != 0): - cmd="rm -rf %s"%(d) - #print cmd - to_delete.append(os.path.join(dir,d)) - #os.system(cmd) - elif(os.path.isdir(d) == True): - #print d - cleanDir(os.path.join(dir,d), to_delete) - #else: - # print d - os.chdir(os.path.join(dir,"..")) - #print os.getcwd() - - -# build bundle structure -if( os.path.exists(dest_dir_path) != True): - print "Creating directory",dest_dir_path - os.mkdir(dest_dir_path) - -if(os.path.exists(bundle_path) != True): - print "Creating the bundle structure", bundle_path - cmd = "cp -R %s %s" % (os.path.join(src_dir_path, "build/macosx/release/",bundle_name), bundle_path) - os.system(cmd) - os.mkdir(os.path.join(bundle_path,"Contents/Frameworks")) - - -dep_table = {} -new_dep_table = {} -# Executable -for f in os.listdir(original_exe_path): - if(f[0] == '.'): - continue - exe_file_path=os.path.join(original_exe_path, f) - buildDependenciesTable(exe_file_path, dep_table) - -# Frameworks -for f in os.listdir(original_lib_path): - if (f.count("framework") == 0): - continue - f_name=f.split('.')[0] - fwk_path=os.path.join(original_lib_path, "%s.framework" % f_name,f_name) - buildDependenciesTable(fwk_path, dep_table) - -# Fix ad-hoc paths -fixPaths(dep_table) - -# install dependent libs -installDependencies(dep_table, install_dependencies, new_dep_table) - -# update paths to installed dependencies -for f in os.listdir(exe_path): - if(f[0] == '.'): - continue - updatePathsToDependencies(os.path.join(exe_path,f), install_dependencies, dep_table, new_dep_table) - -# Frameworks -for f in os.listdir(frameworks_path): - if (f.count("framework") == 0): - continue - f_name=f.split('.')[0] - fwk_path=os.path.join(frameworks_path, "%s.framework" % f_name,f_name) - updatePathsToDependencies(fwk_path, install_dependencies, dep_table, new_dep_table) - - -# Clean-up -# Remove debug libs -print "Cleaning..." -to_delete=[] -cleanDir(bundle_path, to_delete) -for f in to_delete: - cmd = "rm -rf %s"%f - print cmd - os.system(cmd) diff --git a/source/blender/freestyle/intern/libconfig.pri b/source/blender/freestyle/intern/libconfig.pri deleted file mode 100755 index 6fec8878694..00000000000 --- a/source/blender/freestyle/intern/libconfig.pri +++ /dev/null @@ -1,110 +0,0 @@ -# This file should be viewed as a -*- mode: Makefile -*- - -contains( CONFIG, 3ds1.20 ) { - message ("Using 3ds 1.2.0 module") - linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE/LINUX - linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -l3ds - cygwin-g++:INCLUDEPATH *= /usr/lib/lib3ds-1.2.0 - cygwin-g++:LIBS *= -L/usr/lib/lib3ds-1.2.0/lib3ds -l3ds - mac:INCLUDEPATH *= /usr/local/include - mac:LIBS *= -l3ds - mac:QMAKE_LIBDIR *= /usr/local/lib - win32: INCLUDEPATH *= C:\include\lib3ds\1.2.0 - win32: QMAKE_LIBDIR *= C:\lib\lib3ds\1.2.0 - win32:debug: LIBS *= lib3ds-120sd.lib - win32:release: LIBS *= lib3ds-120s.lib -} - -contains( CONFIG, 3ds1.30 ) { - message ("Using 3ds 1.3.0 module") - linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE/LINUX - linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -l3ds - cygwin-g++:INCLUDEPATH *= /usr/lib/lib3ds-1.3.0 - cygwin-g++:LIBS *= -L/usr/lib/lib3ds-1.3.0/lib3ds -l3ds - mac:INCLUDEPATH *= /usr/local/include - mac:LIBS *= -l3ds - mac:QMAKE_LIBDIR *= /usr/local/lib - win32: INCLUDEPATH *= C:\include\lib3ds\1.3.0 - win32: QMAKE_LIBDIR *= C:\lib\lib3ds\1.3.0 - win32:debug: LIBS *= lib3ds-1_3d.lib - win32:release: LIBS *= lib3ds-1_3.lib -} - -contains( CONFIG, qglviewer ) { - message ("Using QGLViewer module") - CONFIG *= qt thread opengl glut - linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE - linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -lQGLViewer - cygwin-g++:LIBS *= -lQGLViewer - win32: INCLUDEPATH *= $(HOME)\INCLUDE - win32: QMAKE_LIBDIR *= $(HOME)\LIB - win32: LIBS *= QGLViewer.lib -} - -contains( CONFIG, python2.3) { - message ("Using python 2.3 module") - linux-g++:INCLUDEPATH *= /usr/include/python2.3 - linux-g++:LIBS *= -lpthread -lm -lutil - linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.3 -L$(HOME)/LIB/LINUX - win32: INCLUDEPATH *= C:\python23\include - win32: QMAKE_LIBDIR *= C:\python23\libs - win32: LIBS *= python23.lib -} - -contains( CONFIG, python2.4) { - message ("Using python 2.4 module") - linux-g++:INCLUDEPATH *= /usr/include/python2.4 - linux-g++:LIBS *= -lpthread -lm -lutil - linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.4 -L$(HOME)/LIB/LINUX - cygwin-g++:INCLUDEPATH *= /usr/include/python2.4 - cygwin-g++:LIBS *= -lpthread -lm -lutil - cygwin-g++:LIBS *= -L/usr/lib/python2.4/config -lpython2.4 - win32: INCLUDEPATH *= C:\python24\include - win32: QMAKE_LIBDIR *= C:\python24\libs - win32: LIBS *= python24.lib -} - -contains( CONFIG, python2.5) { - message ("Using python 2.5 module") - linux-g++:INCLUDEPATH *= /usr/include/python2.5 - linux-g++:LIBS *= -lpthread -lm -lutil - linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.5 -L$(HOME)/LIB/LINUX - mac: INCLUDEPATH *= /usr/include/python2.5 - mac: LIBS *= -L/usr/lib/python2.5/config -lpython2.5 - cygwin-g++:INCLUDEPATH *= /usr/include/python2.5 - cygwin-g++:LIBS *= -lpthread -lm -lutil - cygwin-g++:LIBS *= -L/usr/lib/python2.5/config -lpython2.5 - win32: INCLUDEPATH *= C:\python25\include - win32: QMAKE_LIBDIR *= C:\python25\libs - win32: LIBS *= python25.lib -} - - -contains( CONFIG, glut) { - message ("Using glut module") - linux-g++:LIBS *= -lglut -lXi - cygwin-g++:LIBS *= -lglut -lXi - mac: LIBS *= -framework Glut - win32:INCLUDEPATH *= C:\include - win32: QMAKE_LIBDIR *= C:\lib\glut - win32: LIBS *= glut32.lib -} - -contains( CONFIG, qglviewer2 ) { - message ("Using QGLViewer module") - CONFIG *= qt thread opengl glut - linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE - linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -lQGLViewer - mac: LIBS *= -lQGLViewer - cygwin-g++:LIBS *= -lQGLViewer2 - win32: INCLUDEPATH *= C:\include\QGLViewer\2.2.5 - win32{ - release{ - QMAKE_LIBDIR *= C:\lib\QGLViewer\release - } - debug{ - QMAKE_LIBDIR *= C:\lib\QGLViewer\debug - } - } - win32: LIBS *= QGLViewer2.lib -} diff --git a/source/blender/freestyle/intern/makedsp.vcnet.debug.bat b/source/blender/freestyle/intern/makedsp.vcnet.debug.bat deleted file mode 100755 index e19ca52b4f7..00000000000 --- a/source/blender/freestyle/intern/makedsp.vcnet.debug.bat +++ /dev/null @@ -1,25 +0,0 @@ -@echo off -for /D %%d in (*) do call :FOR2 %%d -rem cd .. -goto :EOF - -:FOR2 -set componentpath=%1 -set dirname=%~n1 -for %%p in (%componentpath%\*.pro) do if exist %%p call :DSP %%p - -goto :EOF - -:DSP -set drive=%~d1 -set filepath=%~p1 -cd %drive%%filepath% -rem echo %drive%%filepath% -set filename=%~n1 -echo creating %filename%_d.vcproj from %filename%.pro ... -if %filename% == app ( - qmake -t vcapp -win32 -o %filename%_d %filename%.pro -) else ( - qmake -t vclib -win32 -o %filename%_d %filename%.pro -) -cd.. diff --git a/source/blender/freestyle/intern/makedsp.vcnet.release.bat b/source/blender/freestyle/intern/makedsp.vcnet.release.bat deleted file mode 100755 index 3050a2fe4ea..00000000000 --- a/source/blender/freestyle/intern/makedsp.vcnet.release.bat +++ /dev/null @@ -1,25 +0,0 @@ -@echo off -for /D %%d in (*) do call :FOR2 %%d -rem cd .. -goto :EOF - -:FOR2 -set componentpath=%1 -set dirname=%~n1 -for %%p in (%componentpath%\*.pro) do if exist %%p call :DSP %%p - -goto :EOF - -:DSP -set drive=%~d1 -set filepath=%~p1 -cd %drive%%filepath% -rem echo %drive%%filepath% -set filename=%~n1 -echo creating %filename%.vcproj from %filename%.pro ... -if %filename% == app ( - qmake -t vcapp -win32 -o %filename% %filename%.pro -) else ( - qmake -t vclib -win32 -o %filename% %filename%.pro -) -cd.. diff --git a/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp b/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp index b396a0ce6d3..716db397e94 100755 --- a/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp +++ b/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp @@ -124,7 +124,7 @@ void GLDebugRenderer::renderBitmapString(real x, glScalef(textSize/200.0, textSize/200.0, textSize/200.0); for (c=string; *c != '\0'; c++) { - glutStrokeCharacter(font, *c); + //soc glutStrokeCharacter(font, *c); } glPopMatrix(); } diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp index 3870edc2b75..d7f2e5683c5 100755 --- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp @@ -201,6 +201,7 @@ unsigned int SteerableViewMap::getNumberOfPyramidLevels() const{ return _imagesPyramids[0]->getNumberOfLevels(); return 0; } + void SteerableViewMap::saveSteerableViewMap() const { for(unsigned i=0; i<=_nbOrientations; ++i){ if(_imagesPyramids[i] == 0){ |