Commit 1e81fb2a authored by Sylvain Thery's avatar Sylvain Thery

schnapps modif

parent eb589834
...@@ -39,14 +39,16 @@ namespace CGoGN ...@@ -39,14 +39,16 @@ namespace CGoGN
namespace Utils namespace Utils
{ {
#ifdef USE_OGL_CORE_PROFILE #ifdef CGoGN_USE_OGL_CORE_PROFILE
unsigned int GLSLShader::CURRENT_OGL_VERSION = 3; unsigned int GLSLShader::CURRENT_OGL_VERSION = 3;
unsigned int GLSLShader::MAJOR_OGL_CORE = 3;
unsigned int GLSLShader::MINOR_OGL_CORE = 3;
#else #else
unsigned int GLSLShader::CURRENT_OGL_VERSION = 2; unsigned int GLSLShader::CURRENT_OGL_VERSION = 2;
unsigned int GLSLShader::MAJOR_OGL_CORE = 2;
unsigned int GLSLShader::MINOR_OGL_CORE = 1;
#endif #endif
unsigned int GLSLShader::MAJOR_OGL_CORE = 3;
unsigned int GLSLShader::MINOR_OGL_CORE = 3;
std::string GLSLShader::DEFINES_GL2=\ std::string GLSLShader::DEFINES_GL2=\
......
...@@ -19,8 +19,7 @@ SET ( CGoGN_WITH_ASSIMP OFF CACHE BOOL "build CGoGN with Assimp" ) ...@@ -19,8 +19,7 @@ SET ( CGoGN_WITH_ASSIMP OFF CACHE BOOL "build CGoGN with Assimp" )
SET ( CGoGN_WITH_ZINRI OFF CACHE BOOL "build CGoGN with Zinri lib" ) SET ( CGoGN_WITH_ZINRI OFF CACHE BOOL "build CGoGN with Zinri lib" )
SET ( CGoGN_WITH_QT ON CACHE BOOL "build CGoGN with Qt lib" ) SET ( CGoGN_WITH_QT ON CACHE BOOL "build CGoGN with Qt lib" )
SET ( DESIRED_QT_VERSION "4" CACHE STRING "4: QT4/ 5 not yet implemented" ) SET ( DESIRED_QT_VERSION "4" CACHE STRING "4: QT4/ 5 not yet implemented" )
SET ( CGoGN_WITH_PYTHONQT ON CACHE BOOL "build PythonQt (for Schnapps)") SET ( CGoGN_WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW (for VRJuggler)" )
SET ( CGoGN_WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW" )
SET ( CGoGN_USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" ) SET ( CGoGN_USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" )
SET ( CGoGN_COMPILE_EXAMPLES OFF CACHE BOOL "compile examples" ) SET ( CGoGN_COMPILE_EXAMPLES OFF CACHE BOOL "compile examples" )
...@@ -93,7 +92,7 @@ endif() ...@@ -93,7 +92,7 @@ endif()
add_definitions("-DCGOGN_ASSERT_BOOL=${ASSERT_ACTIVED}") add_definitions("-DCGOGN_ASSERT_BOOL=${ASSERT_ACTIVED}")
IF(CGoGN_USE_OGL_CORE_PROFILE) IF(CGoGN_USE_OGL_CORE_PROFILE)
add_definitions("-DUSE_OGL_CORE_PROFILE=1") add_definitions("-DCGoGN_USE_OGL_CORE_PROFILE=1")
ENDIF() ENDIF()
add_definitions("-DGLM_FORCE_RADIANS") add_definitions("-DGLM_FORCE_RADIANS")
...@@ -122,10 +121,6 @@ INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/include) ...@@ -122,10 +121,6 @@ INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/include)
ADD_SUBDIRECTORY(ThirdParty/Tools) ADD_SUBDIRECTORY(ThirdParty/Tools)
IF (CGoGN_WITH_PYTHONQT)
ADD_SUBDIRECTORY(ThirdParty/PythonQt)
ENDIF ()
ADD_SUBDIRECTORY(ThirdParty/OpenNL) ADD_SUBDIRECTORY(ThirdParty/OpenNL)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/OpenNL/src) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/OpenNL/src)
......
...@@ -41,11 +41,15 @@ SET( QT_USE_QTSVG TRUE ) ...@@ -41,11 +41,15 @@ SET( QT_USE_QTSVG TRUE )
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
add_definitions(-DGLM_FORCE_RADIANS)
#MESSAGE HERE FOR MORE EASY READING (MESSAGE AT THE END) # PythonQt dependency
MESSAGE("Build type = " ${CMAKE_BUILD_TYPE} " (for change -DCMAKE_BUILD_TYPE=Release|Debug)" ) ADD_SUBDIRECTORY(${CGoGN_ROOT_DIR}/ThirdParty/PythonQt ThirdParty_PythonQt)
# for GLM
add_definitions(-DGLM_FORCE_RADIANS)
# CGoGN compiled in one or several libs
file(STRINGS ${CGoGN_SRC_DIR}/include/cgogn_onelib.h ONELIB_STR) file(STRINGS ${CGoGN_SRC_DIR}/include/cgogn_onelib.h ONELIB_STR)
IF (ONELIB_STR EQUAL 1) IF (ONELIB_STR EQUAL 1)
SET(CGoGN_LIBS cgogn) SET(CGoGN_LIBS cgogn)
...@@ -53,12 +57,12 @@ ELSE() ...@@ -53,12 +57,12 @@ ELSE()
SET(CGoGN_LIBS topology algo container utils) SET(CGoGN_LIBS topology algo container utils)
ENDIF() ENDIF()
# use GL core profile 3.3
file(STRINGS ${CGoGN_SRC_DIR}/include/cgogn_coreprofile.h COREPROFILE_STR) file(STRINGS ${CGoGN_SRC_DIR}/include/cgogn_coreprofile.h COREPROFILE_STR)
IF (COREPROFILE_STR EQUAL 1) IF (COREPROFILE_STR EQUAL 1)
add_definitions(-DCGoGN_USE_OGL_CORE_PROFILE=1) add_definitions(-DCGoGN_USE_OGL_CORE_PROFILE=1)
ENDIF() ENDIF()
add_definitions(-DCGOGN_ASSERT_BOOL=${CGoGN_ASSERT_ACTIVED}) add_definitions(-DCGOGN_ASSERT_BOOL=${CGoGN_ASSERT_ACTIVED})
IF(CGoGN_SLOT_DEBUG_MODE) IF(CGoGN_SLOT_DEBUG_MODE)
......
...@@ -44,7 +44,7 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt ...@@ -44,7 +44,7 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
{ {
GenericMap::initAllStatics(&m_sp); GenericMap::initAllStatics(&m_sp);
#ifdef USE_OGL_CORE_PROFILE #ifdef CGoGN_USE_OGL_CORE_PROFILE
CGoGN::Utils::GLSLShader::setCurrentOGLVersion(3); CGoGN::Utils::GLSLShader::setCurrentOGLVersion(3);
#else #else
CGoGN::Utils::GLSLShader::setCurrentOGLVersion(2); CGoGN::Utils::GLSLShader::setCurrentOGLVersion(2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment