diff options
author | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-03 00:10:55 (GMT) |
---|---|---|
committer | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-03 00:10:55 (GMT) |
commit | e3011f42a5528f6ca774ee246249cb0c2548a1f1 (patch) | |
tree | 2c736c49e079fa8ac4528d8fe2c7c1f60a8f1307 | |
parent | ffb68adb62090d1f2fadceaabb188fa3fdce8c17 (diff) |
Added support for OpenCSG-1.2.0, enabled MDI as default for Mac OS X
git-svn-id: http://svn.clifford.at/openscad/trunk@193 b57f626f-c46c-0410-a088-ec61d464b74c
-rw-r--r-- | OpenCSG-1.2.0-Reset-Hack.patch | 89 | ||||
-rw-r--r-- | TODO.txt | 2 | ||||
-rw-r--r-- | checklist-macosx.txt | 2 | ||||
-rw-r--r-- | openscad.pro | 4 | ||||
-rwxr-xr-x | release-macosx.sh | 5 |
5 files changed, 97 insertions, 5 deletions
diff --git a/OpenCSG-1.2.0-Reset-Hack.patch b/OpenCSG-1.2.0-Reset-Hack.patch new file mode 100644 index 0000000..7254ce7 --- /dev/null +++ b/OpenCSG-1.2.0-Reset-Hack.patch @@ -0,0 +1,89 @@ +diff -ru OpenCSG-1.2.0/include/opencsg.h OpenCSG-1.2.0-reset/include/opencsg.h +--- OpenCSG-1.2.0/include/opencsg.h 2010-01-02 21:04:10.000000000 +0100 ++++ OpenCSG-1.2.0-reset/include/opencsg.h 2010-01-03 00:41:30.000000000 +0100 +@@ -229,6 +229,9 @@ + Algorithm, + DepthComplexityAlgorithm = NoDepthComplexitySampling); + ++ // call this function whenever switching the OpenGL context ++ void reset(); ++ + } // namespace OpenCSG + + #endif // __OpenCSG__opencsg_h__ +Only in OpenCSG-1.2.0-reset/include: opencsg.h~ +diff -ru OpenCSG-1.2.0/src/channelManager.h OpenCSG-1.2.0-reset/src/channelManager.h +--- OpenCSG-1.2.0/src/channelManager.h 2010-01-02 21:03:01.000000000 +0100 ++++ OpenCSG-1.2.0-reset/src/channelManager.h 2010-01-03 00:40:53.000000000 +0100 +@@ -79,9 +79,9 @@ + /// moved into alpha, to allow alpha testing of the channel. + static void setupTexEnv(Channel channel); + +- private: +- + static OpenGL::OffscreenBuffer* gOffscreenBuffer; ++ ++ private: + static int gOffscreenType; + static bool gInUse; + +Only in OpenCSG-1.2.0-reset/src: channelManager.h~ +diff -ru OpenCSG-1.2.0/src/offscreenBuffer.cpp OpenCSG-1.2.0-reset/src/offscreenBuffer.cpp +--- OpenCSG-1.2.0/src/offscreenBuffer.cpp 2010-01-02 21:03:04.000000000 +0100 ++++ OpenCSG-1.2.0-reset/src/offscreenBuffer.cpp 2010-01-03 00:41:28.000000000 +0100 +@@ -24,9 +24,22 @@ + #include "frameBufferObjectExt.h" + #include "pBufferTexture.h" + #include <GL/glew.h> ++#include "channelManager.h" ++ ++static bool reset_fARB = false; ++static bool reset_fEXT = false; ++static bool reset_p = false; + + namespace OpenCSG { + ++ void reset() ++ { ++ reset_fARB = true; ++ reset_fEXT = true; ++ reset_p = true; ++ OpenCSG::ChannelManager::gOffscreenBuffer = NULL; ++ } ++ + namespace OpenGL { + + OffscreenBuffer* getOffscreenBuffer(bool fbo) { +@@ -36,19 +49,28 @@ + + if (fbo) { + if (GLEW_ARB_framebuffer_object) { +- if (!fARB) ++ if (reset_fARB || !fARB) { ++ delete fARB; + fARB = new FrameBufferObject; ++ reset_fARB = false; ++ } + return fARB; + } + else { +- if (!fEXT) ++ if (reset_fEXT || !fEXT) { ++ delete fEXT; + fEXT = new FrameBufferObjectExt; ++ reset_fEXT = false; ++ } + return fEXT; + } + } + else { +- if (!p) ++ if (reset_p || !p) { ++ delete p; + p = new PBufferTexture; ++ reset_p = false; ++ } + return p; + } + } +Only in OpenCSG-1.2.0-reset/src: offscreenBuffer.cpp~ @@ -7,6 +7,7 @@ o Broken polyhedron() entities are not correctly detected and cause CGAL segfaul USER iNTERFACE -------------- +o Fix current_win hack o Preferences - background colors - Model outside/inside color @@ -14,6 +15,7 @@ o Preferences - OpenGL params - Default language feature settings o External editor +o Export, Save etc.: automatically add missing extension. ask on unexpected extension o Mac OS X: - embed examples into bundle -> separate example menu? - Use examples as default File Open folder diff --git a/checklist-macosx.txt b/checklist-macosx.txt index f863ccd..15fb15f 100644 --- a/checklist-macosx.txt +++ b/checklist-macosx.txt @@ -9,7 +9,7 @@ o Patch OpenCSG cd OpenCSG-1.1.1 patch -p1 < ../openscad/OpenCSG-MacOSX-port.patch - patch -p1 < ../openscad/OpenCSG-Reset-Hack.patch # Only if MDI + patch -p1 < ../openscad/OpenCSG-1.2.0-Reset-Hack.patch # Only if MDI o Build OpenCSG diff --git a/openscad.pro b/openscad.pro index b12b467..5dcfb64 100644 --- a/openscad.pro +++ b/openscad.pro @@ -48,8 +48,8 @@ opencsg { unix:LIBS += -lGLEW win32:LIBS += -lglew32 macx { - INCLUDEPATH += $(PWD)/../OpenCSG-1.1.1/include /opt/local/include - LIBS += -L$(PWD)/../OpenCSG-1.1.1/lib + INCLUDEPATH += $(OPENCSGDIR)/include /opt/local/include + LIBS += -L$(OPENCSGDIR)/lib } } diff --git a/release-macosx.sh b/release-macosx.sh index 615a65f..5a4af58 100755 --- a/release-macosx.sh +++ b/release-macosx.sh @@ -5,12 +5,13 @@ VERSION=`date "+%Y.%m.%d"` #VERSION=2010.01 echo "Building.." -qmake VERSION=$VERSION +export OPENCSGDIR=$PWD/../OpenCSG-1.2.0 +qmake VERSION=$VERSION CONFIG+=mdi make clean make -j2 echo "Preparing executable.." mkdir OpenSCAD.app/Contents/Frameworks -cp ../OpenCSG-1.1.1/lib/libopencsg.dylib OpenSCAD.app/Contents/Frameworks +cp $OPENCSGDIR/lib/libopencsg.dylib OpenSCAD.app/Contents/Frameworks cp /opt/local/lib/libGLEW.1.5.1.dylib OpenSCAD.app/Contents/Frameworks cp /Library/Frameworks/QtOpenGL.framework/Versions/4/QtOpenGL OpenSCAD.app/Contents/Frameworks cp /Library/Frameworks/QtGui.framework/Versions/4/QtGui OpenSCAD.app/Contents/Frameworks |