mirror of https://github.com/vitalif/openscad
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-ec61d464b74cstl_dim
parent
ffb68adb62
commit
e3011f42a5
|
@ -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~
|
2
TODO.txt
2
TODO.txt
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue