137{
139
145
146 if (
PB->count==0)
goto CleanUp;
147
148
149 {
158 mask[
i] = (
x[
i]>=xmin) & (
x[
i]<=xmax) & (
y[
i]>=ymin) & (
y[
i]<=ymax);
159 }
160 }
161
162 if (
ctx->Visual->RGBAflag) {
163
164 if (
PB->mono &&
ctx->MutablePixels) {
165
170 }
171
172
173 if (
ctx->MutablePixels || !
PB->mono) {
174
175 if (
ctx->Texture.Enabled) {
176
179 }
180
183 ||
ctx->Texture.Enabled)) {
186 }
187
188
189
190 if (
ctx->Color.AlphaEnabled) {
192 goto CleanUp;
193 }
194 }
195
196 if (
ctx->Stencil.Enabled) {
197
199 goto CleanUp;
200 }
201
203 }
204 else if (
ctx->Depth.Test) {
205
207 }
208
210 goto CleanUp;
211 }
212
214
219 }
220
221 if (
ctx->Color.SWLogicOpEnabled) {
224 }
225 else if (
ctx->Color.BlendEnabled) {
228 }
229
230 if (
ctx->Color.SWmasking) {
233 }
234
235
236 (*
ctx->Driver.WriteColorPixels)(
ctx,
PB->count,
PB->x,
PB->y,
240 }
241
243
245 if (
ctx->Color.SWLogicOpEnabled) {
248 }
249 else if (
ctx->Color.BlendEnabled) {
251 rsave, gsave, bsave, asave,
mask );
252 }
253 if (
ctx->Color.SWmasking) {
255 rsave, gsave, bsave, asave,
mask);
256 }
257 (*
ctx->Driver.WriteColorPixels)(
ctx,
PB->count,
PB->x,
PB->y,
258 rsave, gsave, bsave, asave,
mask);
260 ctx->Buffer->Alpha =
ctx->Buffer->BackAlpha;
263 ctx->Buffer->Alpha =
ctx->Buffer->FrontAlpha;
264 }
266
267 }
268 }
269 else {
270
271
272
273
274 if (
ctx->Color.AlphaEnabled) {
276 goto CleanUp;
277 }
278 }
279
280 if (
ctx->Stencil.Enabled) {
281
283 goto CleanUp;
284 }
285
287 }
288 else if (
ctx->Depth.Test) {
289
291 }
292
294 goto CleanUp;
295 }
296
297
298 {
305 }
310 }
311
313
317 ctx->Buffer->Alpha =
ctx->Buffer->BackAlpha;
320 ctx->Buffer->Alpha =
ctx->Buffer->FrontAlpha;
321 }
323 }
324
325 }
326 }
327 else {
328
329
330
331 if (
PB->mono &&
ctx->MutablePixels) {
332
335 do {
336 *pbindex++ = indx;
339 }
340
341 if (
ctx->MutablePixels || !
PB->mono) {
342
344
348 }
349
350
351
352 if (
ctx->Stencil.Enabled) {
353
355 goto CleanUp;
356 }
357
359 }
360 else if (
ctx->Depth.Test) {
361
363 }
364
366 goto CleanUp;
367 }
368
370
372 }
373
374 if (
ctx->Color.SWLogicOpEnabled) {
376 }
377
378 if (
ctx->Color.SWmasking) {
380 }
381
382
383 (*
ctx->Driver.WriteIndexPixels)(
ctx,
PB->count,
PB->x,
PB->y,
385
387
390 if (
ctx->Color.SWLogicOpEnabled) {
392 }
393 if (
ctx->Color.SWmasking) {
396 }
397 (*
ctx->Driver.WriteIndexPixels)(
ctx,
PB->count,
PB->x,
PB->y,
400 }
401
402
403 }
404 else {
405
406
407
408
409 if (
ctx->Stencil.Enabled) {
410
412 goto CleanUp;
413 }
414
416 }
417 else if (
ctx->Depth.Test) {
418
420 }
421
423 goto CleanUp;
424 }
425
426
427 (*
ctx->Driver.Index)(
ctx,
PB->index );
429
431
435 }
436
437 }
438 }
439
440CleanUp:
447}
GLint gl_alpha_test(GLcontext *ctx, GLuint n, const GLubyte alpha[], GLubyte mask[])
void gl_write_alpha_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte alpha[], const GLubyte mask[])
void gl_write_mono_alpha_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte alpha, const GLubyte mask[])
void gl_blend_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[], GLubyte mask[])
void gl_texture_pixels(GLcontext *ctx, GLuint n, const GLfloat s[], const GLfloat t[], const GLfloat r[], const GLfloat lambda[], GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[])
#define FRONT_AND_BACK_BIT
void gl_fog_color_pixels(GLcontext *ctx, GLuint n, const GLdepth z[], GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[])
void gl_fog_index_pixels(GLcontext *ctx, GLuint n, const GLdepth z[], GLuint index[])
GLint GLint GLint GLint GLint x
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
void gl_logicop_rgba_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[], GLubyte mask[])
void gl_logicop_ci_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLuint index[], GLubyte mask[])
#define DEFARRAY(TYPE, NAME, SIZE)
#define MEMSET(DST, VAL, N)
#define MEMCPY(DST, SRC, BYTES)
void gl_mask_color_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[], const GLubyte mask[])
void gl_mask_index_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLuint index[], const GLubyte mask[])
void gl_depth_stencil_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLdepth z[], GLubyte mask[])
GLint gl_stencil_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte mask[])