TextureProfile

class TextureProfile : System.Object
public TextureProfile ForPlatform(TargetPlatform platform)

Find the profile for this target platform.

Parameters:
  • platform (Microsoft.Xna.Framework.Content.Pipeline.TargetPlatform) – The platform target for textures.
Returns:
public abstract bool Supports(TargetPlatform platform)

Returns true if this profile supports texture processing for this platform.

Parameters:
  • platform (Microsoft.Xna.Framework.Content.Pipeline.TargetPlatform) –
public abstract void Requirements(ContentProcessorContext context, TextureProcessorOutputFormat format, ref bool requiresPowerOfTwo, ref bool requiresSquare)
Parameters:
  • context (Microsoft.Xna.Framework.Content.Pipeline.ContentProcessorContext) –
  • format (Microsoft.Xna.Framework.Content.Pipeline.Processors.TextureProcessorOutputFormat) –
  • (ref) requiresPowerOfTwo (bool) –
  • (ref) requiresSquare (bool) –
public void ConvertTexture(ContentProcessorContext context, TextureContent content, TextureProcessorOutputFormat format, bool isSpriteFont)

Performs conversion of the texture content to the correct format.

Parameters:
  • context (Microsoft.Xna.Framework.Content.Pipeline.ContentProcessorContext) – The processor context.
  • content (Microsoft.Xna.Framework.Content.Pipeline.Graphics.TextureContent) – The content to be compressed.
  • format (Microsoft.Xna.Framework.Content.Pipeline.Processors.TextureProcessorOutputFormat) – The user requested format for compression.
  • isSpriteFont (bool) – If the texture has represents a sprite font, i.e. is greyscale and has sharp black/white contrast.
protected abstract void PlatformCompressTexture(ContentProcessorContext context, TextureContent content, TextureProcessorOutputFormat format, bool isSpriteFont)
Parameters:
  • context (Microsoft.Xna.Framework.Content.Pipeline.ContentProcessorContext) –
  • content (Microsoft.Xna.Framework.Content.Pipeline.Graphics.TextureContent) –
  • format (Microsoft.Xna.Framework.Content.Pipeline.Processors.TextureProcessorOutputFormat) –
  • isSpriteFont (bool) –