From d59df1af3ecda2ecb9d3ec9140a424dfd1fe3759 Mon Sep 17 00:00:00 2001 From: Matrefeytontias Date: Thu, 10 May 2018 17:32:48 +0200 Subject: [PATCH] Fix potential segmentation fault on `glBindSampler` As per [https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBindSampler.xhtml](the OpenGL 4 specification), `glBindSampler` is available only when the GL version is 3.3 or higher. --- examples/opengl3_example/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index 4542c8912b03..be97ce95fc08 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -21,7 +21,7 @@ int main(int, char**) if (!glfwInit()) return 1; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); #if __APPLE__ glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);