Added gaurds around alpha function value to catch erroneous values before they
are passed on to the OSG.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user