From 470a96fee39681eeb0897ddb32365caa60267843 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 21 Feb 2016 07:59:17 +0000 Subject: [PATCH] fix api demos --- CMakeLists.txt | 2 +- Graphics/drawContext.cpp | 5 ++--- Graphics/drawContext.h | 2 +- utils/api_demos/CMakeLists.txt | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a5745e799..126df1b370 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,7 +93,7 @@ opt(WRAP_PYTHON "Enable generation of Python wrappers" OFF) opt(ZIPPER "Enable Zip file compression/decompression" OFF) set(GMSH_MAJOR_VERSION 2) -set(GMSH_MINOR_VERSION 11) +set(GMSH_MINOR_VERSION 12) set(GMSH_PATCH_VERSION 0) set(GMSH_EXTRA_VERSION "" CACHE STRING "Gmsh extra version string") diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index b8b051a476..d9eabed5ce 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -72,10 +72,9 @@ bool drawContext::isHighResolution() // this must be dynamic: the high resolution can change when a window is moved // across displays #if defined(HAVE_FLTK) - return _openglWindow->pixel_w() > _openglWindow->w(); -#else - return false; + if(_openglWindow) return _openglWindow->pixel_w() > _openglWindow->w(); #endif + return false; } drawContextGlobal *drawContext::global() diff --git a/Graphics/drawContext.h b/Graphics/drawContext.h index 35ca6cde7e..e973add3e9 100644 --- a/Graphics/drawContext.h +++ b/Graphics/drawContext.h @@ -132,7 +132,7 @@ class drawContext { enum RenderMode {GMSH_RENDER=1, GMSH_SELECT=2, GMSH_FEEDBACK=3}; int render_mode; // current rendering mode public: - drawContext(openglWindow *window, drawTransform *transform=0); + drawContext(openglWindow *window=0, drawTransform *transform=0); ~drawContext(); bool isHighResolution(); void copyViewAttributes(drawContext *other) diff --git a/utils/api_demos/CMakeLists.txt b/utils/api_demos/CMakeLists.txt index 8fc105af2f..82b2f9683a 100644 --- a/utils/api_demos/CMakeLists.txt +++ b/utils/api_demos/CMakeLists.txt @@ -29,8 +29,8 @@ endif(APPLE) add_executable(mainVertexArray mainVertexArray.cpp) target_link_libraries(mainVertexArray shared) -add_executable(mainAntTweakBar mainAntTweakBar.cpp) -target_link_libraries(mainAntTweakBar shared AntTweakBar ${glut}) +#add_executable(mainAntTweakBar mainAntTweakBar.cpp) +#target_link_libraries(mainAntTweakBar shared AntTweakBar ${glut}) add_executable(mainCartesian mainCartesian.cpp) target_link_libraries(mainCartesian shared) -- GitLab