From 2a546411d5a0886f4cccf68e46ddd60d419ba075 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Sat, 31 Dec 2011 11:39:06 +0100 Subject: [PATCH] Added error checking in initialization of GLEW --- src/SFML/Graphics/GLCheck.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/SFML/Graphics/GLCheck.cpp b/src/SFML/Graphics/GLCheck.cpp index 3eac7e882..b7c231a15 100644 --- a/src/SFML/Graphics/GLCheck.cpp +++ b/src/SFML/Graphics/GLCheck.cpp @@ -112,8 +112,15 @@ void EnsureGlewInit() static bool initialized = false; if (!initialized) { - glewInit(); - initialized = true; + GLenum status = glewInit(); + if (status == GLEW_OK) + { + initialized = true; + } + else + { + Err() << "Failed to initialize GLEW, " << glewGetErrorString(status) << std::endl; + } } }