gDPSetColorImage [macro]
Sets the color frame buffer region.
Syntax
#include <ultra64.h> /* gbi.h */
gDPSetColorImage(Gfx *gdl, s32 fmt, s32 siz, s32 width, s32 img)
gsDPSetColorImage(s32 fmt, s32 siz, s32 width, s32 img)
Arguments
- gdl is the display list pointer.
- fmt is the image format:
G_IM_FMT_RGBA (RGBA format)
G_IM_FMT_YUV (YUV 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).
- img is the image address (64-byte alignment).
Explanation
Sets the format of the frame buffer region to be used for color images. Applications normally use two color frame buffers for double buffering, or switching between buffers on every vertical retrace.
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_YUV
- Each texel comprises a Y (intensity) component and a UV (color difference) component.
- 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 (4/4) |
X (8/8) |
|
I |
X |
X |
|
|
For details, see Section 12.8.1, "Image Location and Format" in the N64 Online Programming Manual.
See Also
gDPSetDepthImage
gDPSetTextureImage
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
|