Search Results for

    Show / Hide Table of Contents

    Class TextureTool

    Textures importing, processing and exporting utilities.

    Inheritance
    TextureTool
    Assembly: FlaxEngine.dll
    File: Engine/Tools/TextureTool/TextureTool.h
    Syntax
    public class TextureTool

    Methods

    Convert(TextureData& dst, const TextureData& src, const PixelFormat dstFormat)

    Converts the specified source texture data into an another format.

    Declaration
    public static bool Convert(TextureData& dst, const TextureData& src, const PixelFormat dstFormat)
    Parameters
    TextureData dst

    The destination data.

    TextureData src

    The source data.

    PixelFormat dstFormat

    The destination data format. Must be other than source data type.

    Returns
    bool

    True if fails, otherwise false.

    ExportTexture(const StringView& path, const TextureData& textureData)

    Exports the texture.

    Declaration
    public static bool ExportTexture(const StringView& path, const TextureData& textureData)
    Parameters
    StringView path

    The output file path.

    TextureData textureData

    The output data.

    Returns
    bool

    True if fails, otherwise false.

    HasAlpha(const StringView& path)

    Checks whenever the given texture file contains alpha channel data with values different than solid fill of 1 (non fully opaque).

    Declaration
    public static bool HasAlpha(const StringView& path)
    Parameters
    StringView path

    The file path.

    Returns
    bool

    True if has alpha channel, otherwise false.

    ImportTexture(const StringView& path, TextureData& textureData)

    Imports the texture.

    Declaration
    public static bool ImportTexture(const StringView& path, TextureData& textureData)
    Parameters
    StringView path

    The file path.

    TextureData textureData

    The output data.

    Returns
    bool

    True if fails, otherwise false.

    ImportTexture(const StringView& path, TextureData& textureData, Options options, String& errorMsg)

    Imports the texture.

    Declaration
    public static bool ImportTexture(const StringView& path, TextureData& textureData, Options options, String& errorMsg)
    Parameters
    StringView path

    The file path.

    TextureData textureData

    The output data.

    Options options

    The import options.

    String errorMsg

    The error message container.

    Returns
    bool

    True if fails, otherwise false.

    Resize(TextureData& dst, const TextureData& src, int32 dstWidth, int32 dstHeight)

    Resizes the specified source texture data into an another dimensions.

    Declaration
    public static bool Resize(TextureData& dst, const TextureData& src, int32 dstWidth, int32 dstHeight)
    Parameters
    TextureData dst

    The destination data.

    TextureData src

    The source data.

    int32 dstWidth

    The destination data width.

    int32 dstHeight

    The destination data height.

    Returns
    bool

    True if fails, otherwise false.

    ToPixelFormat(TextureFormatType format, int32 width, int32 height, bool canCompress)

    Declaration
    public static PixelFormat ToPixelFormat(TextureFormatType format, int32 width, int32 height, bool canCompress)
    Parameters
    TextureFormatType format

    int32 width

    int32 height

    bool canCompress

    Returns
    PixelFormat

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat