public IsHardwareFilteringSupported ( TextureType ttype, Media format, int usage, bool preciseFormatOnly ) : bool | ||
ttype | TextureType | The texture type requested |
format | Media | The pixel format requested |
usage | int | the kind of usage this texture is intended for, a combination of the TextureUsage flags. |
preciseFormatOnly | bool | /// Whether precise or fallback format mode is used to detecting. /// In case the pixel format doesn't supported by device, false will be returned /// if in precise mode, and natively used pixel format will be actually use to /// check if in fallback mode. /// |
return | bool |
public override bool IsHardwareFilteringSupported( TextureType ttype, Media.PixelFormat format, int usage, bool preciseFormatOnly )
{
if ( format == Media.PixelFormat.Unknown )
return false;
// Check native format
Media.PixelFormat nativeFormat = GetNativeFormat( ttype, format, (TextureUsage)usage );
if ( preciseFormatOnly && format != nativeFormat )
return false;
// Assume non-floating point is supported always
if ( !PixelUtil.IsFloatingPoint( nativeFormat ) )
return true;
return false;
}