ReactOS 0.4.15-dev-7788-g1ad9096
pb.h File Reference
#include "types.h"
Include dependency graph for pb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pixel_buffer
 

Macros

#define PB_SIZE   (3*MAX_WIDTH)
 
#define PB_INIT(PB, PRIM)
 
#define PB_SET_COLOR(CTX, PB, R, G, B, A)
 
#define PB_SET_INDEX(CTX, PB, I)
 
#define PB_WRITE_PIXEL(PB, X, Y, Z)
 
#define PB_WRITE_RGBA_PIXEL(PB, X, Y, Z, R, G, B, A)
 
#define PB_WRITE_CI_PIXEL(PB, X, Y, Z, I)
 
#define PB_WRITE_TEX_PIXEL(PB, X, Y, Z, R, G, B, A, S, T, U)
 
#define PB_CHECK_FLUSH(CTX, PB)
 

Functions

struct pixel_buffergl_alloc_pb (void)
 
void gl_flush_pb (GLcontext *ctx)
 

Macro Definition Documentation

◆ PB_CHECK_FLUSH

#define PB_CHECK_FLUSH (   CTX,
  PB 
)
Value:
if ((PB)->count>=PB_SIZE-MAX_WIDTH) { \
gl_flush_pb( CTX ); \
}
#define MAX_WIDTH
Definition: config.h:130
#define PB
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define PB_SIZE
Definition: pb.h:52

Definition at line 167 of file pb.h.

◆ PB_INIT

#define PB_INIT (   PB,
  PRIM 
)
Value:
(PB)->count = 0; \
(PB)->mono = GL_FALSE; \
(PB)->primitive = (PRIM);
#define GL_FALSE
Definition: gl.h:173

Definition at line 79 of file pb.h.

◆ PB_SET_COLOR

#define PB_SET_COLOR (   CTX,
  PB,
  R,
  G,
  B,
  A 
)
Value:
if ((PB)->color[0]!=(R) || (PB)->color[1]!=(G) \
|| (PB)->color[2]!=(B) || (PB)->color[3]!=(A) \
|| !(PB)->mono) { \
gl_flush_pb( ctx ); \
} \
(PB)->color[0] = R; \
(PB)->color[1] = G; \
(PB)->color[2] = B; \
(PB)->color[3] = A; \
(PB)->mono = GL_TRUE;
#define G(r, i, a, b, c, d)
Definition: blake2b-ref.c:117
Definition: ehthrow.cxx:93
Definition: ehthrow.cxx:54
#define GL_TRUE
Definition: gl.h:174
GLuint color
Definition: glext.h:6243
#define R(b, x)
Definition: sha2.c:134

Definition at line 89 of file pb.h.

◆ PB_SET_INDEX

#define PB_SET_INDEX (   CTX,
  PB,
  I 
)
Value:
if ((PB)->index!=(I) || !(PB)->mono) { \
gl_flush_pb( CTX ); \
} \
(PB)->index = I; \
(PB)->mono = GL_TRUE;
GLuint index
Definition: glext.h:6031
#define I(s)

Definition at line 105 of file pb.h.

◆ PB_SIZE

#define PB_SIZE   (3*MAX_WIDTH)

Definition at line 52 of file pb.h.

◆ PB_WRITE_CI_PIXEL

#define PB_WRITE_CI_PIXEL (   PB,
  X,
  Y,
  Z,
  I 
)
Value:
(PB)->x[(PB)->count] = X; \
(PB)->y[(PB)->count] = Y; \
(PB)->z[(PB)->count] = Z; \
(PB)->i[(PB)->count] = I; \
(PB)->count++;
#define Z(I)
#define Y(I)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define X(b, s)

Definition at line 139 of file pb.h.

◆ PB_WRITE_PIXEL

#define PB_WRITE_PIXEL (   PB,
  X,
  Y,
  Z 
)
Value:
(PB)->x[(PB)->count] = X; \
(PB)->y[(PB)->count] = Y; \
(PB)->z[(PB)->count] = Z; \
(PB)->count++;

Definition at line 116 of file pb.h.

◆ PB_WRITE_RGBA_PIXEL

#define PB_WRITE_RGBA_PIXEL (   PB,
  X,
  Y,
  Z,
  R,
  G,
  B,
  A 
)
Value:
(PB)->x[(PB)->count] = X; \
(PB)->y[(PB)->count] = Y; \
(PB)->z[(PB)->count] = Z; \
(PB)->r[(PB)->count] = R; \
(PB)->g[(PB)->count] = G; \
(PB)->b[(PB)->count] = B; \
(PB)->a[(PB)->count] = A; \
(PB)->count++;
#define A(row, col)
#define B(row, col)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean g
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 126 of file pb.h.

