G3*_TexImageParam
C Specification
-
#include <nitro/gx/g3imm.h>
#include <nitro/gx/g3b.h>
#include <nitro/gx/g3c.h>
void G3_TexImageParam(
GXTexFmt texFmt,
GXTexGen texGen,
GXTexSizeS s,
GXTexSizeT t,
GXTexRepeat repeat,
GXTexFlip flip,
GXTexPlttColor0 pltt0,
u32 addr
);
// Below are APIs for creating the display list (command list):
void G3B_TexImageParam(GXDLInfo* info, ...);
void G3C_TexImageParam(GXDLInfo* info, ...);
void G3BS_TexImageParam(GXDLInfo* info, ...);
void G3CS_TexImageParam(GXDLInfo* info, ...);
Arguments
info |
Command List Information |
texFmt |
Texture format |
texGen |
Texture coordinate conversion mode |
s |
Texture size s |
t |
Texture size t |
repeat |
Repeat settings |
flip |
Flip settings (valid only when repeat is enabled.) |
pltt0 |
Flag for selecting whether to use color 0 in the palette or use it as a transparent color |
addr |
Specifies the start offset address of the texture in the texture slot. |
Return Values
None.
Description
Specifies texture parameters. The G3*_TexImageParam
command is normally issued before G3*_Begin
but can be issued between G3*_Begin
and G3*_End
. If it is issued during this interval, a different texture parameter can be set for each polygon in G3*_Begin
and G3*_End
.
GX_TEXFMT_NONE |
No texture |
GX_TEXFMT_A3I5 |
Translucent texture (3-bit alpha, 5-bit palette color number) |
GX_TEXFMT_PLTT4 |
4-color palette texture |
GX_TEXFMT_PLTT16 |
16-color palette texture |
GX_TEXFMT_PLTT256 |
256-color palette texture |
GX_TEXFMT_COMP4x4 |
4x4 text compressed texture |
GX_TEXFMT_A5I3 |
Translucent texture (5-bit alpha, 3-bit palette color number) |
GX_TEXFMT_DIRECT |
Direct texture |
GX_TEXGEN_NONE |
No texture coordinate conversion xyxyxy |
GX_TEXGEN_TEXCOORD |
TexCoord source |
GX_TEXGEN_NORMAL |
Normal source |
GX_TEXGEN_VERTEX |
Vertex source |
GX_TEXSIZE_S8 |
8 texels along S-axis |
GX_TEXSIZE_S16 |
16 texels along S-axis |
GX_TEXSIZE_S32 |
32 texels along S-axis |
GX_TEXSIZE_S64 |
64 texels along S-axis |
GX_TEXSIZE_S128 |
128 texels along S-axis |
GX_TEXSIZE_S256 |
256 texels along S-axis |
GX_TEXSIZE_S512 |
512 texels along S-axis |
GX_TEXSIZE_S1024 |
1024 texels along S-axis |
GX_TEXSIZE_T8 |
8 texels along T-axis |
GX_TEXSIZE_T16 |
16 texels along T-axis |
GX_TEXSIZE_T32 |
32 texels along T-axis |
GX_TEXSIZE_T64 |
64 texels along T-axis |
GX_TEXSIZE_T128 |
128 texels along T-axis |
GX_TEXSIZE_T256 |
256 texels along T-axis |
GX_TEXSIZE_T512 |
512 texels along T-axis |
GX_TEXSIZE_T1024 |
1024 texels along T-axis |
GX_TEXREPEAT_NONE |
No repeat |
GX_TEXREPEAT_S |
Repeat along S-axis |
GX_TEXREPEAT_T |
Repeat along T-axis |
GX_TEXREPEAT_ST |
Repeat along both S- and T-axes |
GX_TEXFLIP_NONE |
No flip |
GX_TEXFLIP_S |
Flip along S-axis |
GX_TEXFLIP_T |
Flip along T-axis |
GX_TEXFLIP_ST |
Flip along both S- and T-axes |
GX_TEXPLTTCOLOR0_TRNS |
Regard Color0 as transparent |
GX_TEXPLTTCOLOR0_USE |
Enable palette color 0 set value |
The following is the type definition for the list types.
typedef enum
{
GX_TEXFMT_NONE = 0,
GX_TEXFMT_A3I5 = 1,
GX_TEXFMT_PLTT4 = 2,
GX_TEXFMT_PLTT16 = 3,
GX_TEXFMT_PLTT256 = 4,
GX_TEXFMT_COMP4x4 = 5,
GX_TEXFMT_A513 = 6,
GX_TEXFMT_DIRECT = 7
}
GXTexFmt;
#define GX_TEXFMT_ALPHA ((GXTexFmt)GX_TEXFMT_A5I3) // Obsolete name
typedef enum
{
GX_TEXGEN_NONE = 0,
GX_TEXGEN_TEXCOORD = 1,
GX_TEXGEN_NORMAL = 2,
GX_TEXGEN_VERTEX = 3
}
GXTexGen;
typedef enum
{
GX_TEXSIZE_S8 = 0,
GX_TEXSIZE_S16 = 1,
GX_TEXSIZE_S32 = 2,
GX_TEXSIZE_S64 = 3,
GX_TEXSIZE_S128 = 4,
GX_TEXSIZE_S256 = 5,
GX_TEXSIZE_S512 = 6,
GX_TEXSIZE_S1024 = 7
}
GXTexSizeS;
typedef enum
{
GX_TEXSIZE_T8 = 0,
GX_TEXSIZE_T16 = 1,
GX_TEXSIZE_T32 = 2,
GX_TEXSIZE_T64 = 3,
GX_TEXSIZE_T128 = 4,
GX_TEXSIZE_T256 = 5,
GX_TEXSIZE_T512 = 6,
GX_TEXSIZE_T1024 = 7
}
GXTexSizeT;
typedef enum
{
GX_TEXREPEAT_NONE = 0,
GX_TEXREPEAT_S = 1,
GX_TEXREPEAT_T = 2,
GX_TEXREPEAT_ST = 3
}
GXTexRepeat;
typedef enum
{
GX_TEXFLIP_NONE = 0,
GX_TEXFLIP_S = 1,
GX_TEXFLIP_T = 2,
GX_TEXFLIP_ST = 3
}
GXTexFlip;
typedef enum
{
GX_TEXPLTTCOLOR0_USE = 0,
GX_TEXPLTTCOLOR0_TRNS = 1
}
GXTexPlttColor0;
See Also
G3*_TexPlttBase
, G3*_TexCoord
Revision History
01/19/2004 Initial version