From 9d7483d6db52c0ef870711703623b1d8b3a374fa Mon Sep 17 00:00:00 2001 From: Eschemann Date: Mon, 28 Sep 2020 15:50:45 +0200 Subject: [PATCH] Fixed segfault in example basic on inter graphics hd and corrected path to model --- examples/basic/basic/basic.vcxproj | 10 +++++----- examples/basic/main.cpp | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/basic/basic/basic.vcxproj b/examples/basic/basic/basic.vcxproj index 3aa245a..294d103 100644 --- a/examples/basic/basic/basic.vcxproj +++ b/examples/basic/basic/basic.vcxproj @@ -22,32 +22,32 @@ 15.0 {0589AC44-0CF3-40D8-8D89-68393CFD40F3} basic - 10.0.17134.0 + 10.0 Application true - v141 + v142 MultiByte Application false - v141 + v142 true MultiByte Application true - v141 + v142 MultiByte Application false - v141 + v142 true MultiByte diff --git a/examples/basic/main.cpp b/examples/basic/main.cpp index 889973f..1a92403 100644 --- a/examples/basic/main.cpp +++ b/examples/basic/main.cpp @@ -329,7 +329,7 @@ static void error_callback(int error, const char *description) { } int main(int argc, char **argv) { - std::string filename = "../../models/Cube/Cube.gltf"; + std::string filename = "../../../models/Cube/Cube.gltf"; if (argc > 1) { filename = argv[1]; @@ -341,9 +341,12 @@ int main(int argc, char **argv) { // Force create OpenGL 3.3 // NOTE(syoyo): Linux + NVIDIA driver segfaults for some reason? commenting out glfwWindowHint will work. + // Note (PE): On laptops with intel hd graphics card you can overcome the segfault by enabling experimental, see below (tested on lenovo thinkpad) glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glewExperimental = GL_TRUE; + #ifdef __APPLE__ glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); #endif