gDPSetImage.3p
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.TH gDPSetImage 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gDPSetImage,
gDPSetColorImage, gsDPSetColorImage,
gDPSetDepthImage, gsDPSetDepthImage,
gDPSetTextureImage, gsDPSetTextureImage
\- set color, depth, texture image buffer area.
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"
gDPSetColorImage(Gfx *gdl, int fmt, int siz, int width, int img)
gsDPSetColorImage(int fmt, int siz, int width, int img)
gDPSetDepthImage(Gfx *gdl, int img)
gsDPSetDepthImage(int img)
gDPSetTextureImage(Gfx *gdl, int fmt, int siz, int width, int img)
gsDPSetTextureImage(int fmt, int siz, int width, int img)
\fP
.fi
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I fmt
image format.
\fBG_IM_FMT_RGBA, G_IM_FMT_YUV, G_IM_FMT_CI, G_IM_FMT_IA, G_IM_FMT_I\fP.
.TP
.I siz
pixel element size.
\fBG_IM_SIZ_4b, G_IM_SIZ_8b, G_IM_SIZ_16b, G_IM_SIZ_32b\fP
.TP
.I width
image width in number of pixel elements.
.TP
.I img
image pointer.
.SH DESCRIPTION
.TP 12
.B G_IM_FMT_RGBA
RGBA format.
Red is always packed toward the MSB.
.TP
.B G_IM_FMT_YUV
YUV format.
.TP
.B G_IM_FMT_CI
Color indexed format.
.TP
.B G_IM_FMT_IA
Intensity and Alpha format.
.TP
.B G_IM_FMT_I
Intensity format.
.TP
.B G_IM_SIZ_4b
4 bits per pixel element.
Only for G_IM_FMT_I
.TP
.B G_IM_SIZ_8b
8 bits per pixel element.
For G_IM_FMT_CI, G_IM_FMT_I, and G_IM_FMT_IA (4b each component).
.TP
.B G_IM_SIZ_16b
For G_IM_FMT_RGBA (5/5/5/1), G_IM_FMT_MASK, G_IM_FMT_IA (8b each component).
.TP
.B G_IM_SIZ_32b
.PP
These commands set the framebuffer area for color, depth, and texture images.
An application typically has 2 color frame buffers for double buffering,
which are swapped during the vertical retrace interval.
.PP
If z-buffering is enabled,
the application should use the
.I gDPSetDepthImage (3P)
command to set up the z-buffer area.
The
.I width
parameter is not needed for
.I gDPSetDepthImage (3P)
because the RDP assumes the
.I width
is the same as the color buffer. The
.I siz
parameter is not needed for
.I gDPSetDepthImage (3P)
because the depth-buffer is always
.B G_IM_SIZ_16b.
.PP
The
.I gDPSetTextureImage (3P)
command is used to point to different textures.
This command is usually not used directly, it is embedded in the
.I gDPLoadTexture* (3P)
commands.
.PP
The
.I gDPSetDepthImage (3P)
and
.I gDPSetColorImage (3P)
commands require a 64 BYTE aligned address.
.SH SEE ALSO
.IR gDPSetDepthImage (3P)
.IR gDPSetTextureImage (3P)
.IR gDPSetColorImage (3P)