◆ PB_WRITE_TEX_PIXEL

#define PB_WRITE_TEX_PIXEL (   PB,
  X,
  Y,
  Z,
  R,
  G,
  B,
  A,
  S,
  T,
  U 
)
Value:
(PB)->x[(PB)->count] = X; \
(PB)->y[(PB)->count] = Y; \
(PB)->z[(PB)->count] = Z; \
(PB)->r[(PB)->count] = R; \
(PB)->g[(PB)->count] = G; \
(PB)->b[(PB)->count] = B; \
(PB)->a[(PB)->count] = A; \
(PB)->s[(PB)->count] = S; \
(PB)->t[(PB)->count] = T; \
(PB)->u[(PB)->count] = U; \
(PB)->count++;
#define U(x)
Definition: wordpad.c:45
GLdouble s
Definition: gl.h:2039
GLdouble GLdouble t
Definition: gl.h:2047
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define T
Definition: mbstring.h:31
#define S(x)
Definition: test.h:217

Definition at line 150 of file pb.h.

Function Documentation

◆ gl_alloc_pb()

struct pixel_buffer * gl_alloc_pb ( void  )

Definition at line 109 of file pb.c.

110{
111 struct pixel_buffer *pb;
112 pb = (struct pixel_buffer *) calloc(sizeof(struct pixel_buffer), 1);
113 if (pb) {
114 int i;
115 /* set non-zero fields */
116 pb->primitive = GL_BITMAP;
117 /* Set all lambda values to 0.0 since we don't do mipmapping for
118 * points or lines and want to use the level 0 texture image.
119 */
120 for (i=0; i<PB_SIZE; i++) {
121 pb->lambda[i] = 0.0;
122 }
123 }
124 return pb;
125}
#define GL_BITMAP
Definition: gl.h:497
#define calloc
Definition: rosglue.h:14
GLfloat lambda[PB_SIZE]
Definition: pb.h:67
GLenum primitive
Definition: pb.h:72

Referenced by gl_create_context().

◆ gl_flush_pb()

void gl_flush_pb ( GLcontext ctx)

Definition at line 136 of file pb.c.

