gDPSetTextureImage [Macro]
Function
gDPSetTextureImage
Sets the texture image area
Syntax
#include <ultra64.h> /* gbi.h */
gDPSetTextureImage(Gfx *gdl, s32 fmt, s32 siz, s32 width, s32 img)
gsDPSetTextureImage( s32 fmt, s32 siz, s32 width, s32 img)
Arguments
- gdl
- Display list pointer.
-
- img
- Image address (64-byte alignment).
-
- fmt
- Image format:
- G_IM_FMT_RGBA (RGBA format)
- G_IM_FMT_CI (CI format)
- G_IM_FMT_IA (IA format)
- G_IM_FMT_I (I format)
-
- siz
- Pixel component size:
- G_IM_SIZ_4b (4 bits/texel)
- G_IM_SIZ_8b (8 bits/texel)
- G_IM_SIZ_16b (16 bits/texel)
- G_IM_SIZ_32b (32 bits/texel)
-
- width
- Image width (1~4096 pixels).
Description
Sets the frame buffer region for texture images. This macro is used in order to utilize a number of textures. The command is normally embedded in gDPLoadTexture* so it is not directly used.
- The different image formats of the fmt argument are explained below:
- G_IM_FMT_RGBA
- Each texel comprises four elements of information: RGB (red, green, blue) and alpha (opacity).
- G_IM_FMT_CI
- Each texel is comprised of index information specifying palette data.
- G_IM_FMT_IA
- Each texel is comprised of I (intensity) information and alpha information.
- G_IM_FMT_I
- Each texel is a texture with only I information. Since this is extremely compact, it is useful when only a few colors are being used.
You can choose from among 7 different texture image formats. The table shows the valid combinations of format and size. Select the format that best suits the texture compression method and type.
|
G_IM_SIZ_ (Size) |
4b |
8b |
16b |
32b |
G_IM_FMT_ (Format) |
RGBA |
|
|
X (5/5/5/1) |
X (8/8/8/8) |
CI |
|
X |
|
|
IA |
X (3/1) |
X (4/4) |
X (8/8) |
|
I |
|
X |
|
|
See Also
gDPSetColorImage, gDPSetDepthImage
Revision History
02/01/99 Completely rewritten