diff --git a/src/osgPlugins/txp/TrPageArchive.cpp b/src/osgPlugins/txp/TrPageArchive.cpp index 6dfb147d4..42996e1f5 100644 --- a/src/osgPlugins/txp/TrPageArchive.cpp +++ b/src/osgPlugins/txp/TrPageArchive.cpp @@ -233,7 +233,7 @@ void TrPageArchive::LoadMaterials() int alphaFunc; mat->GetAlphaFunc(alphaFunc); - if( alphaFunc != trpgMaterial::None) + if( alphaFunc>=GL_NEVER && alphaFunc<=GL_ALWAYS) { float64 ref; mat->GetAlphaRef(ref); diff --git a/src/osgPlugins/txp/TrPageParser.cpp b/src/osgPlugins/txp/TrPageParser.cpp index f75f33ec9..b20ffde41 100644 --- a/src/osgPlugins/txp/TrPageParser.cpp +++ b/src/osgPlugins/txp/TrPageParser.cpp @@ -761,7 +761,7 @@ void TrPageParser::LoadLocalMaterials() */ int alphaFunc; mat->GetAlphaFunc(alphaFunc); - if( alphaFunc != trpgMaterial::None) + if( alphaFunc>=GL_NEVER && alphaFunc<=GL_ALWAYS) { float64 ref; mat->GetAlphaRef(ref);