Hello Carsten,
On 01.07.2016 18:17, Carsten Neumann wrote:
I suspect the problem is that the texture memory is not initialized,
because there is no data specified for the OSG::Image used with the
OSG::TextureObjChunk - which is mostly fine since these textures are
used as render targets before they are read for the first time - except
for the adaptive luminance texture from the previous frame (which has
undefined content on the very first frame).
For this texture we would need a way to initialize it when it is
created. I haven't thought through all the consequences, but one way to
do this is add a field SFVector4f "ClearValues" to TextureObjChunk and
if the Image has no data issue the glClearTexImage call when creating
the OpenGL texture object in TextureObjChunk::handleTexture.
I will take a look into this.
On linux it is more about the default compiler dialect. GCC 6.1
(released 2016-04) is the first release that switched the default to
C++14 (previous C++98). So while it had full support for C++11 for a
long time it is not enabled by default.
That means system compiler for distributions that are widely used at
this point in time need an extra compiler switch to compile C++11 code.
I would not bother with that. C++11 and C++14 are such a huge leap that
it would be a shame to stick to old C++03, at least for the long time.
However, I will of course respect your decision :-)
The overload of std::vector<T>::erase() that takes a const_iterator
overload is a C++11 addition, before erase() required a iterator
argument, see http://en.cppreference.com/w/cpp/container/vector/erase
I didn't know that.
Third, I'm still hoping for a CMake build system solution for the
AntTweakBar library, that allows me to easily integrate the library in
the generated example projects. Do you have an idea how to setup things
for that. If not, however, I will take some time to come up with a
solution, hopefully.
I haven't gotten around to that. If you want to take a stab at it that
would certainly be appreciated. It should be possible to model this
after the existing external dependencies (e.g. image format libs). So
add a OSG_CONFIGURE_ANTTWEAKBAR macro to
CMake/OSGConfigurePackages.cmake and call find_package() from there. For
more details I'll have to dive back into the build system myself, been a
while that I looked at it.
Attached you can find a patch file that contains the CMake build system
adaptation for AntTweakBar.
Besides, it contains additional changes to CMake build system in order
to support some other libraries.
1. I added the Qhull library. Currently it is not used at all, but I'm
planning to use it in the OpenSG Base library in the near future.
Link: http://www.qhull.org/
https://github.com/qhull/qhull/wiki
2. I added the glm and vmath libraries. I do not intend to use them in
any OpenSG libraries nor in any example, but here and then I use them in
my examples for testing some code fragments. They are used a lot in the
OpenGL community and sometimes it is quite useful to have them at hand.
If the libraries are not present nothing awful will be happen. I would
really appreciate support for these. The changes are really minimal.
Remark 1: AntTweakBar, glm and vmath only show up in the Simple examples
targets.
Remark 2: I'm not that proficient in the OpenSG CMake build system that
I can testimony that the changes are correct for every platform. I only
work on the Microsoft Windows platform and do not know the rules for
Linux, OSX, etc. On my Windows platform everythink is working fine, so.
I hope that OpenSG can support these four libraries in the way I do need
them.
Best,
Johannes
diff -rupN org/opensg/CMake/FindAntTweakBar_OpenSG.cmake
new/opensg/CMake/FindAntTweakBar_OpenSG.cmake
--- org/opensg/CMake/FindAntTweakBar_OpenSG.cmake 1970-01-01
01:00:00.000000000 +0100
+++ new/opensg/CMake/FindAntTweakBar_OpenSG.cmake 2016-07-12
16:39:18.318756300 +0200
@@ -0,0 +1,49 @@
+# - Find AntTweakBar
+# Find the native AntTweakBar includes and library
+# This module defines
+# ANTTWEAKBAR_INCLUDE_DIR, where to find AntTweakBar/include/AntTweakBar.h.
+# ANTTWEAKBAR_LIBRARIES, the libraries needed to use AntTweakBar.
+# ANTTWEAKBAR_FOUND, If false, do not try to use AntTweakBar.
+# also defined, but not for general use are
+# ANTTWEAKBAR_LIBRARY, where to find the AntTweakBar library.
+
+FIND_PATH(ANTTWEAKBAR_INCLUDE_DIR AntTweakBar/include/AntTweakBar.h)
+
+SET(ANTTWEAKBAR_NAME AntTweakBar)
+IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(ANTTWEAKBAR_NAME AntTweakBar64)
+ENDIF()
+
+SET(ANTTWEAKBAR_NAMES_RELEASE ${ANTTWEAKBAR_NAMES_RELEASE} ${ANTTWEAKBAR_NAME})
+FIND_LIBRARY(ANTTWEAKBAR_LIBRARY_RELEASE NAMES ${ANTTWEAKBAR_NAMES_RELEASE} )
+
+SET(ANTTWEAKBAR_NAMES_DEBUG ${ANTTWEAKBAR_NAMES_DEBUG} ${ANTTWEAKBAR_NAME})
+FIND_LIBRARY(ANTTWEAKBAR_LIBRARY_DEBUG NAMES ${ANTTWEAKBAR_NAMES_DEBUG} )
+
+IF(ANTTWEAKBAR_LIBRARY_DEBUG)
+ SET(ANTTWEAKBAR_LIBRARIES_FOUND TRUE)
+ MARK_AS_ADVANCED(ANTTWEAKBAR_LIBRARY_DEBUG)
+ENDIF(ANTTWEAKBAR_LIBRARY_DEBUG)
+
+IF(ANTTWEAKBAR_LIBRARY_RELEASE)
+ SET(ANTTWEAKBAR_LIBRARIES_FOUND TRUE)
+ MARK_AS_ADVANCED(ANTTWEAKBAR_LIBRARY_RELEASE)
+ENDIF(ANTTWEAKBAR_LIBRARY_RELEASE)
+
+# handle the QUIETLY and REQUIRED arguments and set ANTTWEAKBAR_FOUND to TRUE
if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ANTTWEAKBAR DEFAULT_MSG
+ ANTTWEAKBAR_LIBRARIES_FOUND
ANTTWEAKBAR_INCLUDE_DIR)
+
+#IF(ANTTWEAKBAR_FOUND)
+# SET(ANTTWEAKBAR_LIBRARIES ${ANTTWEAKBAR_LIBRARY})
+#ENDIF(ANTTWEAKBAR_FOUND)
+
+# Deprecated declarations.
+#SET (NATIVE_ANTTWEAKBAR_INCLUDE_PATH ${ANTTWEAKBAR_INCLUDE_DIR} )
+#IF(ANTTWEAKBAR_LIBRARY)
+# GET_FILENAME_COMPONENT (NATIVE_ANTTWEAKBAR_LIB_PATH ${ANTTWEAKBAR_LIBRARY}
PATH)
+#ENDIF(ANTTWEAKBAR_LIBRARY)
+
+MARK_AS_ADVANCED(ANTTWEAKBAR_LIBRARIES_FOUND ANTTWEAKBAR_INCLUDE_DIR )
diff -rupN org/opensg/CMake/FindGlm_OpenSG.cmake
new/opensg/CMake/FindGlm_OpenSG.cmake
--- org/opensg/CMake/FindGlm_OpenSG.cmake 1970-01-01 01:00:00.000000000
+0100
+++ new/opensg/CMake/FindGlm_OpenSG.cmake 2016-07-13 09:37:43.899027500
+0200
@@ -0,0 +1,21 @@
+# - Find GLM
+# Find the native Glm includes and library
+# This module defines
+# GLM_INCLUDE_DIR, where to find glm/glm/glm.hpp.
+# GLM_LIBRARIES, the libraries needed to use Glm.
+# GLM_FOUND, If false, do not try to use Glm.
+# also defined, but not for general use are
+# GLM_LIBRARY, where to find the Glm library.
+
+FIND_PATH(GLM_INCLUDE_DIR glm/glm.hpp)
+
+SET(GLM_LIBRARY "")
+SET(GLM_LIBRARIES "")
+
+IF(GLM_INCLUDE_DIR)
+ SET(GLM_FOUND TRUE)
+ELSE()
+ SET(GLM_FOUND FALSE)
+ENDIF()
+
+MARK_AS_ADVANCED(GLM_INCLUDE_DIR)
diff -rupN org/opensg/CMake/FindLibMini_OpenSG.cmake
new/opensg/CMake/FindLibMini_OpenSG.cmake
--- org/opensg/CMake/FindLibMini_OpenSG.cmake 2016-07-01 08:15:25.894562200
+0200
+++ new/opensg/CMake/FindLibMini_OpenSG.cmake 2016-07-12 14:30:30.556465400
+0200
@@ -1,44 +1,44 @@
# - Find LibMini
# Find the native LibMini includes and library
# This module defines
-# OSG_LIBMINI_INCLUDE_DIR, where to find mini/mini.h, etc.
-# OSG_LIBMINI_LIBRARIES, the libraries needed to use LibMini.
-# OSG_LIBMINI_FOUND, If false, do not try to use LibMini.
+# LIBMINI_INCLUDE_DIR, where to find mini/mini.h, etc.
+# LIBMINI_LIBRARIES, the libraries needed to use LibMini.
+# LIBMINI_FOUND, If false, do not try to use LibMini.
# also defined, but not for general use are
-# OSG_LIBMINI_LIBRARY, where to find the LibMini library.
+# LIBMINI_LIBRARY, where to find the LibMini library.
-FIND_PATH(OSG_LIBMINI_INCLUDE_DIR mini/mini.h)
+FIND_PATH(LIBMINI_INCLUDE_DIR mini/mini.h)
-SET(OSG_LIBMINI_NAMES_RELEASE ${OSG_LIBMINI_NAMES_RELEASE} libmini)
-FIND_LIBRARY(OSG_LIBMINI_LIBRARY_RELEASE NAMES ${OSG_LIBMINI_NAMES_RELEASE} )
+SET(LIBMINI_NAMES_RELEASE ${LIBMINI_NAMES_RELEASE} libmini)
+FIND_LIBRARY(LIBMINI_LIBRARY_RELEASE NAMES ${LIBMINI_NAMES_RELEASE} )
-SET(OSG_LIBMINI_NAMES_DEBUG ${OSG_LIBMINI_NAMES_DEBUG} libminid)
-FIND_LIBRARY(OSG_LIBMINI_LIBRARY_DEBUG NAMES ${OSG_LIBMINI_NAMES_DEBUG} )
+SET(LIBMINI_NAMES_DEBUG ${LIBMINI_NAMES_DEBUG} libminid)
+FIND_LIBRARY(LIBMINI_LIBRARY_DEBUG NAMES ${LIBMINI_NAMES_DEBUG} )
-IF(OSG_LIBMINI_LIBRARY_DEBUG)
- SET(OSG_LIBMINI_LIBRARIES_FOUND TRUE)
- MARK_AS_ADVANCED(OSG_LIBMINI_LIBRARY_DEBUG)
-ENDIF(OSG_LIBMINI_LIBRARY_DEBUG)
+IF(LIBMINI_LIBRARY_DEBUG)
+ SET(LIBMINI_LIBRARIES_FOUND TRUE)
+ MARK_AS_ADVANCED(LIBMINI_LIBRARY_DEBUG)
+ENDIF(LIBMINI_LIBRARY_DEBUG)
-IF(OSG_LIBMINI_LIBRARY_RELEASE)
- SET(OSG_LIBMINI_LIBRARIES_FOUND TRUE)
- MARK_AS_ADVANCED(OSG_LIBMINI_LIBRARY_RELEASE)
-ENDIF(OSG_LIBMINI_LIBRARY_RELEASE)
+IF(LIBMINI_LIBRARY_RELEASE)
+ SET(LIBMINI_LIBRARIES_FOUND TRUE)
+ MARK_AS_ADVANCED(LIBMINI_LIBRARY_RELEASE)
+ENDIF(LIBMINI_LIBRARY_RELEASE)
-# handle the QUIETLY and REQUIRED arguments and set OSG_LIBMINI_FOUND to TRUE
if
+# handle the QUIETLY and REQUIRED arguments and set LIBMINI_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSG_LIBMINI DEFAULT_MSG
- OSG_LIBMINI_LIBRARIES_FOUND
OSG_LIBMINI_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBMINI DEFAULT_MSG
+ LIBMINI_LIBRARIES_FOUND LIBMINI_INCLUDE_DIR)
-#IF(OSG_LIBMINI_FOUND)
-# SET(OSG_LIBMINI_LIBRARIES ${OSG_LIBMINI_LIBRARY})
-#ENDIF(OSG_LIBMINI_FOUND)
+#IF(LIBMINI_FOUND)
+# SET(LIBMINI_LIBRARIES ${LIBMINI_LIBRARY})
+#ENDIF(LIBMINI_FOUND)
# Deprecated declarations.
-#SET (NATIVE_OSG_LIBMINI_INCLUDE_PATH ${OSG_LIBMINI_INCLUDE_DIR} )
-#IF(OSG_LIBMINI_LIBRARY)
-# GET_FILENAME_COMPONENT (NATIVE_OSG_LIBMINI_LIB_PATH ${OSG_LIBMINI_LIBRARY}
PATH)
-#ENDIF(OSG_LIBMINI_LIBRARY)
+#SET (NATIVE_LIBMINI_INCLUDE_PATH ${LIBMINI_INCLUDE_DIR} )
+#IF(LIBMINI_LIBRARY)
+# GET_FILENAME_COMPONENT (NATIVE_LIBMINI_LIB_PATH ${LIBMINI_LIBRARY} PATH)
+#ENDIF(LIBMINI_LIBRARY)
-MARK_AS_ADVANCED(OSG_LIBMINI_LIBRARIES_FOUND OSG_LIBMINI_INCLUDE_DIR )
+MARK_AS_ADVANCED(LIBMINI_LIBRARIES_FOUND LIBMINI_INCLUDE_DIR )
diff -rupN org/opensg/CMake/FindQhull_OpenSG.cmake
new/opensg/CMake/FindQhull_OpenSG.cmake
--- org/opensg/CMake/FindQhull_OpenSG.cmake 1970-01-01 01:00:00.000000000
+0100
+++ new/opensg/CMake/FindQhull_OpenSG.cmake 2016-07-13 10:54:57.993530300
+0200
@@ -0,0 +1,57 @@
+# - Find Qhull
+# Find the native Qhull includes and library
+# This module defines
+# QHULL_INCLUDE_DIR, where to find libqhullcpp/Qhull.h.
+# QHULL_LIBRARIES, the libraries needed to use Qhull.
+# QHULL_FOUND, If false, do not try to use Qhull.
+# also defined, but not for general use are
+
+FIND_PATH(QHULL_INCLUDE_DIR libqhullcpp/Qhull.h)
+
+FIND_LIBRARY(QHULL_LIBRARY_QHULLCPP_RELEASE NAMES qhullcpp)
+FIND_LIBRARY(QHULL_LIBRARY_QHULLCPP_DEBUG NAMES qhullcpp_d qhullcppD)
+
+FIND_LIBRARY(QHULL_LIBRARY_QHULLSTATIC_R_RELEASE NAMES qhullstatic_r )
+FIND_LIBRARY(QHULL_LIBRARY_QHULLSTATIC_R_DEBUG NAMES qhullstatic_rd
qhullstatic_rD)
+
+IF(QHULL_LIBRARY_QHULLCPP_RELEASE)
+ SET(QHULL_LIBRARY_QHULLCPP_FOUND TRUE)
+ MARK_AS_ADVANCED(QHULL_LIBRARY_QHULLCPP_RELEASE)
+ENDIF(QHULL_LIBRARY_QHULLCPP_RELEASE)
+
+IF(QHULL_LIBRARY_QHULLCPP_DEBUG)
+ SET(QHULL_LIBRARY_QHULLCPP_FOUND TRUE)
+ MARK_AS_ADVANCED(QHULL_LIBRARY_QHULLCPP_DEBUG)
+ENDIF(QHULL_LIBRARY_QHULLCPP_DEBUG)
+
+IF(QHULL_LIBRARY_QHULLSTATIC_R_RELEASE)
+ SET(QHULL_LIBRARY_QHULLSTATIC_R_FOUND TRUE)
+ MARK_AS_ADVANCED(QHULL_LIBRARY_QHULLSTATIC_R_RELEASE)
+ENDIF(QHULL_LIBRARY_QHULLSTATIC_R_RELEASE)
+
+IF(QHULL_LIBRARY_QHULLSTATIC_R_DEBUG)
+ SET(QHULL_LIBRARY_QHULLSTATIC_R_FOUND TRUE)
+ MARK_AS_ADVANCED(QHULL_LIBRARY_QHULLSTATIC_R_DEBUG)
+ENDIF(QHULL_LIBRARY_QHULLSTATIC_R_DEBUG)
+
+# handle the QUIETLY and REQUIRED arguments and set QHULL_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ QHULL DEFAULT_MSG
+ QHULL_LIBRARY_QHULLCPP_RELEASE
+ QHULL_LIBRARY_QHULLCPP_DEBUG
+ QHULL_LIBRARY_QHULLSTATIC_R_RELEASE
+ QHULL_LIBRARY_QHULLSTATIC_R_DEBUG
+ QHULL_INCLUDE_DIR)
+
+SET(QHULL_LIBRARIES "")
+SET(QHULL_LIBRARIES_FOUND FALSE)
+IF(QHULL_FOUND)
+ LIST(APPEND QHULL_LIBRARIES debug ${QHULL_LIBRARY_QHULLCPP_DEBUG}
optimized ${QHULL_LIBRARY_QHULLCPP_RELEASE})
+ LIST(APPEND QHULL_LIBRARIES debug ${QHULL_LIBRARY_QHULLSTATIC_R_DEBUG}
optimized ${QHULL_LIBRARY_QHULLSTATIC_R_RELEASE})
+ SET(QHULL_LIBRARIES_FOUND TRUE)
+ SET(QHULL_INCLUDE_DIRS ${QHULL_INCLUDE_DIR})
+ENDIF(QHULL_FOUND)
+
+MARK_AS_ADVANCED(QHULL_LIBRARIES_FOUND QHULL_INCLUDE_DIR)
diff -rupN org/opensg/CMake/FindVMath_OpenSG.cmake
new/opensg/CMake/FindVMath_OpenSG.cmake
--- org/opensg/CMake/FindVMath_OpenSG.cmake 1970-01-01 01:00:00.000000000
+0100
+++ new/opensg/CMake/FindVMath_OpenSG.cmake 2016-07-13 08:33:02.451402300
+0200
@@ -0,0 +1,21 @@
+# - Find VMATH
+# Find the native VMath includes and library
+# This module defines
+# VMATH_INCLUDE_DIR, where to find vmath/VectorMath.h, etc.
+# VMATH_LIBRARIES, the libraries needed to use VMath.
+# VMATH_FOUND, If false, do not try to use VMath.
+# also defined, but not for general use are
+# VMATH_LIBRARY, where to find the VMath library.
+
+FIND_PATH(VMATH_INCLUDE_DIR vmath/VectorMath.h)
+
+SET(VMATH_LIBRARY "")
+SET(VMATH_LIBRARIES "")
+
+IF(VMATH_INCLUDE_DIR)
+ SET(VMATH_FOUND TRUE)
+ELSE()
+ SET(VMATH_FOUND FALSE)
+ENDIF()
+
+MARK_AS_ADVANCED(VMATH_INCLUDE_DIR)
diff -rupN org/opensg/CMake/OSGConfigurePackages.cmake
new/opensg/CMake/OSGConfigurePackages.cmake
--- org/opensg/CMake/OSGConfigurePackages.cmake 2016-07-01 08:15:25.941362300
+0200
+++ new/opensg/CMake/OSGConfigurePackages.cmake 2016-07-13 11:12:58.114246000
+0200
@@ -1003,70 +1003,178 @@ MACRO(OSG_CONFIGURE_LIBMINI)
IF(OSG_USE_OSGSUPPORT_LIBS)
IF(EXISTS
${OSG_SUPPORT_ROOT}/include${OSG_SUPPORT_INC_SUBDIR}/mini/mini.h)
- SET(OSG_LIBMINI_INCLUDE_DIR
${OSG_SUPPORT_ROOT}/include${OSG_SUPPORT_INC_SUBDIR} CACHE PATH "" FORCE)
+ SET(LIBMINI_INCLUDE_DIR
${OSG_SUPPORT_ROOT}/include${OSG_SUPPORT_INC_SUBDIR} CACHE PATH "" FORCE)
ENDIF()
- SET(OSG_LIBMINI_LIBRARY_RELEASE "" CACHE INTERNAL "" FORCE)
- SET(OSG_LIBMINI_LIBRARY_DEBUG "" CACHE INTERNAL "" FORCE)
- SET(OSG_LIBMINI_FOUND FALSE CACHE INTERNAL "" FORCE)
+ SET(LIBMINI_LIBRARY_RELEASE "" CACHE INTERNAL "" FORCE)
+ SET(LIBMINI_LIBRARY_DEBUG "" CACHE INTERNAL "" FORCE)
+ SET(LIBMINI_FOUND FALSE CACHE INTERNAL "" FORCE)
IF(UNIX)
IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgmini.a)
- SET(OSG_LIBMINI_LIBRARY_RELEASE
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgmini.a)
+ SET(LIBMINI_LIBRARY_RELEASE
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgmini.a)
ENDIF()
IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/debug/libosgmini.a)
- SET(OSG_LIBMINI_LIBRARY_DEBUG
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/debug/libosgmini.a)
+ SET(LIBMINI_LIBRARY_DEBUG
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/debug/libosgmini.a)
ENDIF()
ELSEIF(WIN32)
IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgmini.lib)
- SET(OSG_LIBMINI_LIBRARY_RELEASE
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgmini.lib)
+ SET(LIBMINI_LIBRARY_RELEASE
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgmini.lib)
ENDIF()
IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgminiD.lib)
- SET(OSG_LIBMINI_LIBRARY_DEBUG
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgminiD.lib)
+ SET(LIBMINI_LIBRARY_DEBUG
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libosgminiD.lib)
ENDIF()
ENDIF()
- IF(OSG_LIBMINI_INCLUDE_DIR)
- IF(OSG_LIBMINI_LIBRARY_DEBUG OR OSG_LIBMINI_LIBRARY_RELEASE)
- SET(OSG_LIBMINI_FOUND TRUE CACHE INTERNAL "" FORCE)
+ IF(LIBMINI_INCLUDE_DIR)
+ IF(LIBMINI_LIBRARY_DEBUG OR LIBMINI_LIBRARY_RELEASE)
+ SET(LIBMINI_FOUND TRUE CACHE INTERNAL "" FORCE)
ENDIF()
ENDIF()
- IF(OSG_LIBMINI_FOUND)
- OSG_ADD_IMPORT_LIB(OSG_LIBMINI_TARGETS OSG_LIBMINI_LIBRARY)
- SET(OSG_LIBMINI_LIBRARIES ${OSG_LIBMINI_TARGETS} CACHE STRING ""
FORCE)
- ENDIF(OSG_LIBMINI_FOUND)
+ IF(LIBMINI_FOUND)
+ OSG_ADD_IMPORT_LIB(LIBMINI_TARGETS LIBMINI_LIBRARY)
+ SET(LIBMINI_LIBRARIES ${LIBMINI_TARGETS} CACHE STRING "" FORCE)
+ ENDIF(LIBMINI_FOUND)
ENDIF(OSG_USE_OSGSUPPORT_LIBS)
- IF(NOT OSG_USE_OSGSUPPORT_LIBS OR NOT OSG_LIBMINI_FOUND)
+ IF(NOT OSG_USE_OSGSUPPORT_LIBS OR NOT LIBMINI_FOUND)
IF(WIN32)
OSG_FIND_PACKAGE(LibMini_OpenSG)
- IF(OSG_LIBMINI_FOUND)
- OSG_ADD_IMPORT_LIB(OSG_LIBMINI_TARGETS OSG_LIBMINI_LIBRARY)
+ IF(LIBMINI_FOUND)
+ OSG_ADD_IMPORT_LIB(LIBMINI_TARGETS LIBMINI_LIBRARY)
- SET(OSG_LIBMINI_LIBRARIES ${OSG_LIBMINI_TARGETS} CACHE STRING ""
FORCE)
- ENDIF(OSG_LIBMINI_FOUND)
+ SET(LIBMINI_LIBRARIES ${LIBMINI_TARGETS} CACHE STRING "" FORCE)
+ ENDIF(LIBMINI_FOUND)
ELSE(WIN32)
OSG_FIND_PACKAGE(LibMini_OpenSG)
ENDIF(WIN32)
- ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS OR NOT OSG_LIBMINI_FOUND)
+ ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS OR NOT LIBMINI_FOUND)
- IF(OSG_LIBMINI_FOUND)
+ IF(LIBMINI_FOUND)
OSG_SET(OSG_WITH_LIBMINI 1)
- ENDIF(OSG_LIBMINI_FOUND)
+ ENDIF(LIBMINI_FOUND)
ENDMACRO(OSG_CONFIGURE_LIBMINI)
##############################################################################
+# AntTweakBar
+##############################################################################
+
+MACRO(OSG_CONFIGURE_ANTTWEAKBAR)
+
+ IF(OSG_USE_OSGSUPPORT_LIBS)
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/include${OSG_SUPPORT_INC_SUBDIR}/AntTweakBar/include/AntTweakBar.h)
+ SET(ANTTWEAKBAR_INCLUDE_DIR
${OSG_SUPPORT_ROOT}/include${OSG_SUPPORT_INC_SUBDIR}/AntTweakBar/include CACHE
PATH "" FORCE)
+ ENDIF()
+
+ SET(ANTTWEAKBAR_LIBRARY_RELEASE "" CACHE INTERNAL "" FORCE)
+ SET(ANTTWEAKBAR_LIBRARY_DEBUG "" CACHE INTERNAL "" FORCE)
+ SET(ANTTWEAKBAR_FOUND FALSE CACHE INTERNAL "" FORCE)
+
+ IF(UNIX)
+
+ IF(OSG_PLATFORM_64)
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libanttweakbar64.a)
+ SET(ANTTWEAKBAR_LIBRARY_RELEASE
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libanttweakbar64.a)
+ ENDIF()
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/debug/libosgmini64.a)
+ SET(ANTTWEAKBAR_LIBRARY_DEBUG
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/debug/libanttweakbar64.a)
+ ENDIF()
+ ELSE()
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libanttweakbar.a)
+ SET(ANTTWEAKBAR_LIBRARY_RELEASE
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/libanttweakbar.a)
+ ENDIF()
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/debug/libosgmini.a)
+ SET(ANTTWEAKBAR_LIBRARY_DEBUG
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/debug/libanttweakbar.a)
+ ENDIF()
+ ENDIF()
+
+ ELSEIF(WIN32)
+
+ IF(OSG_PLATFORM_64)
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/AntTweakBar64.lib)
+ SET(ANTTWEAKBAR_LIBRARY_RELEASE
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/AntTweakBar64.lib)
+ ENDIF()
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/AntTweakBar64.lib)
+ SET(ANTTWEAKBAR_LIBRARY_DEBUG
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/AntTweakBar64.lib)
+ ENDIF()
+ ELSE()
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/AntTweakBar.lib)
+ SET(ANTTWEAKBAR_LIBRARY_RELEASE
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/AntTweakBar.lib)
+ ENDIF()
+ IF(EXISTS
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/AntTweakBar.lib)
+ SET(ANTTWEAKBAR_LIBRARY_DEBUG
${OSG_SUPPORT_ROOT}/lib${OSG_LIBDIR_BASE_SUFFIX}/AntTweakBar.lib)
+ ENDIF()
+ ENDIF()
+
+ ENDIF()
+
+ IF(ANTTWEAKBAR_INCLUDE_DIR)
+ IF(ANTTWEAKBAR_LIBRARY_DEBUG OR ANTTWEAKBAR_LIBRARY_RELEASE)
+ SET(ANTTWEAKBAR_FOUND TRUE CACHE INTERNAL "" FORCE)
+ ENDIF()
+ ENDIF()
+
+ IF(ANTTWEAKBAR_FOUND)
+ OSG_ADD_IMPORT_LIB(ANTTWEAKBAR_TARGETS ANTTWEAKBAR_LIBRARY)
+ SET(ANTTWEAKBAR_LIBRARIES ${ANTTWEAKBAR_TARGETS} CACHE STRING ""
FORCE)
+ ENDIF(ANTTWEAKBAR_FOUND)
+
+ ENDIF(OSG_USE_OSGSUPPORT_LIBS)
+
+ IF(NOT OSG_USE_OSGSUPPORT_LIBS OR NOT ANTTWEAKBAR_FOUND)
+ IF(WIN32)
+ OSG_FIND_PACKAGE(AntTweakBar_OpenSG)
+
+ IF(ANTTWEAKBAR_FOUND)
+ OSG_ADD_IMPORT_LIB(ANTTWEAKBAR_TARGETS ANTTWEAKBAR_LIBRARY)
+
+ SET(ANTTWEAKBAR_LIBRARIES ${ANTTWEAKBAR_TARGETS} CACHE STRING ""
FORCE)
+ ENDIF(ANTTWEAKBAR_FOUND)
+
+ ELSE(WIN32)
+ OSG_FIND_PACKAGE(AntTweakBar_OpenSG)
+ ENDIF(WIN32)
+
+ ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS OR NOT ANTTWEAKBAR_FOUND)
+
+ IF(ANTTWEAKBAR_FOUND)
+ OSG_SET(OSG_WITH_ANTTWEAKBAR 1)
+ ENDIF(ANTTWEAKBAR_FOUND)
+
+ENDMACRO(OSG_CONFIGURE_ANTTWEAKBAR)
+
+##############################################################################
+# Qhull
+##############################################################################
+
+MACRO(OSG_CONFIGURE_QHULL)
+
+ IF(OSG_USE_OSGSUPPORT_LIBS)
+ # ToDo
+ ENDIF(OSG_USE_OSGSUPPORT_LIBS)
+
+ IF(NOT OSG_USE_OSGSUPPORT_LIBS OR NOT QHULL_FOUND)
+ OSG_FIND_PACKAGE(Qhull_OpenSG)
+ ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS OR NOT QHULL_FOUND)
+
+ IF(QHULL_FOUND)
+ OSG_SET(OSG_WITH_QHULL 1)
+ ENDIF(QHULL_FOUND)
+
+ENDMACRO(OSG_CONFIGURE_QHULL)
+
+##############################################################################
# VTK
##############################################################################
diff -rupN org/opensg/CMakeLists.txt new/opensg/CMakeLists.txt
--- org/opensg/CMakeLists.txt 2016-07-01 08:15:25.972562300 +0200
+++ new/opensg/CMakeLists.txt 2016-07-12 14:32:02.698627200 +0200
@@ -765,9 +765,9 @@ IF(NOT OSG_BUILD_DEPENDEND)
OSG_CONFIGURE_LIBMINI()
- OSG_ADD_OPT(OSG_LIBMINI_FOUND)
- OSG_ADD_OPT(OSG_LIBMINI_INCLUDE_DIR)
- OSG_ADD_OPT(OSG_LIBMINI_LIBRARIES)
+ OSG_ADD_OPT(LIBMINI_FOUND)
+ OSG_ADD_OPT(LIBMINI_INCLUDE_DIR)
+ OSG_ADD_OPT(LIBMINI_LIBRARIES)
###############
#### OpenNurbs
@@ -779,6 +779,26 @@ IF(NOT OSG_BUILD_DEPENDEND)
OSG_ADD_OPT(OPENNURBS_INCLUDE_DIR)
OSG_ADD_OPT(OPENNURBS_LIBRARIES)
+ #################
+ #### AntTweakBar
+ #################
+
+ OSG_CONFIGURE_ANTTWEAKBAR()
+
+ OSG_ADD_OPT(OSG_ANTTWEAKBAR_FOUND)
+ OSG_ADD_OPT(OSG_ANTTWEAKBAR_INCLUDE_DIR)
+ OSG_ADD_OPT(OSG_ANTTWEAKBAR_LIBRARIES)
+
+ ###########
+ #### QHull
+ ###########
+
+ OSG_CONFIGURE_QHULL()
+
+ OSG_ADD_OPT(OSG_QHULL_FOUND)
+ OSG_ADD_OPT(OSG_QHULL_INCLUDE_DIR)
+ OSG_ADD_OPT(OSG_QHULL_LIBRARIES)
+
#############
#### Python
#############
diff -rupN org/opensg/Examples/Simple/CMakeLists.fromosg.txt
new/opensg/Examples/Simple/CMakeLists.fromosg.txt
--- org/opensg/Examples/Simple/CMakeLists.fromosg.txt 2016-07-01
08:15:26.705763600 +0200
+++ new/opensg/Examples/Simple/CMakeLists.fromosg.txt 2016-07-13
08:54:44.837134200 +0200
@@ -86,6 +86,31 @@ FOREACH(OSGEXTDEP ${OSG_EXTERNAL_COMPONE
INCLUDE_DIRECTORIES(SYSTEM ${${OSGEXTDEP}_INCLUDE_DIR})
ENDFOREACH()
+set(OSG_ADDON_LIBRARIES "")
+
+IF(ANTTWEAKBAR_FOUND)
+ INCLUDE_DIRECTORIES(AFTER ${ANTTWEAKBAR_INCLUDE_DIR})
+ LIST(APPEND OSG_ADDON_LIBRARIES ${ANTTWEAKBAR_LIBRARIES})
+ add_definitions(-DOSG_WITH_ANTTWEAKBAR)
+ENDIF()
+
+IF(QHULL_FOUND)
+ INCLUDE_DIRECTORIES(AFTER ${QHULL_INCLUDE_DIR})
+ LIST(APPEND OSG_ADDON_LIBRARIES ${QHULL_LIBRARIES})
+ add_definitions(-DOSG_WITH_QHULL)
+ENDIF()
+
+OSG_FIND_PACKAGE(Glm_OpenSG)
+IF(GLM_FOUND)
+ INCLUDE_DIRECTORIES(AFTER ${GLM_INCLUDE_DIR})
+ add_definitions(-DOSG_WITH_GLM)
+ENDIF(GLM_FOUND)
+
+OSG_FIND_PACKAGE(VMath_OpenSG)
+IF(VMATH_FOUND)
+ INCLUDE_DIRECTORIES(AFTER ${VMATH_INCLUDE_DIR})
+ add_definitions(-DOSG_WITH_VMATH)
+ENDIF(VMATH_FOUND)
#############################################################################
# build executables
@@ -111,6 +136,8 @@ FOREACH(SRC ${SRCFILES})
TARGET_LINK_LIBRARIES(${EXE} ${OSGDEP})
ENDFOREACH()
+ TARGET_LINK_LIBRARIES(${EXE} ${OSG_ADDON_LIBRARIES})
+
IF(LINUX AND CMAKE_BUILD_TYPE STREQUAL "DebugGV" AND OSG_ADD_CXX_FLAGS_GV)
SET_PROPERTY(TARGET ${EXE}
APPEND PROPERTY COMPILE_FLAGS ${OSG_ADD_CXX_FLAGS_GV})
diff -rupN org/opensg/Examples/Simple/CMakeLists.standalone.txt
new/opensg/Examples/Simple/CMakeLists.standalone.txt
--- org/opensg/Examples/Simple/CMakeLists.standalone.txt 2016-07-01
08:15:26.705763600 +0200
+++ new/opensg/Examples/Simple/CMakeLists.standalone.txt 2016-07-12
17:20:22.498966000 +0200
@@ -122,9 +122,19 @@ FIND_PACKAGE(Boost COMPONENTS ${Boost_CO
IF(Boost_FOUND)
LIST(APPEND DEP_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
LIST(APPEND DEP_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
- LIST(APPEND DEP_LIBRARIES ${Boost_LIBRARIES})
+ LIST(APPEND DEP_LIBRARIES ${Boost_LIBRARIES})
ENDIF(Boost_FOUND)
+##################
+#### AntTweakBar
+
+FIND_PACKAGE(AntTweakBar)
+IF(ANTTWEAKBAR_FOUND)
+ LIST(APPEND DEP_INCLUDE_DIRS ${ANTTWEAKBAR_INCLUDE_DIRS})
+ LIST(APPEND DEP_LIBRARY_DIRS ${ANTTWEAKBAR_LIBRARY_DIRS})
+ LIST(APPEND DEP_LIBRARIES ${ANTTWEAKBAR_LIBRARIES})
+ENDIF(ANTTWEAKBAR_FOUND)
+
#############
#### OpenSG
diff -rupN org/opensg/Examples/Simple/tonemapping.cpp
new/opensg/Examples/Simple/tonemapping.cpp
--- org/opensg/Examples/Simple/tonemapping.cpp 2016-07-01 08:15:26.752563700
+0200
+++ new/opensg/Examples/Simple/tonemapping.cpp 2016-07-13 08:58:28.140125800
+0200
@@ -5,8 +5,6 @@
// The example uses the Antweak bar for gui rendering on top of OpenSG.
//
-// #define HAS_ANTTWEAKBAR
-
#define USE_MIRROR_SPHERE
#include <cstddef>
@@ -15,7 +13,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/assign/std/vector.hpp>
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
#include <AntTweakBar.h>
#endif
@@ -259,7 +257,7 @@ private:
void create_hdr_stage ();
void setup_hdr_stage ();
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
private:
void setupTweakBar ();
@@ -302,7 +300,7 @@ public:
void SetNTaps (int value); int
GetNTaps () const;
void SetSigma (float value); float
GetSigma () const;
void SetUseLinChromInterp(bool value); bool
GetUseLinChromInterp() const;
-#endif
+#endif // OSG_WITH_ANTTWEAKBAR
private:
static Example* _pExample; // Hack
@@ -355,7 +353,7 @@ private:
bool _pause;
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
TwBar* _tweakbar;
#endif
};
@@ -403,7 +401,7 @@ Example::Example(int argc, char *argv[])
, _bloom_background(true)
, _carry_depth(true)
, _pause(true)
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
, _tweakbar(NULL)
#endif
{
@@ -440,7 +438,7 @@ void Example::initialize(int argc, char
// GLUT init
int winid = setupGLUT(&argc, argv);
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
TwInit(TW_OPENGL_CORE, NULL);
#endif
@@ -480,7 +478,7 @@ void Example::initialize(int argc, char
// show the whole scene
_mgr->showAll();
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
setupTweakBar();
#endif
}
@@ -867,7 +865,7 @@ int Example::setupGLUT(int *argc, char *
glutKeyboardFunc(keyboardCB);
glutSpecialFunc(specialCB);
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
TwGLUTModifiersFunc(glutGetModifiers);
#endif
@@ -921,7 +919,7 @@ void Example::reshape(int w, int h)
{
_mgr->resize(w, h);
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
TwWindowSize(w, h);
#endif
@@ -933,7 +931,7 @@ void Example::reshape(int w, int h)
//
void Example::mouse(int button, int state, int x, int y)
{
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
if(TwEventMouseButtonGLUT(button, state, x, y))
{
glutPostRedisplay();
@@ -954,7 +952,7 @@ void Example::mouse(int button, int stat
//
void Example::motion(int x, int y)
{
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
if(TwEventMouseMotionGLUT(x, y))
{
glutPostRedisplay();
@@ -972,7 +970,7 @@ void Example::motion(int x, int y)
//
void Example::keyboard(unsigned char k, int x, int y)
{
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
if(TwEventKeyboardGLUT(k, x, y))
{
glutPostRedisplay();
@@ -1024,7 +1022,7 @@ void Example::keyboard(unsigned char k,
void Example::special(int key, int x, int y)
{
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
if(TwEventSpecialGLUT(key, x, y))
{
glutPostRedisplay();
@@ -1035,7 +1033,7 @@ void Example::special(int key, int x, in
void Example::tweakbar(OSG::DrawEnv* drawEnv)
{
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
//
// Save the current state
//
@@ -1062,7 +1060,7 @@ void Example::tweakbar(OSG::DrawEnv* dra
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
-#endif
+#endif // OSG_WITH_ANTTWEAKBAR
}
//
@@ -1427,7 +1425,7 @@ int main(int argc, char **argv)
// GLUT main loop
glutMainLoop();
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
TwTerminate();
#endif
@@ -1978,7 +1976,7 @@ HDRShaderData HDRShaderData::create_max_
/*---- AntTweakBar --------------------------------------------------------*/
-#ifdef HAS_ANTTWEAKBAR
+#ifdef OSG_WITH_ANTTWEAKBAR
std::string sGenTwDefinition(float vMin, float vMax, float steps, int
precision, const char* keyinc, const char* keydec, const char* msg, const char*
grp = NULL)
{
@@ -3272,5 +3270,5 @@ void Example::setupTweakBar()
TwAddVarCB(_tweakbar, "Specular", TW_TYPE_BOOLCPP, SetRenderSpecularCB,
GetRenderSpecularCB, this, "help='Render specular contribution.' group=Light");
}
-#endif
+#endif // OSG_WITH_ANTTWEAKBAR
diff -rupN org/opensg/Source/Base/CMakeLists.Lib.OSGBase.txt
new/opensg/Source/Base/CMakeLists.Lib.OSGBase.txt
--- org/opensg/Source/Base/CMakeLists.Lib.OSGBase.txt 2016-07-01
08:15:27.204964500 +0200
+++ new/opensg/Source/Base/CMakeLists.Lib.OSGBase.txt 2016-07-13
08:18:34.811787700 +0200
@@ -26,6 +26,11 @@ SET(${PROJECT_NAME}_DEP_UNITTEST_INCDIR
# dependencies - Additional
# SET(${PROJECT_NAME}_DEP_ADD_INCDIR)
+IF(OSG_WITH_QHULL)
+ LIST(APPEND ${PROJECT_NAME}_DEP_LIB QHULL_LIBRARIES)
+ LIST(APPEND ${PROJECT_NAME}_DEP_INCDIR QHULL_INCLUDE_DIR)
+ENDIF(WIN32 AND OSG_WITH_QHULL)
+
SET(${PROJECT_NAME}_CXXFLAGS ${OSG_ADD_CXX_FLAGS})
OSG_STORE_PROJECT_DEPENDENCIES()
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users