diff options
author | Brian Paul <[email protected]> | 2001-03-03 20:33:27 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-03 20:33:27 +0000 |
commit | 08836341788a9f9d638d9dc8328510ccd18ddeb5 (patch) | |
tree | 6bd480b7f5f595c63914b1d39727d70a0f954723 /src/mesa/swrast | |
parent | 19bbfc62638b60dd1a41e84686f24483adea5b03 (diff) |
lots of gl_*() to _mesa_*() namespace clean-up
Diffstat (limited to 'src/mesa/swrast')
26 files changed, 301 insertions, 306 deletions
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h index c50680c0070..febc46f85d3 100644 --- a/src/mesa/swrast/s_aatritemp.h +++ b/src/mesa/swrast/s_aatritemp.h @@ -1,4 +1,4 @@ -/* $Id: s_aatritemp.h,v 1.5 2001/01/05 02:26:49 keithw Exp $ */ +/* $Id: s_aatritemp.h,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -322,7 +322,7 @@ n = (GLuint) ix - (GLuint) startX; #ifdef DO_MULTITEX # ifdef DO_SPEC - gl_write_multitexture_span(ctx, n, startX, iy, z, fog, + _mesa_write_multitexture_span(ctx, n, startX, iy, z, fog, (const GLfloat (*)[MAX_WIDTH]) s, (const GLfloat (*)[MAX_WIDTH]) t, (const GLfloat (*)[MAX_WIDTH]) u, @@ -330,7 +330,7 @@ rgba, (const GLchan (*)[4]) spec, GL_POLYGON); # else - gl_write_multitexture_span(ctx, n, startX, iy, z, fog, + _mesa_write_multitexture_span(ctx, n, startX, iy, z, fog, (const GLfloat (*)[MAX_WIDTH]) s, (const GLfloat (*)[MAX_WIDTH]) t, (const GLfloat (*)[MAX_WIDTH]) u, @@ -338,18 +338,18 @@ # endif #elif defined(DO_TEX) # ifdef DO_SPEC - gl_write_texture_span(ctx, n, startX, iy, z, fog, + _mesa_write_texture_span(ctx, n, startX, iy, z, fog, s, t, u, lambda, rgba, (const GLchan (*)[4]) spec, GL_POLYGON); # else - gl_write_texture_span(ctx, n, startX, iy, z, fog, + _mesa_write_texture_span(ctx, n, startX, iy, z, fog, s, t, u, lambda, rgba, NULL, GL_POLYGON); # endif #elif defined(DO_RGBA) - gl_write_rgba_span(ctx, n, startX, iy, z, fog, rgba, GL_POLYGON); + _mesa_write_rgba_span(ctx, n, startX, iy, z, fog, rgba, GL_POLYGON); #elif defined(DO_INDEX) - gl_write_index_span(ctx, n, startX, iy, z, fog, index, GL_POLYGON); + _mesa_write_index_span(ctx, n, startX, iy, z, fog, index, GL_POLYGON); #endif } } @@ -447,7 +447,7 @@ } } # ifdef DO_SPEC - gl_write_multitexture_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_multitexture_span(ctx, n, left, iy, z + left, fog + left, (const GLfloat (*)[MAX_WIDTH]) s, (const GLfloat (*)[MAX_WIDTH]) t, (const GLfloat (*)[MAX_WIDTH]) u, @@ -455,7 +455,7 @@ (const GLchan (*)[4]) (spec + left), GL_POLYGON); # else - gl_write_multitexture_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_multitexture_span(ctx, n, left, iy, z + left, fog + left, (const GLfloat (*)[MAX_WIDTH]) s, (const GLfloat (*)[MAX_WIDTH]) t, (const GLfloat (*)[MAX_WIDTH]) u, @@ -464,22 +464,22 @@ # endif #elif defined(DO_TEX) # ifdef DO_SPEC - gl_write_texture_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_texture_span(ctx, n, left, iy, z + left, fog + left, s + left, t + left, u + left, lambda + left, rgba + left, (const GLchan (*)[4]) (spec + left), GL_POLYGON); # else - gl_write_texture_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_texture_span(ctx, n, left, iy, z + left, fog + left, s + left, t + left, u + left, lambda + left, rgba + left, NULL, GL_POLYGON); # endif #elif defined(DO_RGBA) - gl_write_rgba_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_rgba_span(ctx, n, left, iy, z + left, fog + left, rgba + left, GL_POLYGON); #elif defined(DO_INDEX) - gl_write_index_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_index_span(ctx, n, left, iy, z + left, fog + left, index + left, GL_POLYGON); #endif } diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index a70cab0364a..d7f7dd9e0da 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -1,4 +1,4 @@ -/* $Id: s_accum.c,v 1.4 2001/01/23 23:39:37 brianp Exp $ */ +/* $Id: s_accum.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -82,7 +82,7 @@ _mesa_alloc_accum_buffer( GLcontext *ctx ) ctx->DrawBuffer->Accum = (GLaccum *) MALLOC( n ); if (!ctx->DrawBuffer->Accum) { /* unable to setup accumulation buffer */ - gl_error( ctx, GL_OUT_OF_MEMORY, "glAccum" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glAccum" ); } #ifdef USE_OPTIMIZED_ACCUM swrast->_IntegerAccumMode = GL_TRUE; @@ -332,7 +332,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, for (j = 0; j < height; j++) { GLuint i, i4; - gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i = i4 = 0; i < width; i++, i4+=4) { acc[i4+0] += rgba[i][RCOMP]; acc[i4+1] += rgba[i][GCOMP]; @@ -353,7 +353,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, for (j=0;j<height;j++) { GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4; GLuint i; - gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i=0;i<width;i++) { *acc += (GLaccum) ( (GLfloat) rgba[i][RCOMP] * rscale ); acc++; *acc += (GLaccum) ( (GLfloat) rgba[i][GCOMP] * gscale ); acc++; @@ -396,7 +396,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, assert(swrast->_IntegerAccumScaler <= 1.0); for (j = 0; j < height; j++) { GLuint i, i4; - gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i = i4 = 0; i < width; i++, i4 += 4) { acc[i4+0] = rgba[i][RCOMP]; acc[i4+1] = rgba[i][GCOMP]; @@ -417,7 +417,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, GLuint i, j; for (j = 0; j < height; j++) { GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4; - gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i=0;i<width;i++) { *acc++ = (GLaccum) ((GLfloat) rgba[i][RCOMP] * rscale + d); *acc++ = (GLaccum) ((GLfloat) rgba[i][GCOMP] * gscale + d); @@ -517,6 +517,6 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, break; default: - gl_error( ctx, GL_INVALID_ENUM, "glAccum" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glAccum" ); } } diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c index 6440ffb18fa..e6bd0c32489 100644 --- a/src/mesa/swrast/s_alpha.c +++ b/src/mesa/swrast/s_alpha.c @@ -1,4 +1,4 @@ -/* $Id: s_alpha.c,v 1.2 2000/11/13 20:02:57 keithw Exp $ */ +/* $Id: s_alpha.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -90,7 +90,7 @@ _mesa_alpha_test( const GLcontext *ctx, /* caller should check for zero! */ return 0; default: - gl_problem( ctx, "Invalid alpha test in gl_alpha_test" ); + _mesa_problem( ctx, "Invalid alpha test in gl_alpha_test" ); return 0; } /* Never get here */ diff --git a/src/mesa/swrast/s_alphabuf.c b/src/mesa/swrast/s_alphabuf.c index 9002d9099ac..5fbb6a36095 100644 --- a/src/mesa/swrast/s_alphabuf.c +++ b/src/mesa/swrast/s_alphabuf.c @@ -1,4 +1,4 @@ -/* $Id: s_alphabuf.c,v 1.4 2001/01/24 00:04:59 brianp Exp $ */ +/* $Id: s_alphabuf.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -66,7 +66,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf ) buf->FrontLeftAlpha = (GLchan *) MALLOC( bytes ); if (!buf->FrontLeftAlpha) { /* out of memory */ - gl_error( ctx, GL_OUT_OF_MEMORY, + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate front-left alpha buffer" ); } @@ -77,7 +77,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf ) buf->BackLeftAlpha = (GLchan *) MALLOC( bytes ); if (!buf->BackLeftAlpha) { /* out of memory */ - gl_error( ctx, GL_OUT_OF_MEMORY, + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate back-left alpha buffer" ); } } @@ -89,7 +89,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf ) buf->FrontRightAlpha = (GLchan *) MALLOC( bytes ); if (!buf->FrontRightAlpha) { /* out of memory */ - gl_error( ctx, GL_OUT_OF_MEMORY, + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate front-right alpha buffer" ); } @@ -100,7 +100,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf ) buf->BackRightAlpha = (GLchan *) MALLOC( bytes ); if (!buf->BackRightAlpha) { /* out of memory */ - gl_error( ctx, GL_OUT_OF_MEMORY, + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate back-right alpha buffer" ); } } diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index ffeb268e7eb..3a77004520c 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -1,4 +1,4 @@ -/* $Id: s_bitmap.c,v 1.4 2001/01/23 23:39:37 brianp Exp $ */ +/* $Id: s_bitmap.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -123,7 +123,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, } } - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c index 9b13a10903d..2c5d2889313 100644 --- a/src/mesa/swrast/s_blend.c +++ b/src/mesa/swrast/s_blend.c @@ -1,4 +1,4 @@ -/* $Id: s_blend.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */ +/* $Id: s_blend.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -325,7 +325,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], break; default: /* this should never happen */ - gl_problem(ctx, "Bad blend source RGB factor in do_blend"); + _mesa_problem(ctx, "Bad blend source RGB factor in do_blend"); return; } @@ -379,7 +379,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], default: /* this should never happen */ sA = 0.0F; - gl_problem(ctx, "Bad blend source A factor in do_blend"); + _mesa_problem(ctx, "Bad blend source A factor in do_blend"); } /* Dest RGB factor */ @@ -441,7 +441,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], default: /* this should never happen */ dR = dG = dB = 0.0F; - gl_problem(ctx, "Bad blend dest RGB factor in do_blend"); + _mesa_problem(ctx, "Bad blend dest RGB factor in do_blend"); } /* Dest Alpha factor */ @@ -491,7 +491,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], default: /* this should never happen */ dA = 0.0F; - gl_problem(ctx, "Bad blend dest A factor in do_blend"); + _mesa_problem(ctx, "Bad blend dest A factor in do_blend"); return; } @@ -537,7 +537,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], else { /* should never get here */ r = g = b = a = 0.0F; /* silence uninitialized var warning */ - gl_problem(ctx, "unexpected BlendEquation in blend_general()"); + _mesa_problem(ctx, "unexpected BlendEquation in blend_general()"); } /* final clamping */ @@ -622,7 +622,7 @@ _mesa_blend_span( GLcontext *ctx, GLuint n, GLint x, GLint y, } /* Read span of current frame buffer pixels */ - gl_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); SWRAST_CONTEXT(ctx)->BlendFunc( ctx, n, mask, rgba, (const GLchan (*)[4])dest ); diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 6f7ad2a4da4..a681ac6d119 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -1,4 +1,4 @@ -/* $Id: s_context.c,v 1.15 2001/02/24 18:25:52 keithw Exp $ */ +/* $Id: s_context.c,v 1.16 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -422,7 +422,7 @@ _swrast_CreateContext( GLcontext *ctx ) if (!swrast) return GL_FALSE; - swrast->PB = gl_alloc_pb(); + swrast->PB = _mesa_alloc_pb(); if (!swrast->PB) { FREE(swrast); return GL_FALSE; diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index 46971b4654e..22fcd3c2a83 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -1,4 +1,4 @@ -/* $Id: s_copypix.c,v 1.12 2001/02/22 17:59:24 brianp Exp $ */ +/* $Id: s_copypix.c,v 1.13 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -134,13 +134,13 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, /* allocate space for GLfloat image */ tmpImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); return; } convImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!convImage) { FREE(tmpImage); - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); return; } @@ -164,7 +164,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, for (row = 0; row < height; row++) { GLchan rgba[MAX_WIDTH][4]; GLint i; - gl_read_rgba_span(ctx, ctx->ReadBuffer, width, srcx, srcy + row, rgba); + _mesa_read_rgba_span(ctx, ctx->ReadBuffer, width, srcx, srcy + row, rgba); /* convert GLchan to GLfloat */ for (i = 0; i < width; i++) { *dest++ = (GLfloat) rgba[i][RCOMP] * (1.0F / CHAN_MAXF); @@ -281,11 +281,11 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, (const GLchan (*)[4])rgba, NULL ); } else if (zoom) { - gl_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, + _mesa_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, (const GLchan (*)[4])rgba, desty); } else { - gl_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP ); + _mesa_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP ); } } @@ -364,7 +364,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint ssy = sy; tmpImage = (GLchan *) MALLOC(width * height * sizeof(GLchan) * 4); if (!tmpImage) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; } p = tmpImage; @@ -381,7 +381,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, ctx->ReadBuffer->Alpha = ctx->ReadBuffer->BackRightAlpha; } for (j = 0; j < height; j++, ssy += stepy) { - gl_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, ssy, + _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, ssy, (GLchan (*)[4]) p ); p += (width * sizeof(GLchan) * 4); } @@ -417,7 +417,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, ctx->ReadBuffer->Alpha = ctx->ReadBuffer->BackRightAlpha; } } - gl_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, sy, rgba ); + _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, sy, rgba ); } if (changeBuffer) { @@ -525,11 +525,11 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, (const GLchan (*)[4])rgba, NULL ); } else if (zoom) { - gl_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, + _mesa_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, (const GLchan (*)[4])rgba, desty); } else { - gl_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP ); + _mesa_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP ); } } @@ -591,7 +591,7 @@ static void copy_ci_pixels( GLcontext *ctx, GLint ssy = sy; tmpImage = (GLuint *) MALLOC(width * height * sizeof(GLuint)); if (!tmpImage) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; } p = tmpImage; @@ -600,7 +600,7 @@ static void copy_ci_pixels( GLcontext *ctx, ctx->Pixel.DriverReadBuffer ); } for (j = 0; j < height; j++, ssy += stepy) { - gl_read_index_span( ctx, ctx->ReadBuffer, width, srcx, ssy, p ); + _mesa_read_index_span( ctx, ctx->ReadBuffer, width, srcx, ssy, p ); p += width; } p = tmpImage; @@ -621,7 +621,7 @@ static void copy_ci_pixels( GLcontext *ctx, (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer, ctx->Pixel.DriverReadBuffer ); } - gl_read_index_span( ctx, ctx->ReadBuffer, width, srcx, sy, indexes ); + _mesa_read_index_span( ctx, ctx->ReadBuffer, width, srcx, sy, indexes ); } if (changeBuffer) { @@ -638,10 +638,10 @@ static void copy_ci_pixels( GLcontext *ctx, } if (zoom) { - gl_write_zoomed_index_span( ctx, width, destx, dy, zspan, 0, indexes, desty ); + _mesa_write_zoomed_index_span( ctx, width, destx, dy, zspan, 0, indexes, desty ); } else { - gl_write_index_span(ctx, width, destx, dy, zspan, 0, indexes, GL_BITMAP); + _mesa_write_index_span(ctx, width, destx, dy, zspan, 0, indexes, GL_BITMAP); } } @@ -673,7 +673,7 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLint overlapping; if (!ctx->Visual.depthBits) { - gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" ); return; } @@ -712,7 +712,7 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLint ssy = sy; tmpImage = (GLfloat *) MALLOC(width * height * sizeof(GLfloat)); if (!tmpImage) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; } p = tmpImage; @@ -743,21 +743,21 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, if (ctx->Visual.rgbMode) { if (zoom) { - gl_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, + _mesa_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, (const GLchan (*)[4])rgba, desty ); } else { - gl_write_rgba_span( ctx, width, destx, dy, zspan, 0, + _mesa_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP); } } else { if (zoom) { - gl_write_zoomed_index_span( ctx, width, destx, dy, + _mesa_write_zoomed_index_span( ctx, width, destx, dy, zspan, 0, indexes, desty ); } else { - gl_write_index_span( ctx, width, destx, dy, + _mesa_write_index_span( ctx, width, destx, dy, zspan, 0, indexes, GL_BITMAP ); } } @@ -781,7 +781,7 @@ static void copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLint overlapping; if (!ctx->Visual.stencilBits) { - gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" ); return; } @@ -806,7 +806,7 @@ static void copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLint ssy = sy; tmpImage = (GLstencil *) MALLOC(width * height * sizeof(GLstencil)); if (!tmpImage) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; } p = tmpImage; @@ -840,7 +840,7 @@ static void copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, } if (zoom) { - gl_write_zoomed_stencil_span( ctx, width, destx, dy, stencil, desty ); + _mesa_write_zoomed_stencil_span( ctx, width, destx, dy, stencil, desty ); } else { _mesa_write_stencil_span( ctx, width, destx, dy, stencil ); @@ -876,6 +876,6 @@ _swrast_CopyPixels( GLcontext *ctx, copy_stencil_pixels( ctx, srcx, srcy, width, height, destx, desty ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glCopyPixels" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyPixels" ); } } diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index c5e1b45d101..1266d318487 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1,4 +1,4 @@ -/* $Id: s_depth.c,v 1.5 2001/02/08 15:57:01 brianp Exp $ */ +/* $Id: s_depth.c,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -294,7 +294,7 @@ depth_test_span16( GLcontext *ctx, GLuint n, GLint x, GLint y, BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in depth_test_span16"); + _mesa_problem(ctx, "Bad depth func in depth_test_span16"); } return passed; @@ -523,7 +523,7 @@ depth_test_span32( GLcontext *ctx, GLuint n, GLint x, GLint y, BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in depth_test_span32"); + _mesa_problem(ctx, "Bad depth func in depth_test_span32"); } return passed; @@ -806,7 +806,7 @@ software_depth_test_pixels16( GLcontext *ctx, GLuint n, BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in software_depth_test_pixels"); + _mesa_problem(ctx, "Bad depth func in software_depth_test_pixels"); } } @@ -1052,7 +1052,7 @@ software_depth_test_pixels32( GLcontext *ctx, GLuint n, BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in software_depth_test_pixels"); + _mesa_problem(ctx, "Bad depth func in software_depth_test_pixels"); } } @@ -1286,7 +1286,7 @@ hardware_depth_test_pixels( GLcontext *ctx, GLuint n, GLdepth zbuffer[], BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in hardware_depth_test_pixels"); + _mesa_problem(ctx, "Bad depth func in hardware_depth_test_pixels"); } } @@ -1507,7 +1507,7 @@ _mesa_alloc_depth_buffer( GLcontext *ctx ) /* out of memory */ ctx->Depth.Test = GL_FALSE; ctx->NewState |= _NEW_DEPTH; - gl_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate depth buffer" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate depth buffer" ); } } } diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 94d8d873a2a..68caa3a23ce 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -1,4 +1,4 @@ -/* $Id: s_drawpix.c,v 1.10 2001/02/20 16:42:26 brianp Exp $ */ +/* $Id: s_drawpix.c,v 1.11 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -130,7 +130,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, rowLength = width; /* If we're not using pixel zoom then do all clipping calculations - * now. Otherwise, we'll let the gl_write_zoomed_*_span() functions + * now. Otherwise, we'll let the _mesa_write_zoomed_*_span() functions * handle the clipping. */ if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) { @@ -230,7 +230,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, /* with zooming */ GLint row; for (row=0; row<drawHeight; row++) { - gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY, + _mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY, zSpan, 0, (void *) src, zoomY0); src += rowLength * 4; destY++; @@ -267,7 +267,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, /* with zooming */ GLint row; for (row=0; row<drawHeight; row++) { - gl_write_zoomed_rgb_span(ctx, drawWidth, destX, destY, + _mesa_write_zoomed_rgb_span(ctx, drawWidth, destX, destY, zSpan, 0, (void *) src, zoomY0); src += rowLength * 3; destY++; @@ -326,7 +326,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, rgb[i][1] = src[i]; rgb[i][2] = src[i]; } - gl_write_zoomed_rgb_span(ctx, drawWidth, destX, destY, + _mesa_write_zoomed_rgb_span(ctx, drawWidth, destX, destY, zSpan, 0, (void *) rgb, zoomY0); src += rowLength; destY++; @@ -391,7 +391,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, rgba[i][2] = *ptr++; rgba[i][3] = *ptr++; } - gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY, + _mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY, zSpan, 0, (void *) rgba, zoomY0); src += rowLength*2; destY++; @@ -438,7 +438,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, for (row=0; row<drawHeight; row++) { ASSERT(drawWidth < MAX_WIDTH); _mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba); - gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY, + _mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY, zSpan, 0, (void *) rgba, zoomY0); src += rowLength; destY++; @@ -512,10 +512,10 @@ draw_index_pixels( GLcontext *ctx, GLint x, GLint y, type, source, &ctx->Unpack, ctx->_ImageTransferState); if (zoom) { - gl_write_zoomed_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, desty); + _mesa_write_zoomed_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, desty); } else { - gl_write_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, GL_BITMAP); + _mesa_write_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, GL_BITMAP); } } } @@ -543,7 +543,7 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y, type != GL_UNSIGNED_INT && type != GL_FLOAT && type != GL_BITMAP) { - gl_error( ctx, GL_INVALID_ENUM, "glDrawPixels(stencil type)"); + _mesa_error( ctx, GL_INVALID_ENUM, "glDrawPixels(stencil type)"); return; } @@ -566,7 +566,7 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y, } if (zoom) { - gl_write_zoomed_stencil_span( ctx, (GLuint) drawWidth, x, y, + _mesa_write_zoomed_stencil_span( ctx, (GLuint) drawWidth, x, y, values, desty ); } else { @@ -599,7 +599,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, && type != GL_INT && type != GL_UNSIGNED_INT && type != GL_FLOAT) { - gl_error(ctx, GL_INVALID_ENUM, "glDrawPixels(type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawPixels(type)"); return; } @@ -636,7 +636,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, GLint i; for (i = 0; i < width; i++) zspan[i] = zptr[i]; - gl_write_rgba_span( ctx, width, x, y, zspan, 0, rgba, GL_BITMAP ); + _mesa_write_rgba_span( ctx, width, x, y, zspan, 0, rgba, GL_BITMAP ); } } else if (type==GL_UNSIGNED_INT && ctx->Visual.depthBits == 32 @@ -646,7 +646,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, for (row = 0; row < height; row++, y++) { const GLuint *zptr = _mesa_image_address(&ctx->Unpack, pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0); - gl_write_rgba_span( ctx, width, x, y, zptr, 0, rgba, GL_BITMAP ); + _mesa_write_rgba_span( ctx, width, x, y, zptr, 0, rgba, GL_BITMAP ); } } else { @@ -670,20 +670,20 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, if (ctx->Visual.rgbMode) { if (zoom) { - gl_write_zoomed_rgba_span(ctx, width, x, y, zspan, 0, + _mesa_write_zoomed_rgba_span(ctx, width, x, y, zspan, 0, (const GLchan (*)[4]) rgba, desty); } else { - gl_write_rgba_span(ctx, width, x, y, zspan, 0, rgba, GL_BITMAP); + _mesa_write_rgba_span(ctx, width, x, y, zspan, 0, rgba, GL_BITMAP); } } else { if (zoom) { - gl_write_zoomed_index_span(ctx, width, x, y, zspan, 0, + _mesa_write_zoomed_index_span(ctx, width, x, y, zspan, 0, ispan, GL_BITMAP); } else { - gl_write_index_span(ctx, width, x, y, zspan, 0, + _mesa_write_index_span(ctx, width, x, y, zspan, 0, ispan, GL_BITMAP); } } @@ -710,7 +710,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, GLuint transferOps = ctx->_ImageTransferState; if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_ENUM, "glDrawPixels(format or type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawPixels(format or type)"); return; } @@ -750,13 +750,13 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, tmpImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); return; } convImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!convImage) { FREE(tmpImage); - gl_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); return; } @@ -832,11 +832,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, (CONST GLchan (*)[]) rgba, NULL); } else if (zoom) { - gl_write_zoomed_rgba_span( ctx, width, x, y, zspan, 0, + _mesa_write_zoomed_rgba_span( ctx, width, x, y, zspan, 0, (CONST GLchan (*)[]) rgba, desty ); } else { - gl_write_rgba_span( ctx, (GLuint) width, x, y, zspan, 0, + _mesa_write_rgba_span( ctx, (GLuint) width, x, y, zspan, 0, rgba, GL_BITMAP); } } @@ -892,7 +892,7 @@ _swrast_DrawPixels( GLcontext *ctx, draw_rgba_pixels(ctx, x, y, width, height, format, type, pixels); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glDrawPixels(format)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glDrawPixels(format)" ); } } diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c index fa670d16397..2bb9f301e80 100644 --- a/src/mesa/swrast/s_feedback.c +++ b/src/mesa/swrast/s_feedback.c @@ -1,4 +1,4 @@ -/* $Id: s_feedback.c,v 1.5 2001/01/23 23:39:37 brianp Exp $ */ +/* $Id: s_feedback.c,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -79,19 +79,19 @@ static void feedback_vertex( GLcontext *ctx, index = v->index; - gl_feedback_vertex( ctx, win, color, index, tc ); + _mesa_feedback_vertex( ctx, win, color, index, tc ); } /* * Put triangle in feedback buffer. */ -void gl_feedback_triangle( GLcontext *ctx, +void _mesa_feedback_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2) { - if (gl_cull_triangle( ctx, v0, v1, v2 )) { + if (_mesa_cull_triangle( ctx, v0, v1, v2 )) { FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN ); FEEDBACK_TOKEN( ctx, (GLfloat) 3 ); /* three vertices */ @@ -108,7 +108,7 @@ void gl_feedback_triangle( GLcontext *ctx, } -void gl_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) +void _mesa_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) { GLenum token = GL_LINE_TOKEN; SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -130,40 +130,40 @@ void gl_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) } -void gl_feedback_point( GLcontext *ctx, const SWvertex *v ) +void _mesa_feedback_point( GLcontext *ctx, const SWvertex *v ) { FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POINT_TOKEN ); feedback_vertex( ctx, v, v ); } -void gl_select_triangle( GLcontext *ctx, +void _mesa_select_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2) { - if (gl_cull_triangle( ctx, v0, v1, v2 )) { + if (_mesa_cull_triangle( ctx, v0, v1, v2 )) { const GLfloat zs = 1.0F / ctx->DepthMaxF; - gl_update_hitflag( ctx, v0->win[2] * zs ); - gl_update_hitflag( ctx, v1->win[2] * zs ); - gl_update_hitflag( ctx, v2->win[2] * zs ); + _mesa_update_hitflag( ctx, v0->win[2] * zs ); + _mesa_update_hitflag( ctx, v1->win[2] * zs ); + _mesa_update_hitflag( ctx, v2->win[2] * zs ); } } -void gl_select_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) +void _mesa_select_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) { const GLfloat zs = 1.0F / ctx->DepthMaxF; - gl_update_hitflag( ctx, v0->win[2] * zs ); - gl_update_hitflag( ctx, v1->win[2] * zs ); + _mesa_update_hitflag( ctx, v0->win[2] * zs ); + _mesa_update_hitflag( ctx, v1->win[2] * zs ); } -void gl_select_point( GLcontext *ctx, const SWvertex *v ) +void _mesa_select_point( GLcontext *ctx, const SWvertex *v ) { const GLfloat zs = 1.0F / ctx->DepthMaxF; - gl_update_hitflag( ctx, v->win[2] * zs ); + _mesa_update_hitflag( ctx, v->win[2] * zs ); } diff --git a/src/mesa/swrast/s_feedback.h b/src/mesa/swrast/s_feedback.h index b0a1d04ee63..bd84f0dc8ab 100644 --- a/src/mesa/swrast/s_feedback.h +++ b/src/mesa/swrast/s_feedback.h @@ -1,4 +1,4 @@ -/* $Id: s_feedback.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */ +/* $Id: s_feedback.h,v 1.4 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -33,20 +33,20 @@ #include "swrast.h" -extern void gl_feedback_point( GLcontext *ctx, const SWvertex *v ); +extern void _mesa_feedback_point( GLcontext *ctx, const SWvertex *v ); -extern void gl_feedback_line( GLcontext *ctx, +extern void _mesa_feedback_line( GLcontext *ctx, const SWvertex *v1, const SWvertex *v2 ); -extern void gl_feedback_triangle( GLcontext *ctx, const SWvertex *v0, +extern void _mesa_feedback_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ); -extern void gl_select_point( GLcontext *ctx, const SWvertex *v ); +extern void _mesa_select_point( GLcontext *ctx, const SWvertex *v ); -extern void gl_select_line( GLcontext *ctx, +extern void _mesa_select_line( GLcontext *ctx, const SWvertex *v1, const SWvertex *v2 ); -extern void gl_select_triangle( GLcontext *ctx, const SWvertex *v0, +extern void _mesa_select_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ); #endif diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index f103bdb02d4..7c2d519173b 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -1,4 +1,4 @@ -/* $Id: s_fog.c,v 1.8 2001/01/03 22:55:26 brianp Exp $ */ +/* $Id: s_fog.c,v 1.9 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -234,7 +234,7 @@ _mesa_win_fog_coords_from_z( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad fog mode in _mesa_win_fog_coords_from_z"); + _mesa_problem(ctx, "Bad fog mode in _mesa_win_fog_coords_from_z"); return; } } diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c index af62dba3d99..114ddeb320b 100644 --- a/src/mesa/swrast/s_lines.c +++ b/src/mesa/swrast/s_lines.c @@ -1,4 +1,4 @@ -/* $Id: s_lines.c,v 1.11 2001/02/16 18:14:41 keithw Exp $ */ +/* $Id: s_lines.c,v 1.12 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -67,7 +67,7 @@ static void flat_ci_line( GLcontext *ctx, #include "s_linetemp.h" - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -86,7 +86,7 @@ static void flat_ci_z_line( GLcontext *ctx, #include "s_linetemp.h" - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -105,7 +105,7 @@ static void flat_rgba_line( GLcontext *ctx, #include "s_linetemp.h" - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -125,7 +125,7 @@ static void flat_rgba_z_line( GLcontext *ctx, #include "s_linetemp.h" - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -155,7 +155,7 @@ static void smooth_ci_line( GLcontext *ctx, #include "s_linetemp.h" PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -188,7 +188,7 @@ static void smooth_ci_z_line( GLcontext *ctx, #include "s_linetemp.h" PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -222,7 +222,7 @@ static void smooth_rgba_line( GLcontext *ctx, #include "s_linetemp.h" PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -262,14 +262,14 @@ static void smooth_rgba_z_line( GLcontext *ctx, #include "s_linetemp.h" PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } #define CHECK_FULL(count) \ if (count >= PB_SIZE-MAX_WIDTH) { \ PB->count = count; \ - gl_flush_pb(ctx); \ + _mesa_flush_pb(ctx); \ count = PB->count; \ } @@ -351,7 +351,7 @@ static void general_smooth_ci_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -423,7 +423,7 @@ static void general_flat_ci_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -526,7 +526,7 @@ static void general_smooth_rgba_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -569,7 +569,7 @@ static void general_flat_rgba_line( GLcontext *ctx, } } - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -634,7 +634,7 @@ static void flat_textured_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -712,7 +712,7 @@ static void smooth_textured_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -809,7 +809,7 @@ static void smooth_multitextured_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -906,7 +906,7 @@ static void flat_multitextured_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -1060,11 +1060,11 @@ _swrast_choose_line( GLcontext *ctx ) } } else if (ctx->RenderMode==GL_FEEDBACK) { - swrast->Line = gl_feedback_line; + swrast->Line = _mesa_feedback_line; } else { /* GL_SELECT mode */ - swrast->Line = gl_select_line; + swrast->Line = _mesa_select_line; } /*_mesa_print_line_function(ctx);*/ diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c index 10a4654b8ac..c16a4b63a9f 100644 --- a/src/mesa/swrast/s_logic.c +++ b/src/mesa/swrast/s_logic.c @@ -1,4 +1,4 @@ -/* $Id: s_logic.c,v 1.3 2001/02/13 23:50:25 brianp Exp $ */ +/* $Id: s_logic.c,v 1.4 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -155,7 +155,7 @@ static void index_logicop( GLcontext *ctx, GLuint n, } break; default: - gl_problem(ctx, "bad mode in index_logic()"); + _mesa_problem(ctx, "bad mode in index_logic()"); } } @@ -321,7 +321,7 @@ static void rgba_logicop( const GLcontext *ctx, GLuint n, break; default: /* should never happen */ - gl_problem(ctx, "Bad function in rgba_logicop"); + _mesa_problem(ctx, "Bad function in rgba_logicop"); } } @@ -337,7 +337,7 @@ _mesa_logicop_rgba_span( GLcontext *ctx, GLchan rgba[][4], const GLubyte mask[] ) { GLchan dest[MAX_WIDTH][4]; - gl_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); rgba_logicop( ctx, n, mask, (GLuint *) rgba, (const GLuint *) dest ); } diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c index b246da2053c..a2d763067d6 100644 --- a/src/mesa/swrast/s_masking.c +++ b/src/mesa/swrast/s_masking.c @@ -1,4 +1,4 @@ -/* $Id: s_masking.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */ +/* $Id: s_masking.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -58,7 +58,7 @@ _mesa_mask_rgba_span( GLcontext *ctx, GLuint *rgba32 = (GLuint *) rgba; GLuint *dest32 = (GLuint *) dest; - gl_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); for (i = 0; i < n; i++) { rgba32[i] = (rgba32[i] & srcMask) | (dest32[i] & dstMask); } @@ -70,7 +70,7 @@ _mesa_mask_rgba_span( GLcontext *ctx, const GLint bMask = ctx->Color.ColorMask[BCOMP]; const GLint aMask = ctx->Color.ColorMask[ACOMP]; - gl_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); for (i = 0; i < n; i++) { if (!rMask) rgba[i][RCOMP] = dest[i][RCOMP]; if (!gMask) rgba[i][GCOMP] = dest[i][GCOMP]; @@ -145,7 +145,7 @@ _mesa_mask_index_span( GLcontext *ctx, GLuint fbindexes[MAX_WIDTH]; GLuint msrc, mdest; - gl_read_index_span( ctx, ctx->DrawBuffer, n, x, y, fbindexes ); + _mesa_read_index_span( ctx, ctx->DrawBuffer, n, x, y, fbindexes ); msrc = ctx->Color.IndexMask; mdest = ~msrc; diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 85001291e4d..70ff376df88 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -1,4 +1,4 @@ -/* $Id: s_points.c,v 1.13 2001/02/16 18:14:41 keithw Exp $ */ +/* $Id: s_points.c,v 1.14 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -269,11 +269,11 @@ _swrast_choose_point( GLcontext *ctx ) } } else if (ctx->RenderMode==GL_FEEDBACK) { - USE(gl_feedback_point); + USE(_mesa_feedback_point); } else { /* GL_SELECT mode */ - USE(gl_select_point); + USE(_mesa_select_point); } } diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 8514b5a1f93..4ca5af4c8f2 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -1,4 +1,4 @@ -/* $Id: s_readpix.c,v 1.7 2001/02/16 23:29:14 brianp Exp $ */ +/* $Id: s_readpix.c,v 1.8 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -57,7 +57,7 @@ read_index_pixels( GLcontext *ctx, /* error checking */ if (ctx->Visual.rgbMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); return; } @@ -100,7 +100,7 @@ read_depth_pixels( GLcontext *ctx, /* Error checking */ if (ctx->Visual.depthBits <= 0) { /* No depth buffer */ - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); return; } @@ -113,7 +113,7 @@ read_depth_pixels( GLcontext *ctx, type != GL_INT && type != GL_UNSIGNED_INT && type != GL_FLOAT) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels(depth type)"); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels(depth type)"); return; } @@ -179,7 +179,7 @@ read_stencil_pixels( GLcontext *ctx, type != GL_UNSIGNED_INT && type != GL_FLOAT && type != GL_BITMAP) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels(stencil type)"); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels(stencil type)"); return; } @@ -187,7 +187,7 @@ read_stencil_pixels( GLcontext *ctx, if (ctx->Visual.stencilBits <= 0) { /* No stencil buffer */ - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); return; } @@ -350,13 +350,13 @@ read_rgba_pixels( GLcontext *ctx, /* valid pixel type */ break; default: - gl_error( ctx, GL_INVALID_ENUM, "glReadPixels(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(type)" ); return; } if (!_mesa_is_legal_format_and_type(format, type) || format == GL_INTENSITY) { - gl_error(ctx, GL_INVALID_OPERATION, "glReadPixels(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(format or type)"); return; } @@ -367,13 +367,13 @@ read_rgba_pixels( GLcontext *ctx, tmpImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); return; } convImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!convImage) { FREE(tmpImage); - gl_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); return; } @@ -382,7 +382,7 @@ read_rgba_pixels( GLcontext *ctx, for (row = 0; row < height; row++, y++) { GLchan rgba[MAX_WIDTH][4]; if (ctx->Visual.rgbMode) { - gl_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); + _mesa_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); } else { GLuint index[MAX_WIDTH]; @@ -428,7 +428,7 @@ read_rgba_pixels( GLcontext *ctx, GLchan rgba[MAX_WIDTH][4]; GLvoid *dst; if (ctx->Visual.rgbMode) { - gl_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); + _mesa_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); } else { GLuint index[MAX_WIDTH]; @@ -506,6 +506,6 @@ _swrast_ReadPixels( GLcontext *ctx, format, type, pixels, &ctx->Pack); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glReadPixels(format)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(format)" ); } } diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index cb62a8a10bf..4197167e2d0 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1,4 +1,4 @@ -/* $Id: s_span.c,v 1.9 2001/02/20 16:42:26 brianp Exp $ */ +/* $Id: s_span.c,v 1.10 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -177,7 +177,7 @@ static void multi_write_index_span( GLcontext *ctx, GLuint n, * index - array of [n] color indexes * primitive - either GL_POINT, GL_LINE, GL_POLYGON, or GL_BITMAP */ -void gl_write_index_span( GLcontext *ctx, +void _mesa_write_index_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], GLuint indexIn[], GLenum primitive ) @@ -268,7 +268,7 @@ void gl_write_index_span( GLcontext *ctx, -void gl_write_monoindex_span( GLcontext *ctx, +void _mesa_write_monoindex_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -441,7 +441,7 @@ static void multi_write_rgba_span( GLcontext *ctx, GLuint n, -void gl_write_rgba_span( GLcontext *ctx, +void _mesa_write_rgba_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed *fog, GLchan rgbaIn[][4], @@ -577,7 +577,7 @@ void gl_write_rgba_span( GLcontext *ctx, * r, g, b, a - the color of the pixels * primitive - either GL_POINT, GL_LINE, GL_POLYGON or GL_BITMAP. */ -void gl_write_monocolor_span( GLcontext *ctx, +void _mesa_write_monocolor_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], const GLchan color[4], @@ -760,7 +760,7 @@ static void add_colors(GLuint n, GLchan rgba[][4], CONST GLchan specular[][4] ) * rgba - array of [n] color components * primitive - either GL_POINT, GL_LINE, GL_POLYGON or GL_BITMAP. */ -void gl_write_texture_span( GLcontext *ctx, +void _mesa_write_texture_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], const GLfloat s[], const GLfloat t[], @@ -902,7 +902,7 @@ void gl_write_texture_span( GLcontext *ctx, * As above but perform multiple stages of texture application. */ void -gl_write_multitexture_span( GLcontext *ctx, +_mesa_write_multitexture_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -1057,7 +1057,7 @@ gl_write_multitexture_span( GLcontext *ctx, * Read RGBA pixels from frame buffer. Clipping will be done to prevent * reading ouside the buffer's boundaries. */ -void gl_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, +void _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLchan rgba[][4] ) { @@ -1110,7 +1110,7 @@ void gl_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, * Read CI pixels from frame buffer. Clipping will be done to prevent * reading ouside the buffer's boundaries. */ -void gl_read_index_span( GLcontext *ctx, GLframebuffer *buffer, +void _mesa_read_index_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLuint indx[] ) { if (y < 0 || y >= buffer->Height diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index eb866d66ff6..d4c77715c34 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -1,4 +1,4 @@ -/* $Id: s_span.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */ +/* $Id: s_span.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -36,26 +36,26 @@ #include "swrast.h" -extern void gl_write_index_span( GLcontext *ctx, +extern void _mesa_write_index_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], GLuint index[], GLenum primitive ); -extern void gl_write_monoindex_span( GLcontext *ctx, +extern void _mesa_write_monoindex_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], GLuint index, GLenum primitive ); -extern void gl_write_rgba_span( GLcontext *ctx, +extern void _mesa_write_rgba_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], GLchan rgba[][4], GLenum primitive ); -extern void gl_write_monocolor_span( GLcontext *ctx, +extern void _mesa_write_monocolor_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -63,7 +63,7 @@ extern void gl_write_monocolor_span( GLcontext *ctx, GLenum primitive ); -extern void gl_write_texture_span( GLcontext *ctx, +extern void _mesa_write_texture_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -74,7 +74,7 @@ extern void gl_write_texture_span( GLcontext *ctx, extern void -gl_write_multitexture_span( GLcontext *ctx, +_mesa_write_multitexture_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -87,12 +87,12 @@ gl_write_multitexture_span( GLcontext *ctx, GLenum primitive ); -extern void gl_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, +extern void _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLchan rgba[][4] ); -extern void gl_read_index_span( GLcontext *ctx, GLframebuffer *buffer, +extern void _mesa_read_index_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLuint indx[] ); diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index dd17acfd2bd..a69bd3c96c4 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -1,4 +1,4 @@ -/* $Id: s_stencil.c,v 1.7 2001/02/23 23:14:11 brianp Exp $ */ +/* $Id: s_stencil.c,v 1.8 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -219,7 +219,7 @@ static void apply_stencil_op( const GLcontext *ctx, GLenum oper, } break; default: - gl_problem(ctx, "Bad stencil op in apply_stencil_op"); + _mesa_problem(ctx, "Bad stencil op in apply_stencil_op"); } } @@ -391,7 +391,7 @@ do_stencil_test( GLcontext *ctx, GLuint n, GLstencil stencil[], } break; default: - gl_problem(ctx, "Bad stencil func in gl_stencil_span"); + _mesa_problem(ctx, "Bad stencil func in gl_stencil_span"); return 0; } @@ -697,7 +697,7 @@ apply_stencil_op_to_pixels( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad stencilop in apply_stencil_op_to_pixels"); + _mesa_problem(ctx, "Bad stencilop in apply_stencil_op_to_pixels"); } } @@ -875,7 +875,7 @@ stencil_test_pixels( GLcontext *ctx, GLuint n, } break; default: - gl_problem(ctx, "Bad stencil func in gl_stencil_pixels"); + _mesa_problem(ctx, "Bad stencil func in gl_stencil_pixels"); return 0; } @@ -1118,7 +1118,7 @@ _mesa_alloc_stencil_buffer( GLcontext *ctx ) if (!ctx->DrawBuffer->Stencil) { /* out of memory */ /* _mesa_set_enable( ctx, GL_STENCIL_TEST, GL_FALSE ); */ - gl_error( ctx, GL_OUT_OF_MEMORY, "_mesa_alloc_stencil_buffer" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "_mesa_alloc_stencil_buffer" ); } } diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 9c60c695c30..7b1b4e94e3f 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -1,4 +1,4 @@ -/* $Id: s_texture.c,v 1.13 2001/02/26 18:24:37 brianp Exp $ */ +/* $Id: s_texture.c,v 1.14 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -208,7 +208,7 @@ palette_sample(const GLcontext *ctx, rgba[ACOMP] = palette[(index << 2) + 3]; return; default: - gl_problem(ctx, "Bad palette format in palette_sample"); + _mesa_problem(ctx, "Bad palette format in palette_sample"); } } @@ -467,7 +467,7 @@ sample_lambda_1d( GLcontext *ctx, GLuint texUnit, rgba[i]); break; default: - gl_problem(NULL, "Bad min filter in sample_1d_texture"); + _mesa_problem(NULL, "Bad min filter in sample_1d_texture"); return; } } @@ -483,7 +483,7 @@ sample_lambda_1d( GLcontext *ctx, GLuint texUnit, s[i], rgba[i]); break; default: - gl_problem(NULL, "Bad mag filter in sample_1d_texture"); + _mesa_problem(NULL, "Bad mag filter in sample_1d_texture"); return; } } @@ -767,7 +767,7 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit, s[i], t[i], rgba[i] ); break; default: - gl_problem(NULL, "Bad mag filter in sample_2d_texture"); + _mesa_problem(NULL, "Bad mag filter in sample_2d_texture"); } } else { @@ -800,7 +800,7 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit, lambda[i], rgba[i] ); break; default: - gl_problem(NULL, "Bad min filter in sample_2d_texture"); + _mesa_problem(NULL, "Bad min filter in sample_2d_texture"); return; } } @@ -816,7 +816,7 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit, s[i], t[i], rgba[i] ); break; default: - gl_problem(NULL, "Bad mag filter in sample_2d_texture"); + _mesa_problem(NULL, "Bad mag filter in sample_2d_texture"); } } } @@ -1249,7 +1249,7 @@ sample_lambda_3d( GLcontext *ctx, GLuint texUnit, lambda[i], rgba[i]); break; default: - gl_problem(NULL, "Bad min filterin sample_3d_texture"); + _mesa_problem(NULL, "Bad min filterin sample_3d_texture"); } } else { @@ -1264,7 +1264,7 @@ sample_lambda_3d( GLcontext *ctx, GLuint texUnit, s[i], t[i], u[i], rgba[i]); break; default: - gl_problem(NULL, "Bad mag filter in sample_3d_texture"); + _mesa_problem(NULL, "Bad mag filter in sample_3d_texture"); } } } @@ -1532,7 +1532,7 @@ sample_lambda_cube( GLcontext *ctx, GLuint texUnit, lambda[i], rgba[i]); break; default: - gl_problem(NULL, "Bad min filter in sample_lambda_cube"); + _mesa_problem(NULL, "Bad min filter in sample_lambda_cube"); } } else { @@ -1551,7 +1551,7 @@ sample_lambda_cube( GLcontext *ctx, GLuint texUnit, newS, newT, rgba[i]); break; default: - gl_problem(NULL, "Bad mag filter in sample_lambda_cube"); + _mesa_problem(NULL, "Bad mag filter in sample_lambda_cube"); } } } @@ -1664,7 +1664,7 @@ _swrast_choose_texture_sample_func( GLcontext *ctx, GLuint texUnit, } break; default: - gl_problem(NULL, "invalid dimensions in _mesa_set_texture_sampler"); + _mesa_problem(NULL, "invalid dimensions in _mesa_set_texture_sampler"); } } } @@ -1711,7 +1711,7 @@ texture_combine(const GLcontext *ctx, } break; default: - gl_problem(NULL, "invalid combine source"); + _mesa_problem(NULL, "invalid combine source"); } switch (textureUnit->CombineSourceRGB[j]) { @@ -1740,7 +1740,7 @@ texture_combine(const GLcontext *ctx, } break; default: - gl_problem(NULL, "invalid combine source"); + _mesa_problem(NULL, "invalid combine source"); } if (textureUnit->CombineOperandRGB[j] != GL_SRC_COLOR) { @@ -1909,7 +1909,7 @@ texture_combine(const GLcontext *ctx, } break; default: - gl_problem(NULL, "invalid combine mode"); + _mesa_problem(NULL, "invalid combine mode"); } switch (textureUnit->CombineModeA) { @@ -1976,7 +1976,7 @@ texture_combine(const GLcontext *ctx, } break; default: - gl_problem(NULL, "invalid combine mode"); + _mesa_problem(NULL, "invalid combine mode"); } /* Fix the alpha component for GL_DOT3_RGBA_EXT combining. @@ -2086,7 +2086,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_REPLACE) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_REPLACE) in apply_texture"); return; } break; @@ -2152,7 +2152,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_MODULATE) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_MODULATE) in apply_texture"); return; } break; @@ -2185,7 +2185,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_DECAL) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_DECAL) in apply_texture"); return; } break; @@ -2255,7 +2255,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_BLEND) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_BLEND) in apply_texture"); return; } break; @@ -2330,7 +2330,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_ADD) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_ADD) in apply_texture"); return; } break; @@ -2340,7 +2340,7 @@ apply_texture( const GLcontext *ctx, break; default: - gl_problem(ctx, "Bad env mode in apply_texture"); + _mesa_problem(ctx, "Bad env mode in apply_texture"); return; } } @@ -2371,12 +2371,12 @@ sample_depth_texture(const GLcontext *ctx, GLboolean lequal, gequal; if (texObj->Dimensions != 2) { - gl_problem(ctx, "only 2-D depth textures supported at this time"); + _mesa_problem(ctx, "only 2-D depth textures supported at this time"); return; } if (texObj->MinFilter != texObj->MagFilter) { - gl_problem(ctx, "mipmapped depth textures not supported at this time"); + _mesa_problem(ctx, "mipmapped depth textures not supported at this time"); return; } @@ -2385,7 +2385,7 @@ sample_depth_texture(const GLcontext *ctx, * isn't a depth texture. */ if (texImage->Format != GL_DEPTH_COMPONENT) { - gl_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture"); + _mesa_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture"); return; } @@ -2548,12 +2548,12 @@ sample_depth_texture2(const GLcontext *ctx, GLboolean lequal, gequal; if (texObj->Dimensions != 2) { - gl_problem(ctx, "only 2-D depth textures supported at this time"); + _mesa_problem(ctx, "only 2-D depth textures supported at this time"); return; } if (texObj->MinFilter != texObj->MagFilter) { - gl_problem(ctx, "mipmapped depth textures not supported at this time"); + _mesa_problem(ctx, "mipmapped depth textures not supported at this time"); return; } @@ -2562,7 +2562,7 @@ sample_depth_texture2(const GLcontext *ctx, * isn't a depth texture. */ if (texImage->Format != GL_DEPTH_COMPONENT) { - gl_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture"); + _mesa_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture"); return; } diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 3b5d57c5d4e..2baa2b5d29a 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -1,4 +1,4 @@ -/* $Id: s_triangle.c,v 1.14 2001/03/03 00:37:27 brianp Exp $ */ +/* $Id: s_triangle.c,v 1.15 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -48,7 +48,7 @@ #include "s_span.h" #include "s_triangle.h" -GLboolean gl_cull_triangle( GLcontext *ctx, +GLboolean _mesa_cull_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ) @@ -89,7 +89,7 @@ static void flat_ci_triangle( GLcontext *ctx, fogspan[i] = fffog / 256; \ fffog += fdfogdx; \ } \ - gl_write_monoindex_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_monoindex_span( ctx, n, LEFT, Y, zspan, \ fogspan, v0->index, GL_POLYGON ); \ } \ } @@ -126,7 +126,7 @@ static void smooth_ci_triangle( GLcontext *ctx, fogspan[i] = fffog / 256; \ fffog += fdfogdx; \ } \ - gl_write_index_span( ctx, n, LEFT, Y, zspan, fogspan, \ + _mesa_write_index_span( ctx, n, LEFT, Y, zspan, fogspan, \ index, GL_POLYGON ); \ } \ } @@ -160,7 +160,7 @@ static void flat_rgba_triangle( GLcontext *ctx, fogspan[i] = fffog / 256; \ fffog += fdfogdx; \ } \ - gl_write_monocolor_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_monocolor_span( ctx, n, LEFT, Y, zspan, \ fogspan, v2->color, \ GL_POLYGON ); \ } \ @@ -210,7 +210,7 @@ static void smooth_rgba_triangle( GLcontext *ctx, ffb += fdbdx; \ ffa += fdadx; \ } \ - gl_write_rgba_span( ctx, n, LEFT, Y, \ + _mesa_write_rgba_span( ctx, n, LEFT, Y, \ (CONST GLdepth *) zspan, \ fogspan, \ rgba, GL_POLYGON ); \ @@ -409,7 +409,7 @@ static void affine_textured_triangle( GLcontext *ctx, comp = 4; \ break; \ default: \ - gl_problem(NULL, "Bad texture format in affine_texture_triangle");\ + _mesa_problem(NULL, "Bad texture format in affine_texture_triangle");\ return; \ } \ tbytesline = obj->Image[b]->Width * comp; \ @@ -648,7 +648,7 @@ static void affine_textured_triangle( GLcontext *ctx, } \ break; \ } \ - gl_write_rgba_span(ctx, n, LEFT, Y, zspan, \ + _mesa_write_rgba_span(ctx, n, LEFT, Y, zspan, \ fogspan, \ rgba, GL_POLYGON); \ /* explicit kill of variables: */ \ @@ -1385,7 +1385,7 @@ static void near_persp_textured_triangle(GLcontext *ctx, break; \ } \ } \ - gl_write_rgba_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_rgba_span( ctx, n, LEFT, Y, zspan, \ fogspan, rgba, GL_POLYGON); \ ffr = ffg = ffb = ffa = 0; \ } \ @@ -1465,7 +1465,7 @@ static void lin_persp_textured_triangle( GLcontext *ctx, comp = 4; \ break; \ default: \ - gl_problem(NULL, "Bad texture format in lin_persp_texture_triangle"); \ + _mesa_problem(NULL, "Bad texture format in lin_persp_texture_triangle"); \ return; \ } \ sscale = FIXED_SCALE * twidth; \ @@ -1570,7 +1570,7 @@ static void lin_persp_textured_triangle( GLcontext *ctx, abort(); \ } \ } \ - gl_write_rgba_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_rgba_span( ctx, n, LEFT, Y, zspan, \ fogspan, \ rgba, GL_POLYGON ); \ ffr = ffg = ffb = ffa = 0; \ @@ -1661,7 +1661,7 @@ static void general_textured_triangle( GLcontext *ctx, vv += dvdx; \ } \ } \ - gl_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ + _mesa_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ s, t, u, NULL, \ rgba, \ NULL, GL_POLYGON ); \ @@ -1765,7 +1765,7 @@ static void general_textured_spec_triangle1( GLcontext *ctx, vv += dvdx; \ } \ } \ - gl_write_texture_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_texture_span( ctx, n, LEFT, Y, zspan, \ fogspan, \ s, t, u, NULL, rgba, \ (CONST GLchan (*)[4]) spec, \ @@ -1869,7 +1869,7 @@ static void lambda_textured_triangle1( GLcontext *ctx, vv += dvdx; \ } \ } \ - gl_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ + _mesa_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ s, t, u, lambda, \ rgba, NULL, GL_POLYGON ); \ } \ @@ -1986,7 +1986,7 @@ static void lambda_textured_spec_triangle1( GLcontext *ctx, vv += dvdx; \ } \ } \ - gl_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ + _mesa_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ s, t, u, lambda, \ rgba, (CONST GLchan (*)[4]) spec, \ GL_POLYGON ); \ @@ -2042,8 +2042,6 @@ lambda_multitextured_triangle1( GLcontext *ctx, } \ } - - #define INNER_LOOP( LEFT, RIGHT, Y ) \ { \ GLint i; \ @@ -2054,6 +2052,7 @@ lambda_multitextured_triangle1( GLcontext *ctx, if (n > 0) { \ if (flat_shade) { \ for (i=0;i<n;i++) { \ + GLuint unit; \ zspan[i] = FixedToDepth(ffz); \ fogspan[i] = fffog / 256; \ fffog += fdfogdx; \ @@ -2062,26 +2061,24 @@ lambda_multitextured_triangle1( GLcontext *ctx, rgba[i][GCOMP] = g; \ rgba[i][BCOMP] = b; \ rgba[i][ACOMP] = a; \ - { \ - GLuint unit; \ - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {\ - if (ctx->Texture.Unit[unit]._ReallyEnabled) { \ - GLdouble invQ = 1.0 / vv[unit]; \ - s[unit][i] = ss[unit] * invQ; \ - t[unit][i] = tt[unit] * invQ; \ - u[unit][i] = uu[unit] * invQ; \ - COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit);\ - ss[unit] += dsdx[unit]; \ - tt[unit] += dtdx[unit]; \ - uu[unit] += dudx[unit]; \ - vv[unit] += dvdx[unit]; \ - } \ + for (unit=0; unit < ctx->Const.MaxTextureUnits; unit++) {\ + if (ctx->Texture.Unit[unit]._ReallyEnabled) { \ + GLdouble invQ = 1.0 / vv[unit]; \ + s[unit][i] = ss[unit] * invQ; \ + t[unit][i] = tt[unit] * invQ; \ + u[unit][i] = uu[unit] * invQ; \ + COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \ + ss[unit] += dsdx[unit]; \ + tt[unit] += dtdx[unit]; \ + uu[unit] += dudx[unit]; \ + vv[unit] += dvdx[unit]; \ } \ } \ } \ } \ else { /* smooth shade */ \ for (i=0;i<n;i++) { \ + GLuint unit; \ zspan[i] = FixedToDepth(ffz); \ fogspan[i] = fffog / 256; \ ffz += fdzdx; \ @@ -2094,32 +2091,30 @@ lambda_multitextured_triangle1( GLcontext *ctx, ffg += fdgdx; \ ffb += fdbdx; \ ffa += fdadx; \ - { \ - GLuint unit; \ - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {\ - if (ctx->Texture.Unit[unit]._ReallyEnabled) { \ - GLdouble invQ = 1.0 / vv[unit]; \ - s[unit][i] = ss[unit] * invQ; \ - t[unit][i] = tt[unit] * invQ; \ - u[unit][i] = uu[unit] * invQ; \ - COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \ - ss[unit] += dsdx[unit]; \ - tt[unit] += dtdx[unit]; \ - uu[unit] += dudx[unit]; \ - vv[unit] += dvdx[unit]; \ - } \ + for (unit=0; unit < ctx->Const.MaxTextureUnits; unit++) {\ + if (ctx->Texture.Unit[unit]._ReallyEnabled) { \ + GLdouble invQ = 1.0 / vv[unit]; \ + s[unit][i] = ss[unit] * invQ; \ + t[unit][i] = tt[unit] * invQ; \ + u[unit][i] = uu[unit] * invQ; \ + COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \ + ss[unit] += dsdx[unit]; \ + tt[unit] += dtdx[unit]; \ + uu[unit] += dudx[unit]; \ + vv[unit] += dvdx[unit]; \ } \ } \ } \ } \ - gl_write_multitexture_span( ctx, n, LEFT, Y, zspan, fogspan, \ - (const GLfloat (*)[MAX_WIDTH]) s, \ - (const GLfloat (*)[MAX_WIDTH]) t, \ - (const GLfloat (*)[MAX_WIDTH]) u, \ - (GLfloat (*)[MAX_WIDTH]) lambda, \ - rgba, NULL, GL_POLYGON ); \ + _mesa_write_multitexture_span(ctx, n, LEFT, Y, zspan, fogspan, \ + (const GLfloat (*)[MAX_WIDTH]) s,\ + (const GLfloat (*)[MAX_WIDTH]) t,\ + (const GLfloat (*)[MAX_WIDTH]) u,\ + (GLfloat (*)[MAX_WIDTH]) lambda, \ + rgba, NULL, GL_POLYGON ); \ } \ } + #include "s_tritemp.h" } @@ -2406,10 +2401,10 @@ _swrast_choose_triangle( GLcontext *ctx ) } } else if (ctx->RenderMode==GL_FEEDBACK) { - swrast->Triangle = gl_feedback_triangle; + swrast->Triangle = _mesa_feedback_triangle; } else { /* GL_SELECT mode */ - swrast->Triangle = gl_select_triangle; + swrast->Triangle = _mesa_select_triangle; } } diff --git a/src/mesa/swrast/s_triangle.h b/src/mesa/swrast/s_triangle.h index 318b6a66716..8689441bea6 100644 --- a/src/mesa/swrast/s_triangle.h +++ b/src/mesa/swrast/s_triangle.h @@ -1,4 +1,4 @@ -/* $Id: s_triangle.h,v 1.5 2001/02/16 18:14:41 keithw Exp $ */ +/* $Id: s_triangle.h,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -36,7 +36,7 @@ #include "swrast.h" -GLboolean gl_cull_triangle( GLcontext *ctx, +GLboolean _mesa_cull_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2); diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c index 890adb1c613..b2ecbf2d902 100644 --- a/src/mesa/swrast/s_zoom.c +++ b/src/mesa/swrast/s_zoom.c @@ -1,4 +1,4 @@ -/* $Id: s_zoom.c,v 1.2 2000/11/05 18:24:41 keithw Exp $ */ +/* $Id: s_zoom.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -44,10 +44,10 @@ * y0 - location of first row in the image we're drawing. */ void -gl_write_zoomed_rgba_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, const GLdepth z[], - const GLfixed *fog, - CONST GLchan rgba[][4], GLint y0 ) +_mesa_write_zoomed_rgba_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, const GLdepth z[], + const GLfixed *fog, + CONST GLchan rgba[][4], GLint y0 ) { GLint m; GLint r0, r1, row, r; @@ -142,7 +142,7 @@ gl_write_zoomed_rgba_span( GLcontext *ctx, /* write the span */ for (r=r0; r<r1; r++) { - gl_write_rgba_span( ctx, m, x+skipcol, r, zdepth, + _mesa_write_rgba_span( ctx, m, x+skipcol, r, zdepth, (fog ? zfog : 0), zrgba, GL_BITMAP ); } @@ -151,10 +151,10 @@ gl_write_zoomed_rgba_span( GLcontext *ctx, void -gl_write_zoomed_rgb_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, const GLdepth z[], - const GLfixed *fog, - CONST GLchan rgb[][3], GLint y0 ) +_mesa_write_zoomed_rgb_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, const GLdepth z[], + const GLfixed *fog, + CONST GLchan rgb[][3], GLint y0 ) { GLint m; GLint r0, r1, row, r; @@ -253,7 +253,7 @@ gl_write_zoomed_rgb_span( GLcontext *ctx, /* write the span */ for (r=r0; r<r1; r++) { - gl_write_rgba_span( ctx, m, x+skipcol, r, zdepth, + _mesa_write_rgba_span( ctx, m, x+skipcol, r, zdepth, (fog ? zfog : 0), zrgba, GL_BITMAP ); } } @@ -264,10 +264,10 @@ gl_write_zoomed_rgb_span( GLcontext *ctx, * As above, but write CI pixels. */ void -gl_write_zoomed_index_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, const GLdepth z[], - const GLfixed *fog, - const GLuint indexes[], GLint y0 ) +_mesa_write_zoomed_index_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, const GLdepth z[], + const GLfixed *fog, + const GLuint indexes[], GLint y0 ) { GLint m; GLint r0, r1, row, r; @@ -360,7 +360,7 @@ gl_write_zoomed_index_span( GLcontext *ctx, /* write the span */ for (r=r0; r<r1; r++) { - gl_write_index_span( ctx, m, x+skipcol, r, zdepth, + _mesa_write_index_span( ctx, m, x+skipcol, r, zdepth, (fog ? zfog : 0), zindexes, GL_BITMAP ); } } @@ -371,9 +371,9 @@ gl_write_zoomed_index_span( GLcontext *ctx, * As above, but write stencil values. */ void -gl_write_zoomed_stencil_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, - const GLstencil stencil[], GLint y0 ) +_mesa_write_zoomed_stencil_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, + const GLstencil stencil[], GLint y0 ) { GLint m; GLint r0, r1, row, r; diff --git a/src/mesa/swrast/s_zoom.h b/src/mesa/swrast/s_zoom.h index 07872c5b61b..4724edeb0ce 100644 --- a/src/mesa/swrast/s_zoom.h +++ b/src/mesa/swrast/s_zoom.h @@ -1,4 +1,4 @@ -/* $Id: s_zoom.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */ +/* $Id: s_zoom.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -33,30 +33,30 @@ extern void -gl_write_zoomed_rgba_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, const GLdepth z[], - const GLfixed *fog, - CONST GLchan rgba[][4], GLint y0 ); +_mesa_write_zoomed_rgba_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, const GLdepth z[], + const GLfixed *fog, + CONST GLchan rgba[][4], GLint y0 ); extern void -gl_write_zoomed_rgb_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, const GLdepth z[], - const GLfixed *fog, - CONST GLchan rgb[][3], GLint y0 ); +_mesa_write_zoomed_rgb_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, const GLdepth z[], + const GLfixed *fog, + CONST GLchan rgb[][3], GLint y0 ); extern void -gl_write_zoomed_index_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, const GLdepth z[], - const GLfixed *fog, - const GLuint indexes[], GLint y0 ); +_mesa_write_zoomed_index_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, const GLdepth z[], + const GLfixed *fog, + const GLuint indexes[], GLint y0 ); extern void -gl_write_zoomed_stencil_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, - const GLstencil stencil[], GLint y0 ); +_mesa_write_zoomed_stencil_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, + const GLstencil stencil[], GLint y0 ); #endif |