Added a GL vesion number check to LightModel, and small typo fix in Registry.
This commit is contained in:
@@ -35,14 +35,18 @@ LightModel::~LightModel()
|
||||
void LightModel::apply(State&) const
|
||||
{
|
||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,_ambient.ptr());
|
||||
|
||||
if (_colorControl==SEPERATE_SPECULAR_COLOR)
|
||||
|
||||
static bool s_seperateSpecularSupported = strcmp((const char *)glGetString(GL_VERSION),"1.2")>=0;
|
||||
if (s_seperateSpecularSupported)
|
||||
{
|
||||
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPERATE_SPECULAR_COLOR);
|
||||
}
|
||||
else
|
||||
{
|
||||
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SINGLE_COLOR);
|
||||
if (_colorControl==SEPERATE_SPECULAR_COLOR)
|
||||
{
|
||||
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPERATE_SPECULAR_COLOR);
|
||||
}
|
||||
else
|
||||
{
|
||||
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SINGLE_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,_localViewer);
|
||||
|
||||
@@ -177,7 +177,7 @@ void Registry::removeDotOsgWrapper(DotOsgWrapper* wrapper)
|
||||
EraseMacro(_nodeWrapperMap,wrapper);
|
||||
}
|
||||
|
||||
#undef EraseMaroc
|
||||
#undef EraseMacro
|
||||
|
||||
void Registry::addReaderWriter(ReaderWriter* rw)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user