diff --git a/01/main.cpp b/01/main.cpp index f26b461..b59ae79 100644 --- a/01/main.cpp +++ b/01/main.cpp @@ -133,11 +133,11 @@ int main(void) glGenVertexArrays(1, &VAO); GLuint vertex_shader = mylib::compileShader( - "/home/sam/workspace/cpp/ogl_playground/01/simple.vertex.glsl", + "C:\\Users\\Samuel Vishesh Paul\\Documents\\GitHub\\My-Jolly-journey\\01/simple.vertex.glsl", GL_VERTEX_SHADER ); GLuint frag_shader = mylib::compileShader( - "/home/sam/workspace/cpp/ogl_playground/01/simple.fragment.glsl", + "C:\\Users\\Samuel Vishesh Paul\\Documents\\GitHub\\My-Jolly-journey\\01\\simple.fragment.glsl", GL_FRAGMENT_SHADER ); GLuint shader_program = mylib::linkShaderProgram( diff --git a/09/main.cpp b/09/main.cpp index 95fd0d2..0b57dab 100644 --- a/09/main.cpp +++ b/09/main.cpp @@ -1,12 +1,18 @@ #undef _NDEBUG +#define WIN32 + #include "../lib/mylib.hpp" #include "../lib/camera.hpp" #include +#ifdef _WIN32 +#include +#else #include +#endif -#include +#include #define GLM_ENABLE_EXPERIMENTAL #include @@ -71,20 +77,20 @@ class myApp : public mylib::App { lightingShader = mylib::Shader({ std::make_pair( - "/home/sam/workspace/cpp/ogl_playground/07/07.vertex.glsl", + "C:\\Users\\Samuel Vishesh Paul\\Documents\\GitHub\\My-Jolly-journey\\07/07.vertex.glsl", GL_VERTEX_SHADER), std::make_pair( //"/home/sam/workspace/cpp/ogl_playground/07/07.fragment.glsl", - "/home/sam/workspace/cpp/ogl_playground/09/ambientLighting.fragment.glsl", + "C:\\Users\\Samuel Vishesh Paul\\Documents\\GitHub\\My-Jolly-journey\\09\\ambientLighting.fragment.glsl", GL_FRAGMENT_SHADER), }); lightSrcShader = mylib::Shader({ std::make_pair( - "/home/sam/workspace/cpp/ogl_playground/07/07.vertex.glsl", + "C:\\Users\\Samuel Vishesh Paul\\Documents\\GitHub\\My-Jolly-journey\\07.vertex.glsl", GL_VERTEX_SHADER), std::make_pair( //"/home/sam/workspace/cpp/ogl_playground/07/07.fragment.glsl", - "/home/sam/workspace/cpp/ogl_playground/09/lightSrc.fragment.glsl", + "C:\\Users\\Samuel Vishesh Paul\\Documents\\GitHub\\My-Jolly-journey\\09/lightSrc.fragment.glsl", GL_FRAGMENT_SHADER), }); @@ -203,9 +209,19 @@ class myApp : public mylib::App int main(const int argc, const char *const argv[]) { - mylib::Window wind; - myApp app(std::move(wind)); - app.run(app); - + try + { + mylib::Window wind; + myApp app(std::move(wind)); + app.run(app); + } + catch (const std::exception& e) + { + std::cerr << e.what() << std::endl; + std::cin.get(); + std::exit(EXIT_FAILURE); + } + + std::cin.get(); std::exit(EXIT_SUCCESS); } diff --git a/CMakeLists.txt b/CMakeLists.txt index fb256e0..9c1016c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,12 @@ find_package(glm REQUIRED) find_package(Boost REQUIRED) find_package(tinyobjloader REQUIRED) -set(SOIL_INCLUDE_DIR "/usr/include/SOIL") +if(UNIX) + set(SOIL_INCLUDE_DIR "/usr/include/SOIL") +elseif(WIN32) + set(SOIL_INCLUDE_DIR "C:/Program Files/SOIL/include") +endif(UNIX) + set(SOIL_LIBRARY "SOIL") set(ALL_INCLUDE_DIR @@ -42,6 +47,10 @@ set(ALL_INCLUDE_DIR ${GTKMM_INCLUDE_DIRS} ) +if(WIN32) + set(ALL_INCLUDE_DIR ${ALL_INCLUDE_DIR} "C:/Program Files/epoxy/include") +endif(WIN32) + set(ALL_LIBS ${OPENGL_LIBRARY} ${SOIL_LIBRARY}