/*---------------------------------------------------------------------------* Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ #if !defined(_ATI_TEX_TEXTURE_H_INCLUDED_) #define _ATI_TEX_TEXTURE_H_INCLUDED_ /// @addtogroup GX2TexUtilGroup /// @{ #if defined(WIN32) || defined(WIN64) #include #else #include #endif #include "texUtils.h" #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #ifdef __cplusplus extern "C" { #endif typedef enum { PE_OK, ///< No error - success. PE_AlreadyLoaded, ///< The plugin is already loaded. PE_Unknown, ///< An error occurred. } TU_Error; /// A set of flags indicating cube-map faces. typedef enum { MS_CF_None = 0x00, ///< No cube-map faces. MS_CF_PositiveX = 0x01, ///< The positive-X cube-map face. MS_CF_NegativeX = 0x02, ///< The negative-X cube-map face. MS_CF_PositiveY = 0x04, ///< The positive-Y cube-map face. MS_CF_NegativeY = 0x08, ///< The negative-Y cube-map face. MS_CF_PositiveZ = 0x10, ///< The positive-Z cube-map face. MS_CF_NegativeZ = 0x20, ///< The negative-Z cube-map face. MS_CF_All = 0x3f, ///< All the cube-map faces. } MS_CubeFace; /// \brief The format of data in the channels of texture. typedef enum { CF_Unknown = 0, /// 8-bit integer data CF_8bit = 1, /// 16-bit float data CF_Float16 = 2, /// 32-bit float data CF_Float32 = 3, /// Compressed data CF_Compressed = 4, /// 16-bit integer data CF_16bit = 5, /// 10-bit integer data in the color channels & 2-bit integer data in the alpha channel CF_2101010 = 6, /// 1555 CF_1555 = 7, /// 4444 CF_4444 = 8, /// 32-bit integer data CF_32bit = 9, } ChannelFormat; /// \brief The type of data the texture represents. typedef enum { /// An RGB texture padded to u32 width TDT_XRGB = 0, /// An ARGB texture TDT_ARGB = 1, /// A normal map TDT_NORMAL_MAP = 2, /// A single component texture TDT_R = 3, /// A two component texture TDT_RG = 4, /// A three component texture TDT_RGB = 5 } TextureDataType; /// \brief The type of the texture. typedef enum { /// A regular 2D texture TT_2D = 0, /// A cubemap texture TT_CubeMap = 1, /// A volume texture TT_VolumeTexture = 2, } TextureType; /// \brief A struct for storing ARGB8 colors. typedef struct { /// The color as an array of components u8 rgba[4]; } COLOR; typedef enum { MS_Default = 0, MS_AlphaPremult = 1, } MS_Flags; /// \brief A MipLevel is the fundamental unit for containing texture data. /// /// The MipLevel structure contains the dimensions, size and data pointer for /// a given mipmap level. /// typedef struct { s32 width; ///< Width of the data in pixels. s32 height; ///< Height of the data in pixels. u32 byteSize; ///< Size of the data in bytes. u8* pData; ///< A pointer to the texture data that this MipLevel contains. } MipLevel; #ifdef __cplusplus }; #endif ///////////////////////////////////////////////////////////////////////////// /// @} #endif // !defined(_ATI_TA_TEXTURE_H_INCLUDED_)