1mlib_GraphicsDrawTriangleSemte(d3iMaLLIiBb)Library Fmulnicbt_iGornasphicsDrawTriangleSet(3MLIB)
2
3
4
6 mlib_GraphicsDrawTriangleSet, mlib_GraphicsDrawTriangleSet_8,
7 mlib_GraphicsDrawTriangleSet_32, mlib_GraphicsDrawTriangleSet_X_8,
8 mlib_GraphicsDrawTriangleSet_X_32, mlib_GraphicsDrawTriangleSet_A_8,
9 mlib_GraphicsDrawTriangleSet_A_32, mlib_GraphicsDrawTriangleSet_B_8,
10 mlib_GraphicsDrawTriangleSet_B_32, mlib_GraphicsDrawTriangleSet_G_8,
11 mlib_GraphicsDrawTriangleSet_G_32, mlib_GraphicsDrawTriangleSet_Z_8,
12 mlib_GraphicsDrawTriangleSet_Z_32, mlib_GraphicsDrawTriangleSet_AB_8,
13 mlib_GraphicsDrawTriangleSet_AB_32, mlib_GraphicsDrawTriangleSet_ABG_8,
14 mlib_GraphicsDrawTriangleSet_ABG_32, mlib_GraphicsDrawTriangle‐
15 Set_ABGZ_8, mlib_GraphicsDrawTriangleSet_ABGZ_32, mlib_GraphicsDrawTri‐
16 angleSet_ABZ_8, mlib_GraphicsDrawTriangleSet_ABZ_32, mlib_GraphicsDraw‐
17 TriangleSet_AG_8, mlib_GraphicsDrawTriangleSet_AG_32, mlib_Graphics‐
18 DrawTriangleSet_AGZ_8, mlib_GraphicsDrawTriangleSet_AGZ_32, mlib_Graph‐
19 icsDrawTriangleSet_AZ_8, mlib_GraphicsDrawTriangleSet_AZ_32,
20 mlib_GraphicsDrawTriangleSet_BG_8, mlib_GraphicsDrawTriangleSet_BG_32,
21 mlib_GraphicsDrawTriangleSet_BGZ_8, mlib_GraphicsDrawTriangle‐
22 Set_BGZ_32, mlib_GraphicsDrawTriangleSet_BZ_8, mlib_GraphicsDrawTrian‐
23 gleSet_BZ_32, mlib_GraphicsDrawTriangleSet_GZ_8, mlib_GraphicsDrawTri‐
24 angleSet_GZ_32 - draw triangle set where each member can have different
25 vertices
26
28 cc [ flag... ] file... -lmlib [ library... ]
29 #include <mlib.h>
30
31 mlib_status mlib_GraphicsDrawTriangleSet_8(mlib_image *buffer,
32 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
33
34
35 mlib_status mlib_GraphicsDrawTriangleSet_32(mlib_image *buffer,
36 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
37
38
39 mlib_status mlib_GraphicsDrawTriangleSet_X_8(mlib_image *buffer,
40 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
41 mlib_s32 c2);
42
43
44 mlib_status mlib_GraphicsDrawTriangleSet_X_32(mlib_image *buffer,
45 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
46 mlib_s32 c2);
47
48
49 mlib_status mlib_GraphicsDrawTriangleSet_A_8(mlib_image *buffer,
50 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
51
52
53 mlib_status mlib_GraphicsDrawTriangleSet_A_32(mlib_image *buffer,
54 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c);
55
56
57 mlib_status mlib_GraphicsDrawTriangleSet_B_8(mlib_image *buffer,
58 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
59 mlib_s32 a);
60
61
62 mlib_status mlib_GraphicsDrawTriangleSet_B_32(mlib_image *buffer,
63 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
64 mlib_s32 a);
65
66
67 mlib_status mlib_GraphicsDrawTriangleSet_G_8(mlib_image *buffer,
68 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
69 const mlib_s32 *c);
70
71
72 mlib_status mlib_GraphicsDrawTriangleSet_G_32(mlib_image *buffer,
73 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
74 const mlib_s32 *c);
75
76
77 mlib_status mlib_GraphicsDrawTriangleSet_Z_8(mlib_image *buffer,
78 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
79 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c);
80
81
82 mlib_status mlib_GraphicsDrawTriangleSet_Z_32(mlib_image *buffer,
83 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
84 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c);
85
86
87 mlib_status mlib_GraphicsDrawTriangleSet_AB_8(mlib_image *buffer,
88 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
89 mlib_s32 a);
90
91
92 mlib_status mlib_GraphicsDrawTriangleSet_AB_32(mlib_image *buffer,
93 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints, mlib_s32 c,
94 mlib_s32 a);
95
96
97 mlib_status mlib_GraphicsDrawTriangleSet_ABG_8(mlib_image *buffer,
98 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
99 const mlib_s32 *c, mlib_s32 a);
100
101
102 mlib_status mlib_GraphicsDrawTriangleSet_ABG_32(mlib_image *buffer,
103 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
104 const mlib_s32 *c, mlib_s32 a);
105
106
107 mlib_status mlib_GraphicsDrawTriangleSet_ABGZ_8(mlib_image *buffer,
108 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
109 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
110
111
112 mlib_status mlib_GraphicsDrawTriangleSet_ABGZ_32(mlib_image *buffer,
113 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
114 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
115
116
117 mlib_status mlib_GraphicsDrawTriangleSet_ABZ_8(mlib_image *buffer,
118 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
119 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
120
121
122 mlib_status mlib_GraphicsDrawTriangleSet_ABZ_32(mlib_image *buffer,
123 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
124 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
125
126
127 mlib_status mlib_GraphicsDrawTriangleSet_AG_8(mlib_image *buffer,
128 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
129 const mlib_s32 *c);
130
131
132 mlib_status mlib_GraphicsDrawTriangleSet_AG_32(mlib_image *buffer,
133 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
134 const mlib_s32 *c);
135
136
137 mlib_status mlib_GraphicsDrawTriangleSet_AGZ_8(mlib_image *buffer,
138 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
139 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c);
140
141
142 mlib_status mlib_GraphicsDrawTriangleSet_AGZ_32(mlib_image *buffer,
143 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
144 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c);
145
146
147 mlib_status mlib_GraphicsDrawTriangleSet_AZ_8(mlib_image *buffer,
148 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
149 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c);
150
151
152 mlib_status mlib_GraphicsDrawTriangleSet_AZ_32(mlib_image *buffer,
153 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
154 const mlib_s16 *z,mlib_s32 npoints, mlib_s32 c);
155
156
157 mlib_status mlib_GraphicsDrawTriangleSet_BG_8(mlib_image *buffer,
158 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
159 const mlib_s32 *c, mlib_s32 a);
160
161
162 mlib_status mlib_GraphicsDrawTriangleSet_BG_32(mlib_image *buffer,
163 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 npoints,
164 const mlib_s32 *c, mlib_s32 a);
165
166
167 mlib_status mlib_GraphicsDrawTriangleSet_BGZ_8(mlib_image *buffer,
168 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
169 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
170
171
172 mlib_status mlib_GraphicsDrawTriangleSet_BGZ_32(mlib_image *buffer,
173 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
174 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c, mlib_s32 a);
175
176
177 mlib_status mlib_GraphicsDrawTriangleSet_BZ_8(mlib_image *buffer,
178 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
179 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
180
181
182 mlib_status mlib_GraphicsDrawTriangleSet_BZ_32(mlib_image *buffer,
183 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
184 const mlib_s16 *z, mlib_s32 npoints, mlib_s32 c, mlib_s32 a);
185
186
187 mlib_status mlib_GraphicsDrawTriangleSet_GZ_8(mlib_image *buffer,
188 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
189 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c);
190
191
192 mlib_status mlib_GraphicsDrawTriangleSet_GZ_32(mlib_image *buffer,
193 mlib_image *zbuffer, const mlib_s16 *x, const mlib_s16 *y,
194 const mlib_s16 *z, mlib_s32 npoints, const mlib_s32 *c);
195
196
198 Each of the mlib_GraphicsDrawTriangleSet_*() functions draws a set of
199 triangles with vertices at {(x1,y1), (x2,y2), (x3,y3)}, {(x4,y4),
200 (x5,y5), (x6,y6)}, ..., and {(xn-2,yn-2), (xn-1,yn-1), (xn,yn)}.
201
202
203 Each of the mlib_GraphicsDrawTriangleSet_X_*() functions draws a set of
204 triangles in Xor mode as follows:
205
206 data[x,y] ^= c ^ c2
207
208
209
210 Each of the mlib_GraphicsDrawTriangleSet_A_*() functions draws a set of
211 triangles with antialiasing.
212
213
214 Each of the mlib_GraphicsDrawTriangleSet_B_*() functions draws a set of
215 triangles with alpha blending as follows:
216
217 data[x,y] = (data[x,y] * (255 - a) + c * a) / 255
218
219
220
221 Each of the mlib_GraphicsDrawTriangleSet_G_*() functions draws a set of
222 triangles with Gouraud shading.
223
224
225 Each of the mlib_GraphicsDrawTriangleSet_Z_*() functions draws a set of
226 triangles with Z buffering.
227
228
229 Each of the other functions draws a set of triangles with a combination
230 of two or more features like antialiasing (A), alpha blending (B),
231 Gouraud shading (G), and Z buffering (Z).
232
234 Each of the functions takes some of the following arguments:
235
236 buffer Pointer to the image into which the function is drawing.
237
238
239 zbuffer Pointer to the image that holds the Z buffer.
240
241
242 x Pointer to array of X coordinates of the points.
243
244
245 y Pointer to array of Y coordinates of the points.
246
247
248 z Pointer to array of Z coordinates of the points.
249
250
251 npoints Number of points in the arrays. npoints must be a multiple
252 of 3.
253
254
255 c Color used in the drawing, or pointer to array of colors of
256 the points in the case of Gouraud shading.
257
258
259 c2 Alternation color.
260
261
262 a Alpha value for blending. 0 ≤ a ≤ 255.
263
264
266 Each of the functions returns MLIB_SUCCESS if successful. Otherwise it
267 returns MLIB_FAILURE.
268
270 See attributes(5) for descriptions of the following attributes:
271
272
273
274
275 ┌─────────────────────────────┬─────────────────────────────┐
276 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
277 ├─────────────────────────────┼─────────────────────────────┤
278 │Interface Stability │Committed │
279 ├─────────────────────────────┼─────────────────────────────┤
280 │MT-Level │MT-Safe │
281 └─────────────────────────────┴─────────────────────────────┘
282
284 mlib_GraphicsDrawTriangle(3MLIB), mlib_GraphicsDrawTriangle‐
285 FanSet(3MLIB), mlib_GraphicsDrawTriangleStripSet(3MLIB), attributes(5)
286
287
288
289SunOS 5.11 2 Mar 2007mlib_GraphicsDrawTriangleSet(3MLIB)