From 6e6667a2ea863e0b03ffbb76bbf67792c10d0b23 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Wed, 26 Feb 2014 00:00:24 +0100 Subject: [PATCH] Check minor gl version --- src/graphics/irr_driver.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 6e63c4eae..8d1868150 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -421,10 +421,11 @@ void IrrDriver::initDevice() m_gui_env = m_device->getGUIEnvironment(); m_video_driver = m_device->getVideoDriver(); - int GLMajorVersion; + int GLMajorVersion = 0, GLMinorVersion = 0; glGetIntegerv(GL_MAJOR_VERSION, &GLMajorVersion); - printf("OPENGL VERSION IS %d\n", GLMajorVersion); - m_glsl = (GLMajorVersion >= 3) && UserConfigParams::m_pixel_shaders; + glGetIntegerv(GL_MINOR_VERSION, &GLMinorVersion); + printf("OPENGL VERSION IS %d.%d\n", GLMajorVersion, GLMinorVersion); + m_glsl = (GLMajorVersion >3 || (GLMajorVersion == 3 && GLMinorVersion == 3)) && UserConfigParams::m_pixel_shaders; // This remaps the window, so it has to be done before the clear to avoid flicker