From 1d15e8b2a666452252c273c9f9df94548c764e9b Mon Sep 17 00:00:00 2001 From: HC Helltegen Date: Tue, 18 Feb 2014 16:26:54 -0500 Subject: [PATCH 1/3] Run-time bugfixes on windows --- CMakeLists.txt | 43 ++++++++++------------------ src/interaction/deviceidentifier.cpp | 2 +- src/openspaceengine.cpp | 22 ++++++++------ src/scenegraph/scenegraphnode.cpp | 3 +- 4 files changed, 31 insertions(+), 39 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81b859e460..2105fb24bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,27 +46,27 @@ endif () # Ghoul add_definitions(-DGHL_DEBUG) set(GHOUL_ROOT_DIR "${OPENSPACE_EXT_DIR}/ghoul") -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${GHOUL_ROOT_DIR}/ext) include_directories("${GHOUL_ROOT_DIR}/include") add_subdirectory(${GHOUL_ROOT_DIR}) set(DEPENDENT_LIBS ${DEPENDENT_LIBS} Ghoul) +# Add ghoul ext +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${GHOUL_ROOT_DIR}/ext) + # SGCT (TODO: write cmake script) #set(SGCT_ROOT_DIR "$ENV{SGCT_ROOT_DIR}") #set(SGCT_ROOT_DIR "C:/Program Files/SGCT/SGCT_2.0.7") #set(SGCT_ROOT_DIR "C:/Program Files (x86)/SGCT/SGCT_2.0.5_x86") -#set(SGCT_ROOT_DIR "C:/Program Files/SGCT/SGCT_2.0.7") - -#add_definitions(-D__WIN32__) +set(SGCT_ROOT_DIR "C:/Program Files/SGCT/SGCT_2.0.7") +add_definitions(-D__WIN32__) add_definitions(-DGLEW_STATIC) -include_directories("${OPENSPACE_EXT_DIR}/sgct/include") +include_directories("${SGCT_ROOT_DIR}/include") #set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SGCT_ROOT_DOR}/bin/lib/msvc11) set(DEPENDENT_LIBS ${DEPENDENT_LIBS} -# "Ws2_32.lib" -# optimized "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgct.lib" -# debug "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgctd.lib" - ${OPENSPACE_EXT_DIR}/sgct/lib/libsgct_cpp11.a + "Ws2_32.lib" + optimized "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgct.lib" + debug "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgctd.lib" ) #add_subdirectory(${SGCT_ROOT_DIR}) @@ -80,18 +80,18 @@ include_directories(${GLM_INCLUDE_DIRS}) # OpenGL #find_package(OpenGL REQUIRED) #include_directories(${OPENGL_INCLUDE_DIRS}) -set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${OPENGL_LIBRARIES}) +#set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${OPENGL_LIBRARIES}) # GLEW #find_package(GLEW REQUIRED) #include_directories(${GLEW_INCLUDE_DIRECTORIES}) -set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${GLEW_LIBRARIES}) +#set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${GLEW_LIBRARIES}) # Lua set(LUA_ROOT_DIR "${GHOUL_ROOT_DIR}/ext/lua") include_directories("${LUA_ROOT_DIR}/include") #add_subdirectory(${LUA_ROOT_DIR}) -set(DEPENDENT_LIBS ${DEPENDENT_LIBS} Lua) +#set(DEPENDENT_LIBS ${DEPENDENT_LIBS} Lua) # Spice set(SPICE_ROOT_DIR "${OPENSPACE_EXT_DIR}/spice") @@ -99,26 +99,13 @@ include_directories("${SPICE_ROOT_DIR}/include") add_subdirectory(${SPICE_ROOT_DIR}) set(DEPENDENT_LIBS ${DEPENDENT_LIBS} Spice) -# Threads -find_library(PTHREADS_LIB pthread) -set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${PTHREADS_LIB}) - if (APPLE) include_directories(/Developer/Headers/FlatCarbon) find_library(CARBON_LIBRARY Carbon) - find_library(COCOA_LIBRARY Cocoa) + find_library(COCOA_LIBRARY Carbon) find_library(APP_SERVICES_LIBRARY ApplicationServices) - find_library(APPKIT_LIBRARY AppKit) - find_library(IOKIT_LIBRARY IOKit) - mark_as_advanced(CARBON_LIBRARY COCOA_LIBRARY APP_SERVICES_LIBRARY IOKIT_LIBRARY) - set(DEPENDENT_LIBS - ${DEPENDENT_LIBS} - ${CARBON_LIBRARY} - ${APPKIT_LIBRARY} - ${COCOA_LIBRARY} - ${APP_SERVICES_LIBRARY} - ${IOKIT_LIBRARY} - ) + mark_as_advanced(CARBON_LIBRARY COCOA_LIBRARY APP_SERVICES_LIBRARY) + set(DEPENDENT_LIBS ${CARBON_LIBRARY} ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY}) endif () ######################################################################################### diff --git a/src/interaction/deviceidentifier.cpp b/src/interaction/deviceidentifier.cpp index f7a1e5ba7c..08e60a2826 100644 --- a/src/interaction/deviceidentifier.cpp +++ b/src/interaction/deviceidentifier.cpp @@ -66,7 +66,7 @@ void DeviceIdentifier::scanDevices() { //numberOfButtons_[i] = sgct::Engine::getJoystickParam( GLFW_JOYSTICK_1 + i, GLFW_BUTTONS ); // joystick found - void* joystickName; + void* joystickName = NULL; if( joystickName != NULL ) { // sgct::Engine::getJoystickAxes(SGCT_JOYSTICK_1 + i, &numberOfAxes_[i]); // sgct::Engine::getJoystickButtons(SGCT_JOYSTICK_1 + i, &numberOfButtons_[i]); diff --git a/src/openspaceengine.cpp b/src/openspaceengine.cpp index 0810c4c9e5..1e9ab5b9c6 100644 --- a/src/openspaceengine.cpp +++ b/src/openspaceengine.cpp @@ -81,6 +81,12 @@ void OpenSpaceEngine::create(int argc, char** argv, int& newArgc, char**& newArg LogManager::initialize(LogManager::LogLevel::Debug); LogMgr.addLog(new ConsoleLog); + ghoul::filesystem::FileSystem::initialize(); + //FileSys.registerPathToken("${BASE_PATH}", "../../.."); + FileSys.registerPathToken("${BASE_PATH}", "../.."); + FileSys.registerPathToken("${SCRIPTS}", "${BASE_PATH}/scripts"); + //FileSys.registerPathToken("${SCRIPTS}", "${BASE_PATH}/openspace/scripts"); // FIX ME: tempoary path + _engine->_configurationManager = new ghoul::ConfigurationManager; _engine->_configurationManager->initialize(); @@ -88,14 +94,12 @@ void OpenSpaceEngine::create(int argc, char** argv, int& newArgc, char**& newArg newArgv = new char*[3]; newArgv[0] = "prog"; newArgv[1] = "-config"; - newArgv[2] = "../../../config/single.xml"; + //newArgv[2] = "../../../config/single.xml"; + newArgv[2] = "C:/openspace/config/single.xml"; // FIX ME: tempoary path - ghoul::filesystem::FileSystem::initialize(); - FileSys.registerPathToken("${BASE_PATH}", "../../.."); - //FileSys.registerPathToken("${BASE_PATH}", "../.."); - FileSys.registerPathToken("${SCRIPTS}", "${BASE_PATH}/scripts"); + _engine->_renderEngine = new RenderEngine; @@ -108,9 +112,9 @@ void OpenSpaceEngine::destroy() { } bool OpenSpaceEngine::initialize() { - _configurationManager->initialize(); - _configurationManager->loadConfiguration("${SCRIPTS}/config.lua"); - _configurationManager->loadConfiguration("${SCRIPTS}/config2.lua"); + //_configurationManager->initialize(); + //_configurationManager->loadConfiguration("${SCRIPTS}/config.lua"); + //_configurationManager->loadConfiguration("${SCRIPTS}/config2.lua"); Time::init(); Spice::init(); @@ -229,7 +233,7 @@ void RenderEngine::decode() { sgct::SharedDouble *shDouble = new sgct::SharedDouble(); // sync the time - sharedDataInstance_->readDouble(shDouble); + sharedDataInstance_->Double(shDouble); masterTime_ = shDouble->getVal(); // check that the camera has been allocated diff --git a/src/scenegraph/scenegraphnode.cpp b/src/scenegraph/scenegraphnode.cpp index b5dbd6c31d..3af3cfba86 100644 --- a/src/scenegraph/scenegraphnode.cpp +++ b/src/scenegraph/scenegraphnode.cpp @@ -70,7 +70,8 @@ void SceneGraphNode::update() { void SceneGraphNode::evaluate(const Camera *camera, const psc & parentPosition) { const psc thisPosition = parentPosition + position_; - const psc toCamera = thisPosition - camera->getPosition(); + const psc camPos = camera->getPosition(); + const psc toCamera = thisPosition - camPos; // init as not visible boundingSphereVisible_ = true; From d43b4a8ca5bd7d12884a8d7e3fd434ffde97b3fb Mon Sep 17 00:00:00 2001 From: Jonas Strandstedt Date: Tue, 18 Feb 2014 18:33:20 -0500 Subject: [PATCH 2/3] Small bugfix for OS X --- CMakeLists.txt | 32 +++++----------- ext/FindSGCT.cmake | 94 ++++++++++++++++++++++++++++++++++++++++++++++ ext/ghoul | 2 +- ext/spice | 2 +- src/CMakeLists.txt | 23 ++++++++++++ 5 files changed, 128 insertions(+), 25 deletions(-) create mode 100644 ext/FindSGCT.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 2105fb24bb..470a23b315 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,24 +53,10 @@ set(DEPENDENT_LIBS ${DEPENDENT_LIBS} Ghoul) # Add ghoul ext set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${GHOUL_ROOT_DIR}/ext) -# SGCT (TODO: write cmake script) -#set(SGCT_ROOT_DIR "$ENV{SGCT_ROOT_DIR}") -#set(SGCT_ROOT_DIR "C:/Program Files/SGCT/SGCT_2.0.7") -#set(SGCT_ROOT_DIR "C:/Program Files (x86)/SGCT/SGCT_2.0.5_x86") -set(SGCT_ROOT_DIR "C:/Program Files/SGCT/SGCT_2.0.7") -add_definitions(-D__WIN32__) -add_definitions(-DGLEW_STATIC) -include_directories("${SGCT_ROOT_DIR}/include") -#set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SGCT_ROOT_DOR}/bin/lib/msvc11) -set(DEPENDENT_LIBS - ${DEPENDENT_LIBS} - "Ws2_32.lib" - optimized "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgct.lib" - debug "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgctd.lib" - ) - -#add_subdirectory(${SGCT_ROOT_DIR}) -#set(DEPENDENT_LIBS ${DEPENDENT_LIBS} SGCT) +# SGCT +find_package(SGCT REQUIRED) +include_directories(${SGCT_INCLUDE_DIRECTORIES}) +set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${SGCT_LIBRARIES}) # GLM set(GLM_ROOT_DIR "${GHOUL_ROOT_DIR}/ext/glm") @@ -83,9 +69,9 @@ include_directories(${GLM_INCLUDE_DIRS}) #set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${OPENGL_LIBRARIES}) # GLEW -#find_package(GLEW REQUIRED) -#include_directories(${GLEW_INCLUDE_DIRECTORIES}) -#set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${GLEW_LIBRARIES}) +find_package(GLEW REQUIRED) +include_directories(${GLEW_INCLUDE_DIRECTORIES}) +set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${GLEW_LIBRARIES}) # Lua set(LUA_ROOT_DIR "${GHOUL_ROOT_DIR}/ext/lua") @@ -102,10 +88,10 @@ set(DEPENDENT_LIBS ${DEPENDENT_LIBS} Spice) if (APPLE) include_directories(/Developer/Headers/FlatCarbon) find_library(CARBON_LIBRARY Carbon) - find_library(COCOA_LIBRARY Carbon) + find_library(COCOA_LIBRARY Cocoa) find_library(APP_SERVICES_LIBRARY ApplicationServices) mark_as_advanced(CARBON_LIBRARY COCOA_LIBRARY APP_SERVICES_LIBRARY) - set(DEPENDENT_LIBS ${CARBON_LIBRARY} ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY}) + set(DEPENDENT_LIBS ${DEPENDENT_LIBS} ${CARBON_LIBRARY} ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY}) endif () ######################################################################################### diff --git a/ext/FindSGCT.cmake b/ext/FindSGCT.cmake new file mode 100644 index 0000000000..88a30f9ddf --- /dev/null +++ b/ext/FindSGCT.cmake @@ -0,0 +1,94 @@ + + + + +# Find the library +if(WIN32) + add_definitions(-D__WIN32__) + file(GLOB SGCT_WINDOWS_PATHS "C:/Program Files/SGCT/SGCT_*") + find_path(SGCT_ROOT_DIR include/sgct.h HINTS + "${SGCT_WINDOWS_PATHS}" + ) + set(DEPENDENT_LIBS + ${DEPENDENT_LIBS} + "Ws2_32.lib" + optimized "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgct.lib" + debug "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgctd.lib" + ) +else() + find_path(SGCT_ROOT_DIR include/sgct.h HINTS + "/opt/local/include/sgct" + "/usr/local/include/sgct" + "/usr/include/sgct" + "/opt/local" + "/usr/local" + ) + find_library(SGCT_LIBRARY NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}sgct_cpp11${CMAKE_STATIC_LIBRARY_SUFFIX} + HINTS "${SGCT_ROOT_DIR}/lib") + +endif() + +# make sure glew is static +add_definitions(-DGLEW_STATIC) + +if (APPLE) + find_library(FRAMEWORK_IOKit + NAMES IOKit + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + PATH_SUFFIXES Frameworks + NO_DEFAULT_PATH + ) + find_library(FRAMEWORK_CoreVideo + NAMES CoreVideo + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + PATH_SUFFIXES Frameworks + NO_DEFAULT_PATH + ) + find_library(FRAMEWORK_Cocoa + NAMES Cocoa + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + PATH_SUFFIXES Frameworks + NO_DEFAULT_PATH + ) + set(SGCT_DEPENDENCIES ${SGCT_DEPENDENCIES} ${FRAMEWORK_IOKit} ${FRAMEWORK_CoreVideo} ${FRAMEWORK_Cocoa}) +endif (APPLE) + +# includes +set(SGCT_INCLUDES "${SGCT_ROOT_DIR}/include") +include_directories(${SGCT_INCLUDE_DIRS}) + +# libraries +set(SGCT_INCLUDE_DIRECTORIES ${SGCT_INCLUDES}) +set(SGCT_LIBRARIES ${SGCT_DEPENDENCIES} ${SGCT_LIBRARY}) +#set(SGCT_LIBRARIES "${SGCT_LIBRARY}") + +# handle the QUIETLY and REQUIRED arguments and set SGCT_FOUND to TRUE +# if all listed variables are TRUE +find_package_handle_standard_args(SGCT DEFAULT_MSG + SGCT_LIBRARY SGCT_INCLUDES) + +mark_as_advanced(SGCT_INCLUDE_DIR SGCT_LIBRARY ) + +if(SGCT_FOUND) + MESSAGE(STATUS "SGCT found: ${SGCT_INCLUDES}/sgct.h") + MESSAGE(STATUS "SGCT SGCT_LIBRARY: ${SGCT_LIBRARY}") +else() + MESSAGE(FATAL_ERROR "SGCT not found!") +endif(SGCT_FOUND) + + + + + + +# OLD STUFF. REMOVE WHEN ABOVE WORKS +#set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SGCT_ROOT_DOR}/bin/lib/msvc11) +#set(DEPENDENT_LIBS +# ${DEPENDENT_LIBS} +# "Ws2_32.lib" +# optimized "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgct.lib" +# debug "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgctd.lib" +# ) + +#add_subdirectory(${SGCT_ROOT_DIR}) +#set(DEPENDENT_LIBS ${DEPENDENT_LIBS} SGCT) \ No newline at end of file diff --git a/ext/ghoul b/ext/ghoul index 270056597a..0e4ef0b930 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 270056597af3b843164434561b31c3556f659054 +Subproject commit 0e4ef0b930630a16416e3471a19da9b8475e4587 diff --git a/ext/spice b/ext/spice index 784478de97..1ea38307b2 160000 --- a/ext/spice +++ b/ext/spice @@ -1 +1 @@ -Subproject commit 784478de97c3243c9bbd668256b5e3186a85b8b3 +Subproject commit 1ea38307b2a0bdb861cb6cec67a22da2d78269b0 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index abe892d01a..bd7f9e331b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,5 +88,28 @@ include_directories(${HEADER_ROOT_DIR}) # hack: set(OPENSPACE_SOURCE ${OPENSPACE_SOURCE} ${OPENSPACE_EXT_DIR}/tinythread.cpp) +if (APPLE) + find_library(FRAMEWORK_IOKit + NAMES IOKit + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + PATH_SUFFIXES Frameworks + NO_DEFAULT_PATH + ) + find_library(FRAMEWORK_CoreVideo + NAMES CoreVideo + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + PATH_SUFFIXES Frameworks + NO_DEFAULT_PATH + ) + find_library(FRAMEWORK_Cocoa + NAMES Cocoa + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + PATH_SUFFIXES Frameworks + NO_DEFAULT_PATH + ) + set(SGCT_DEPENDENCIES ${SGCT_DEPENDENCIES} ${FRAMEWORK_IOKit} ${FRAMEWORK_CoreVideo} ${FRAMEWORK_Cocoa}) +endif (APPLE) +#add_definitions(-framework IOKit -framework CoreVideo) + add_executable(OpenSpace ${OPENSPACE_HEADER} ${OPENSPACE_SOURCE}) target_link_libraries(OpenSpace ${DEPENDENT_LIBS}) From 470afe034bb77ad6392f24f928701de57a33b6a7 Mon Sep 17 00:00:00 2001 From: Jonas Strandstedt Date: Wed, 19 Feb 2014 10:17:32 -0500 Subject: [PATCH 3/3] Fixed build and runtime errors and improved cross-platform compatibility --- .gitignore | 3 ++- ext/ghoul | 2 +- ext/spice | 2 +- src/openspaceengine.cpp | 20 ++++++++++++++++++-- src/rendering/renderengine.cpp | 11 ++++++----- 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 35128a7b4d..d5bab2c5e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ bin/ build/ -ext/SGCT \ No newline at end of file +ext/SGCT +.DS_Store \ No newline at end of file diff --git a/ext/ghoul b/ext/ghoul index 0e4ef0b930..4a8e9e5408 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 0e4ef0b930630a16416e3471a19da9b8475e4587 +Subproject commit 4a8e9e540894fc0ec4ec3cbbbf45e18c37872499 diff --git a/ext/spice b/ext/spice index 1ea38307b2..1947309fea 160000 --- a/ext/spice +++ b/ext/spice @@ -1 +1 @@ -Subproject commit 1ea38307b2a0bdb861cb6cec67a22da2d78269b0 +Subproject commit 1947309fea2f2baad3795503fdc8ecbca0575615 diff --git a/src/openspaceengine.cpp b/src/openspaceengine.cpp index 1e9ab5b9c6..982b2d431c 100644 --- a/src/openspaceengine.cpp +++ b/src/openspaceengine.cpp @@ -60,6 +60,8 @@ OpenSpaceEngine::~OpenSpaceEngine() { delete _configurationManager; delete _interactionHandler; delete _renderEngine; + + // TODO deallocate scriptengine when starting to use it //delete _scriptEngine; Spice::deinit(); @@ -82,9 +84,17 @@ void OpenSpaceEngine::create(int argc, char** argv, int& newArgc, char**& newArg LogMgr.addLog(new ConsoleLog); ghoul::filesystem::FileSystem::initialize(); - //FileSys.registerPathToken("${BASE_PATH}", "../../.."); + +#ifdef __WIN32__ + // Windows: Binary two folders down FileSys.registerPathToken("${BASE_PATH}", "../.."); +#else + // OS X and linux: Binary three folders down + FileSys.registerPathToken("${BASE_PATH}", "../../.."); +#endif FileSys.registerPathToken("${SCRIPTS}", "${BASE_PATH}/scripts"); + + // OLD //FileSys.registerPathToken("${SCRIPTS}", "${BASE_PATH}/openspace/scripts"); // FIX ME: tempoary path _engine->_configurationManager = new ghoul::ConfigurationManager; @@ -94,8 +104,14 @@ void OpenSpaceEngine::create(int argc, char** argv, int& newArgc, char**& newArg newArgv = new char*[3]; newArgv[0] = "prog"; newArgv[1] = "-config"; - //newArgv[2] = "../../../config/single.xml"; +#ifdef __WIN32__ + // Windows uses fixed path to OpenSpace data + #warning "Fixed path" newArgv[2] = "C:/openspace/config/single.xml"; // FIX ME: tempoary path +#else + // OS X and Linux uses local path to OpenSpace data + newArgv[2] = "../../../config/single.xml"; +#endif diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index fe3fb015b6..bd35f6c2ee 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -144,8 +144,8 @@ void RenderEngine::postSynchronizationPreDraw() { _mainCamera->compileViewRotationMatrix(); // update and evaluate the scene starting from the root node - _sceneGraph->update(); - _sceneGraph->evaluate(_mainCamera); + //_sceneGraph->update(); + //_sceneGraph->evaluate(_mainCamera); } void RenderEngine::render() { @@ -158,11 +158,11 @@ void RenderEngine::render() { view = glm::translate(view, eyePosition); // make sure the eye is in the center // setup the camera for the current frame - _mainCamera->setViewProjectionMatrix(projection*view); + //_mainCamera->setViewProjectionMatrix(projection*view); // render the scene starting from the root node - _sceneGraph->render(_mainCamera); - + //_sceneGraph->render(_mainCamera); + /* if (sgct::Engine::instance()->isMaster()) { const glm::vec2 scaling = _mainCamera->getScaling(); const glm::vec3 viewdirection = _mainCamera->getViewDirection(); @@ -189,6 +189,7 @@ void RenderEngine::render() { "Distance to origin: (%.15f, %.2f)", pssl[0], pssl[1] ); } + */ } SceneGraph* RenderEngine::sceneGraph() {