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:
parent
e3478069b4
commit
eb68735ff9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user