gDPSetTextureImage [macro]
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 is the display list pointer.
- img is the image address (64-byte alignment).
- fmt is the 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 is the 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 is the image width (1~4096 pixels).
Explanation
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
2/1/99 Completely rewritten.
|
Nintendo® Confidential
Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998-1999
Nintendo of America Inc. All rights reserved Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999
|