3.7 Other Commands Relating to Texture Settings

Here we introduce four other commands relating to textures. The first three commands will be brought up again later in Chapters 9 and 10, so refer there for concrete examples of their use.

gDPSetTexturePersp(Gfx *gdl, u32 enable)
  Specifies whether or not to perform perspective correction on the texture. When texture mapping to polygons this should be set to G_TP_PERSP.

  enable The perspective correction flag
   G_TP_NONE (turns perspective correction off)
   G_TP_PERSP (turns perspective correction on)

gDPSetTextureLOD(Gfx *gdl, u32 mode)
  This command sets the mode for multi-tile textures. Specify G_TL_LOD for mipmapping and other LOD-compliant texture mapping.

  mode Texture mode
   G_TL_TILE (turns LOD tile selection off)
   G_TL_LOD (turns LOD tile selection on)

gDPSetTextureDetail(Gfx *gdl, u32 type)
  Specifies the texture sampling type when performing LOD-compliant texture mapping. See Chapter 9 for details.

  type Texture sampling type
   G_TD_CLAMP (clamp)
   G_TD_SHARPEN (sharp)
   G_TD_DETAIL (detail)

gDPSetTextureLUT(Gfx *gdl, u32 mode)
  Specifies whether or not the texture image will use a lookup table (LUT), and if so, what kind.

  mode Texture mode
   G_TT_NONE (Do not use TLUT)
   G_TT_RGBA16 (Use TLUT with entries in 16bit RGBA format)
   G_TT_IA16 (Use TLUT with entries in 16bit IA format)