137{
138 struct pixel_buffer* PB = ctx->PB;
139
141 DEFARRAY(GLubyte, rsave, PB_SIZE);
142 DEFARRAY(GLubyte, gsave, PB_SIZE);
143 DEFARRAY(GLubyte, bsave, PB_SIZE);
144 DEFARRAY(GLubyte, asave, PB_SIZE);
145
146 if (PB->count==0) goto CleanUp;
147
148 /* initialize mask array and clip pixels simultaneously */
149 {
150 GLint xmin = ctx->Buffer->Xmin;
151 GLint xmax = ctx->Buffer->Xmax;
152 GLint ymin = ctx->Buffer->Ymin;
153 GLint ymax = ctx->Buffer->Ymax;
154 GLint *x = PB->x;
155 GLint *y = PB->y;
156 GLuint i, n = PB->count;
157 for (i=0;i<n;i++) {
158 mask[i] = (x[i]>=xmin) & (x[i]<=xmax) & (y[i]>=ymin) & (y[i]<=ymax);
159 }
160 }
161
162 if (ctx->Visual->RGBAflag) {
163 /* RGBA COLOR PIXELS */
164 if (PB->mono && ctx->MutablePixels) {
165 /* Copy flat color to all pixels */
166 MEMSET( PB->r, PB->color[0], PB->count );
167 MEMSET( PB->g, PB->color[1], PB->count );
168 MEMSET( PB->b, PB->color[2], PB->count );
169 MEMSET( PB->a, PB->color[3], PB->count );
170 }
171
172 /* If each pixel can be of a different color... */
173 if (ctx->MutablePixels || !PB->mono) {
174
175 if (ctx->Texture.Enabled) {
176 /* TODO: need texture lambda valus */
177 gl_texture_pixels( ctx, PB->count, PB->s, PB->t, PB->u,
178 PB->lambda, PB->r, PB->g, PB->b, PB->a);
179 }
180
181 if (ctx->Fog.Enabled
182 && (ctx->Hint.Fog==GL_NICEST || PB->primitive==GL_BITMAP
183 || ctx->Texture.Enabled)) {
184 gl_fog_color_pixels( ctx, PB->count, PB->z,
185 PB->r, PB->g, PB->b, PB->a );
186 }
187
188 /* Scissoring already done above */
189
190 if (ctx->Color.AlphaEnabled) {
191 if (gl_alpha_test( ctx, PB->count, PB->a, mask )==0) {
192 goto CleanUp;
193 }
194 }
195
196 if (ctx->Stencil.Enabled) {
197 /* first stencil test */
198 if (gl_stencil_pixels( ctx, PB->count, PB->x, PB->y, mask )==0) {
199 goto CleanUp;
200 }
201 /* depth buffering w/ stencil */
202 gl_depth_stencil_pixels( ctx, PB->count, PB->x, PB->y, PB->z, mask );
203 }
204 else if (ctx->Depth.Test) {
205 /* regular depth testing */
206 (*ctx->Driver.DepthTestPixels)( ctx, PB->count, PB->x, PB->y, PB->z, mask );
207 }
208
209 if (ctx->RasterMask & NO_DRAW_BIT) {
210 goto CleanUp;
211 }
212
213 if (ctx->RasterMask & FRONT_AND_BACK_BIT) {
214 /* make a copy of the colors */
215 MEMCPY( rsave, PB->r, PB->count * sizeof(GLubyte) );
216 MEMCPY( gsave, PB->r, PB->count * sizeof(GLubyte) );
217 MEMCPY( bsave, PB->r, PB->count * sizeof(GLubyte) );
218 MEMCPY( asave, PB->r, PB->count * sizeof(GLubyte) );
219 }
220
221 if (ctx->Color.SWLogicOpEnabled) {
222 gl_logicop_rgba_pixels( ctx, PB->count, PB->x, PB->y,
223 PB->r, PB->g, PB->b, PB->a, mask);
224 }
225 else if (ctx->Color.BlendEnabled) {
226 gl_blend_pixels( ctx, PB->count, PB->x, PB->y,
227 PB->r, PB->g, PB->b, PB->a, mask);
228 }
229
230 if (ctx->Color.SWmasking) {
231 gl_mask_color_pixels( ctx, PB->count, PB->x, PB->y,
232 PB->r, PB->g, PB->b, PB->a, mask );
233 }
234
235 /* write pixels */
236 (*ctx->Driver.WriteColorPixels)( ctx, PB->count, PB->x, PB->y,
237 PB->r, PB->g, PB->b, PB->a, mask );
238 if (ctx->RasterMask & ALPHABUF_BIT) {
239 gl_write_alpha_pixels( ctx, PB->count, PB->x, PB->y, PB->a, mask );
240 }
241
242 if (ctx->RasterMask & FRONT_AND_BACK_BIT) {
243 /*** Also draw to back buffer ***/
244 (*ctx->Driver.SetBuffer)( ctx, GL_BACK );
245 if (ctx->Color.SWLogicOpEnabled) {
246 gl_logicop_rgba_pixels( ctx, PB->count, PB->x, PB->y,
247 PB->r, PB->g, PB->b, PB->a, mask);
248 }
249 else if (ctx->Color.BlendEnabled) {
250 gl_blend_pixels( ctx, PB->count, PB->x, PB->y,
251 rsave, gsave, bsave, asave, mask );
252 }
253 if (ctx->Color.SWmasking) {
254 gl_mask_color_pixels( ctx, PB->count, PB->x, PB->y,
255 rsave, gsave, bsave, asave, mask);
256 }
257 (*ctx->Driver.WriteColorPixels)( ctx, PB->count, PB->x, PB->y,
258 rsave, gsave, bsave, asave, mask);
259 if (ctx->RasterMask & ALPHABUF_BIT) {
260 ctx->Buffer->Alpha = ctx->Buffer->BackAlpha;
261 gl_write_alpha_pixels( ctx, PB->count, PB->x, PB->y,
262 asave, mask );
263 ctx->Buffer->Alpha = ctx->Buffer->FrontAlpha;
264 }
265 (*ctx->Driver.SetBuffer)( ctx, GL_FRONT );
266 /*** ALL DONE ***/
267 }
268 }
269 else {
270 /* Same color for all pixels */
271
272 /* Scissoring already done above */
273
274 if (ctx->Color.AlphaEnabled) {
275 if (gl_alpha_test( ctx, PB->count, PB->a, mask )==0) {
276 goto CleanUp;
277 }
278 }
279
280 if (ctx->Stencil.Enabled) {
281 /* first stencil test */
282 if (gl_stencil_pixels( ctx, PB->count, PB->x, PB->y, mask )==0) {
283 goto CleanUp;
284 }
285 /* depth buffering w/ stencil */
286 gl_depth_stencil_pixels( ctx, PB->count, PB->x, PB->y, PB->z, mask );
287 }
288 else if (ctx->Depth.Test) {
289 /* regular depth testing */
290 (*ctx->Driver.DepthTestPixels)( ctx, PB->count, PB->x, PB->y, PB->z, mask );
291 }
292
293 if (ctx->RasterMask & NO_DRAW_BIT) {
294 goto CleanUp;
295 }
296
297 /* write pixels */
298 {
300 red = PB->color[0];
301 green = PB->color[1];
302 blue = PB->color[2];
303 alpha = PB->color[3];
304 (*ctx->Driver.Color)( ctx, red, green, blue, alpha );
305 }
306 (*ctx->Driver.WriteMonocolorPixels)( ctx, PB->count, PB->x, PB->y, mask );
307 if (ctx->RasterMask & ALPHABUF_BIT) {
308 gl_write_mono_alpha_pixels( ctx, PB->count, PB->x, PB->y,
309 PB->color[3], mask );
310 }
311
312 if (ctx->RasterMask & FRONT_AND_BACK_BIT) {
313 /*** Also render to back buffer ***/
314 (*ctx->Driver.SetBuffer)( ctx, GL_BACK );
315 (*ctx->Driver.WriteMonocolorPixels)( ctx, PB->count, PB->x, PB->y, mask );
316 if (ctx->RasterMask & ALPHABUF_BIT) {
317 ctx->Buffer->Alpha = ctx->Buffer->BackAlpha;
318 gl_write_mono_alpha_pixels( ctx, PB->count, PB->x, PB->y,
319 PB->color[3], mask );
320 ctx->Buffer->Alpha = ctx->Buffer->FrontAlpha;
321 }
322 (*ctx->Driver.SetBuffer)( ctx, GL_FRONT );
323 }
324 /*** ALL DONE ***/
325 }
326 }
327 else {
328 /* COLOR INDEX PIXELS */
329
330 /* If we may be writting pixels with different indexes... */
331 if (PB->mono && ctx->MutablePixels) {
332 /* copy index to all pixels */
333 GLuint n = PB->count, indx = PB->index;
334 GLuint *pbindex = PB->i;
335 do {
336 *pbindex++ = indx;
337 n--;
338 } while (n);
339 }
340
341 if (ctx->MutablePixels || !PB->mono) {
342 /* Pixel color index may be modified */
343 GLuint isave[PB_SIZE];
344
345 if (ctx->Fog.Enabled
346 && (ctx->Hint.Fog==GL_NICEST || PB->primitive==GL_BITMAP)) {
347 gl_fog_index_pixels( ctx, PB->count, PB->z, PB->i );
348 }
349
350 /* Scissoring already done above */
351
352 if (ctx->Stencil.Enabled) {
353 /* first stencil test */
354 if (gl_stencil_pixels( ctx, PB->count, PB->x, PB->y, mask )==0) {
355 goto CleanUp;
356 }
357 /* depth buffering w/ stencil */
358 gl_depth_stencil_pixels( ctx, PB->count, PB->x, PB->y, PB->z, mask );
359 }
360 else if (ctx->Depth.Test) {
361 /* regular depth testing */
362 (*ctx->Driver.DepthTestPixels)( ctx, PB->count, PB->x, PB->y, PB->z, mask );
363 }
364
365 if (ctx->RasterMask & NO_DRAW_BIT) {
366 goto CleanUp;
367 }
368
369 if (ctx->RasterMask & FRONT_AND_BACK_BIT) {
370 /* make a copy of the indexes */
371 MEMCPY( isave, PB->i, PB->count * sizeof(GLuint) );
372 }
373
374 if (ctx->Color.SWLogicOpEnabled) {
375 gl_logicop_ci_pixels( ctx, PB->count, PB->x, PB->y, PB->i, mask );
376 }
377
378 if (ctx->Color.SWmasking) {
379 gl_mask_index_pixels( ctx, PB->count, PB->x, PB->y, PB->i, mask );
380 }
381
382 /* write pixels */
383 (*ctx->Driver.WriteIndexPixels)( ctx, PB->count, PB->x, PB->y,
384 PB->i, mask );
385
386 if (ctx->RasterMask & FRONT_AND_BACK_BIT) {
387 /*** Also write to back buffer ***/
388 (*ctx->Driver.SetBuffer)( ctx, GL_BACK );
389 MEMCPY( PB->i, isave, PB->count * sizeof(GLuint) );
390 if (ctx->Color.SWLogicOpEnabled) {
391 gl_logicop_ci_pixels( ctx, PB->count, PB->x, PB->y, PB->i, mask );
392 }
393 if (ctx->Color.SWmasking) {
394 gl_mask_index_pixels( ctx, PB->count, PB->x, PB->y,
395 PB->i, mask );
396 }
397 (*ctx->Driver.WriteIndexPixels)( ctx, PB->count, PB->x, PB->y,
398 PB->i, mask );
399 (*ctx->Driver.SetBuffer)( ctx, GL_FRONT );
400 }
401
402 /*** ALL DONE ***/
403 }
404 else {
405 /* Same color index for all pixels */
406
407 /* Scissoring already done above */
408
409 if (ctx->Stencil.Enabled) {
410 /* first stencil test */
411 if (gl_stencil_pixels( ctx, PB->count, PB->x, PB->y, mask )==0) {
412 goto CleanUp;
413 }
414 /* depth buffering w/ stencil */
415 gl_depth_stencil_pixels( ctx, PB->count, PB->x, PB->y, PB->z, mask );
416 }
417 else if (ctx->Depth.Test) {
418 /* regular depth testing */
419 (*ctx->Driver.DepthTestPixels)( ctx, PB->count, PB->x, PB->y, PB->z, mask );
420 }
421
422 if (ctx->RasterMask & NO_DRAW_BIT) {
423 goto CleanUp;
424 }
425
426 /* write pixels */
427 (*ctx->Driver.Index)( ctx, PB->index );
428 (*ctx->Driver.WriteMonoindexPixels)( ctx, PB->count, PB->x, PB->y, mask );
429
430 if (ctx->RasterMask & FRONT_AND_BACK_BIT) {
431 /*** Also write to back buffer ***/
432 (*ctx->Driver.SetBuffer)( ctx, GL_BACK );
433 (*ctx->Driver.WriteMonoindexPixels)( ctx, PB->count, PB->x, PB->y, mask );
434 (*ctx->Driver.SetBuffer)( ctx, GL_FRONT );
435 }
436 /*** ALL DONE ***/
437 }
438 }
439
440CleanUp:
441 PB->count = 0;
443 UNDEFARRAY(rsave);
444 UNDEFARRAY(gsave);
445 UNDEFARRAY(bsave);
446 UNDEFARRAY(asave);
447}
GLint gl_alpha_test(GLcontext *ctx, GLuint n, const GLubyte alpha[], GLubyte mask[])
Definition: alpha.c:92
void gl_write_alpha_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte alpha[], const GLubyte mask[])
Definition: alphabuf.c:199
void gl_write_mono_alpha_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte alpha, const GLubyte mask[])
Definition: alphabuf.c:222
void gl_blend_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[], GLubyte mask[])
Definition: blend.c:532
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[])
Definition: texture.c:1678
#define FRONT_AND_BACK_BIT
Definition: types.h:1225
#define NO_DRAW_BIT
Definition: types.h:1226
#define ALPHABUF_BIT
Definition: types.h:1223
void gl_fog_color_pixels(GLcontext *ctx, GLuint n, const GLdepth z[], GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[])
Definition: fog.c:252
void gl_fog_index_pixels(GLcontext *ctx, GLuint n, const GLdepth z[], GLuint index[])
Definition: fog.c:333
unsigned char GLubyte
Definition: gl.h:157
#define GL_NICEST
Definition: gl.h:585
GLclampf green
Definition: gl.h:1740
GLclampf GLclampf GLclampf alpha
Definition: gl.h:1740
#define GL_BACK
Definition: gl.h:271
unsigned int GLuint
Definition: gl.h:159
GLclampf GLclampf blue
Definition: gl.h:1740
int GLint
Definition: gl.h:156
#define GL_FRONT
Definition: gl.h:270
GLdouble n
Definition: glext.h:7729
GLenum GLint GLuint mask
Definition: glext.h:6028
#define red
Definition: linetest.c:67
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[])
Definition: logic.c:548
void gl_logicop_ci_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLuint index[], GLubyte mask[])
Definition: logic.c:234
#define DEFARRAY(TYPE, NAME, SIZE)
Definition: macros.h:256
#define MEMSET(DST, VAL, N)
Definition: macros.h:241
#define MEMCPY(DST, SRC, BYTES)
Definition: macros.h:231
#define UNDEFARRAY(NAME)
Definition: macros.h:257
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[])
Definition: masking.c:125
void gl_mask_index_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLuint index[], const GLubyte mask[])
Definition: masking.c:183
void gl_depth_stencil_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLdepth z[], GLubyte mask[])
Definition: stencil.c:882
GLint gl_stencil_pixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte mask[])
Definition: stencil.c:702

Referenced by gl_End(), and gl_render_bitmap().