From eb68735ff9f301052d3528bea8b8d6c67f118123 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 2 Oct 2006 13:40:58 +0000 Subject: [PATCH] From Farshid Lashkari, "The ColorControl of osg::LightModel is never applied because it incorrectly checks for a valid OpenGL version. Instead of checking if the current version is exactly 1.2, it will check if the version is greater than 1.2." --- src/osg/LightModel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/osg/LightModel.cpp b/src/osg/LightModel.cpp index 0f827a8c5..280035a49 100644 --- a/src/osg/LightModel.cpp +++ b/src/osg/LightModel.cpp @@ -49,8 +49,7 @@ void LightModel::apply(State&) const { glLightModelfv(GL_LIGHT_MODEL_AMBIENT,_ambient.ptr()); - //static bool s_separateSpecularSupported = strcmp((const char *)glGetString(GL_VERSION),"1.2")>=0; - static bool s_separateSpecularSupported = (std::string((const char *)glGetString(GL_VERSION)) == "1.2"); + static bool s_separateSpecularSupported = strncmp((const char*)glGetString(GL_VERSION),"1.2",3)>=0; if (s_separateSpecularSupported) { if (_colorControl==SEPARATE_SPECULAR_COLOR)