Added guard to testing _internalFormat in compareTexture(..) so that

a comparison would only be done if both the lhs and rhs had already been
set to a non zero value.
This commit is contained in:
Robert Osfield
2004-11-08 16:39:10 +00:00
parent d26c8460dc
commit fd9063628a

View File

@@ -384,9 +384,13 @@ int Texture::compareTexture(const Texture& rhs) const
COMPARE_StateAttribute_Parameter(_maxAnisotropy)
COMPARE_StateAttribute_Parameter(_useHardwareMipMapGeneration)
COMPARE_StateAttribute_Parameter(_internalFormatMode)
#if 1
COMPARE_StateAttribute_Parameter(_internalFormat)
#endif
// only compare _internalFomat is it has alrady been set in both lhs, and rhs
if (_internalFormat!=0 && rhs._internalFormat!=0)
{
COMPARE_StateAttribute_Parameter(_internalFormat)
}
COMPARE_StateAttribute_Parameter(_use_shadow_comparison)
COMPARE_StateAttribute_Parameter(_shadow_compare_func)
COMPARE_StateAttribute_Parameter(_shadow_texture_mode)