Added gaurds around alpha function value to catch erroneous values before they

are passed on to the OSG.
This commit is contained in:
Robert Osfield
2003-01-21 16:02:29 +00:00
parent ac5c9a6847
commit 87973523ad
2 changed files with 2 additions and 2 deletions

View File

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

View File

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