Show GLEW error string on glewInit() initialization errors

This commit is contained in:
Yuri D'Elia 2022-02-19 12:49:23 +01:00 committed by Lukáš Matěna
parent f3384c835f
commit fe14c547fe

View File

@ -233,8 +233,9 @@ OpenGLManager::~OpenGLManager()
bool OpenGLManager::init_gl()
{
if (!m_gl_initialized) {
if (glewInit() != GLEW_OK) {
BOOST_LOG_TRIVIAL(error) << "Unable to init glew library";
GLenum err = glewInit();
if (err != GLEW_OK) {
BOOST_LOG_TRIVIAL(error) << "Unable to init glew library: " << glewGetErrorString(err);
return false;
}
m_gl_initialized = true;