diff --git a/examples/common/Viewer.cpp b/examples/common/Viewer.cpp index e895cc5c..56bb2185 100644 --- a/examples/common/Viewer.cpp +++ b/examples/common/Viewer.cpp @@ -27,6 +27,8 @@ #include "Viewer.h" #include "openglframework.h" #include +#include +#include using namespace openglframework; @@ -60,7 +62,7 @@ void Viewer::init(int argc, char** argv, const std::string& windowsTitle, // Initialize the GLFW library if (!glfwInit()) { - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } // Active the multi-sampling by default @@ -73,7 +75,7 @@ void Viewer::init(int argc, char** argv, const std::string& windowsTitle, static_cast(windowsSize.y), mWindowTitle.c_str(), NULL, NULL); if (!mWindow) { glfwTerminate(); - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } glfwMakeContextCurrent(mWindow); @@ -87,7 +89,7 @@ void Viewer::init(int argc, char** argv, const std::string& windowsTitle, // Problem: glewInit failed, something is wrong std::cerr << "GLEW Error : " << glewGetErrorString(errorGLEW) << std::endl; assert(false); - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } if (isMultisamplingActive) { @@ -332,6 +334,9 @@ void Viewer::displayGUI() { // Display the FPS void Viewer::displayFPS() { - std::string windowTitle = mWindowTitle + " | FPS : " + std::to_string(mFPS); + std::stringstream ss; + ss << mFPS; + std::string fpsString = ss.str(); + std::string windowTitle = mWindowTitle + " | FPS : " + fpsString; glfwSetWindowTitle(mWindow, windowTitle.c_str()); } diff --git a/examples/raycast/CMakeLists.txt b/examples/raycast/CMakeLists.txt index b0305277..01440b00 100644 --- a/examples/raycast/CMakeLists.txt +++ b/examples/raycast/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 2.6) PROJECT(Raycast) # Where to build the executables -SET(EXECUTABLE_OUTPUT_PATH "${OUR_EXECUTABLE_OUTPUT_PATH}/collisionshapes") +SET(EXECUTABLE_OUTPUT_PATH "${OUR_EXECUTABLE_OUTPUT_PATH}/raycast") SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${EXECUTABLE_OUTPUT_PATH}) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${EXECUTABLE_OUTPUT_PATH})