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."
This commit is contained in:
Robert Osfield 2006-10-02 13:40:58 +00:00
parent e3478069b4
commit eb68735ff9

View File

@ -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)