From bd7c409b17e289d79c0f888fa362d2fe28dab57b Mon Sep 17 00:00:00 2001 From: juergen <juergen@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Fri, 5 Mar 2010 15:40:50 +0000 Subject: [PATCH] -windows changes -fixes to octree -fixed several warnings git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1774 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- cmake_support/OST.cmake | 9 +++++++-- modules/gfx/src/impl/connect_renderer_base.hh | 2 +- modules/gfx/src/impl/map_octree.hh | 1 + modules/gfx/src/map_slab.cc | 4 ++-- modules/gfx/src/scene.hh | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cmake_support/OST.cmake b/cmake_support/OST.cmake index f772e065f..3a0ea2680 100644 --- a/cmake_support/OST.cmake +++ b/cmake_support/OST.cmake @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Author: Marco Biasini +# Author: Marco Biasini, Juergen Haas # # This file contains a bunch of useful macros to facilitate the build-system # configuration for the modules. @@ -489,8 +489,13 @@ macro(ost_unittest MODULE SOURCE_FILES) endif() endif() foreach(py_test ${PY_TESTS}) + if(WIN32) + set (PY_TESTS_CMD "${EXECUTABLE_OUTPUT_PATH}/ost.bat") + else() + set (PY_TESTS_CMD "${EXECUTABLE_OUTPUT_PATH}/ost.bat") + endif() add_custom_target("${py_test}_run" - COMMAND ${EXECUTABLE_OUTPUT_PATH}/ost ${CMAKE_CURRENT_SOURCE_DIR}/${py_test} || echo + COMMAND ${PY_TESTS_CMD} ${CMAKE_CURRENT_SOURCE_DIR}/${py_test} || echo WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "running checks ${py_test}" VERBATIM) add_dependencies("${py_test}_run" ost_scripts "_${MODULE}") diff --git a/modules/gfx/src/impl/connect_renderer_base.hh b/modules/gfx/src/impl/connect_renderer_base.hh index 0d1cf46e5..06504f377 100644 --- a/modules/gfx/src/impl/connect_renderer_base.hh +++ b/modules/gfx/src/impl/connect_renderer_base.hh @@ -56,7 +56,7 @@ public: protected: void SetFixedPickRadius(float radius) { pick_radius_=radius;} bool HasFixedPickRadius() const { return pick_radius_!=0.0; } - bool GetFixedPickRadius() const { return pick_radius_; } + float GetFixedPickRadius() const { return pick_radius_; } protected: float pick_radius_; diff --git a/modules/gfx/src/impl/map_octree.hh b/modules/gfx/src/impl/map_octree.hh index 8e453647d..08a2c57c2 100644 --- a/modules/gfx/src/impl/map_octree.hh +++ b/modules/gfx/src/impl/map_octree.hh @@ -22,6 +22,7 @@ #include <ost/img/image_handle.hh> #include <ost/img/image_state.hh> #include <ost/gfx/module_config.hh> +#include <ost/stdint.hh> /* Author: Marco Biasini */ diff --git a/modules/gfx/src/map_slab.cc b/modules/gfx/src/map_slab.cc index 60775444c..32da5912c 100644 --- a/modules/gfx/src/map_slab.cc +++ b/modules/gfx/src/map_slab.cc @@ -188,8 +188,8 @@ std::pair<float, float> calc_sr(float ax, float ay, float cx, float cy) { float det = ax*by-ay*bx; - if(std::abs(det)<1e-10) { - return std::make_pair(0.0,0.0); + if(std::abs(det)<1e-10f) { + return std::make_pair(0.0f,0.0f); } return std::make_pair((cx*by-cy*bx)/det, (ax*cy-ay*cx)/det); diff --git a/modules/gfx/src/scene.hh b/modules/gfx/src/scene.hh index e35a4b72f..655d207d9 100644 --- a/modules/gfx/src/scene.hh +++ b/modules/gfx/src/scene.hh @@ -375,7 +375,7 @@ private: Color fog_color_; bool shadow_flag_; int shadow_quality_; - GLuint texture_id_[1]; + GLuint texture_id_; bool auto_autoslab_; bool offscreen_flag_; -- GitLab