Class TextureProfile
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
Base class for handling texture profiles.
public abstract class TextureProfile
- Inheritance
-
TextureProfile
- Inherited Members
Methods
ConvertTexture(ContentProcessorContext, TextureContent, TextureProcessorOutputFormat, bool)
Performs conversion of the texture content to the correct format.
public void ConvertTexture(ContentProcessorContext context, TextureContent content, TextureProcessorOutputFormat format, bool isSpriteFont)
Parameters
contextContentProcessorContextThe processor context.
contentTextureContentThe content to be compressed.
formatTextureProcessorOutputFormatThe user requested format for compression.
isSpriteFontboolIf the texture has represents a sprite font, i.e. is greyscale and has sharp black/white contrast.
ForPlatform(TargetPlatform)
Find the profile for this target platform.
public static TextureProfile ForPlatform(TargetPlatform platform)
Parameters
platformTargetPlatformThe platform target for textures.
Returns
PlatformCompressTexture(ContentProcessorContext, TextureContent, TextureProcessorOutputFormat, bool)
protected abstract void PlatformCompressTexture(ContentProcessorContext context, TextureContent content, TextureProcessorOutputFormat format, bool isSpriteFont)
Parameters
contextContentProcessorContextcontentTextureContentformatTextureProcessorOutputFormatisSpriteFontbool
Requirements(ContentProcessorContext, TextureProcessorOutputFormat, out bool, out bool)
Determines if the texture format will require power-of-two dimensions and/or equal width and height.
public abstract void Requirements(ContentProcessorContext context, TextureProcessorOutputFormat format, out bool requiresPowerOfTwo, out bool requiresSquare)
Parameters
contextContentProcessorContextThe processor context.
formatTextureProcessorOutputFormatThe desired texture format.
requiresPowerOfTwoboolTrue if the texture format requires power-of-two dimensions.
requiresSquareboolTrue if the texture format requires equal width and height.
Supports(TargetPlatform)
Returns true if this profile supports texture processing for this platform.
public abstract bool Supports(TargetPlatform platform)
Parameters
platformTargetPlatform