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:
@@ -49,8 +49,7 @@ void LightModel::apply(State&) const
|
|||||||
{
|
{
|
||||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,_ambient.ptr());
|
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,_ambient.ptr());
|
||||||
|
|
||||||
//static bool s_separateSpecularSupported = strcmp((const char *)glGetString(GL_VERSION),"1.2")>=0;
|
static bool s_separateSpecularSupported = strncmp((const char*)glGetString(GL_VERSION),"1.2",3)>=0;
|
||||||
static bool s_separateSpecularSupported = (std::string((const char *)glGetString(GL_VERSION)) == "1.2");
|
|
||||||
if (s_separateSpecularSupported)
|
if (s_separateSpecularSupported)
|
||||||
{
|
{
|
||||||
if (_colorControl==SEPARATE_SPECULAR_COLOR)
|
if (_colorControl==SEPARATE_SPECULAR_COLOR)
|
||||||
|
|||||||
Reference in New Issue
Block a user