gDPSetColorImage [Macro]

Function

gDPSetColorImage

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
Display list pointer.
fmt
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)
size
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)
img
Image address (64-byte alignment)

Description

Sets the format, etc. 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 Programming Manual.

See Also

gDPSetDepthImage, gDPSetTextureImage

Revision History

02/01/99   Completely rewritten