diff options
-rw-r--r-- | openscad.pro | 6 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/OffscreenContextWGL.cc | 26 | ||||
-rw-r--r-- | tests/system-gl.cc | 12 |
4 files changed, 19 insertions, 27 deletions
diff --git a/openscad.pro b/openscad.pro index ff65162..7408c5e 100644 --- a/openscad.pro +++ b/openscad.pro @@ -59,7 +59,11 @@ win32:QMAKE_CXXFLAGS += -wd4800 win32:QMAKE_CXXFLAGS += -wd4100 # disable Eigen SIMD optimizations for non-Mac OSX -!macx:QMAKE_CXXFLAGS += -DEIGEN_DONT_ALIGN +!macx { + !unix:freebsd-g++ { + QMAKE_CXXFLAGS += -DEIGEN_DONT_ALIGN + } +} TEMPLATE = app RESOURCES = openscad.qrc diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1fca2fe..36021c0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -253,7 +253,7 @@ include_directories(${CGAL_INCLUDE_DIRS}) # # cgaltest # -add_executable(cgaltest cgaltest.cc ../src/CGAL_Nef_polyhedron.cc ../src/cgalutils.cc ../src/CSGTermEvaluator.cc system-gl.cc +add_executable(cgaltest cgaltest.cc ../src/CGAL_Nef_polyhedron.cc ../src/cgalutils.cc ../src/CSGTermEvaluator.cc ../src/CGALEvaluator.cc ../src/CGALCache.cc ../src/PolySetCGALEvaluator.cc ../src/qhash.cc ../src/CGAL_Nef_polyhedron_DxfData.cc ../src/cgaladv_minkowski2.cc ../src/cgaladv_convexhull2.cc ${COMMON_SOURCES}) diff --git a/tests/OffscreenContextWGL.cc b/tests/OffscreenContextWGL.cc index 7e97676..6e202a4 100644 --- a/tests/OffscreenContextWGL.cc +++ b/tests/OffscreenContextWGL.cc @@ -12,13 +12,14 @@ For more info: */ #include <windows.h> +#include <vector> +#include <GL/gl.h> #include "OffscreenContext.h" #include "printutils.h" #include "imageutils.h" +#include "system-gl.h" #include "fbo.h" -#include <vector> -#include <GL/gl.h> using namespace std; @@ -42,25 +43,6 @@ void offscreen_context_init(OffscreenContext &ctx, int width, int height) ctx.fbo = NULL; } -void glewCheck() { -#ifdef DEBUG - cerr << "GLEW version " << glewGetString(GLEW_VERSION) << "\n"; - cerr << (const char *)glGetString(GL_RENDERER) << "(" << (const char *)glGetString(GL_VENDOR) << ")\n" - << "OpenGL version " << (const char *)glGetString(GL_VERSION) << "\n"; - //cerr << "Extensions: " << (const char *)glGetString(GL_EXTENSIONS) << "\n"; - - if (GLEW_ARB_framebuffer_object) { - cerr << "ARB_FBO supported\n"; - } - if (GLEW_EXT_framebuffer_object) { - cerr << "EXT_FBO supported\n"; - } - if (GLEW_EXT_packed_depth_stencil) { - cerr << "EXT_packed_depth_stencil\n"; - } -#endif -} - LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { return DefWindowProc( hwnd, message, wparam, lparam ); @@ -159,7 +141,7 @@ OffscreenContext *create_offscreen_context(int w, int h) cerr << "Unable to init GLEW: " << glewGetErrorString(err) << "\n"; return NULL; } - glewCheck(); + glew_dump(); ctx->fbo = fbo_new(); if (!fbo_init(ctx->fbo, w, h)) { diff --git a/tests/system-gl.cc b/tests/system-gl.cc index 7000221..fe9bdce 100644 --- a/tests/system-gl.cc +++ b/tests/system-gl.cc @@ -21,9 +21,15 @@ void glew_dump() { cerr << "Extensions: " << endl << " " << extensions << endl; } - cerr << " GLEW_ARB_framebuffer_object: " << ((GLEW_ARB_framebuffer_object==1) ? "yes" : "no" ) << endl - << " GLEW_EXT_framebuffer_object: " << ((GLEW_EXT_framebuffer_object==1) ? "yes" : "no") << endl - << " GLEW_EXT_packed_depth_stencil: " << ((GLEW_EXT_packed_depth_stencil==1) ? "yes" : "no") << endl; + cerr << " GL_ARB_framebuffer_object: " + << (glewIsSupported("GL_ARB_framebuffer_object") ? "yes" : "no") + << endl + << " GL_EXT_framebuffer_object: " + << (glewIsSupported("GL_EXT_framebuffer_object") ? "yes" : "no") + << endl + << " GL_EXT_packed_depth_stencil: " + << (glewIsSupported("GL_EXT_packed_depth_stencil") ? "yes" : "no") + << endl; }; const char * gl_errors[] = { |