From 08836341788a9f9d638d9dc8328510ccd18ddeb5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 3 Mar 2001 20:33:27 +0000 Subject: lots of gl_*() to _mesa_*() namespace clean-up --- src/mesa/main/accum.c | 6 +- src/mesa/main/api_noop.c | 12 +-- src/mesa/main/api_validate.c | 26 ++--- src/mesa/main/attrib.c | 16 +-- src/mesa/main/blend.c | 48 ++++----- src/mesa/main/buffers.c | 36 +++---- src/mesa/main/clip.c | 12 +-- src/mesa/main/colortab.c | 58 +++++------ src/mesa/main/context.c | 27 +++-- src/mesa/main/context.h | 11 +- src/mesa/main/convolve.c | 102 +++++++++---------- src/mesa/main/debug.c | 6 +- src/mesa/main/debug.h | 6 +- src/mesa/main/depth.c | 6 +- src/mesa/main/dlist.c | 106 ++++++++++--------- src/mesa/main/dlist.h | 8 +- src/mesa/main/drawpix.c | 8 +- src/mesa/main/enable.c | 48 ++++----- src/mesa/main/enums.c | 6 +- src/mesa/main/enums.h | 6 +- src/mesa/main/eval.c | 76 +++++++------- src/mesa/main/eval.h | 12 +-- src/mesa/main/feedback.c | 32 +++--- src/mesa/main/feedback.h | 6 +- src/mesa/main/fog.c | 10 +- src/mesa/main/get.c | 138 ++++++++++++------------- src/mesa/main/hint.c | 10 +- src/mesa/main/histogram.c | 72 ++++++------- src/mesa/main/image.c | 40 ++++---- src/mesa/main/light.c | 86 ++++++++-------- src/mesa/main/light.h | 38 ++++--- src/mesa/main/lines.c | 4 +- src/mesa/main/matrix.c | 48 ++++----- src/mesa/main/matrix.h | 13 +-- src/mesa/main/mtypes.h | 4 +- src/mesa/main/pixel.c | 44 ++++---- src/mesa/main/points.c | 12 +-- src/mesa/main/polygon.c | 18 ++-- src/mesa/main/rastpos.c | 6 +- src/mesa/main/state.c | 16 +-- src/mesa/main/state.h | 8 +- src/mesa/main/stencil.c | 10 +- src/mesa/main/teximage.c | 198 ++++++++++++++++++------------------ src/mesa/main/texobj.c | 24 ++--- src/mesa/main/texstate.c | 236 +++++++++++++++++++++---------------------- src/mesa/main/texstore.c | 36 +++---- src/mesa/main/texutil.c | 6 +- src/mesa/main/varray.c | 54 +++++----- 48 files changed, 906 insertions(+), 905 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index 59d3d59..32c2298 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -1,4 +1,4 @@ -/* $Id: accum.c,v 1.35 2001/01/29 20:47:39 keithw Exp $ */ +/* $Id: accum.c,v 1.36 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -69,12 +69,12 @@ _mesa_Accum( GLenum op, GLfloat value ) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->Visual.accumRedBits == 0 || ctx->DrawBuffer != ctx->ReadBuffer) { - gl_error(ctx, GL_INVALID_OPERATION, "glAccum"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glAccum"); return; } if (ctx->NewState) - gl_update_state( ctx ); + _mesa_update_state( ctx ); /* Determine region to operate upon. */ if (ctx->Scissor.Enabled) { diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index 8ee5b9f..38fac3c 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -1,4 +1,4 @@ -/* $Id: api_noop.c,v 1.4 2001/01/24 00:04:58 brianp Exp $ */ +/* $Id: api_noop.c,v 1.5 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -102,12 +102,12 @@ void _mesa_noop_Normal3fv( const GLfloat *v ) COPY_FLOAT(dest[2], v[2]); } -void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) +void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) { GET_CURRENT_CONTEXT(ctx); struct gl_material mat[2]; - GLuint bitmask = gl_material_bitmask( ctx, face, pname, ~0, - "_mesa_noop_Materialfv" ); + GLuint bitmask = _mesa_material_bitmask( ctx, face, pname, ~0, + "_mesa_noop_Materialfv" ); if (bitmask == 0) return; @@ -154,7 +154,7 @@ void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) mat[1].SpecularIndex = params[2]; } - gl_update_material( ctx, mat, bitmask ); + _mesa_update_material( ctx, mat, bitmask ); } void _mesa_noop_Color4ub( GLubyte a, GLubyte b, GLubyte c, GLubyte d ) @@ -565,7 +565,7 @@ void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type, glArrayElement( ((GLuint *)indices)[i] ); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glDrawElements(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glDrawElements(type)" ); break; } diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 9f26538..8d3cbaf 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -1,5 +1,5 @@ -/* $Id: api_validate.c,v 1.3 2001/01/05 02:26:48 keithw Exp $ */ +/* $Id: api_validate.c,v 1.4 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -41,13 +41,13 @@ _mesa_validate_DrawElements(GLcontext *ctx, if (count <= 0) { if (count < 0) - gl_error(ctx, GL_INVALID_VALUE, "glDrawElements(count)" ); + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawElements(count)" ); return GL_FALSE; } if (mode < 0 || mode > GL_POLYGON) { - gl_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); return GL_FALSE; } @@ -55,12 +55,12 @@ _mesa_validate_DrawElements(GLcontext *ctx, type != GL_UNSIGNED_BYTE && type != GL_UNSIGNED_SHORT) { - gl_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" ); + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" ); return GL_FALSE; } if (ctx->NewState) - gl_update_state( ctx ); + _mesa_update_state( ctx ); if (!ctx->Array.Vertex.Enabled) return GL_FALSE; @@ -79,17 +79,17 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, if (count <= 0) { if (count < 0) - gl_error(ctx, GL_INVALID_VALUE, "glDrawElements(count)" ); + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawElements(count)" ); return GL_FALSE; } if (mode < 0 || mode > GL_POLYGON) { - gl_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); return GL_FALSE; } if (end < start) { - gl_error(ctx, GL_INVALID_VALUE, "glDrawRangeElements(endNewState) - gl_update_state( ctx ); + _mesa_update_state( ctx ); if (!ctx->Array.Vertex.Enabled) return GL_FALSE; @@ -119,17 +119,17 @@ _mesa_validate_DrawArrays(GLcontext *ctx, ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); if (count<0) { - gl_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); return GL_FALSE; } if (mode < 0 || mode > GL_POLYGON) { - gl_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); return GL_FALSE; } if (ctx->NewState) - gl_update_state( ctx ); + _mesa_update_state( ctx ); if (!ctx->Array.Vertex.Enabled) return GL_FALSE; diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 746ca73..00394a7 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,4 +1,4 @@ -/* $Id: attrib.c,v 1.44 2001/02/20 16:42:25 brianp Exp $ */ +/* $Id: attrib.c,v 1.45 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -125,7 +125,7 @@ _mesa_PushAttrib(GLbitfield mask) fprintf(stderr, "glPushAttrib %x\n", (int)mask); if (ctx->AttribStackDepth >= MAX_ATTRIB_STACK_DEPTH) { - gl_error( ctx, GL_STACK_OVERFLOW, "glPushAttrib" ); + _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushAttrib" ); return; } @@ -573,7 +573,7 @@ _mesa_PopAttrib(void) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->AttribStackDepth == 0) { - gl_error( ctx, GL_STACK_UNDERFLOW, "glPopAttrib" ); + _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopAttrib" ); return; } @@ -583,7 +583,7 @@ _mesa_PopAttrib(void) while (attr) { if (MESA_VERBOSE&VERBOSE_API) - fprintf(stderr, "glPopAttrib %s\n", gl_lookup_enum_by_nr(attr->kind)); + fprintf(stderr, "glPopAttrib %s\n", _mesa_lookup_enum_by_nr(attr->kind)); switch (attr->kind) { case GL_ACCUM_BUFFER_BIT: @@ -871,7 +871,7 @@ _mesa_PopAttrib(void) } break; default: - gl_problem( ctx, "Bad attrib flag in PopAttrib"); + _mesa_problem( ctx, "Bad attrib flag in PopAttrib"); break; } @@ -897,7 +897,7 @@ _mesa_PushClientAttrib(GLbitfield mask) ASSERT_OUTSIDE_BEGIN_END(ctx); if (ctx->ClientAttribStackDepth >= MAX_CLIENT_ATTRIB_STACK_DEPTH) { - gl_error( ctx, GL_STACK_OVERFLOW, "glPushClientAttrib" ); + _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushClientAttrib" ); return; } @@ -948,7 +948,7 @@ _mesa_PopClientAttrib(void) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->ClientAttribStackDepth == 0) { - gl_error( ctx, GL_STACK_UNDERFLOW, "glPopClientAttrib" ); + _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopClientAttrib" ); return; } @@ -973,7 +973,7 @@ _mesa_PopClientAttrib(void) ctx->NewState = _NEW_ARRAY; break; default: - gl_problem( ctx, "Bad attrib flag in PopClientAttrib"); + _mesa_problem( ctx, "Bad attrib flag in PopClientAttrib"); break; } diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index 7232ae4..7aaf31e 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -1,4 +1,4 @@ -/* $Id: blend.c,v 1.28 2001/02/26 22:07:03 brianp Exp $ */ +/* $Id: blend.c,v 1.29 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -46,14 +46,14 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor ) if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) fprintf(stderr, "glBlendFunc %s %s\n", - gl_lookup_enum_by_nr(sfactor), - gl_lookup_enum_by_nr(dfactor)); + _mesa_lookup_enum_by_nr(sfactor), + _mesa_lookup_enum_by_nr(dfactor)); switch (sfactor) { case GL_SRC_COLOR: case GL_ONE_MINUS_SRC_COLOR: if (!ctx->Extensions.NV_blend_square) { - gl_error( ctx, GL_INVALID_ENUM, "glBlendFunc(sfactor)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc(sfactor)" ); return; } /* fall-through */ @@ -72,7 +72,7 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor ) case GL_ONE_MINUS_CONSTANT_ALPHA: break; default: - gl_error( ctx, GL_INVALID_ENUM, "glBlendFunc(sfactor)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc(sfactor)" ); return; } @@ -80,7 +80,7 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor ) case GL_DST_COLOR: case GL_ONE_MINUS_DST_COLOR: if (!ctx->Extensions.NV_blend_square) { - gl_error( ctx, GL_INVALID_ENUM, "glBlendFunc(dfactor)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc(dfactor)" ); return; } /* fall-through */ @@ -98,7 +98,7 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor ) case GL_ONE_MINUS_CONSTANT_ALPHA: break; default: - gl_error( ctx, GL_INVALID_ENUM, "glBlendFunc(dfactor)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc(dfactor)" ); return; } @@ -127,16 +127,16 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) fprintf(stderr, "glBlendFuncSeperate %s %s %s %s\n", - gl_lookup_enum_by_nr(sfactorRGB), - gl_lookup_enum_by_nr(dfactorRGB), - gl_lookup_enum_by_nr(sfactorA), - gl_lookup_enum_by_nr(dfactorA)); + _mesa_lookup_enum_by_nr(sfactorRGB), + _mesa_lookup_enum_by_nr(dfactorRGB), + _mesa_lookup_enum_by_nr(sfactorA), + _mesa_lookup_enum_by_nr(dfactorA)); switch (sfactorRGB) { case GL_SRC_COLOR: case GL_ONE_MINUS_SRC_COLOR: if (!ctx->Extensions.NV_blend_square) { - gl_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorRGB)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorRGB)"); return; } /* fall-through */ @@ -155,7 +155,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, case GL_ONE_MINUS_CONSTANT_ALPHA: break; default: - gl_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorRGB)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorRGB)"); return; } @@ -163,7 +163,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, case GL_DST_COLOR: case GL_ONE_MINUS_DST_COLOR: if (!ctx->Extensions.NV_blend_square) { - gl_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorRGB)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorRGB)"); return; } /* fall-through */ @@ -181,7 +181,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, case GL_ONE_MINUS_CONSTANT_ALPHA: break; default: - gl_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorRGB)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorRGB)"); return; } @@ -189,7 +189,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, case GL_SRC_COLOR: case GL_ONE_MINUS_SRC_COLOR: if (!ctx->Extensions.NV_blend_square) { - gl_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorA)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorA)"); return; } /* fall-through */ @@ -208,7 +208,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, case GL_ONE_MINUS_CONSTANT_ALPHA: break; default: - gl_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorA)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorA)"); return; } @@ -216,7 +216,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, case GL_DST_COLOR: case GL_ONE_MINUS_DST_COLOR: if (!ctx->Extensions.NV_blend_square) { - gl_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorA)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorA)"); return; } /* fall-through */ @@ -234,7 +234,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, case GL_ONE_MINUS_CONSTANT_ALPHA: break; default: - gl_error( ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorA)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorA)" ); return; } @@ -268,7 +268,7 @@ _mesa_BlendEquation( GLenum mode ) if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) fprintf(stderr, "glBlendEquation %s\n", - gl_lookup_enum_by_nr(mode)); + _mesa_lookup_enum_by_nr(mode)); switch (mode) { case GL_FUNC_ADD_EXT: @@ -277,13 +277,13 @@ _mesa_BlendEquation( GLenum mode ) case GL_MAX_EXT: if (!ctx->Extensions.EXT_blend_minmax && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); return; } break; case GL_LOGIC_OP: if (!ctx->Extensions.EXT_blend_logic_op) { - gl_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); return; } break; @@ -291,12 +291,12 @@ _mesa_BlendEquation( GLenum mode ) case GL_FUNC_REVERSE_SUBTRACT_EXT: if (!ctx->Extensions.EXT_blend_subtract && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glBlendEquation" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glBlendEquation" ); return; } diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index f7280e4..6d7bb9b 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -1,4 +1,4 @@ -/* $Id: buffers.c,v 1.26 2001/01/29 22:10:37 brianp Exp $ */ +/* $Id: buffers.c,v 1.27 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -101,7 +101,7 @@ _mesa_Clear( GLbitfield mask ) fprintf(stderr, "glClear 0x%x\n", mask); if (ctx->NewState) { - gl_update_state( ctx ); /* update _Xmin, etc */ + _mesa_update_state( ctx ); /* update _Xmin, etc */ } if (ctx->RenderMode==GL_RENDER) { @@ -138,7 +138,7 @@ _mesa_DrawBuffer( GLenum mode ) if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glDrawBuffer %s\n", gl_lookup_enum_by_nr(mode)); + fprintf(stderr, "glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(mode)); switch (mode) { case GL_AUX0: @@ -146,11 +146,11 @@ _mesa_DrawBuffer( GLenum mode ) case GL_AUX2: case GL_AUX3: /* AUX buffers not implemented in Mesa at this time */ - gl_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); return; case GL_RIGHT: if (!ctx->Visual.stereoMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); return;} if (ctx->Visual.doubleBufferMode) ctx->Color.DrawDestMask = FRONT_RIGHT_BIT | BACK_RIGHT_BIT; @@ -159,32 +159,32 @@ _mesa_DrawBuffer( GLenum mode ) break; case GL_FRONT_RIGHT: if (!ctx->Visual.stereoMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); return; } ctx->Color.DrawDestMask = FRONT_RIGHT_BIT; break; case GL_BACK_RIGHT: if (!ctx->Visual.stereoMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); return; } if (!ctx->Visual.doubleBufferMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); return; } ctx->Color.DrawDestMask = BACK_RIGHT_BIT; break; case GL_BACK_LEFT: if (!ctx->Visual.doubleBufferMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); return; } ctx->Color.DrawDestMask = BACK_LEFT_BIT; break; case GL_FRONT_AND_BACK: if (!ctx->Visual.doubleBufferMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); return; } if (ctx->Visual.stereoMode) @@ -195,7 +195,7 @@ _mesa_DrawBuffer( GLenum mode ) break; case GL_BACK: if (!ctx->Visual.doubleBufferMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); return; } if (ctx->Visual.stereoMode) @@ -226,7 +226,7 @@ _mesa_DrawBuffer( GLenum mode ) ctx->Color.DrawDestMask = 0; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glDrawBuffer" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glDrawBuffer" ); return; } @@ -290,7 +290,7 @@ _mesa_ReadBuffer( GLenum mode ) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glReadBuffer %s\n", gl_lookup_enum_by_nr(mode)); + fprintf(stderr, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(mode)); switch (mode) { case GL_AUX0: @@ -298,7 +298,7 @@ _mesa_ReadBuffer( GLenum mode ) case GL_AUX2: case GL_AUX3: /* AUX buffers not implemented in Mesa at this time */ - gl_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); return; case GL_LEFT: case GL_FRONT: @@ -310,7 +310,7 @@ _mesa_ReadBuffer( GLenum mode ) case GL_BACK_LEFT: /* Back-Left buffer, requires double buffering */ if (!ctx->Visual.doubleBufferMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); return; } ctx->Pixel.DriverReadBuffer = GL_BACK_LEFT; @@ -318,20 +318,20 @@ _mesa_ReadBuffer( GLenum mode ) case GL_FRONT_RIGHT: case GL_RIGHT: if (!ctx->Visual.stereoMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); return; } ctx->Pixel.DriverReadBuffer = GL_FRONT_RIGHT; break; case GL_BACK_RIGHT: if (!ctx->Visual.stereoMode || !ctx->Visual.doubleBufferMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); return; } ctx->Pixel.DriverReadBuffer = GL_BACK_RIGHT; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glReadBuffer" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glReadBuffer" ); return; } diff --git a/src/mesa/main/clip.c b/src/mesa/main/clip.c index c2c7ec3..d2bbd8b 100644 --- a/src/mesa/main/clip.c +++ b/src/mesa/main/clip.c @@ -1,4 +1,4 @@ -/* $Id: clip.c,v 1.19 2000/12/26 05:09:27 keithw Exp $ */ +/* $Id: clip.c,v 1.20 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -60,7 +60,7 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *eq ) p = (GLint) plane - (GLint) GL_CLIP_PLANE0; if (p < 0 || p >= ctx->Const.MaxClipPlanes) { - gl_error( ctx, GL_INVALID_ENUM, "glClipPlane" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glClipPlane" ); return; } @@ -80,7 +80,7 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *eq ) if (ctx->ModelView.flags & MAT_DIRTY) _math_matrix_analyse( &ctx->ModelView ); - gl_transform_vector( equation, equation, ctx->ModelView.inv ); + _mesa_transform_vector( equation, equation, ctx->ModelView.inv ); if (TEST_EQ_4V(ctx->Transform.EyeUserPlane[p], equation)) return; @@ -90,13 +90,13 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *eq ) /* Update derived state. This state also depends on the projection * matrix, and is recalculated on changes to the projection matrix by - * code in gl_update_state(). + * code in _mesa_update_state(). */ if (ctx->Transform.ClipEnabled[p]) { if (ctx->ProjectionMatrix.flags & MAT_DIRTY) _math_matrix_analyse( &ctx->ProjectionMatrix ); - gl_transform_vector( ctx->Transform._ClipUserPlane[p], + _mesa_transform_vector( ctx->Transform._ClipUserPlane[p], ctx->Transform.EyeUserPlane[p], ctx->ProjectionMatrix.inv ); } @@ -115,7 +115,7 @@ _mesa_GetClipPlane( GLenum plane, GLdouble *equation ) p = (GLint) (plane - GL_CLIP_PLANE0); if (p < 0 || p >= ctx->Const.MaxClipPlanes) { - gl_error( ctx, GL_INVALID_ENUM, "glGetClipPlane" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetClipPlane" ); return; } diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c index 1f6019f..f9693c6 100644 --- a/src/mesa/main/colortab.c +++ b/src/mesa/main/colortab.c @@ -1,4 +1,4 @@ -/* $Id: colortab.c,v 1.34 2001/02/27 16:42:01 brianp Exp $ */ +/* $Id: colortab.c,v 1.35 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -178,7 +178,7 @@ set_component_sizes( struct gl_color_table *table ) table->LuminanceSize = 0; break; default: - gl_problem(NULL, "unexpected format in set_component_sizes"); + _mesa_problem(NULL, "unexpected format in set_component_sizes"); } } @@ -281,7 +281,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, proxy = GL_TRUE; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glColorTable(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)"); return; } @@ -289,13 +289,13 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, if (!_mesa_is_legal_format_and_type(format, type) || format == GL_INTENSITY) { - gl_error(ctx, GL_INVALID_OPERATION, "glColorTable(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glColorTable(format or type)"); return; } baseFormat = base_colortab_format(internalFormat); if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - gl_error(ctx, GL_INVALID_ENUM, "glColorTable(internalFormat)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(internalFormat)"); return; } @@ -309,7 +309,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, else { char msg[100]; sprintf(msg, "glColorTable(width=%d)", width); - gl_error(ctx, GL_INVALID_VALUE, msg); + _mesa_error(ctx, GL_INVALID_VALUE, msg); } return; } @@ -321,7 +321,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, table->Format = (GLenum) 0; } else { - gl_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)"); + _mesa_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)"); } return; } @@ -354,7 +354,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, table->FloatTable = GL_TRUE; table->Table = MALLOC(comps * width * sizeof(GLfloat)); if (!table->Table) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glColorTable"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorTable"); return; } @@ -398,7 +398,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, } break; default: - gl_problem(ctx, "Bad format in _mesa_ColorTable"); + _mesa_problem(ctx, "Bad format in _mesa_ColorTable"); return; } } @@ -407,7 +407,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, table->FloatTable = GL_FALSE; table->Table = MALLOC(comps * width * sizeof(GLchan)); if (!table->Table) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glColorTable"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorTable"); return; } _mesa_unpack_chan_color_span(ctx, width, table->Format, @@ -494,7 +494,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start, aBias = ctx->Pixel.PCMCTbias[3]; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)"); return; } @@ -502,12 +502,12 @@ _mesa_ColorSubTable( GLenum target, GLsizei start, if (!_mesa_is_legal_format_and_type(format, type) || format == GL_INTENSITY) { - gl_error(ctx, GL_INVALID_OPERATION, "glColorSubTable(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glColorSubTable(format or type)"); return; } if (count < 1) { - gl_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)"); return; } @@ -515,12 +515,12 @@ _mesa_ColorSubTable( GLenum target, GLsizei start, assert(comps > 0); /* error should have been caught sooner */ if (start + count > table->Size) { - gl_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)"); return; } if (!table->Table) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glColorSubTable"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorSubTable"); return; } @@ -587,7 +587,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start, } break; default: - gl_problem(ctx, "Bad format in _mesa_ColorSubTable"); + _mesa_problem(ctx, "Bad format in _mesa_ColorSubTable"); return; } } @@ -622,7 +622,7 @@ _mesa_CopyColorTable(GLenum target, GLenum internalformat, /* read the data from framebuffer */ RENDER_START(ctx); - gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data ); + _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data ); RENDER_FINISH(ctx); /* Restore reading from draw buffer (the default) */ @@ -653,7 +653,7 @@ _mesa_CopyColorSubTable(GLenum target, GLsizei start, /* read the data from framebuffer */ RENDER_START(ctx); - gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data ); + _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data ); RENDER_FINISH(ctx); /* Restore reading from draw buffer (the default) */ @@ -677,7 +677,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->NewState) { - gl_update_state(ctx); + _mesa_update_state(ctx); } switch (target) { @@ -703,7 +703,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, table = &ctx->PostColorMatrixColorTable; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)"); return; } @@ -831,7 +831,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, } break; default: - gl_problem(ctx, "bad table format in glGetColorTable"); + _mesa_problem(ctx, "bad table format in glGetColorTable"); return; } @@ -862,7 +862,7 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) ctx->Pixel.ColorTableBias[3] = params[3]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); return; } break; @@ -880,7 +880,7 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) ctx->Pixel.PCCTbias[3] = params[3]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); return; } break; @@ -898,12 +898,12 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) ctx->Pixel.PCMCTbias[3] = params[3]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); return; } break; default: - gl_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)"); return; } @@ -1025,7 +1025,7 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ) table = &ctx->ProxyPostColorMatrixColorTable; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(target)"); return; } @@ -1057,7 +1057,7 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = table->IntensitySize; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(pname)" ); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(pname)" ); return; } } @@ -1155,7 +1155,7 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ) table = &ctx->ProxyPostColorMatrixColorTable; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(target)"); return; } @@ -1187,7 +1187,7 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ) *params = table->IntensitySize; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(pname)" ); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(pname)" ); return; } } diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 3bbcb40..85a4379 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.124 2001/02/28 00:27:48 brianp Exp $ */ +/* $Id: context.c,v 1.125 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -428,7 +428,7 @@ one_time_init( void ) assert( sizeof(GLushort) >= 2 ); assert( sizeof(GLuint) >= 4 ); - gl_init_lists(); + _mesa_init_lists(); _math_init(); _mesa_init_math(); @@ -537,7 +537,7 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) while (1) { GLuint list = _mesa_HashFirstEntry(ss->DisplayList); if (list) { - gl_destroy_list(ctx, list); + _mesa_destroy_list(ctx, list); } else { break; @@ -581,7 +581,7 @@ init_light( struct gl_light *l, GLuint n ) ASSIGN_4V( l->EyePosition, 0.0, 0.0, 1.0, 0.0 ); ASSIGN_3V( l->EyeDirection, 0.0, 0.0, -1.0 ); l->SpotExponent = 0.0; - gl_invalidate_spot_exp_table( l ); + _mesa_invalidate_spot_exp_table( l ); l->SpotCutoff = 180.0; l->_CosCutoff = 0.0; /* KW: -ve values not admitted */ l->ConstantAttenuation = 1.0; @@ -951,10 +951,9 @@ init_attrib_groups( GLcontext *ctx ) ctx->Light.Enabled = GL_FALSE; ctx->Light.ColorMaterialFace = GL_FRONT_AND_BACK; ctx->Light.ColorMaterialMode = GL_AMBIENT_AND_DIFFUSE; - ctx->Light.ColorMaterialBitmask - = gl_material_bitmask( ctx, - GL_FRONT_AND_BACK, - GL_AMBIENT_AND_DIFFUSE, ~0, 0 ); + ctx->Light.ColorMaterialBitmask = _mesa_material_bitmask( ctx, + GL_FRONT_AND_BACK, + GL_AMBIENT_AND_DIFFUSE, ~0, 0 ); ctx->Light.ColorMaterialEnabled = GL_FALSE; @@ -1643,7 +1642,7 @@ _mesa_destroy_context( GLcontext *ctx ) void _mesa_context_initialize( GLcontext *ctx ) { - gl_read_config_file( ctx ); + _mesa_read_config_file( ctx ); } @@ -1808,7 +1807,7 @@ _mesa_make_current2( GLcontext *newCtx, GLframebuffer *drawBuffer, newCtx->DrawBuffer = drawBuffer; newCtx->ReadBuffer = readBuffer; newCtx->NewState |= _NEW_BUFFERS; - /* gl_update_state( newCtx ); */ + /* _mesa_update_state( newCtx ); */ } if (newCtx->Driver.MakeCurrent) @@ -1877,7 +1876,7 @@ _mesa_get_dispatch(GLcontext *ctx) * This function is called when the Mesa user has stumbled into a code * path which may not be implemented fully or correctly. */ -void gl_problem( const GLcontext *ctx, const char *s ) +void _mesa_problem( const GLcontext *ctx, const char *s ) { fprintf( stderr, "Mesa implementation error: %s\n", s ); fprintf( stderr, "Report to Mesa bug database at www.mesa3d.org\n" ); @@ -1906,10 +1905,10 @@ void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s ) { if (ctx->CompileFlag) - gl_save_error( ctx, error, s ); + _mesa_save_error( ctx, error, s ); if (ctx->ExecuteFlag) - gl_error( ctx, error, s ); + _mesa_error( ctx, error, s ); } @@ -1924,7 +1923,7 @@ _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s ) * where - usually the name of function where error was detected */ void -gl_error( GLcontext *ctx, GLenum error, const char *where ) +_mesa_error( GLcontext *ctx, GLenum error, const char *where ) { const char *debugEnv = getenv("MESA_DEBUG"); GLboolean debug; diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index d10953f..792862c 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -1,4 +1,4 @@ -/* $Id: context.h,v 1.23 2001/02/28 00:27:48 brianp Exp $ */ +/* $Id: context.h,v 1.24 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -197,13 +197,13 @@ _mesa_get_dispatch(GLcontext *ctx); */ extern void -gl_problem( const GLcontext *ctx, const char *s ); +_mesa_problem( const GLcontext *ctx, const char *s ); extern void _mesa_warning( const GLcontext *ctx, const char *s ); extern void -gl_error( GLcontext *ctx, GLenum error, const char *s ); +_mesa_error( GLcontext *ctx, GLenum error, const char *s ); extern void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s ); @@ -219,10 +219,11 @@ _mesa_Flush( void ); extern void -gl_read_config_file(GLcontext *ctx); +_mesa_read_config_file(GLcontext *ctx); extern void -gl_register_config_var(const char *name, void (*notify)( const char *, int )); +_mesa_register_config_var(const char *name, + void (*notify)( const char *, int )); #endif diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c index 891e0aa..0b1d411 100644 --- a/src/mesa/main/convolve.c +++ b/src/mesa/main/convolve.c @@ -1,4 +1,4 @@ -/* $Id: convolve.c,v 1.19 2001/02/06 17:22:16 brianp Exp $ */ +/* $Id: convolve.c,v 1.20 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -115,23 +115,23 @@ _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, G ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (target != GL_CONVOLUTION_1D) { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(target)"); return; } baseFormat = base_filter_format(internalFormat); if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(internalFormat)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(internalFormat)"); return; } if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - gl_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter1D(width)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter1D(width)"); return; } if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter1D(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter1D(format or type)"); return; } @@ -140,7 +140,7 @@ _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, G format == GL_DEPTH_COMPONENT || format == GL_INTENSITY || type == GL_BITMAP) { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(format or type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(format or type)"); return; } @@ -189,27 +189,27 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (target != GL_CONVOLUTION_2D) { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(target)"); return; } baseFormat = base_filter_format(internalFormat); if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(internalFormat)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(internalFormat)"); return; } if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - gl_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter2D(width)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter2D(width)"); return; } if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) { - gl_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter2D(height)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter2D(height)"); return; } if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter2D(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter2D(format or type)"); return; } if (format == GL_COLOR_INDEX || @@ -217,7 +217,7 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G format == GL_DEPTH_COMPONENT || format == GL_INTENSITY || type == GL_BITMAP) { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(format or type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(format or type)"); return; } @@ -281,7 +281,7 @@ _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) c = 2; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(target)"); return; } @@ -293,12 +293,12 @@ _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) param; } else { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(params)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(params)"); return; } break; default: - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(pname)"); return; } @@ -328,7 +328,7 @@ _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) conv = &ctx->Separable2D; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)"); return; } @@ -343,7 +343,7 @@ _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) params[0]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(params)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(params)"); return; } break; @@ -354,7 +354,7 @@ _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) COPY_4V(ctx->Pixel.ConvolutionFilterBias[c], params); break; default: - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(pname)"); return; } @@ -380,7 +380,7 @@ _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) c = 2; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(target)"); return; } @@ -392,12 +392,12 @@ _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) param; } else { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(params)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(params)"); return; } break; default: - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(pname)"); return; } @@ -427,7 +427,7 @@ _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) conv = &ctx->Separable2D; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)"); return; } @@ -445,7 +445,7 @@ _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) params[0]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(params)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(params)"); return; } break; @@ -456,7 +456,7 @@ _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) COPY_4V(ctx->Pixel.ConvolutionFilterBias[c], params); break; default: - gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(pname)"); return; } @@ -473,24 +473,24 @@ _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLi ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (target != GL_CONVOLUTION_1D) { - gl_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D(target)"); return; } baseFormat = base_filter_format(internalFormat); if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - gl_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D(internalFormat)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D(internalFormat)"); return; } if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - gl_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter1D(width)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter1D(width)"); return; } /* read pixels from framebuffer */ RENDER_START(ctx); - gl_read_rgba_span(ctx, ctx->ReadBuffer, width, x, y, (GLchan (*)[4]) rgba); + _mesa_read_rgba_span(ctx, ctx->ReadBuffer, width, x, y, (GLchan (*)[4]) rgba); RENDER_FINISH(ctx); /* store as convolution filter */ @@ -510,29 +510,29 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (target != GL_CONVOLUTION_2D) { - gl_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D(target)"); return; } baseFormat = base_filter_format(internalFormat); if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - gl_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D(internalFormat)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D(internalFormat)"); return; } if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - gl_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter2D(width)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter2D(width)"); return; } if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) { - gl_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter2D(height)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter2D(height)"); return; } /* read pixels from framebuffer */ RENDER_START(ctx); for (i = 0; i < height; i++) { - gl_read_rgba_span(ctx, ctx->ReadBuffer, width, x, y + i, + _mesa_read_rgba_span(ctx, ctx->ReadBuffer, width, x, y + i, (GLchan (*)[4]) rgba[i]); } RENDER_FINISH(ctx); @@ -569,11 +569,11 @@ _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *im ASSERT_OUTSIDE_BEGIN_END(ctx); if (ctx->NewState) { - gl_update_state(ctx); + _mesa_update_state(ctx); } if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter(format or type)"); return; } @@ -582,7 +582,7 @@ _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *im format == GL_DEPTH_COMPONENT || format == GL_INTENSITY || type == GL_BITMAP) { - gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(format or type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(format or type)"); return; } @@ -594,7 +594,7 @@ _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *im filter = &(ctx->Convolution2D); break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(target)"); return; } @@ -632,7 +632,7 @@ _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) conv = &ctx->Separable2D; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(target)"); return; } @@ -665,7 +665,7 @@ _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) *params = (GLfloat) ctx->Const.MaxConvolutionHeight; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(pname)"); return; } } @@ -693,7 +693,7 @@ _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) conv = &ctx->Separable2D; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(target)"); return; } @@ -735,7 +735,7 @@ _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) *params = (GLint) ctx->Const.MaxConvolutionHeight; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(pname)"); return; } } @@ -750,16 +750,16 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, ASSERT_OUTSIDE_BEGIN_END(ctx); if (ctx->NewState) { - gl_update_state(ctx); + _mesa_update_state(ctx); } if (target != GL_SEPARABLE_2D) { - gl_error(ctx, GL_INVALID_ENUM, "glGetSeparableFilter(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetSeparableFilter(target)"); return; } if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter(format or type)"); return; } @@ -768,7 +768,7 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, format == GL_DEPTH_COMPONENT || format == GL_INTENSITY || type == GL_BITMAP) { - gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(format or type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(format or type)"); return; } @@ -808,27 +808,27 @@ _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLs ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (target != GL_SEPARABLE_2D) { - gl_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(target)"); return; } baseFormat = base_filter_format(internalFormat); if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - gl_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(internalFormat)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(internalFormat)"); return; } if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - gl_error(ctx, GL_INVALID_VALUE, "glSeparableFilter2D(width)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glSeparableFilter2D(width)"); return; } if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) { - gl_error(ctx, GL_INVALID_VALUE, "glSeparableFilter2D(height)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glSeparableFilter2D(height)"); return; } if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_OPERATION, "glSeparableFilter2D(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glSeparableFilter2D(format or type)"); return; } @@ -837,7 +837,7 @@ _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLs format == GL_DEPTH_COMPONENT || format == GL_INTENSITY || type == GL_BITMAP) { - gl_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(format or type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(format or type)"); return; } diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 83e3a8b..62c3e1f 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -1,7 +1,7 @@ #include "mtypes.h" #include "debug.h" -void gl_print_state( const char *msg, GLuint state ) +void _mesa_print_state( const char *msg, GLuint state ) { fprintf(stderr, "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", @@ -35,7 +35,7 @@ void gl_print_state( const char *msg, GLuint state ) } -void gl_print_enable_flags( const char *msg, GLuint flags ) +void _mesa_print_enable_flags( const char *msg, GLuint flags ) { fprintf(stderr, "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", @@ -64,7 +64,7 @@ void gl_print_enable_flags( const char *msg, GLuint flags ) (flags & ENABLE_RESCALE) ? "rescale, " : ""); } -void gl_print_tri_caps( const char *name, GLuint flags ) +void _mesa_print_tri_caps( const char *name, GLuint flags ) { fprintf(stderr, "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h index 1fff954..929a877 100644 --- a/src/mesa/main/debug.h +++ b/src/mesa/main/debug.h @@ -1,8 +1,8 @@ #ifndef _DEBUG_H #define _DEBUG_H -void gl_print_tri_caps( const char *name, GLuint flags ); -void gl_print_enable_flags( const char *msg, GLuint flags ); -void gl_print_state( const char *msg, GLuint state ); +void _mesa_print_tri_caps( const char *name, GLuint flags ); +void _mesa_print_enable_flags( const char *msg, GLuint flags ); +void _mesa_print_state( const char *msg, GLuint state ); #endif diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c index 789260b..82ca1bd 100644 --- a/src/mesa/main/depth.c +++ b/src/mesa/main/depth.c @@ -1,4 +1,4 @@ -/* $Id: depth.c,v 1.25 2000/12/26 05:09:28 keithw Exp $ */ +/* $Id: depth.c,v 1.26 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -70,7 +70,7 @@ _mesa_DepthFunc( GLenum func ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - fprintf(stderr, "glDepthFunc %s\n", gl_lookup_enum_by_nr(func)); + fprintf(stderr, "glDepthFunc %s\n", _mesa_lookup_enum_by_nr(func)); switch (func) { case GL_LESS: /* (default) pass if incoming z < stored z */ @@ -83,7 +83,7 @@ _mesa_DepthFunc( GLenum func ) case GL_NEVER: break; default: - gl_error( ctx, GL_INVALID_ENUM, "glDepth.Func" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glDepth.Func" ); return; } diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index b979171..988bcd1 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1,4 +1,4 @@ -/* $Id: dlist.c,v 1.64 2001/02/06 21:42:48 brianp Exp $ */ +/* $Id: dlist.c,v 1.65 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -313,7 +313,7 @@ static Node *make_empty_list( void ) * Destroy all nodes in a display list. * Input: list - display list number */ -void gl_destroy_list( GLcontext *ctx, GLuint list ) +void _mesa_destroy_list( GLcontext *ctx, GLuint list ) { Node *n, *block; GLboolean done; @@ -503,7 +503,7 @@ static GLuint translate_id( GLsizei n, GLenum type, const GLvoid *list ) /***** Public *****/ /**********************************************************************/ -void gl_init_lists( void ) +void _mesa_init_lists( void ) { static int init_flag = 0; @@ -668,7 +668,7 @@ _mesa_alloc_instruction( GLcontext *ctx, int opcode, GLint sz ) n[0].opcode = OPCODE_CONTINUE; newblock = (Node *) MALLOC( sizeof(Node) * BLOCK_SIZE ); if (!newblock) { - gl_error( ctx, GL_OUT_OF_MEMORY, "Building display list" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Building display list" ); return NULL; } n[1].next = (Node *) newblock; @@ -2133,7 +2133,7 @@ static void save_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP1, 6 ); if (n) { - GLfloat *pnts = gl_copy_map_points1d( target, stride, order, points ); + GLfloat *pnts = _mesa_copy_map_points1d( target, stride, order, points ); n[1].e = target; n[2].f = u1; n[3].f = u2; @@ -2154,7 +2154,7 @@ static void save_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP1, 6 ); if (n) { - GLfloat *pnts = gl_copy_map_points1f( target, stride, order, points ); + GLfloat *pnts = _mesa_copy_map_points1f( target, stride, order, points ); n[1].e = target; n[2].f = u1; n[3].f = u2; @@ -2178,7 +2178,7 @@ static void save_Map2d( GLenum target, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP2, 10 ); if (n) { - GLfloat *pnts = gl_copy_map_points2d( target, ustride, uorder, + GLfloat *pnts = _mesa_copy_map_points2d( target, ustride, uorder, vstride, vorder, points ); n[1].e = target; n[2].f = u1; @@ -2210,7 +2210,7 @@ static void save_Map2f( GLenum target, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP2, 10 ); if (n) { - GLfloat *pnts = gl_copy_map_points2f( target, ustride, uorder, + GLfloat *pnts = _mesa_copy_map_points2f( target, ustride, uorder, vstride, vorder, points ); n[1].e = target; n[2].f = u1; @@ -2350,7 +2350,7 @@ static void save_NewList( GLuint list, GLenum mode ) { GET_CURRENT_CONTEXT(ctx); /* It's an error to call this function while building a display list */ - gl_error( ctx, GL_INVALID_OPERATION, "glNewList" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" ); (void) list; (void) mode; } @@ -2379,7 +2379,8 @@ static void save_Ortho( GLdouble left, GLdouble right, } -static void save_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) +static void +save_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -2397,7 +2398,8 @@ static void save_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) } -static void save_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values ) +static void +save_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values ) { GLfloat fvalues[MAX_PIXEL_MAP_TABLE]; GLint i; @@ -2415,7 +2417,8 @@ static void save_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values ) } -static void save_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values) +static void +save_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values) { GLfloat fvalues[MAX_PIXEL_MAP_TABLE]; GLint i; @@ -2433,7 +2436,8 @@ static void save_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values) } -static void save_PixelTransferf( GLenum pname, GLfloat param ) +static void +save_PixelTransferf( GLenum pname, GLfloat param ) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -2449,13 +2453,15 @@ static void save_PixelTransferf( GLenum pname, GLfloat param ) } -static void save_PixelTransferi( GLenum pname, GLint param ) +static void +save_PixelTransferi( GLenum pname, GLint param ) { save_PixelTransferf( pname, (GLfloat) param ); } -static void save_PixelZoom( GLfloat xfactor, GLfloat yfactor ) +static void +save_PixelZoom( GLfloat xfactor, GLfloat yfactor ) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -2471,7 +2477,8 @@ static void save_PixelZoom( GLfloat xfactor, GLfloat yfactor ) } -static void save_PointParameterfvEXT( GLenum pname, const GLfloat *params ) +static void +save_PointParameterfvEXT( GLenum pname, const GLfloat *params ) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -3587,7 +3594,8 @@ static void save_LoadTransposeMatrixfARB( const GLfloat m[16] ) } -static void save_MultTransposeMatrixdARB( const GLdouble m[16] ) +static void +save_MultTransposeMatrixdARB( const GLdouble m[16] ) { GLfloat tm[16]; _math_transposefd(tm, m); @@ -3595,7 +3603,8 @@ static void save_MultTransposeMatrixdARB( const GLdouble m[16] ) } -static void save_MultTransposeMatrixfARB( const GLfloat m[16] ) +static void +save_MultTransposeMatrixfARB( const GLfloat m[16] ) { GLfloat tm[16]; _math_transposef(tm, m); @@ -3603,7 +3612,8 @@ static void save_MultTransposeMatrixfARB( const GLfloat m[16] ) } -static void save_PixelTexGenSGIX(GLenum mode) +static void +save_PixelTexGenSGIX(GLenum mode) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -3638,7 +3648,7 @@ save_CompressedTexImage1DARB(GLenum target, GLint level, /* make copy of image */ image = MALLOC(imageSize); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB"); return; } MEMCPY(image, data, imageSize); @@ -3682,7 +3692,7 @@ save_CompressedTexImage2DARB(GLenum target, GLint level, /* make copy of image */ image = MALLOC(imageSize); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB"); return; } MEMCPY(image, data, imageSize); @@ -3727,7 +3737,7 @@ save_CompressedTexImage3DARB(GLenum target, GLint level, /* make copy of image */ image = MALLOC(imageSize); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB"); return; } MEMCPY(image, data, imageSize); @@ -3768,7 +3778,7 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, /* make copy of image */ image = MALLOC(imageSize); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage1DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage1DARB"); return; } MEMCPY(image, data, imageSize); @@ -3807,7 +3817,7 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, /* make copy of image */ image = MALLOC(imageSize); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2DARB"); return; } MEMCPY(image, data, imageSize); @@ -3848,7 +3858,7 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, /* make copy of image */ image = MALLOC(imageSize); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage3DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage3DARB"); return; } MEMCPY(image, data, imageSize); @@ -3878,7 +3888,8 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, /* GL_SGIS_pixel_texture */ -static void save_PixelTexGenParameteriSGIS(GLenum target, GLint value) +static void +save_PixelTexGenParameteriSGIS(GLenum target, GLint value) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -3894,19 +3905,22 @@ static void save_PixelTexGenParameteriSGIS(GLenum target, GLint value) } -static void save_PixelTexGenParameterfSGIS(GLenum target, GLfloat value) +static void +save_PixelTexGenParameterfSGIS(GLenum target, GLfloat value) { save_PixelTexGenParameteriSGIS(target, (GLint) value); } -static void save_PixelTexGenParameterivSGIS(GLenum target, const GLint *value) +static void +save_PixelTexGenParameterivSGIS(GLenum target, const GLint *value) { save_PixelTexGenParameteriSGIS(target, *value); } -static void save_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value) +static void +save_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value) { save_PixelTexGenParameteriSGIS(target, (GLint) *value); } @@ -3917,7 +3931,8 @@ static void save_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value) * Will appear in the list before the vertex buffer containing the * command that provoked the error. I don't see this as a problem. */ -void gl_save_error( GLcontext *ctx, GLenum error, const char *s ) +void +_mesa_save_error( GLcontext *ctx, GLenum error, const char *s ) { Node *n; n = ALLOC_INSTRUCTION( ctx, OPCODE_ERROR, 2 ); @@ -3953,7 +3968,8 @@ islist(GLcontext *ctx, GLuint list) * the absolute list number, not relative to ListBase. * Input: list - display list number */ -static void execute_list( GLcontext *ctx, GLuint list ) +static void +execute_list( GLcontext *ctx, GLuint list ) { Node *n; GLboolean done; @@ -3983,7 +3999,7 @@ static void execute_list( GLcontext *ctx, GLuint list ) else { switch (opcode) { case OPCODE_ERROR: - gl_error( ctx, n[1].e, (const char *) n[2].data ); + _mesa_error( ctx, n[1].e, (const char *) n[2].data ); break; case OPCODE_ACCUM: (*ctx->Exec->Accum)( n[1].e, n[2].f ); @@ -4601,7 +4617,7 @@ static void execute_list( GLcontext *ctx, GLuint list ) { char msg[1000]; sprintf(msg, "Error in execute_list: opcode=%d", (int) opcode); - gl_problem( ctx, msg ); + _mesa_problem( ctx, msg ); } done = GL_TRUE; } @@ -4654,11 +4670,11 @@ _mesa_DeleteLists( GLuint list, GLsizei range ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (range<0) { - gl_error( ctx, GL_INVALID_VALUE, "glDeleteLists" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glDeleteLists" ); return; } for (i=list;iCurrentListPtr) { /* already compiling a display list */ - gl_error( ctx, GL_INVALID_OPERATION, "glNewList" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" ); return; } @@ -4768,14 +4784,14 @@ _mesa_EndList( void ) /* Check that a list is under construction */ if (!ctx->CurrentListPtr) { - gl_error( ctx, GL_INVALID_OPERATION, "glEndList" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glEndList" ); return; } (void) ALLOC_INSTRUCTION( ctx, OPCODE_END_OF_LIST, 0 ); /* Destroy old list, if any */ - gl_destroy_list(ctx, ctx->CurrentListNum); + _mesa_destroy_list(ctx, ctx->CurrentListNum); /* Install the list */ _mesa_HashInsert(ctx->Shared->DisplayList, ctx->CurrentListNum, ctx->CurrentListPtr); @@ -5876,7 +5892,7 @@ _mesa_init_dlist_table( struct _glapi_table *table, GLuint tableSize ) ***/ static const char *enum_string( GLenum k ) { - return gl_lookup_enum_by_nr( k ); + return _mesa_lookup_enum_by_nr( k ); } @@ -5997,11 +6013,11 @@ static void print_list( GLcontext *ctx, FILE *f, GLuint list ) fprintf(f,"Translate %g %g %g\n", n[1].f, n[2].f, n[3].f ); break; case OPCODE_BIND_TEXTURE: - fprintf(f,"BindTexture %s %d\n", gl_lookup_enum_by_nr(n[1].ui), + fprintf(f,"BindTexture %s %d\n", _mesa_lookup_enum_by_nr(n[1].ui), n[2].ui); break; case OPCODE_SHADE_MODEL: - fprintf(f,"ShadeModel %s\n", gl_lookup_enum_by_nr(n[1].ui)); + fprintf(f,"ShadeModel %s\n", _mesa_lookup_enum_by_nr(n[1].ui)); break; /* diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h index d43aed7..ad98244 100644 --- a/src/mesa/main/dlist.h +++ b/src/mesa/main/dlist.h @@ -1,4 +1,4 @@ -/* $Id: dlist.h,v 1.12 2001/01/13 18:28:20 keithw Exp $ */ +/* $Id: dlist.h,v 1.13 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -57,9 +57,9 @@ do { \ } while (0) -extern void gl_init_lists( void ); +extern void _mesa_init_lists( void ); -extern void gl_destroy_list( GLcontext *ctx, GLuint list ); +extern void _mesa_destroy_list( GLcontext *ctx, GLuint list ); extern void _mesa_CallList( GLuint list ); @@ -79,7 +79,7 @@ extern void _mesa_NewList( GLuint list, GLenum mode ); extern void _mesa_init_dlist_table( struct _glapi_table *table, GLuint tableSize ); -extern void gl_save_error( GLcontext *ctx, GLenum error, const char *s ); +extern void _mesa_save_error( GLcontext *ctx, GLenum error, const char *s ); void * diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index 618c41a..77da0f7 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -1,4 +1,4 @@ -/* $Id: drawpix.c,v 1.48 2001/01/29 20:47:39 keithw Exp $ */ +/* $Id: drawpix.c,v 1.49 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -61,7 +61,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, } if (ctx->NewState) { - gl_update_state(ctx); + _mesa_update_state(ctx); } x = (GLint) (ctx->Current.RasterPos[0] + 0.5F); @@ -91,14 +91,14 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, texcoord[2] = ctx->Current.Texcoord[0][2] * invq; texcoord[3] = ctx->Current.Texcoord[0][3]; FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_DRAW_PIXEL_TOKEN ); - gl_feedback_vertex( ctx, + _mesa_feedback_vertex( ctx, ctx->Current.RasterPos, color, ctx->Current.Index, texcoord ); } } else if (ctx->RenderMode==GL_SELECT) { if (ctx->Current.RasterPosValid) { - gl_update_hitflag( ctx, ctx->Current.RasterPos[2] ); + _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); } } } diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 5fcc44e..3e0de24 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1,4 +1,4 @@ -/* $Id: enable.c,v 1.43 2001/02/27 22:33:59 brianp Exp $ */ +/* $Id: enable.c,v 1.44 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -84,7 +84,7 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state ) flag = _NEW_ARRAY_SECONDARYCOLOR; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glEnable/DisableClientState" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glEnable/DisableClientState" ); return; } @@ -134,7 +134,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) if (MESA_VERBOSE & VERBOSE_API) fprintf(stderr, "%s %s (newstate is %x)\n", state ? "glEnable" : "glDisable", - gl_lookup_enum_by_nr(cap), + _mesa_lookup_enum_by_nr(cap), ctx->NewState); switch (cap) { @@ -183,10 +183,10 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) } /* This derived state also calculated in clip.c and - * from gl_update_state() on changes to EyeUserPlane + * from _mesa_update_state() on changes to EyeUserPlane * and ctx->ProjectionMatrix respectively. */ - gl_transform_vector( ctx->Transform._ClipUserPlane[p], + _mesa_transform_vector( ctx->Transform._ClipUserPlane[p], ctx->Transform.EyeUserPlane[p], ctx->ProjectionMatrix.inv ); } else { @@ -202,7 +202,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Light.ColorMaterialEnabled = state; if (state) { FLUSH_CURRENT(ctx, 0); - gl_update_color_material( ctx, ctx->Current.Color ); + _mesa_update_color_material( ctx, ctx->Current.Color ); } break; case GL_CULL_FACE: @@ -239,7 +239,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) break; case GL_HISTOGRAM: if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_ENUM, "glEnable(GL_HISTOGRAM)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glEnable(GL_HISTOGRAM)"); return; } if (ctx->Pixel.HistogramEnabled == state) @@ -604,7 +604,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_HP_occlusion_test */ case GL_OCCLUSION_TEST_HP: if (!ctx->Extensions.HP_occlusion_test) { - gl_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); + _mesa_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); return; } if (ctx->Depth.OcclusionTest == state) @@ -620,7 +620,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_SGIS_pixel_texture */ case GL_PIXEL_TEXTURE_SGIS: if (!ctx->Extensions.SGIS_pixel_texture) { - gl_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); + _mesa_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); return; } if (ctx->Pixel.PixelTextureEnabled == state) @@ -632,7 +632,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_SGIX_pixel_texture */ case GL_PIXEL_TEX_GEN_SGIX: if (!ctx->Extensions.SGIX_pixel_texture) { - gl_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); + _mesa_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); return; } if (ctx->Pixel.PixelTextureEnabled == state) @@ -644,7 +644,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_SGI_color_table */ case GL_COLOR_TABLE_SGI: if (!ctx->Extensions.SGI_color_table && !ctx->Extensions.ARB_imaging) { - gl_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); + _mesa_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); return; } if (ctx->Pixel.ColorTableEnabled == state) @@ -654,7 +654,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) break; case GL_POST_CONVOLUTION_COLOR_TABLE_SGI: if (!ctx->Extensions.SGI_color_table && !ctx->Extensions.ARB_imaging) { - gl_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); + _mesa_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); return; } if (ctx->Pixel.PostConvolutionColorTableEnabled == state) @@ -664,7 +664,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) break; case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI: if (!ctx->Extensions.SGI_color_table && !ctx->Extensions.ARB_imaging) { - gl_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); + _mesa_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" ); return; } if (ctx->Pixel.PostColorMatrixColorTableEnabled == state) @@ -676,7 +676,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_EXT_convolution */ case GL_CONVOLUTION_1D: if (!ctx->Extensions.EXT_convolution && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); return; } if (ctx->Pixel.Convolution1DEnabled == state) @@ -686,7 +686,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) break; case GL_CONVOLUTION_2D: if (!ctx->Extensions.EXT_convolution && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); return; } if (ctx->Pixel.Convolution2DEnabled == state) @@ -696,7 +696,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) break; case GL_SEPARABLE_2D: if (!ctx->Extensions.EXT_convolution && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); return; } if (ctx->Pixel.Separable2DEnabled == state) @@ -713,7 +713,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) if (state) newenabled |= TEXTURE0_CUBE; if (!ctx->Extensions.ARB_texture_cube_map) { - gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); return; } if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) @@ -725,7 +725,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_EXT_secondary_color */ case GL_COLOR_SUM_EXT: if (!ctx->Extensions.EXT_secondary_color) { - gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); return; } if (ctx->Fog.ColorSumEnabled == state) @@ -745,7 +745,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_MESA_sprite_point */ case GL_SPRITE_POINT_MESA: if (!ctx->Extensions.MESA_sprite_point) { - gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); return; } if (ctx->Point.SpriteMode == state) @@ -755,7 +755,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) break; default: - gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); return; } @@ -822,7 +822,7 @@ _mesa_IsEnabled( GLenum cap ) return ctx->Pixel.HistogramEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); + _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); return GL_FALSE; } case GL_LIGHTING: @@ -963,7 +963,7 @@ _mesa_IsEnabled( GLenum cap ) return ctx->Depth.OcclusionTest; } else { - gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glIsEnabled" ); return GL_FALSE; } @@ -998,7 +998,7 @@ _mesa_IsEnabled( GLenum cap ) return (texUnit->Enabled & TEXTURE0_CUBE) ? GL_TRUE : GL_FALSE; } else { - gl_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); + _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); return GL_FALSE; } @@ -1007,7 +1007,7 @@ _mesa_IsEnabled( GLenum cap ) return ctx->Point.SpriteMode; default: - gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glIsEnabled" ); return GL_FALSE; } } diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c index 5a4d871..de18c7c 100644 --- a/src/mesa/main/enums.c +++ b/src/mesa/main/enums.c @@ -1,4 +1,4 @@ -/* $Id: enums.c,v 1.11 2001/01/17 02:49:38 keithw Exp $ */ +/* $Id: enums.c,v 1.12 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -877,7 +877,7 @@ static void sort_enums( void ) -int gl_lookup_enum_by_name( const char *symbol ) +int _mesa_lookup_enum_by_name( const char *symbol ) { enum_elt tmp; enum_elt *e; @@ -896,7 +896,7 @@ int gl_lookup_enum_by_name( const char *symbol ) } -const char *gl_lookup_enum_by_nr( int nr ) +const char *_mesa_lookup_enum_by_nr( int nr ) { enum_elt tmp, *e, **f; diff --git a/src/mesa/main/enums.h b/src/mesa/main/enums.h index 028c9b4..a6b2141 100644 --- a/src/mesa/main/enums.h +++ b/src/mesa/main/enums.h @@ -1,4 +1,4 @@ -/* $Id: enums.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */ +/* $Id: enums.h,v 1.2 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -28,7 +28,7 @@ #ifndef _ENUMS_H_ #define _ENUMS_H_ -extern const char *gl_lookup_enum_by_nr( int nr ); -extern int gl_lookup_enum_by_name( const char *symbol ); +extern const char *_mesa_lookup_enum_by_nr( int nr ); +extern int _mesa_lookup_enum_by_name( const char *symbol ); #endif diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c index 3d5e4c7..d012ace 100644 --- a/src/mesa/main/eval.c +++ b/src/mesa/main/eval.c @@ -1,4 +1,4 @@ -/* $Id: eval.c,v 1.17 2000/12/26 05:09:28 keithw Exp $ */ +/* $Id: eval.c,v 1.18 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -95,7 +95,7 @@ GLuint _mesa_evaluator_components( GLenum target ) * Return: pointer to buffer of contiguous control points or NULL if out * of memory. */ -GLfloat *gl_copy_map_points1f( GLenum target, GLint ustride, GLint uorder, +GLfloat *_mesa_copy_map_points1f( GLenum target, GLint ustride, GLint uorder, const GLfloat *points ) { GLfloat *buffer, *p; @@ -120,7 +120,7 @@ GLfloat *gl_copy_map_points1f( GLenum target, GLint ustride, GLint uorder, /* * Same as above but convert doubles to floats. */ -GLfloat *gl_copy_map_points1d( GLenum target, GLint ustride, GLint uorder, +GLfloat *_mesa_copy_map_points1d( GLenum target, GLint ustride, GLint uorder, const GLdouble *points ) { GLfloat *buffer, *p; @@ -152,7 +152,7 @@ GLfloat *gl_copy_map_points1d( GLenum target, GLint ustride, GLint uorder, * Return: pointer to buffer of contiguous control points or NULL if out * of memory. */ -GLfloat *gl_copy_map_points2f( GLenum target, +GLfloat *_mesa_copy_map_points2f( GLenum target, GLint ustride, GLint uorder, GLint vstride, GLint vorder, const GLfloat *points ) @@ -195,7 +195,7 @@ GLfloat *gl_copy_map_points2f( GLenum target, /* * Same as above but convert doubles to floats. */ -GLfloat *gl_copy_map_points2d(GLenum target, +GLfloat *_mesa_copy_map_points2d(GLenum target, GLint ustride, GLint uorder, GLint vstride, GLint vorder, const GLdouble *points ) @@ -257,25 +257,25 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, assert(type == GL_FLOAT || type == GL_DOUBLE); if (u1 == u2) { - gl_error( ctx, GL_INVALID_VALUE, "glMap1(u1,u2)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap1(u1,u2)" ); return; } if (uorder < 1 || uorder > MAX_EVAL_ORDER) { - gl_error( ctx, GL_INVALID_VALUE, "glMap1(order)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap1(order)" ); return; } if (!points) { - gl_error( ctx, GL_INVALID_VALUE, "glMap1(points)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap1(points)" ); return; } k = _mesa_evaluator_components( target ); if (k == 0) { - gl_error( ctx, GL_INVALID_ENUM, "glMap1(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glMap1(target)" ); } if (ustride < k) { - gl_error( ctx, GL_INVALID_VALUE, "glMap1(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap1(stride)" ); return; } @@ -308,15 +308,15 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, map = &ctx->EvalMap.Map1Texture4; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glMap1(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glMap1(target)" ); return; } /* make copy of the control points */ if (type == GL_FLOAT) - pnts = gl_copy_map_points1f(target, ustride, uorder, (GLfloat*) points); + pnts = _mesa_copy_map_points1f(target, ustride, uorder, (GLfloat*) points); else - pnts = gl_copy_map_points1d(target, ustride, uorder, (GLdouble*) points); + pnts = _mesa_copy_map_points1d(target, ustride, uorder, (GLdouble*) points); FLUSH_VERTICES(ctx, _NEW_EVAL); @@ -359,36 +359,36 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, ASSERT_OUTSIDE_BEGIN_END(ctx); if (u1==u2) { - gl_error( ctx, GL_INVALID_VALUE, "glMap2(u1,u2)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(u1,u2)" ); return; } if (v1==v2) { - gl_error( ctx, GL_INVALID_VALUE, "glMap2(v1,v2)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(v1,v2)" ); return; } if (uorder<1 || uorder>MAX_EVAL_ORDER) { - gl_error( ctx, GL_INVALID_VALUE, "glMap2(uorder)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(uorder)" ); return; } if (vorder<1 || vorder>MAX_EVAL_ORDER) { - gl_error( ctx, GL_INVALID_VALUE, "glMap2(vorder)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(vorder)" ); return; } k = _mesa_evaluator_components( target ); if (k==0) { - gl_error( ctx, GL_INVALID_ENUM, "glMap2(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glMap2(target)" ); } if (ustride < k) { - gl_error( ctx, GL_INVALID_VALUE, "glMap2(ustride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(ustride)" ); return; } if (vstride < k) { - gl_error( ctx, GL_INVALID_VALUE, "glMap2(vstride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(vstride)" ); return; } @@ -421,16 +421,16 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, map = &ctx->EvalMap.Map2Texture4; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glMap2(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glMap2(target)" ); return; } /* make copy of the control points */ if (type == GL_FLOAT) - pnts = gl_copy_map_points2f(target, ustride, uorder, + pnts = _mesa_copy_map_points2f(target, ustride, uorder, vstride, vorder, (GLfloat*) points); else - pnts = gl_copy_map_points2d(target, ustride, uorder, + pnts = _mesa_copy_map_points2d(target, ustride, uorder, vstride, vorder, (GLdouble*) points); @@ -565,7 +565,7 @@ _mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ) * ctx->EvalMap.Map2Vertex4.Vorder * 4; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapdv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapdv(target)" ); return; } if (data) { @@ -640,7 +640,7 @@ _mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ) v[1] = ctx->EvalMap.Map2Vertex4.Vorder; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapdv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapdv(target)" ); return; } break; @@ -737,11 +737,11 @@ _mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ) v[3] = ctx->EvalMap.Map2Vertex4.v2; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapdv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapdv(target)" ); } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapdv(query)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapdv(query)" ); } } @@ -839,7 +839,7 @@ _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ) * ctx->EvalMap.Map2Vertex4.Vorder * 4; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapfv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapfv(target)" ); return; } if (data) { @@ -914,7 +914,7 @@ _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ) v[1] = ctx->EvalMap.Map2Vertex4.Vorder; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapfv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapfv(target)" ); return; } break; @@ -1011,11 +1011,11 @@ _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ) v[3] = ctx->EvalMap.Map2Vertex4.v2; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapfv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapfv(target)" ); } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapfv(query)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapfv(query)" ); } } @@ -1113,7 +1113,7 @@ _mesa_GetMapiv( GLenum target, GLenum query, GLint *v ) * ctx->EvalMap.Map2Vertex4.Vorder * 4; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapiv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapiv(target)" ); return; } if (data) { @@ -1188,7 +1188,7 @@ _mesa_GetMapiv( GLenum target, GLenum query, GLint *v ) v[1] = ctx->EvalMap.Map2Vertex4.Vorder; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapiv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapiv(target)" ); return; } break; @@ -1285,11 +1285,11 @@ _mesa_GetMapiv( GLenum target, GLenum query, GLint *v ) v[3] = ROUNDF(ctx->EvalMap.Map2Vertex4.v2); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapiv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapiv(target)" ); } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMapiv(query)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapiv(query)" ); } } @@ -1302,7 +1302,7 @@ _mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (un<1) { - gl_error( ctx, GL_INVALID_VALUE, "glMapGrid1f" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMapGrid1f" ); return; } FLUSH_VERTICES(ctx, _NEW_EVAL); @@ -1328,11 +1328,11 @@ _mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2, ASSERT_OUTSIDE_BEGIN_END(ctx); if (un<1) { - gl_error( ctx, GL_INVALID_VALUE, "glMapGrid2f(un)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMapGrid2f(un)" ); return; } if (vn<1) { - gl_error( ctx, GL_INVALID_VALUE, "glMapGrid2f(vn)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glMapGrid2f(vn)" ); return; } diff --git a/src/mesa/main/eval.h b/src/mesa/main/eval.h index 0966237..8db0137 100644 --- a/src/mesa/main/eval.h +++ b/src/mesa/main/eval.h @@ -1,4 +1,4 @@ -/* $Id: eval.h,v 1.4 2000/11/22 07:32:16 joukj Exp $ */ +/* $Id: eval.h,v 1.5 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -32,7 +32,7 @@ #include "mtypes.h" -extern void gl_init_eval( void ); +extern void _mesa_init_eval( void ); extern GLuint _mesa_evaluator_components( GLenum target ); @@ -42,20 +42,20 @@ extern void gl_free_control_points( GLcontext *ctx, GLenum target, GLfloat *data ); -extern GLfloat *gl_copy_map_points1f( GLenum target, +extern GLfloat *_mesa_copy_map_points1f( GLenum target, GLint ustride, GLint uorder, const GLfloat *points ); -extern GLfloat *gl_copy_map_points1d( GLenum target, +extern GLfloat *_mesa_copy_map_points1d( GLenum target, GLint ustride, GLint uorder, const GLdouble *points ); -extern GLfloat *gl_copy_map_points2f( GLenum target, +extern GLfloat *_mesa_copy_map_points2f( GLenum target, GLint ustride, GLint uorder, GLint vstride, GLint vorder, const GLfloat *points ); -extern GLfloat *gl_copy_map_points2d(GLenum target, +extern GLfloat *_mesa_copy_map_points2d(GLenum target, GLint ustride, GLint uorder, GLint vstride, GLint vorder, const GLdouble *points ); diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index 1ddd12f..806f3e2 100644 --- a/src/mesa/main/feedback.c +++ b/src/mesa/main/feedback.c @@ -1,4 +1,4 @@ -/* $Id: feedback.c,v 1.21 2001/01/23 23:39:36 brianp Exp $ */ +/* $Id: feedback.c,v 1.22 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -55,15 +55,15 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (ctx->RenderMode==GL_FEEDBACK) { - gl_error( ctx, GL_INVALID_OPERATION, "glFeedbackBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glFeedbackBuffer" ); return; } if (size<0) { - gl_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(size<0)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(size<0)" ); return; } if (!buffer) { - gl_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(buffer==NULL)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(buffer==NULL)" ); ctx->Feedback.BufferSize = 0; return; } @@ -90,7 +90,7 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) FB_TEXTURE); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glFeedbackBuffer" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glFeedbackBuffer" ); return; } @@ -120,7 +120,7 @@ _mesa_PassThrough( GLfloat token ) /* * Put a vertex into the feedback buffer. */ -void gl_feedback_vertex( GLcontext *ctx, +void _mesa_feedback_vertex( GLcontext *ctx, const GLfloat win[4], const GLfloat color[4], GLuint index, @@ -167,7 +167,7 @@ _mesa_SelectBuffer( GLsizei size, GLuint *buffer ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (ctx->RenderMode==GL_SELECT) { - gl_error( ctx, GL_INVALID_OPERATION, "glSelectBuffer" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glSelectBuffer" ); return; /* KW: added return */ } @@ -189,7 +189,7 @@ _mesa_SelectBuffer( GLsizei size, GLuint *buffer ) -void gl_update_hitflag( GLcontext *ctx, GLfloat z ) +void _mesa_update_hitflag( GLcontext *ctx, GLfloat z ) { ctx->Select.HitFlag = GL_TRUE; if (z < ctx->Select.HitMinZ) { @@ -259,7 +259,7 @@ _mesa_LoadName( GLuint name ) return; } if (ctx->Select.NameStackDepth == 0) { - gl_error( ctx, GL_INVALID_OPERATION, "glLoadName" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glLoadName" ); return; } @@ -292,7 +292,7 @@ _mesa_PushName( GLuint name ) write_hit_record( ctx ); } if (ctx->Select.NameStackDepth >= MAX_NAME_STACK_DEPTH) { - gl_error( ctx, GL_STACK_OVERFLOW, "glPushName" ); + _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushName" ); } else ctx->Select.NameStack[ctx->Select.NameStackDepth++] = name; @@ -315,7 +315,7 @@ _mesa_PopName( void ) write_hit_record( ctx ); } if (ctx->Select.NameStackDepth == 0) { - gl_error( ctx, GL_STACK_UNDERFLOW, "glPopName" ); + _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopName" ); } else ctx->Select.NameStackDepth--; @@ -340,7 +340,7 @@ _mesa_RenderMode( GLenum mode ) ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glRenderMode %s\n", gl_lookup_enum_by_nr(mode)); + fprintf(stderr, "glRenderMode %s\n", _mesa_lookup_enum_by_nr(mode)); FLUSH_VERTICES(ctx, _NEW_RENDERMODE); ctx->_TriangleCaps &= ~(DD_FEEDBACK|DD_SELECT); @@ -378,7 +378,7 @@ _mesa_RenderMode( GLenum mode ) ctx->Feedback.Count = 0; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glRenderMode" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glRenderMode" ); return 0; } @@ -389,18 +389,18 @@ _mesa_RenderMode( GLenum mode ) ctx->_TriangleCaps |= DD_SELECT; if (ctx->Select.BufferSize==0) { /* haven't called glSelectBuffer yet */ - gl_error( ctx, GL_INVALID_OPERATION, "glRenderMode" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glRenderMode" ); } break; case GL_FEEDBACK: ctx->_TriangleCaps |= DD_FEEDBACK; if (ctx->Feedback.BufferSize==0) { /* haven't called glFeedbackBuffer yet */ - gl_error( ctx, GL_INVALID_OPERATION, "glRenderMode" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glRenderMode" ); } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glRenderMode" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glRenderMode" ); return 0; } diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h index bc4c7ae..be2dd9a 100644 --- a/src/mesa/main/feedback.h +++ b/src/mesa/main/feedback.h @@ -1,4 +1,4 @@ -/* $Id: feedback.h,v 1.5 2000/11/22 07:32:17 joukj Exp $ */ +/* $Id: feedback.h,v 1.6 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -39,14 +39,14 @@ CTX->Feedback.Count++; -extern void gl_feedback_vertex( GLcontext *ctx, +extern void _mesa_feedback_vertex( GLcontext *ctx, const GLfloat win[4], const GLfloat color[4], GLuint index, const GLfloat texcoord[4] ); -extern void gl_update_hitflag( GLcontext *ctx, GLfloat z ); +extern void _mesa_update_hitflag( GLcontext *ctx, GLfloat z ); extern void diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c index c0e4b4a..0c1214e 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -1,4 +1,4 @@ -/* $Id: fog.c,v 1.32 2001/01/05 02:26:48 keithw Exp $ */ +/* $Id: fog.c,v 1.33 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -95,7 +95,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) case GL_EXP2: break; default: - gl_error( ctx, GL_INVALID_ENUM, "glFog" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glFog" ); return; } if (ctx->Fog.Mode == m) @@ -105,7 +105,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) break; case GL_FOG_DENSITY: if (*params<0.0) { - gl_error( ctx, GL_INVALID_VALUE, "glFog" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glFog" ); return; } if (ctx->Fog.Density == *params) @@ -143,7 +143,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) case GL_FOG_COORDINATE_SOURCE_EXT: { GLenum p = (GLenum)(GLint) *params; if (p != GL_FOG_COORDINATE_EXT && p != GL_FRAGMENT_DEPTH_EXT) { - gl_error( ctx, GL_INVALID_ENUM, "glFog" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glFog" ); return; } if (ctx->Fog.FogCoordinateSource == p) @@ -153,7 +153,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) break; } default: - gl_error( ctx, GL_INVALID_ENUM, "glFog" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glFog" ); return; } diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 3258aad..200d66c 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1,4 +1,4 @@ -/* $Id: get.c,v 1.54 2001/02/27 22:33:59 brianp Exp $ */ +/* $Id: get.c,v 1.55 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -97,7 +97,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) return; if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glGetBooleanv %s\n", gl_lookup_enum_by_nr(pname)); + fprintf(stderr, "glGetBooleanv %s\n", _mesa_lookup_enum_by_nr(pname)); if (ctx->Driver.GetBooleanv && (*ctx->Driver.GetBooleanv)(ctx, pname, params)) @@ -365,7 +365,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = ctx->Pixel.HistogramEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); return; } break; @@ -981,19 +981,19 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) if (ctx->Extensions.ARB_texture_cube_map) *params = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB); else - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); return; case GL_TEXTURE_BINDING_CUBE_MAP_ARB: if (ctx->Extensions.ARB_texture_cube_map) *params = INT_TO_BOOL(textureUnit->CurrentCubeMap->Name); else - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); return; case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: if (ctx->Extensions.ARB_texture_cube_map) *params = INT_TO_BOOL(ctx->Const.MaxCubeTextureSize); else - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); break; /* GL_ARB_texture_compression */ @@ -1002,14 +1002,14 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = INT_TO_BOOL(ctx->Hint.TextureCompression); } else - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); break; case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: if (ctx->Extensions.ARB_texture_compression) { *params = INT_TO_BOOL(ctx->Const.NumCompressedTextureFormats); } else - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); break; case GL_COMPRESSED_TEXTURE_FORMATS_ARB: if (ctx->Extensions.ARB_texture_compression) { @@ -1018,7 +1018,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[i] = INT_TO_BOOL(ctx->Const.CompressedTextureFormats[i]); } else - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); break; /* GL_EXT_compiled_vertex_array */ @@ -1077,7 +1077,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = ctx->Depth.OcclusionTest; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" ); } return; case GL_OCCLUSION_TEST_RESULT_HP: @@ -1091,7 +1091,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) ctx->OcclusionResultSaved = GL_FALSE; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" ); } return; @@ -1151,7 +1151,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = ctx->Pixel.Convolution1DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); return; } break; @@ -1160,7 +1160,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = ctx->Pixel.Convolution2DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); return; } break; @@ -1169,7 +1169,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = ctx->Pixel.Separable2DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); return; } break; @@ -1259,13 +1259,13 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = ctx->Point.SpriteMode; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" ); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" ); } } @@ -1286,7 +1286,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) return; if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glGetDoublev %s\n", gl_lookup_enum_by_nr(pname)); + fprintf(stderr, "glGetDoublev %s\n", _mesa_lookup_enum_by_nr(pname)); if (ctx->Driver.GetDoublev && (*ctx->Driver.GetDoublev)(ctx, pname, params)) return; @@ -1553,7 +1553,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Pixel.HistogramEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); return; } break; @@ -2169,19 +2169,19 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) if (ctx->Extensions.ARB_texture_cube_map) *params = (GLdouble) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB); else - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); return; case GL_TEXTURE_BINDING_CUBE_MAP_ARB: if (ctx->Extensions.ARB_texture_cube_map) *params = (GLdouble) textureUnit->CurrentCubeMap->Name; else - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); return; case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: if (ctx->Extensions.ARB_texture_cube_map) *params = (GLdouble) ctx->Const.MaxCubeTextureSize; else - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); return; /* GL_ARB_texture_compression */ @@ -2190,14 +2190,14 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Hint.TextureCompression; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); break; case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: if (ctx->Extensions.ARB_texture_compression) { *params = (GLdouble) ctx->Const.NumCompressedTextureFormats; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); break; case GL_COMPRESSED_TEXTURE_FORMATS_ARB: if (ctx->Extensions.ARB_texture_compression) { @@ -2206,7 +2206,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) params[i] = (GLdouble) ctx->Const.CompressedTextureFormats[i]; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); break; /* GL_EXT_compiled_vertex_array */ @@ -2265,7 +2265,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Depth.OcclusionTest; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetDoublev" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetDoublev" ); } return; case GL_OCCLUSION_TEST_RESULT_HP: @@ -2279,7 +2279,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) ctx->OcclusionResultSaved = GL_FALSE; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetDoublev" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetDoublev" ); } return; @@ -2339,7 +2339,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Pixel.Convolution1DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); return; } break; @@ -2348,7 +2348,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Pixel.Convolution2DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); return; } break; @@ -2357,7 +2357,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Pixel.Separable2DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); return; } break; @@ -2447,13 +2447,13 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Point.SpriteMode; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetDoublev" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetDoublev" ); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetDoublev" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetDoublev" ); } } @@ -2474,7 +2474,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) return; if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glGetFloatv %s\n", gl_lookup_enum_by_nr(pname)); + fprintf(stderr, "glGetFloatv %s\n", _mesa_lookup_enum_by_nr(pname)); if (ctx->Driver.GetFloatv && (*ctx->Driver.GetFloatv)(ctx, pname, params)) return; @@ -2741,7 +2741,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Pixel.HistogramEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); return; } break; @@ -3359,19 +3359,19 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) if (ctx->Extensions.ARB_texture_cube_map) *params = (GLfloat) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB); else - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); return; case GL_TEXTURE_BINDING_CUBE_MAP_ARB: if (ctx->Extensions.ARB_texture_cube_map) *params = (GLfloat) textureUnit->CurrentCubeMap->Name; else - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); return; case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: if (ctx->Extensions.ARB_texture_cube_map) *params = (GLfloat) ctx->Const.MaxCubeTextureSize; else - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); return; /* GL_ARB_texture_compression */ @@ -3380,14 +3380,14 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Hint.TextureCompression; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); break; case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: if (ctx->Extensions.ARB_texture_compression) { *params = (GLfloat) ctx->Const.NumCompressedTextureFormats; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); break; case GL_COMPRESSED_TEXTURE_FORMATS_ARB: if (ctx->Extensions.ARB_texture_compression) { @@ -3396,7 +3396,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[i] = (GLfloat) ctx->Const.CompressedTextureFormats[i]; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); break; /* GL_EXT_compiled_vertex_array */ @@ -3427,7 +3427,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Depth.OcclusionTest; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetFloatv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" ); } return; case GL_OCCLUSION_TEST_RESULT_HP: @@ -3441,7 +3441,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) ctx->OcclusionResultSaved = GL_FALSE; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetFloatv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" ); } return; @@ -3501,7 +3501,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Pixel.Convolution1DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); return; } break; @@ -3510,7 +3510,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Pixel.Convolution2DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); return; } break; @@ -3519,7 +3519,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Pixel.Separable2DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); return; } break; @@ -3609,13 +3609,13 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Point.SpriteMode; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetFloatv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" ); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetFloatv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" ); } } @@ -3636,7 +3636,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) return; if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glGetIntegerv %s\n", gl_lookup_enum_by_nr(pname)); + fprintf(stderr, "glGetIntegerv %s\n", _mesa_lookup_enum_by_nr(pname)); if (ctx->Driver.GetIntegerv && (*ctx->Driver.GetIntegerv)(ctx, pname, params)) @@ -3905,7 +3905,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Pixel.HistogramEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); return; } break; @@ -4521,19 +4521,19 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) if (ctx->Extensions.ARB_texture_cube_map) *params = (GLint) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB); else - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); return; case GL_TEXTURE_BINDING_CUBE_MAP_ARB: if (ctx->Extensions.ARB_texture_cube_map) *params = textureUnit->CurrentCubeMap->Name; else - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); return; case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: if (ctx->Extensions.ARB_texture_cube_map) *params = ctx->Const.MaxCubeTextureSize; else - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); return; /* GL_ARB_texture_compression */ @@ -4542,14 +4542,14 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Hint.TextureCompression; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); break; case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: if (ctx->Extensions.ARB_texture_compression) { *params = (GLint) ctx->Const.NumCompressedTextureFormats; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); break; case GL_COMPRESSED_TEXTURE_FORMATS_ARB: if (ctx->Extensions.ARB_texture_compression) { @@ -4558,7 +4558,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[i] = (GLint) ctx->Const.CompressedTextureFormats[i]; } else - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); break; /* GL_EXT_compiled_vertex_array */ @@ -4617,7 +4617,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Depth.OcclusionTest; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); } return; case GL_OCCLUSION_TEST_RESULT_HP: @@ -4631,7 +4631,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) ctx->OcclusionResultSaved = GL_FALSE; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); } return; @@ -4691,7 +4691,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Pixel.Convolution1DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); return; } break; @@ -4700,7 +4700,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Pixel.Convolution2DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); return; } break; @@ -4709,7 +4709,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Pixel.Separable2DEnabled; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv"); return; } break; @@ -4786,7 +4786,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Current.FogCoord; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); } break; case GL_FOG_COORDINATE_ARRAY_EXT: @@ -4794,7 +4794,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Array.FogCoord.Enabled; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); } break; case GL_FOG_COORDINATE_ARRAY_TYPE_EXT: @@ -4802,7 +4802,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Array.FogCoord.Type; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); } break; case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT: @@ -4810,7 +4810,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Array.FogCoord.Stride; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); } break; @@ -4820,13 +4820,13 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Point.SpriteMode; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" ); } } @@ -4843,7 +4843,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) return; if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glGetPointerv %s\n", gl_lookup_enum_by_nr(pname)); + fprintf(stderr, "glGetPointerv %s\n", _mesa_lookup_enum_by_nr(pname)); if (ctx->Driver.GetPointerv && (*ctx->Driver.GetPointerv)(ctx, pname, params)) @@ -4881,7 +4881,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) *params = ctx->Select.Buffer; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetPointerv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerv" ); return; } } @@ -4914,7 +4914,7 @@ _mesa_GetString( GLenum name ) case GL_EXTENSIONS: return (const GLubyte *) _mesa_extensions_get_string(ctx); default: - gl_error( ctx, GL_INVALID_ENUM, "glGetString" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetString" ); return (const GLubyte *) 0; } } @@ -4932,7 +4932,7 @@ _mesa_GetError( void ) ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glGetError <-- %s\n", gl_lookup_enum_by_nr(e)); + fprintf(stderr, "glGetError <-- %s\n", _mesa_lookup_enum_by_nr(e)); ctx->ErrorValue = (GLenum) GL_NO_ERROR; return e; diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c index 0c6ddf2..4f132c4 100644 --- a/src/mesa/main/hint.c +++ b/src/mesa/main/hint.c @@ -1,4 +1,4 @@ -/* $Id: hint.c,v 1.7 2001/01/24 04:56:20 brianp Exp $ */ +/* $Id: hint.c,v 1.8 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -50,10 +50,10 @@ GLboolean _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode ) { if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glHint %s %d\n", gl_lookup_enum_by_nr(target), mode); + fprintf(stderr, "glHint %s %d\n", _mesa_lookup_enum_by_nr(target), mode); if (mode != GL_NICEST && mode != GL_FASTEST && mode != GL_DONT_CARE) { - gl_error(ctx, GL_INVALID_ENUM, "glHint(mode)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glHint(mode)"); return GL_FALSE; } @@ -100,7 +100,7 @@ _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode ) /* GL_ARB_texture_compression */ case GL_TEXTURE_COMPRESSION_HINT_ARB: if (ctx->Extensions.ARB_texture_compression) { - gl_error(ctx, GL_INVALID_ENUM, "glHint(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); return GL_TRUE; } if (ctx->Hint.TextureCompression == mode) @@ -110,7 +110,7 @@ _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode ) break; default: - gl_error(ctx, GL_INVALID_ENUM, "glHint(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); return GL_FALSE; } diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c index de5348d..e616e4c 100644 --- a/src/mesa/main/histogram.c +++ b/src/mesa/main/histogram.c @@ -1,4 +1,4 @@ -/* $Id: histogram.c,v 1.8 2001/02/27 22:33:59 brianp Exp $ */ +/* $Id: histogram.c,v 1.9 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -125,7 +125,7 @@ pack_histogram( GLcontext *ctx, } \ break; \ default: \ - gl_problem(ctx, "bad format in pack_histogram"); \ + _mesa_problem(ctx, "bad format in pack_histogram"); \ } \ } @@ -536,7 +536,7 @@ pack_histogram( GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad type in pack_histogram"); + _mesa_problem(ctx, "Bad type in pack_histogram"); } #undef PACK_MACRO @@ -603,17 +603,17 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetMinmax"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmax"); return; } if (target != GL_MINMAX) { - gl_error(ctx, GL_INVALID_ENUM, "glGetMinmax(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinmax(target)"); return; } if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetMinmax(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmax(format or type)"); return; } @@ -636,7 +636,7 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo type != GL_UNSIGNED_INT_8_8_8_8_REV && type != GL_UNSIGNED_INT_10_10_10_2 && type != GL_UNSIGNED_INT_2_10_10_10_REV) { - gl_error(ctx, GL_INVALID_ENUM, "glGetMinmax(type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinmax(type)"); return; } @@ -670,17 +670,17 @@ _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, G ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetHistogram"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogram"); return; } if (target != GL_HISTOGRAM) { - gl_error(ctx, GL_INVALID_ENUM, "glGetHistogram(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogram(target)"); return; } if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetHistogram(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogram(format or type)"); return; } @@ -703,7 +703,7 @@ _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, G type != GL_UNSIGNED_INT_8_8_8_8_REV && type != GL_UNSIGNED_INT_10_10_10_2 && type != GL_UNSIGNED_INT_2_10_10_10_REV) { - gl_error(ctx, GL_INVALID_ENUM, "glGetHistogram(type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogram(type)"); return; } @@ -733,12 +733,12 @@ _mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params) ASSERT_OUTSIDE_BEGIN_END(ctx); if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameterfv"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameterfv"); return; } if (target != GL_HISTOGRAM && target != GL_PROXY_HISTOGRAM) { - gl_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameterfv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameterfv(target)"); return; } @@ -768,7 +768,7 @@ _mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params) *params = (GLfloat) ctx->Histogram.Sink; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameterfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameterfv(pname)"); } } @@ -780,12 +780,12 @@ _mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params) ASSERT_OUTSIDE_BEGIN_END(ctx); if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameteriv"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameteriv"); return; } if (target != GL_HISTOGRAM && target != GL_PROXY_HISTOGRAM) { - gl_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameteriv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameteriv(target)"); return; } @@ -815,7 +815,7 @@ _mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params) *params = (GLint) ctx->Histogram.Sink; break; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameteriv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameteriv(pname)"); } } @@ -827,11 +827,11 @@ _mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params) ASSERT_OUTSIDE_BEGIN_END(ctx); if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameterfv"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameterfv"); return; } if (target != GL_MINMAX) { - gl_error(ctx, GL_INVALID_ENUM, "glGetMinmaxParameterfv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinmaxParameterfv(target)"); return; } if (pname == GL_MINMAX_FORMAT) { @@ -841,7 +841,7 @@ _mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params) *params = (GLfloat) ctx->MinMax.Sink; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameterfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameterfv(pname)"); } } @@ -853,11 +853,11 @@ _mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params) ASSERT_OUTSIDE_BEGIN_END(ctx); if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameteriv"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameteriv"); return; } if (target != GL_MINMAX) { - gl_error(ctx, GL_INVALID_ENUM, "glGetMinmaxParameteriv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinmaxParameteriv(target)"); return; } if (pname == GL_MINMAX_FORMAT) { @@ -867,7 +867,7 @@ _mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params) *params = (GLint) ctx->MinMax.Sink; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameteriv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameteriv(pname)"); } } @@ -881,12 +881,12 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* sideeffects */ if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glHistogram"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glHistogram"); return; } if (target != GL_HISTOGRAM && target != GL_PROXY_HISTOGRAM) { - gl_error(ctx, GL_INVALID_ENUM, "glHistogram(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glHistogram(target)"); return; } @@ -896,9 +896,9 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s } else { if (width < 0) - gl_error(ctx, GL_INVALID_VALUE, "glHistogram(width)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glHistogram(width)"); else - gl_error(ctx, GL_TABLE_TOO_LARGE, "glHistogram(width)"); + _mesa_error(ctx, GL_TABLE_TOO_LARGE, "glHistogram(width)"); return; } } @@ -908,7 +908,7 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s error = GL_TRUE; } else { - gl_error(ctx, GL_INVALID_VALUE, "glHistogram(width)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glHistogram(width)"); return; } } @@ -918,7 +918,7 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s error = GL_TRUE; } else { - gl_error(ctx, GL_INVALID_ENUM, "glHistogram(internalFormat)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glHistogram(internalFormat)"); return; } } @@ -962,17 +962,17 @@ _mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink) ASSERT_OUTSIDE_BEGIN_END(ctx); if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glMinmax"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glMinmax"); return; } if (target != GL_MINMAX) { - gl_error(ctx, GL_INVALID_ENUM, "glMinMax(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glMinMax(target)"); return; } if (base_histogram_format(internalFormat) < 0) { - gl_error(ctx, GL_INVALID_ENUM, "glMinMax(internalFormat)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glMinMax(internalFormat)"); return; } @@ -991,12 +991,12 @@ _mesa_ResetHistogram(GLenum target) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* sideeffects */ if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glResetHistogram"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glResetHistogram"); return; } if (target != GL_HISTOGRAM) { - gl_error(ctx, GL_INVALID_ENUM, "glResetHistogram(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glResetHistogram(target)"); return; } @@ -1018,12 +1018,12 @@ _mesa_ResetMinmax(GLenum target) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - gl_error(ctx, GL_INVALID_OPERATION, "glResetMinmax"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glResetMinmax"); return; } if (target != GL_MINMAX) { - gl_error(ctx, GL_INVALID_ENUM, "glResetMinMax(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glResetMinMax(target)"); return; } diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 1ae4925..89bfcc2 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1,4 +1,4 @@ -/* $Id: image.c,v 1.56 2001/02/17 18:41:01 brianp Exp $ */ +/* $Id: image.c,v 1.57 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -959,7 +959,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } break; default: - gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); + _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); } } break; @@ -1031,7 +1031,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } break; default: - gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); + _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); } } break; @@ -1104,7 +1104,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } break; default: - gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); + _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); } if (dstPacking->SwapBytes) { _mesa_swap2( (GLushort *) dst, n * comps); @@ -1179,7 +1179,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } break; default: - gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); + _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); } if (dstPacking->SwapBytes) { _mesa_swap2( (GLushort *) dst, n * comps ); @@ -1255,7 +1255,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } break; default: - gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); + _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); } if (dstPacking->SwapBytes) { _mesa_swap4( (GLuint *) dst, n * comps ); @@ -1331,7 +1331,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } break; default: - gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); + _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); } if (dstPacking->SwapBytes) { _mesa_swap4( (GLuint *) dst, n * comps ); @@ -1407,7 +1407,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } break; default: - gl_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); + _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n"); } if (dstPacking->SwapBytes) { _mesa_swap4( (GLuint *) dst, n * comps ); @@ -1687,7 +1687,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } break; default: - gl_problem(ctx, "bad type in _mesa_pack_float_rgba_span"); + _mesa_problem(ctx, "bad type in _mesa_pack_float_rgba_span"); } } @@ -1925,7 +1925,7 @@ extract_uint_indexes(GLuint n, GLuint indexes[], } break; default: - gl_problem(NULL, "bad srcType in extract_uint_indexes"); + _mesa_problem(NULL, "bad srcType in extract_uint_indexes"); return; } } @@ -2076,7 +2076,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], stride = 4; break; default: - gl_problem(NULL, "bad srcFormat in extract float data"); + _mesa_problem(NULL, "bad srcFormat in extract float data"); return; } @@ -2430,7 +2430,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], } break; default: - gl_problem(NULL, "bad srcType in extract float data"); + _mesa_problem(NULL, "bad srcType in extract float data"); break; } } @@ -2707,7 +2707,7 @@ _mesa_unpack_chan_color_span( GLcontext *ctx, dstLuminanceIndex = dstIntensityIndex = -1; break; default: - gl_problem(ctx, "bad dstFormat in _mesa_unpack_chan_span()"); + _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_chan_span()"); return; } @@ -2978,7 +2978,7 @@ _mesa_unpack_float_color_span( GLcontext *ctx, dstLuminanceIndex = dstIntensityIndex = -1; break; default: - gl_problem(ctx, "bad dstFormat in _mesa_unpack_float_color_span()"); + _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_float_color_span()"); return; } @@ -3137,7 +3137,7 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n, MEMCPY(dest, indexes, n * sizeof(GLuint)); break; default: - gl_problem(ctx, "bad dstType in _mesa_unpack_index_span"); + _mesa_problem(ctx, "bad dstType in _mesa_unpack_index_span"); } } } @@ -3247,7 +3247,7 @@ _mesa_pack_index_span( const GLcontext *ctx, GLuint n, } break; default: - gl_problem(ctx, "bad type in _mesa_pack_index_span"); + _mesa_problem(ctx, "bad type in _mesa_pack_index_span"); } } @@ -3354,7 +3354,7 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, MEMCPY(dest, indexes, n * sizeof(GLuint)); break; default: - gl_problem(ctx, "bad dstType in _mesa_unpack_stencil_span"); + _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span"); } } } @@ -3500,7 +3500,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, } break; default: - gl_problem(ctx, "bad type in _mesa_pack_index_span"); + _mesa_problem(ctx, "bad type in _mesa_pack_index_span"); } } @@ -3570,7 +3570,7 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLfloat *dest, MEMCPY(dest, source, n * sizeof(GLfloat)); break; default: - gl_problem(NULL, "bad type in _mesa_unpack_depth_span()"); + _mesa_problem(NULL, "bad type in _mesa_unpack_depth_span()"); return; } @@ -3691,7 +3691,7 @@ _mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLdepth *dest, } break; default: - gl_problem(ctx, "bad type in _mesa_pack_depth_span"); + _mesa_problem(ctx, "bad type in _mesa_pack_depth_span"); } } diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 052c046..a7fce7e 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1,4 +1,4 @@ -/* $Id: light.c,v 1.38 2001/02/16 18:14:41 keithw Exp $ */ +/* $Id: light.c,v 1.39 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -57,10 +57,10 @@ _mesa_ShadeModel( GLenum mode ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE & VERBOSE_API) - fprintf(stderr, "glShadeModel %s\n", gl_lookup_enum_by_nr(mode)); + fprintf(stderr, "glShadeModel %s\n", _mesa_lookup_enum_by_nr(mode)); if (mode != GL_FLAT && mode != GL_SMOOTH) { - gl_error( ctx, GL_INVALID_ENUM, "glShadeModel" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glShadeModel" ); return; } @@ -91,7 +91,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) struct gl_light *l = &ctx->Light.Light[i]; if (i < 0 || i >= ctx->Const.MaxLights) { - gl_error( ctx, GL_INVALID_ENUM, "glLight" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glLight" ); return; } @@ -143,18 +143,18 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) } case GL_SPOT_EXPONENT: if (params[0]<0.0 || params[0]>128.0) { - gl_error( ctx, GL_INVALID_VALUE, "glLight" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); return; } if (l->SpotExponent == params[0]) return; FLUSH_VERTICES(ctx, _NEW_LIGHT); l->SpotExponent = params[0]; - gl_invalidate_spot_exp_table( l ); + _mesa_invalidate_spot_exp_table( l ); break; case GL_SPOT_CUTOFF: if ((params[0]<0.0 || params[0]>90.0) && params[0]!=180.0) { - gl_error( ctx, GL_INVALID_VALUE, "glLight" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); return; } if (l->SpotCutoff == params[0]) @@ -171,7 +171,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) break; case GL_CONSTANT_ATTENUATION: if (params[0]<0.0) { - gl_error( ctx, GL_INVALID_VALUE, "glLight" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); return; } if (l->ConstantAttenuation == params[0]) @@ -181,7 +181,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) break; case GL_LINEAR_ATTENUATION: if (params[0]<0.0) { - gl_error( ctx, GL_INVALID_VALUE, "glLight" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); return; } if (l->LinearAttenuation == params[0]) @@ -191,7 +191,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) break; case GL_QUADRATIC_ATTENUATION: if (params[0]<0.0) { - gl_error( ctx, GL_INVALID_VALUE, "glLight" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); return; } if (l->QuadraticAttenuation == params[0]) @@ -200,7 +200,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) l->QuadraticAttenuation = params[0]; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glLight" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glLight" ); return; } @@ -266,7 +266,7 @@ _mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (l < 0 || l >= ctx->Const.MaxLights) { - gl_error( ctx, GL_INVALID_ENUM, "glGetLightfv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightfv" ); return; } @@ -302,7 +302,7 @@ _mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params ) params[0] = ctx->Light.Light[l].QuadraticAttenuation; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetLightfv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightfv" ); break; } } @@ -317,7 +317,7 @@ _mesa_GetLightiv( GLenum light, GLenum pname, GLint *params ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (l < 0 || l >= ctx->Const.MaxLights) { - gl_error( ctx, GL_INVALID_ENUM, "glGetLightiv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightiv" ); return; } @@ -367,7 +367,7 @@ _mesa_GetLightiv( GLenum light, GLenum pname, GLint *params ) params[0] = (GLint) ctx->Light.Light[l].QuadraticAttenuation; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetLightiv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightiv" ); break; } } @@ -414,7 +414,7 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params ) else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR) newenum = GL_SEPARATE_SPECULAR_COLOR; else { - gl_error( ctx, GL_INVALID_ENUM, "glLightModel(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glLightModel(param)" ); return; } if (ctx->Light.Model.ColorControl == newenum) @@ -431,7 +431,7 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params ) break; default: - gl_error( ctx, GL_INVALID_ENUM, "glLightModel" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glLightModel" ); break; } @@ -487,9 +487,9 @@ _mesa_LightModelf( GLenum pname, GLfloat param ) * Given a face and pname value (ala glColorMaterial), compute a bitmask * of the targeted material values. */ -GLuint gl_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname, - GLuint legal, - const char *where ) +GLuint +_mesa_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname, + GLuint legal, const char *where ) { GLuint bitmask = 0; @@ -518,7 +518,7 @@ GLuint gl_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname, bitmask |= FRONT_INDEXES_BIT | BACK_INDEXES_BIT; break; default: - gl_error( ctx, GL_INVALID_ENUM, where ); + _mesa_error( ctx, GL_INVALID_ENUM, where ); return 0; } @@ -529,12 +529,12 @@ GLuint gl_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname, bitmask &= BACK_MATERIAL_BITS; } else if (face != GL_FRONT_AND_BACK) { - gl_error( ctx, GL_INVALID_ENUM, where ); + _mesa_error( ctx, GL_INVALID_ENUM, where ); return 0; } if (bitmask & ~legal) { - gl_error( ctx, GL_INVALID_ENUM, where ); + _mesa_error( ctx, GL_INVALID_ENUM, where ); return 0; } @@ -544,7 +544,7 @@ GLuint gl_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname, /* Perform a straight copy between pairs of materials. */ -void gl_copy_material_pairs( struct gl_material dst[2], +void _mesa_copy_material_pairs( struct gl_material dst[2], const struct gl_material src[2], GLuint bitmask ) { @@ -602,7 +602,7 @@ void gl_copy_material_pairs( struct gl_material dst[2], * * Additionally keeps the precomputed lighting state uptodate. */ -void gl_update_material( GLcontext *ctx, +void _mesa_update_material( GLcontext *ctx, const struct gl_material src[2], GLuint bitmask ) { @@ -612,7 +612,7 @@ void gl_update_material( GLcontext *ctx, bitmask &= ~ctx->Light.ColorMaterialBitmask; if (MESA_VERBOSE&VERBOSE_IMMEDIATE) - fprintf(stderr, "gl_update_material, mask 0x%x\n", bitmask); + fprintf(stderr, "_mesa_update_material, mask 0x%x\n", bitmask); if (!bitmask) return; @@ -693,11 +693,11 @@ void gl_update_material( GLcontext *ctx, if (bitmask & FRONT_SHININESS_BIT) { ctx->Light.Material[0].Shininess = src[0].Shininess; - gl_invalidate_shine_table( ctx, 0 ); + _mesa_invalidate_shine_table( ctx, 0 ); } if (bitmask & BACK_SHININESS_BIT) { ctx->Light.Material[1].Shininess = src[1].Shininess; - gl_invalidate_shine_table( ctx, 1 ); + _mesa_invalidate_shine_table( ctx, 1 ); } if (bitmask & FRONT_INDEXES_BIT) { @@ -744,7 +744,7 @@ void gl_update_material( GLcontext *ctx, * according to the bitmask in ColorMaterialBitmask, which is * set by glColorMaterial(). */ -void gl_update_color_material( GLcontext *ctx, +void _mesa_update_color_material( GLcontext *ctx, const GLchan rgba[4] ) { struct gl_light *light, *list = &ctx->Light.EnabledList; @@ -757,7 +757,7 @@ void gl_update_color_material( GLcontext *ctx, color[3] = CHAN_TO_FLOAT(rgba[3]); if (MESA_VERBOSE&VERBOSE_IMMEDIATE) - fprintf(stderr, "gl_update_color_material, mask 0x%x\n", bitmask); + fprintf(stderr, "_mesa_update_color_material, mask 0x%x\n", bitmask); /* update emissive colors */ if (bitmask & FRONT_EMISSION_BIT) { @@ -874,10 +874,10 @@ _mesa_ColorMaterial( GLenum face, GLenum mode ) if (MESA_VERBOSE&VERBOSE_API) fprintf(stderr, "glColorMaterial %s %s\n", - gl_lookup_enum_by_nr(face), - gl_lookup_enum_by_nr(mode)); + _mesa_lookup_enum_by_nr(face), + _mesa_lookup_enum_by_nr(mode)); - bitmask = gl_material_bitmask( ctx, face, mode, legal, "glColorMaterial" ); + bitmask = _mesa_material_bitmask(ctx, face, mode, legal, "glColorMaterial"); if (ctx->Light.ColorMaterialBitmask == bitmask && ctx->Light.ColorMaterialFace == face && @@ -891,7 +891,7 @@ _mesa_ColorMaterial( GLenum face, GLenum mode ) if (ctx->Light.ColorMaterialEnabled) { FLUSH_CURRENT( ctx, 0 ); - gl_update_color_material( ctx, ctx->Current.Color ); + _mesa_update_color_material( ctx, ctx->Current.Color ); } } @@ -913,7 +913,7 @@ _mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params ) f = 1; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(face)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(face)" ); return; } switch (pname) { @@ -938,7 +938,7 @@ _mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params ) params[2] = ctx->Light.Material[f].SpecularIndex; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(pname)" ); } } @@ -958,7 +958,7 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ) f = 1; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetMaterialiv(face)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialiv(face)" ); return; } switch (pname) { @@ -995,7 +995,7 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ) params[2] = ROUNDF( ctx->Light.Material[f].SpecularIndex ); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(pname)" ); } } @@ -1046,7 +1046,7 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ) * this function to recompute the exponent lookup table. */ void -gl_invalidate_spot_exp_table( struct gl_light *l ) +_mesa_invalidate_spot_exp_table( struct gl_light *l ) { l->_SpotExpTable[0][0] = -1; } @@ -1085,7 +1085,7 @@ static void validate_spot_exp_table( struct gl_light *l ) * by keeping a MRU cache of shine tables for various shine values. */ void -gl_invalidate_shine_table( GLcontext *ctx, GLuint i ) +_mesa_invalidate_shine_table( GLcontext *ctx, GLuint i ) { if (ctx->_ShineTable[i]) ctx->_ShineTable[i]->refcount--; @@ -1141,7 +1141,7 @@ static void validate_shine_table( GLcontext *ctx, GLuint i, GLfloat shininess ) } void -gl_validate_all_lighting_tables( GLcontext *ctx ) +_mesa_validate_all_lighting_tables( GLcontext *ctx ) { GLint i; GLfloat shininess; @@ -1169,7 +1169,7 @@ gl_validate_all_lighting_tables( GLcontext *ctx ) * source and material ambient, diffuse and specular coefficients. */ void -gl_update_lighting( GLcontext *ctx ) +_mesa_update_lighting( GLcontext *ctx ) { struct gl_light *light; ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE; @@ -1255,7 +1255,7 @@ gl_update_lighting( GLcontext *ctx ) * Also update on lighting space changes. */ void -gl_compute_light_positions( GLcontext *ctx ) +_mesa_compute_light_positions( GLcontext *ctx ) { struct gl_light *light; static const GLfloat eye_z[3] = { 0, 0, 1 }; diff --git a/src/mesa/main/light.h b/src/mesa/main/light.h index 38ca338..82f6d78 100644 --- a/src/mesa/main/light.h +++ b/src/mesa/main/light.h @@ -1,4 +1,4 @@ -/* $Id: light.h,v 1.10 2001/02/15 01:33:52 keithw Exp $ */ +/* $Id: light.h,v 1.11 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -92,33 +92,31 @@ do { \ -extern GLuint gl_material_bitmask( GLcontext *ctx, - GLenum face, GLenum pname, - GLuint legal, - const char * ); +extern GLuint _mesa_material_bitmask( GLcontext *ctx, + GLenum face, GLenum pname, + GLuint legal, + const char * ); -extern void gl_set_material( GLcontext *ctx, GLuint bitmask, - const GLfloat *params); +extern void _mesa_invalidate_spot_exp_table( struct gl_light *l ); +extern void _mesa_invalidate_shine_table( GLcontext *ctx, GLuint i ); -extern void gl_invalidate_spot_exp_table( struct gl_light *l ); -extern void gl_invalidate_shine_table( GLcontext *ctx, GLuint i ); -extern void gl_validate_all_lighting_tables( GLcontext *ctx ); +extern void _mesa_validate_all_lighting_tables( GLcontext *ctx ); +extern void _mesa_update_lighting( GLcontext *ctx ); -extern void gl_update_lighting( GLcontext *ctx ); +extern void _mesa_compute_light_positions( GLcontext *ctx ); -extern void gl_compute_light_positions( GLcontext *ctx ); +extern void _mesa_update_material( GLcontext *ctx, + const struct gl_material src[2], + GLuint bitmask ); -extern void gl_update_material( GLcontext *ctx, - const struct gl_material src[2], - GLuint bitmask ); +extern void _mesa_copy_material_pairs( struct gl_material dst[2], + const struct gl_material src[2], + GLuint bitmask ); -extern void gl_copy_material_pairs( struct gl_material dst[2], - const struct gl_material src[2], - GLuint bitmask ); - -extern void gl_update_color_material( GLcontext *ctx, const GLchan rgba[4] ); +extern void _mesa_update_color_material( GLcontext *ctx, + const GLchan rgba[4] ); #endif diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c index 520010c..13e5083 100644 --- a/src/mesa/main/lines.c +++ b/src/mesa/main/lines.c @@ -1,4 +1,4 @@ -/* $Id: lines.c,v 1.27 2001/01/14 06:14:21 keithw Exp $ */ +/* $Id: lines.c,v 1.28 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -47,7 +47,7 @@ _mesa_LineWidth( GLfloat width ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (width<=0.0) { - gl_error( ctx, GL_INVALID_VALUE, "glLineWidth" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glLineWidth" ); return; } diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 1239f6e..466911c 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -1,4 +1,4 @@ -/* $Id: matrix.c,v 1.32 2001/02/13 23:51:34 brianp Exp $ */ +/* $Id: matrix.c,v 1.33 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -78,7 +78,7 @@ do { \ flags |= _NEW_COLOR_MATRIX; \ break; \ default: \ - gl_problem(ctx, where); \ + _mesa_problem(ctx, where); \ } \ } while (0) @@ -100,7 +100,7 @@ _mesa_Frustum( GLdouble left, GLdouble right, left == right || top == bottom) { - gl_error( ctx, GL_INVALID_VALUE, "glFrustum" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glFrustum" ); return; } @@ -123,7 +123,7 @@ _mesa_Ortho( GLdouble left, GLdouble right, bottom == top || nearval == farval) { - gl_error( ctx, GL_INVALID_VALUE, "glOrtho" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glOrtho" ); return; } @@ -148,7 +148,7 @@ _mesa_MatrixMode( GLenum mode ) FLUSH_VERTICES(ctx, _NEW_TRANSFORM); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glMatrixMode" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glMatrixMode" ); } } @@ -162,12 +162,12 @@ _mesa_PushMatrix( void ) if (MESA_VERBOSE&VERBOSE_API) fprintf(stderr, "glPushMatrix %s\n", - gl_lookup_enum_by_nr(ctx->Transform.MatrixMode)); + _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode)); switch (ctx->Transform.MatrixMode) { case GL_MODELVIEW: if (ctx->ModelViewStackDepth >= MAX_MODELVIEW_STACK_DEPTH - 1) { - gl_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); + _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); return; } _math_matrix_copy( &ctx->ModelViewStack[ctx->ModelViewStackDepth++], @@ -175,7 +175,7 @@ _mesa_PushMatrix( void ) break; case GL_PROJECTION: if (ctx->ProjectionStackDepth >= MAX_PROJECTION_STACK_DEPTH - 1) { - gl_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); + _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); return; } _math_matrix_copy( &ctx->ProjectionStack[ctx->ProjectionStackDepth++], @@ -185,7 +185,7 @@ _mesa_PushMatrix( void ) { GLuint t = ctx->Texture.CurrentTransformUnit; if (ctx->TextureStackDepth[t] >= MAX_TEXTURE_STACK_DEPTH - 1) { - gl_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); + _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); return; } _math_matrix_copy( &ctx->TextureStack[t][ctx->TextureStackDepth[t]++], @@ -194,14 +194,14 @@ _mesa_PushMatrix( void ) break; case GL_COLOR: if (ctx->ColorStackDepth >= MAX_COLOR_STACK_DEPTH - 1) { - gl_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); + _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); return; } _math_matrix_copy( &ctx->ColorStack[ctx->ColorStackDepth++], &ctx->ColorMatrix ); break; default: - gl_problem(ctx, "Bad matrix mode in gl_PushMatrix"); + _mesa_problem(ctx, "Bad matrix mode in _mesa_PushMatrix"); } } @@ -215,12 +215,12 @@ _mesa_PopMatrix( void ) if (MESA_VERBOSE&VERBOSE_API) fprintf(stderr, "glPopMatrix %s\n", - gl_lookup_enum_by_nr(ctx->Transform.MatrixMode)); + _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode)); switch (ctx->Transform.MatrixMode) { case GL_MODELVIEW: if (ctx->ModelViewStackDepth==0) { - gl_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix"); + _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix"); return; } _math_matrix_copy( &ctx->ModelView, @@ -229,7 +229,7 @@ _mesa_PopMatrix( void ) break; case GL_PROJECTION: if (ctx->ProjectionStackDepth==0) { - gl_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix"); + _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix"); return; } @@ -241,7 +241,7 @@ _mesa_PopMatrix( void ) { GLuint t = ctx->Texture.CurrentTransformUnit; if (ctx->TextureStackDepth[t]==0) { - gl_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix"); + _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix"); return; } _math_matrix_copy(&ctx->TextureMatrix[t], @@ -251,7 +251,7 @@ _mesa_PopMatrix( void ) break; case GL_COLOR: if (ctx->ColorStackDepth==0) { - gl_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix"); + _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix"); return; } _math_matrix_copy(&ctx->ColorMatrix, @@ -259,7 +259,7 @@ _mesa_PopMatrix( void ) ctx->NewState |= _NEW_COLOR_MATRIX; break; default: - gl_problem(ctx, "Bad matrix mode in gl_PopMatrix"); + _mesa_problem(ctx, "Bad matrix mode in _mesa_PopMatrix"); } } @@ -437,24 +437,20 @@ _mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height ) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - gl_Viewport(ctx, x, y, width, height); + _mesa_set_viewport(ctx, x, y, width, height); } - /* * Define a new viewport and reallocate auxillary buffers if the size of * the window (color buffer) has changed. - * - * XXX This is directly called by device drivers, BUT this function - * may be renamed _mesa_Viewport (without ctx arg) in the future so - * use of _mesa_Viewport is encouraged. */ void -gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height ) +_mesa_set_viewport( GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height ) { - if (width<0 || height<0) { - gl_error( ctx, GL_INVALID_VALUE, "glViewport" ); + if (width < 0 || height < 0) { + _mesa_error( ctx, GL_INVALID_VALUE, "glViewport" ); return; } diff --git a/src/mesa/main/matrix.h b/src/mesa/main/matrix.h index f49a3f1..53fd29a 100644 --- a/src/mesa/main/matrix.h +++ b/src/mesa/main/matrix.h @@ -1,4 +1,4 @@ -/* $Id: matrix.h,v 1.10 2000/11/22 07:32:17 joukj Exp $ */ +/* $Id: matrix.h,v 1.11 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -32,15 +32,6 @@ #include "mtypes.h" -#ifdef VMS -#define gl_calculate_model_project_matrix gl_calculate_model_project_matr -#endif - - -extern void -gl_calculate_model_project_matrix( GLcontext *ctx ); - - extern void _mesa_Frustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, @@ -109,7 +100,7 @@ extern void _mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height ); extern void -gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height ); +_mesa_set_viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height ); extern void _mesa_DepthRange( GLclampd nearval, GLclampd farval ); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index ca1a758..c40049d 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1,4 +1,4 @@ -/* $Id: mtypes.h,v 1.22 2001/02/28 00:27:48 brianp Exp $ */ +/* $Id: mtypes.h,v 1.23 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1645,7 +1645,7 @@ do { \ #define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval) \ do { \ if (ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) { \ - gl_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \ + _mesa_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \ return retval; \ } \ } while (0) diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index 2257507..3b4cada 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -1,4 +1,4 @@ -/* $Id: pixel.c,v 1.25 2001/02/27 16:42:01 brianp Exp $ */ +/* $Id: pixel.c,v 1.26 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -88,7 +88,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_PACK_ROW_LENGTH: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Pack.RowLength == param) @@ -98,7 +98,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_PACK_IMAGE_HEIGHT: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Pack.ImageHeight == param) @@ -108,7 +108,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_PACK_SKIP_PIXELS: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Pack.SkipPixels == param) @@ -118,7 +118,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_PACK_SKIP_ROWS: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Pack.SkipRows == param) @@ -128,7 +128,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_PACK_SKIP_IMAGES: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Pack.SkipImages == param) @@ -138,7 +138,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_PACK_ALIGNMENT: if (param!=1 && param!=2 && param!=4 && param!=8) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Pack.Alignment == param) @@ -164,7 +164,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_UNPACK_ROW_LENGTH: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Unpack.RowLength == param) @@ -174,7 +174,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_UNPACK_IMAGE_HEIGHT: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Unpack.ImageHeight == param) @@ -185,7 +185,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_UNPACK_SKIP_PIXELS: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Unpack.SkipPixels == param) @@ -195,7 +195,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_UNPACK_SKIP_ROWS: if (param<0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Unpack.SkipRows == param) @@ -205,7 +205,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_UNPACK_SKIP_IMAGES: if (param < 0) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); return; } if (ctx->Unpack.SkipImages == param) @@ -215,7 +215,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) break; case GL_UNPACK_ALIGNMENT: if (param!=1 && param!=2 && param!=4 && param!=8) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelStore" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore" ); return; } if (ctx->Unpack.Alignment == param) @@ -224,7 +224,7 @@ _mesa_PixelStorei( GLenum pname, GLint param ) ctx->Unpack.Alignment = param; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glPixelStore" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glPixelStore" ); return; } } @@ -252,7 +252,7 @@ _mesa_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (mapsize<0 || mapsize>MAX_PIXEL_MAP_TABLE) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" ); return; } @@ -267,7 +267,7 @@ _mesa_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) } } if (!ok) { - gl_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" ); return; } } @@ -344,7 +344,7 @@ _mesa_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glPixelMapfv(map)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glPixelMapfv(map)" ); } } @@ -433,7 +433,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values ) MEMCPY(values,ctx->Pixel.MapAtoA,ctx->Pixel.MapAtoAsize*sizeof(GLfloat)); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); } } @@ -493,7 +493,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values ) } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); } } @@ -557,7 +557,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values ) } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); } } @@ -760,7 +760,7 @@ _mesa_PixelTransferf( GLenum pname, GLfloat param ) ctx->Pixel.PostConvolutionBias[2] = param; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glPixelTransfer(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glPixelTransfer(pname)" ); return; } } @@ -1043,7 +1043,7 @@ _mesa_lookup_rgba(const struct gl_color_table *table, } break; default: - gl_problem(NULL, "Bad format in _mesa_lookup_rgba"); + _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba"); return; } } diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index 4178835..895bf75 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -1,4 +1,4 @@ -/* $Id: points.c,v 1.28 2001/01/14 06:14:21 keithw Exp $ */ +/* $Id: points.c,v 1.29 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -46,7 +46,7 @@ _mesa_PointSize( GLfloat size ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (size <= 0.0) { - gl_error( ctx, GL_INVALID_VALUE, "glPointSize" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPointSize" ); return; } @@ -110,7 +110,7 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params) break; case GL_POINT_SIZE_MIN_EXT: if (*params < 0.0F) { - gl_error( ctx, GL_INVALID_VALUE, "glPointParameterfvEXT" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPointParameterfvEXT" ); return; } if (ctx->Point.MinSize == *params) @@ -120,7 +120,7 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params) break; case GL_POINT_SIZE_MAX_EXT: if (*params < 0.0F) { - gl_error( ctx, GL_INVALID_VALUE, "glPointParameterfvEXT" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPointParameterfvEXT" ); return; } if (ctx->Point.MaxSize == *params) @@ -130,7 +130,7 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params) break; case GL_POINT_FADE_THRESHOLD_SIZE_EXT: if (*params < 0.0F) { - gl_error( ctx, GL_INVALID_VALUE, "glPointParameterfvEXT" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPointParameterfvEXT" ); return; } if (ctx->Point.Threshold == *params) @@ -139,7 +139,7 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params) ctx->Point.Threshold = *params; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glPointParameterfvEXT" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glPointParameterfvEXT" ); return; } diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index a0d103f..396c897 100644 --- a/src/mesa/main/polygon.c +++ b/src/mesa/main/polygon.c @@ -1,4 +1,4 @@ -/* $Id: polygon.c,v 1.18 2001/01/23 23:39:36 brianp Exp $ */ +/* $Id: polygon.c,v 1.19 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -47,10 +47,10 @@ _mesa_CullFace( GLenum mode ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE&VERBOSE_API) - fprintf(stderr, "glCullFace %s\n", gl_lookup_enum_by_nr(mode)); + fprintf(stderr, "glCullFace %s\n", _mesa_lookup_enum_by_nr(mode)); if (mode!=GL_FRONT && mode!=GL_BACK && mode!=GL_FRONT_AND_BACK) { - gl_error( ctx, GL_INVALID_ENUM, "glCullFace" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCullFace" ); return; } @@ -73,10 +73,10 @@ _mesa_FrontFace( GLenum mode ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE&VERBOSE_API) - fprintf(stderr, "glFrontFace %s\n", gl_lookup_enum_by_nr(mode)); + fprintf(stderr, "glFrontFace %s\n", _mesa_lookup_enum_by_nr(mode)); if (mode!=GL_CW && mode!=GL_CCW) { - gl_error( ctx, GL_INVALID_ENUM, "glFrontFace" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glFrontFace" ); return; } @@ -102,11 +102,11 @@ _mesa_PolygonMode( GLenum face, GLenum mode ) if (MESA_VERBOSE&VERBOSE_API) fprintf(stderr, "glPolygonMode %s %s\n", - gl_lookup_enum_by_nr(face), - gl_lookup_enum_by_nr(mode)); + _mesa_lookup_enum_by_nr(face), + _mesa_lookup_enum_by_nr(mode)); if (mode!=GL_POINT && mode!=GL_LINE && mode!=GL_FILL) { - gl_error( ctx, GL_INVALID_ENUM, "glPolygonMode(mode)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(mode)" ); return; } @@ -132,7 +132,7 @@ _mesa_PolygonMode( GLenum face, GLenum mode ) ctx->Polygon.BackMode = mode; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glPolygonMode(face)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(face)" ); return; } diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c index c2f2226..730d925 100644 --- a/src/mesa/main/rastpos.c +++ b/src/mesa/main/rastpos.c @@ -1,4 +1,4 @@ -/* $Id: rastpos.c,v 1.20 2001/01/23 23:39:36 brianp Exp $ */ +/* $Id: rastpos.c,v 1.21 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -247,7 +247,7 @@ raster_pos4f(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FLUSH_CURRENT(ctx, 0); if (ctx->NewState) - gl_update_state( ctx ); + _mesa_update_state( ctx ); ASSIGN_4V( v, x, y, z, w ); TRANSFORM_POINT( eye, ctx->ModelView.m, v ); @@ -331,7 +331,7 @@ raster_pos4f(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) } if (ctx->RenderMode==GL_SELECT) { - gl_update_hitflag( ctx, ctx->Current.RasterPos[2] ); + _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); } } diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index badf180..4bd1ade 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -1,4 +1,4 @@ -/* $Id: state.c,v 1.59 2001/02/20 16:42:25 brianp Exp $ */ +/* $Id: state.c,v 1.60 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -88,7 +88,7 @@ static int generic_noop(void) { #ifdef DEBUG - gl_problem(NULL, "undefined function dispatch"); + _mesa_problem(NULL, "undefined function dispatch"); #endif return 0; } @@ -557,7 +557,7 @@ update_tnl_spaces( GLcontext *ctx, GLuint oldneedeyecoords ) */ update_modelview_scale(ctx); calculate_model_project_matrix(ctx); - gl_compute_light_positions( ctx ); + _mesa_compute_light_positions( ctx ); if (ctx->Driver.LightingSpaceChange) ctx->Driver.LightingSpaceChange( ctx ); @@ -575,7 +575,7 @@ update_tnl_spaces( GLcontext *ctx, GLuint oldneedeyecoords ) calculate_model_project_matrix(ctx); if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW)) - gl_compute_light_positions( ctx ); + _mesa_compute_light_positions( ctx ); } } @@ -621,7 +621,7 @@ update_projection( GLcontext *ctx ) GLuint p; for (p = 0; p < ctx->Const.MaxClipPlanes; p++) { if (ctx->Transform.ClipEnabled[p]) { - gl_transform_vector( ctx->Transform._ClipUserPlane[p], + _mesa_transform_vector( ctx->Transform._ClipUserPlane[p], ctx->Transform.EyeUserPlane[p], ctx->ProjectionMatrix.inv ); } @@ -867,13 +867,13 @@ update_texture_state( GLcontext *ctx ) * _NeedEyeCoords is calculated from within _mesa_update_tnl_spaces(), * and from nowhere else. */ -void gl_update_state( GLcontext *ctx ) +void _mesa_update_state( GLcontext *ctx ) { const GLuint new_state = ctx->NewState; const GLuint oldneedeyecoords = ctx->_NeedEyeCoords; if (MESA_VERBOSE & VERBOSE_STATE) - gl_print_state("", new_state); + _mesa_print_state("", new_state); if (new_state & _NEW_MODELVIEW) _math_matrix_analyse( &ctx->ModelView ); @@ -906,7 +906,7 @@ void gl_update_state( GLcontext *ctx ) /* Contributes to NeedEyeCoords, NeedNormals. */ if (new_state & _NEW_LIGHT) - gl_update_lighting( ctx ); + _mesa_update_lighting( ctx ); /* We can light in object space if the modelview matrix preserves * lengths and relative angles. diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h index 1352f34..8a45096 100644 --- a/src/mesa/main/state.h +++ b/src/mesa/main/state.h @@ -1,4 +1,4 @@ -/* $Id: state.h,v 1.5 2000/11/22 07:32:17 joukj Exp $ */ +/* $Id: state.h,v 1.6 2001/03/03 20:33:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -38,13 +38,13 @@ extern void _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize); extern void -gl_update_state( GLcontext *ctx ); +_mesa_update_state( GLcontext *ctx ); extern void -gl_print_state( const char *msg, GLuint state ); +_mesa_print_state( const char *msg, GLuint state ); extern void -gl_print_enable_flags( const char *msg, GLuint flags ); +_mesa_print_enable_flags( const char *msg, GLuint flags ); #endif diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c index 6775d58..1520fe8 100644 --- a/src/mesa/main/stencil.c +++ b/src/mesa/main/stencil.c @@ -1,4 +1,4 @@ -/* $Id: stencil.c,v 1.24 2000/12/26 05:09:29 keithw Exp $ */ +/* $Id: stencil.c,v 1.25 2001/03/03 20:33:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -78,7 +78,7 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask ) case GL_ALWAYS: break; default: - gl_error( ctx, GL_INVALID_ENUM, "glStencilFunc" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glStencilFunc" ); return; } @@ -143,7 +143,7 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) } /* FALL-THROUGH */ default: - gl_error(ctx, GL_INVALID_ENUM, "glStencilOp"); + _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp"); return; } switch (zfail) { @@ -161,7 +161,7 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) } /* FALL-THROUGH */ default: - gl_error(ctx, GL_INVALID_ENUM, "glStencilOp"); + _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp"); return; } switch (zpass) { @@ -179,7 +179,7 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) } /* FALL-THROUGH */ default: - gl_error(ctx, GL_INVALID_ENUM, "glStencilOp"); + _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp"); return; } diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index e98a99c..87ed959 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1,4 +1,4 @@ -/* $Id: teximage.c,v 1.80 2001/02/27 22:16:27 brianp Exp $ */ +/* $Id: teximage.c,v 1.81 2001/03/03 20:33:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -81,7 +81,7 @@ static void PrintTexture(const struct gl_texture_image *img) c = 4; break; default: - gl_problem(NULL, "error in PrintTexture\n"); + _mesa_problem(NULL, "error in PrintTexture\n"); return; } @@ -349,7 +349,7 @@ set_tex_image(struct gl_texture_object *tObj, tObj->NegZ[level] = texImage; return; default: - gl_problem(NULL, "bad target in set_tex_image()"); + _mesa_problem(NULL, "bad target in set_tex_image()"); return; } } @@ -424,7 +424,7 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit, return ctx->Extensions.ARB_texture_cube_map ? ctx->Texture.ProxyCubeMap : NULL; default: - gl_problem(NULL, "bad target in _mesa_select_tex_object()"); + _mesa_problem(NULL, "bad target in _mesa_select_tex_object()"); return NULL; } } @@ -488,7 +488,7 @@ _mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit, else return NULL; default: - gl_problem(ctx, "bad target in _mesa_select_tex_image()"); + _mesa_problem(ctx, "bad target in _mesa_select_tex_image()"); return NULL; } } @@ -638,7 +638,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (dimensions == 1) { isProxy = (GLboolean) (target == GL_PROXY_TEXTURE_1D); if (target != GL_TEXTURE_1D && !isProxy) { - gl_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" ); return GL_TRUE; } } @@ -649,19 +649,19 @@ texture_error_check( GLcontext *ctx, GLenum target, !(ctx->Extensions.ARB_texture_cube_map && target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB)) { - gl_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" ); return GL_TRUE; } } else if (dimensions == 3) { isProxy = (GLboolean) (target == GL_PROXY_TEXTURE_3D); if (target != GL_TEXTURE_3D && !isProxy) { - gl_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" ); return GL_TRUE; } } else { - gl_problem( ctx, "bad dims in texture_error_check" ); + _mesa_problem( ctx, "bad dims in texture_error_check" ); return GL_TRUE; } @@ -670,7 +670,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (!isProxy) { char message[100]; sprintf(message, "glTexImage%dD(border=%d)", dimensions, border); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); } return GL_TRUE; } @@ -681,7 +681,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (!isProxy) { char message[100]; sprintf(message, "glTexImage%dD(width=%d)", dimensions, width); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); } return GL_TRUE; } @@ -693,7 +693,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (!isProxy) { char message[100]; sprintf(message, "glTexImage%dD(height=%d)", dimensions, height); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); } return GL_TRUE; } @@ -704,7 +704,7 @@ texture_error_check( GLcontext *ctx, GLenum target, target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { if (width != height) { if (!isProxy) { - gl_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)"); } return GL_TRUE; } @@ -717,7 +717,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (!isProxy) { char message[100]; sprintf(message, "glTexImage3D(depth=%d)", depth ); - gl_error( ctx, GL_INVALID_VALUE, message ); + _mesa_error( ctx, GL_INVALID_VALUE, message ); } return GL_TRUE; } @@ -728,7 +728,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (!isProxy) { char message[100]; sprintf(message, "glTexImage%dD(level=%d)", dimensions, level); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); } return GL_TRUE; } @@ -737,7 +737,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { if (width != height) { - gl_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)"); return GL_TRUE; } } @@ -748,7 +748,7 @@ texture_error_check( GLcontext *ctx, GLenum target, char message[100]; sprintf(message, "glTexImage%dD(internalFormat=0x%x)", dimensions, internalFormat); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); } return GL_TRUE; } @@ -761,7 +761,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (!isProxy) { char message[100]; sprintf(message, "glTexImage%dD(format or type)", dimensions); - gl_error(ctx, GL_INVALID_OPERATION, message); + _mesa_error(ctx, GL_INVALID_OPERATION, message); } return GL_TRUE; } @@ -791,7 +791,7 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions, if (dimensions == 1) { if (target != GL_TEXTURE_1D) { - gl_error( ctx, GL_INVALID_ENUM, "glTexSubImage1D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage1D(target)" ); return GL_TRUE; } } @@ -800,84 +800,84 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions, if ((target < GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB || target > GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) && target != GL_TEXTURE_2D) { - gl_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" ); return GL_TRUE; } } else if (target != GL_TEXTURE_2D) { - gl_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" ); return GL_TRUE; } } else if (dimensions == 3) { if (target != GL_TEXTURE_3D) { - gl_error( ctx, GL_INVALID_ENUM, "glTexSubImage3D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage3D(target)" ); return GL_TRUE; } } else { - gl_problem( ctx, "bad dims in texture_error_check" ); + _mesa_problem( ctx, "bad dims in texture_error_check" ); return GL_TRUE; } if (level < 0 || level >= ctx->Const.MaxTextureLevels) { char message[100]; sprintf(message, "glTexSubImage2D(level=%d)", level); - gl_error(ctx, GL_INVALID_ENUM, message); + _mesa_error(ctx, GL_INVALID_ENUM, message); return GL_TRUE; } if (width < 0) { char message[100]; sprintf(message, "glTexSubImage%dD(width=%d)", dimensions, width); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } if (height < 0 && dimensions > 1) { char message[100]; sprintf(message, "glTexSubImage%dD(height=%d)", dimensions, height); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } if (depth < 0 && dimensions > 2) { char message[100]; sprintf(message, "glTexSubImage%dD(depth=%d)", dimensions, depth); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } destTex = _mesa_select_tex_image(ctx, texUnit, target, level); if (!destTex) { - gl_error(ctx, GL_INVALID_OPERATION, "glTexSubImage2D"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glTexSubImage2D"); return GL_TRUE; } if (xoffset < -((GLint)destTex->Border)) { - gl_error(ctx, GL_INVALID_VALUE, "glTexSubImage1/2/3D(xoffset)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage1/2/3D(xoffset)"); return GL_TRUE; } if (xoffset + width > (GLint) (destTex->Width + destTex->Border)) { - gl_error(ctx, GL_INVALID_VALUE, "glTexSubImage1/2/3D(xoffset+width)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage1/2/3D(xoffset+width)"); return GL_TRUE; } if (dimensions > 1) { if (yoffset < -((GLint)destTex->Border)) { - gl_error(ctx, GL_INVALID_VALUE, "glTexSubImage2/3D(yoffset)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage2/3D(yoffset)"); return GL_TRUE; } if (yoffset + height > (GLint) (destTex->Height + destTex->Border)) { - gl_error(ctx, GL_INVALID_VALUE, "glTexSubImage2/3D(yoffset+height)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage2/3D(yoffset+height)"); return GL_TRUE; } } if (dimensions > 2) { if (zoffset < -((GLint)destTex->Border)) { - gl_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset)"); return GL_TRUE; } if (zoffset + depth > (GLint) (destTex->Depth+destTex->Border)) { - gl_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset+depth)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset+depth)"); return GL_TRUE; } } @@ -886,7 +886,7 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions, if (!_mesa_is_legal_format_and_type(format, type)) { char message[100]; sprintf(message, "glTexSubImage%dD(format or type)", dimensions); - gl_error(ctx, GL_INVALID_ENUM, message); + _mesa_error(ctx, GL_INVALID_ENUM, message); return GL_TRUE; } } @@ -909,7 +909,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, if (dimensions == 1) { if (target != GL_TEXTURE_1D) { - gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage1D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexImage1D(target)" ); return GL_TRUE; } } @@ -918,12 +918,12 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, if ((target < GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB || target > GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) && target != GL_TEXTURE_2D) { - gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" ); return GL_TRUE; } } else if (target != GL_TEXTURE_2D) { - gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" ); return GL_TRUE; } } @@ -932,7 +932,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, if (border!=0 && border!=1) { char message[100]; sprintf(message, "glCopyTexImage%dD(border)", dimensions); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } @@ -941,7 +941,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, || logbase2( width - 2 * border ) < 0) { char message[100]; sprintf(message, "glCopyTexImage%dD(width=%d)", dimensions, width); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } @@ -951,7 +951,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, || logbase2( height - 2 * border ) < 0) { char message[100]; sprintf(message, "glCopyTexImage%dD(height=%d)", dimensions, height); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } } @@ -960,7 +960,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { if (width != height) { - gl_error(ctx, GL_INVALID_VALUE, "glCopyTexImage2D(width != height)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glCopyTexImage2D(width != height)"); return GL_TRUE; } } @@ -969,7 +969,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, if (level<0 || level>=ctx->Const.MaxTextureLevels) { char message[100]; sprintf(message, "glCopyTexImage%dD(level=%d)", dimensions, level); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } @@ -977,7 +977,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, if (iformat < 0) { char message[100]; sprintf(message, "glCopyTexImage%dD(internalFormat)", dimensions); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } @@ -997,7 +997,7 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions, if (dimensions == 1) { if (target != GL_TEXTURE_1D) { - gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage1D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage1D(target)" ); return GL_TRUE; } } @@ -1006,18 +1006,18 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions, if ((target < GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB || target > GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) && target != GL_TEXTURE_2D) { - gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" ); return GL_TRUE; } } else if (target != GL_TEXTURE_2D) { - gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" ); return GL_TRUE; } } else if (dimensions == 3) { if (target != GL_TEXTURE_3D) { - gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage3D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage3D(target)" ); return GL_TRUE; } } @@ -1025,20 +1025,20 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions, if (level < 0 || level >= ctx->Const.MaxTextureLevels) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(level=%d)", dimensions, level); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } if (width < 0) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(width=%d)", dimensions, width); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } if (dimensions > 1 && height < 0) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(height=%d)", dimensions, height); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } @@ -1046,34 +1046,34 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions, if (!teximage) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(undefined texture)", dimensions); - gl_error(ctx, GL_INVALID_OPERATION, message); + _mesa_error(ctx, GL_INVALID_OPERATION, message); return GL_TRUE; } if (xoffset < -((GLint)teximage->Border)) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(xoffset=%d)", dimensions, xoffset); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } if (xoffset+width > (GLint) (teximage->Width+teximage->Border)) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(xoffset+width)", dimensions); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } if (dimensions > 1) { if (yoffset < -((GLint)teximage->Border)) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(yoffset=%d)", dimensions, yoffset); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } /* NOTE: we're adding the border here, not subtracting! */ if (yoffset+height > (GLint) (teximage->Height+teximage->Border)) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(yoffset+height)", dimensions); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } } @@ -1082,13 +1082,13 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions, if (zoffset < -((GLint)teximage->Border)) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(zoffset)", dimensions); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } if (zoffset > (GLint) (teximage->Depth+teximage->Border)) { char message[100]; sprintf(message, "glCopyTexSubImage%dD(zoffset+depth)", dimensions); - gl_error(ctx, GL_INVALID_VALUE, message); + _mesa_error(ctx, GL_INVALID_VALUE, message); return GL_TRUE; } } @@ -1111,27 +1111,27 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (level < 0 || level >= ctx->Const.MaxTextureLevels) { - gl_error( ctx, GL_INVALID_VALUE, "glGetTexImage(level)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glGetTexImage(level)" ); return; } if (_mesa_sizeof_type(type) <= 0) { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexImage(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(type)" ); return; } if (_mesa_components_in_format(format) <= 0 || format == GL_STENCIL_INDEX) { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" ); return; } if (!ctx->Extensions.EXT_paletted_texture && is_index_format(format)) { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); } if (!ctx->Extensions.SGIX_depth_texture && format == GL_DEPTH_COMPONENT) { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); } /* XXX what if format/type doesn't match texture format/type? */ @@ -1142,7 +1142,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format, texUnit = &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]); texObj = _mesa_select_tex_object(ctx, texUnit, target); if (!texObj || is_proxy_target(target)) { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)"); return; } @@ -1158,7 +1158,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format, } if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); if (is_color_format(format) && ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) { @@ -1170,13 +1170,13 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format, GLfloat *tmpImage, *convImage; tmpImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); return; } convImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!convImage) { FREE(tmpImage); - gl_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); return; } @@ -1323,7 +1323,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, texImage = _mesa_alloc_texture_image(); texObj->Image[level] = texImage; if (!texImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); return; } } @@ -1337,7 +1337,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, border, internalFormat); if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); ASSERT(ctx->Driver.TexImage1D); if (pixels) { @@ -1391,7 +1391,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, } } else { - gl_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" ); return; } } @@ -1435,7 +1435,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, texImage = _mesa_alloc_texture_image(); set_tex_image(texObj, target, level, texImage); if (!texImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); return; } } @@ -1449,7 +1449,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, border, internalFormat); if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); ASSERT(ctx->Driver.TexImage2D); if (pixels) { @@ -1503,7 +1503,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, } } else { - gl_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" ); return; } } @@ -1540,7 +1540,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, texImage = _mesa_alloc_texture_image(); texObj->Image[level] = texImage; if (!texImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D"); return; } } @@ -1553,7 +1553,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, internalFormat); if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); ASSERT(ctx->Driver.TexImage3D); if (pixels) { @@ -1607,7 +1607,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, } } else { - gl_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" ); return; } } @@ -1638,7 +1638,7 @@ _mesa_TexSubImage1D( GLenum target, GLint level, struct gl_texture_image *texImage; if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); /* XXX should test internal format */ if (is_color_format(format)) { @@ -1680,7 +1680,7 @@ _mesa_TexSubImage2D( GLenum target, GLint level, struct gl_texture_image *texImage; if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); /* XXX should test internal format */ if (is_color_format(format)) { @@ -1723,7 +1723,7 @@ _mesa_TexSubImage3D( GLenum target, GLint level, struct gl_texture_image *texImage; if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); if (subtexture_error_check(ctx, 3, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type)) { @@ -1763,7 +1763,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); if (is_color_format(internalFormat)) { _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL); @@ -1780,7 +1780,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, texImage = _mesa_alloc_texture_image(); set_tex_image(texObj, target, level, texImage); if (!texImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D"); return; } } @@ -1819,7 +1819,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); if (is_color_format(internalFormat)) { _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, @@ -1837,7 +1837,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, texImage = _mesa_alloc_texture_image(); set_tex_image(texObj, target, level, texImage); if (!texImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D"); return; } } @@ -1871,7 +1871,7 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); /* XXX should test internal format */ _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL); @@ -1897,7 +1897,7 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); /* XXX should test internal format */ _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, &postConvHeight); @@ -1924,7 +1924,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->NewState & _NEW_PIXEL) - gl_update_state(ctx); + _mesa_update_state(ctx); /* XXX should test internal format */ _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, &postConvHeight); @@ -1958,7 +1958,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, case GL_COMPRESSED_INTENSITY_ARB: case GL_COMPRESSED_RGB_ARB: case GL_COMPRESSED_RGBA_ARB: - gl_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage1DARB"); + _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage1DARB"); return; default: /* silence compiler warning */ @@ -1983,7 +1983,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, texImage = _mesa_alloc_texture_image(); texObj->Image[level] = texImage; if (!texImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB"); return; } } @@ -2031,7 +2031,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, } } else { - gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage1DARB(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage1DARB(target)" ); return; } } @@ -2053,7 +2053,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, case GL_COMPRESSED_INTENSITY_ARB: case GL_COMPRESSED_RGB_ARB: case GL_COMPRESSED_RGBA_ARB: - gl_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage2DARB"); + _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage2DARB"); return; default: /* silence compiler warning */ @@ -2081,7 +2081,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, texImage = _mesa_alloc_texture_image(); texObj->Image[level] = texImage; if (!texImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB"); return; } } @@ -2130,7 +2130,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, } } else { - gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage2DARB(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage2DARB(target)" ); return; } } @@ -2152,7 +2152,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, case GL_COMPRESSED_INTENSITY_ARB: case GL_COMPRESSED_RGB_ARB: case GL_COMPRESSED_RGBA_ARB: - gl_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage3DARB"); + _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage3DARB"); return; default: /* silence compiler warning */ @@ -2177,7 +2177,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, texImage = _mesa_alloc_texture_image(); texObj->Image[level] = texImage; if (!texImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB"); return; } } @@ -2227,7 +2227,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, } } else { - gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage3DARB(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage3DARB(target)" ); return; } } @@ -2346,12 +2346,12 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (level < 0 || level >= ctx->Const.MaxTextureLevels) { - gl_error( ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)" ); return; } if (is_proxy_target(target)) { - gl_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)"); return; } @@ -2361,12 +2361,12 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img) if (!texImage) { /* invalid mipmap level */ - gl_error(ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)"); return; } if (!texImage->IsCompressed) { - gl_error(ctx, GL_INVALID_OPERATION, "glGetCompressedTexImageARB"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetCompressedTexImageARB"); return; } diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 8881083..3f0aa19 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1,4 +1,4 @@ -/* $Id: texobj.c,v 1.41 2001/02/26 18:25:25 brianp Exp $ */ +/* $Id: texobj.c,v 1.42 2001/03/03 20:33:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -405,7 +405,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx, } else { /* Dimensions = ??? */ - gl_problem(ctx, "Bug in gl_test_texture_object_completeness\n"); + _mesa_problem(ctx, "Bug in gl_test_texture_object_completeness\n"); } } } @@ -426,7 +426,7 @@ _mesa_GenTextures( GLsizei n, GLuint *texName ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (n < 0) { - gl_error( ctx, GL_INVALID_VALUE, "glGenTextures" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glGenTextures" ); return; } @@ -531,7 +531,7 @@ _mesa_BindTexture( GLenum target, GLuint texName ) if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) fprintf(stderr, "glBindTexture %s %d\n", - gl_lookup_enum_by_nr(target), (GLint) texName); + _mesa_lookup_enum_by_nr(target), (GLint) texName); switch (target) { case GL_TEXTURE_1D: @@ -554,7 +554,7 @@ _mesa_BindTexture( GLenum target, GLuint texName ) } /* fallthrough */ default: - gl_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" ); return; } @@ -591,7 +591,7 @@ _mesa_BindTexture( GLenum target, GLuint texName ) /* error checking */ if (newTexObj->Dimensions > 0 && newTexObj->Dimensions != targetDim) { /* the named texture object's dimensions don't match the target */ - gl_error( ctx, GL_INVALID_OPERATION, "glBindTexture" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glBindTexture" ); return; } } @@ -600,7 +600,7 @@ _mesa_BindTexture( GLenum target, GLuint texName ) newTexObj = _mesa_alloc_texture_object( ctx->Shared, texName, targetDim); if (!newTexObj) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glBindTexture"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindTexture"); return; } } @@ -628,7 +628,7 @@ _mesa_BindTexture( GLenum target, GLuint texName ) texUnit->CurrentCubeMap = newTexObj; break; default: - gl_problem(ctx, "bad target in BindTexture"); + _mesa_problem(ctx, "bad target in BindTexture"); } /* Pass BindTexture call to device driver */ @@ -661,7 +661,7 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (n < 0) { - gl_error( ctx, GL_INVALID_VALUE, "glPrioritizeTextures" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glPrioritizeTextures" ); return; } @@ -698,7 +698,7 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName, ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); if (n < 0) { - gl_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(n)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(n)"); return GL_FALSE; } @@ -708,7 +708,7 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName, for (i = 0; i < n; i++) { struct gl_texture_object *t; if (texName[i] == 0) { - gl_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)"); return GL_FALSE; } t = (struct gl_texture_object *) @@ -724,7 +724,7 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName, } } else { - gl_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)"); return GL_FALSE; } } diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 7fbf2b7..91763dc 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,4 +1,4 @@ -/* $Id: texstate.c,v 1.34 2001/02/28 19:31:39 brianp Exp $ */ +/* $Id: texstate.c,v 1.35 2001/03/03 20:33:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -77,13 +77,13 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) switch (mode) { case GL_ADD: if (!ctx->Extensions.EXT_texture_env_add) { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)"); return; } break; case GL_COMBINE_EXT: if (!ctx->Extensions.EXT_texture_env_combine) { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)"); return; } break; @@ -93,7 +93,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) case GL_REPLACE: break; default: - gl_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" ); return; } @@ -128,12 +128,12 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) case GL_DOT3_RGB_EXT: case GL_DOT3_RGBA_EXT: if (!ctx->Extensions.EXT_texture_env_dot3) { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)"); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } if (texUnit->CombineModeRGB == mode) @@ -142,7 +142,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineModeRGB = mode; } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } case GL_COMBINE_ALPHA_EXT: @@ -160,12 +160,12 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineModeA = mode; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; @@ -186,12 +186,12 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineSourceRGB[s] = source; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; @@ -211,12 +211,12 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineSourceA[s] = source; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; @@ -236,12 +236,12 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineOperandRGB[s] = operand; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; @@ -259,12 +259,12 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineOperandA[pname-GL_OPERAND0_ALPHA_EXT] = operand; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; @@ -278,12 +278,12 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) FLUSH_VERTICES(ctx, _NEW_TEXTURE); texUnit->CombineOperandRGB[2] = operand; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; @@ -298,12 +298,12 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineOperandA[2] = operand; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; @@ -320,7 +320,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) newshift = 2; } else { - gl_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" ); return; } if (texUnit->CombineScaleShiftRGB == newshift) @@ -329,7 +329,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineScaleShiftRGB = newshift; } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; @@ -346,7 +346,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) newshift = 2; } else { - gl_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" ); return; } if (texUnit->CombineScaleShiftA == newshift) @@ -355,18 +355,18 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->CombineScaleShiftA = newshift; } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)"); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname)" ); return; } } else if (target==GL_TEXTURE_FILTER_CONTROL_EXT) { if (!ctx->Extensions.EXT_texture_lod_bias) { - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param)" ); return; } switch (pname) { @@ -377,21 +377,21 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) texUnit->LodBias = param[0]; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname)" ); return; } } else { - gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target)" ); return; } if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE)) fprintf(stderr, "glTexEnv %s %s %.1f(%s) ...\n", - gl_lookup_enum_by_nr(target), - gl_lookup_enum_by_nr(pname), + _mesa_lookup_enum_by_nr(target), + _mesa_lookup_enum_by_nr(pname), *param, - gl_lookup_enum_by_nr((GLenum) (GLint) *param)); + _mesa_lookup_enum_by_nr((GLenum) (GLint) *param)); /* Tell device driver about the new texture environment */ if (ctx->Driver.TexEnv) { @@ -438,7 +438,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (target!=GL_TEXTURE_ENV) { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" ); return; } @@ -459,7 +459,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) *params = 4.0; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); return; } break; @@ -473,12 +473,12 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) *params = 4.0; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)" ); } } @@ -491,7 +491,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (target != GL_TEXTURE_ENV) { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" ); return; } @@ -510,7 +510,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineModeRGB; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_COMBINE_ALPHA_EXT: @@ -518,7 +518,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineModeA; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_SOURCE0_RGB_EXT: @@ -526,7 +526,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineSourceRGB[0]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_SOURCE1_RGB_EXT: @@ -534,7 +534,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineSourceRGB[1]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_SOURCE2_RGB_EXT: @@ -542,7 +542,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineSourceRGB[2]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_SOURCE0_ALPHA_EXT: @@ -550,7 +550,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineSourceA[0]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_SOURCE1_ALPHA_EXT: @@ -558,7 +558,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineSourceA[1]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_SOURCE2_ALPHA_EXT: @@ -566,7 +566,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineSourceA[2]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_OPERAND0_RGB_EXT: @@ -574,7 +574,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineOperandRGB[0]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_OPERAND1_RGB_EXT: @@ -582,7 +582,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineOperandRGB[1]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_OPERAND2_RGB_EXT: @@ -590,7 +590,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineOperandRGB[2]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_OPERAND0_ALPHA_EXT: @@ -598,7 +598,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineOperandA[0]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_OPERAND1_ALPHA_EXT: @@ -606,7 +606,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineOperandA[1]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; case GL_OPERAND2_ALPHA_EXT: @@ -614,11 +614,11 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) texUnit->CombineOperandA[2]; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)" ); } } @@ -648,8 +648,8 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE)) fprintf(stderr, "texPARAM %s %s %d...\n", - gl_lookup_enum_by_nr(target), - gl_lookup_enum_by_nr(pname), + _mesa_lookup_enum_by_nr(target), + _mesa_lookup_enum_by_nr(pname), eparam); @@ -670,7 +670,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) } /* fallthrough */ default: - gl_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" ); return; } @@ -688,7 +688,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) texObj->MinFilter = eparam; } else { - gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); return; } break; @@ -701,7 +701,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) texObj->MagFilter = eparam; } else { - gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); return; } break; @@ -713,7 +713,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) texObj->WrapS = eparam; } else { - gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); return; } break; @@ -725,7 +725,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) texObj->WrapT = eparam; } else { - gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); return; } break; @@ -737,7 +737,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) texObj->WrapR = eparam; } else { - gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); } break; case GL_TEXTURE_BORDER_COLOR: @@ -754,14 +754,14 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) break; case GL_TEXTURE_BASE_LEVEL: if (params[0] < 0.0) { - gl_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); return; } texObj->BaseLevel = (GLint) params[0]; break; case GL_TEXTURE_MAX_LEVEL: if (params[0] < 0.0) { - gl_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); + _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); return; } texObj->MaxLevel = (GLint) params[0]; @@ -775,7 +775,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) texObj->CompareFlag = params[0] ? GL_TRUE : GL_FALSE; } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname)"); return; } break; @@ -787,11 +787,11 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) texObj->CompareOperator = op; } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexParameter(param)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(param)"); } } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname)"); return; } break; @@ -800,12 +800,12 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) UNCLAMPED_FLOAT_TO_CHAN(texObj->ShadowAmbient, params[0]); } else { - gl_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname)"); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexParameter(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(pname)" ); return; } @@ -864,7 +864,7 @@ tex_image_dimensions(GLcontext *ctx, GLenum target) case GL_PROXY_TEXTURE_CUBE_MAP_ARB: return ctx->Extensions.ARB_texture_cube_map ? 2 : 0; default: - gl_problem(ctx, "bad target in _mesa_tex_target_dimensions()"); + _mesa_problem(ctx, "bad target in _mesa_tex_target_dimensions()"); return 0; } } @@ -882,13 +882,13 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, ASSERT_OUTSIDE_BEGIN_END(ctx); if (level < 0 || level >= ctx->Const.MaxTextureLevels) { - gl_error( ctx, GL_INVALID_VALUE, "glGetTexLevelParameter[if]v" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glGetTexLevelParameter[if]v" ); return; } dimensions = tex_image_dimensions(ctx, target); /* 1, 2 or 3 */ if (dimensions == 0) { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(target)"); return; } @@ -950,7 +950,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, if (ctx->Extensions.SGIX_depth_texture) *params = img->DepthBits; else - gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)"); return; /* GL_ARB_texture_compression */ @@ -959,11 +959,11 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, if (img->IsCompressed && !isProxy) *params = img->CompressedSize; else - gl_error(ctx, GL_INVALID_OPERATION, + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexLevelParameter[if]v(pname)"); } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)"); } return; case GL_TEXTURE_COMPRESSED_ARB: @@ -971,12 +971,12 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, *params = (GLint) img->IsCompressed; } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)"); } return; default: - gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)"); } } @@ -992,7 +992,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) obj = _mesa_select_tex_object(ctx, texUnit, target); if (!obj) { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(target)"); return; } @@ -1048,7 +1048,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = (GLfloat) obj->CompareFlag; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" ); return; } break; @@ -1057,7 +1057,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = (GLfloat) obj->CompareOperator; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" ); return; } break; @@ -1066,12 +1066,12 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = CHAN_TO_FLOAT(obj->ShadowAmbient); } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)"); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" ); } } @@ -1086,7 +1086,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) obj = _mesa_select_tex_object(ctx, texUnit, target); if (!obj) { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(target)"); return; } @@ -1149,7 +1149,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) obj->CompareFlag; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" ); return; } break; @@ -1158,7 +1158,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) obj->CompareOperator; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" ); return; } break; @@ -1168,12 +1168,12 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) *params = CHAN_TO_FLOAT(obj->ShadowAmbient); } else { - gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)"); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" ); } } @@ -1195,8 +1195,8 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE)) fprintf(stderr, "texGEN %s %s %x...\n", - gl_lookup_enum_by_nr(coord), - gl_lookup_enum_by_nr(pname), + _mesa_lookup_enum_by_nr(coord), + _mesa_lookup_enum_by_nr(pname), *(int *)params); switch (coord) { @@ -1221,7 +1221,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) bits = TEXGEN_SPHERE_MAP; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); return; } if (texUnit->GenModeS == mode) @@ -1246,14 +1246,14 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) if (ctx->ModelView.flags & MAT_DIRTY_INVERSE) { _math_matrix_analyse( &ctx->ModelView ); } - gl_transform_vector( tmp, params, ctx->ModelView.inv ); + _mesa_transform_vector( tmp, params, ctx->ModelView.inv ); if (TEST_EQ_4V(texUnit->EyePlaneS, tmp)) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); COPY_4FV(texUnit->EyePlaneS, tmp); } else { - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); return; } break; @@ -1278,7 +1278,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) bitt = TEXGEN_SPHERE_MAP; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); return; } if (texUnit->GenModeT == mode) @@ -1302,14 +1302,14 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) if (ctx->ModelView.flags & MAT_DIRTY_INVERSE) { _math_matrix_analyse( &ctx->ModelView ); } - gl_transform_vector( tmp, params, ctx->ModelView.inv ); + _mesa_transform_vector( tmp, params, ctx->ModelView.inv ); if (TEST_EQ_4V(texUnit->EyePlaneT, tmp)) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); COPY_4FV(texUnit->EyePlaneT, tmp); } else { - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); return; } break; @@ -1331,7 +1331,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) bitr = TEXGEN_EYE_LINEAR; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); return; } if (texUnit->GenModeR == mode) @@ -1355,14 +1355,14 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) if (ctx->ModelView.flags & MAT_DIRTY_INVERSE) { _math_matrix_analyse( &ctx->ModelView ); } - gl_transform_vector( tmp, params, ctx->ModelView.inv ); + _mesa_transform_vector( tmp, params, ctx->ModelView.inv ); if (TEST_EQ_4V(texUnit->EyePlaneR, tmp)) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); COPY_4FV(texUnit->EyePlaneR, tmp); } else { - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); return; } break; @@ -1378,7 +1378,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) bitq = TEXGEN_EYE_LINEAR; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); return; } if (texUnit->GenModeQ == mode) @@ -1402,19 +1402,19 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) if (ctx->ModelView.flags & MAT_DIRTY_INVERSE) { _math_matrix_analyse( &ctx->ModelView ); } - gl_transform_vector( tmp, params, ctx->ModelView.inv ); + _mesa_transform_vector( tmp, params, ctx->ModelView.inv ); if (TEST_EQ_4V(texUnit->EyePlaneQ, tmp)) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); COPY_4FV(texUnit->EyePlaneQ, tmp); } else { - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(coord)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(coord)" ); return; } @@ -1490,7 +1490,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) COPY_4V( params, texUnit->EyePlaneS ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); return; } break; @@ -1505,7 +1505,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) COPY_4V( params, texUnit->EyePlaneT ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); return; } break; @@ -1520,7 +1520,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) COPY_4V( params, texUnit->EyePlaneR ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); return; } break; @@ -1535,12 +1535,12 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) COPY_4V( params, texUnit->EyePlaneQ ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(coord)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(coord)" ); return; } } @@ -1567,7 +1567,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) COPY_4V( params, texUnit->EyePlaneS ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); return; } break; @@ -1582,7 +1582,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) COPY_4V( params, texUnit->EyePlaneT ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); return; } break; @@ -1597,7 +1597,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) COPY_4V( params, texUnit->EyePlaneR ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); return; } break; @@ -1612,12 +1612,12 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) COPY_4V( params, texUnit->EyePlaneQ ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(coord)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(coord)" ); return; } } @@ -1650,7 +1650,7 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) params[3] = (GLint) texUnit->EyePlaneS[3]; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); return; } break; @@ -1671,7 +1671,7 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) params[3] = (GLint) texUnit->EyePlaneT[3]; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); return; } break; @@ -1692,7 +1692,7 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) params[3] = (GLint) texUnit->EyePlaneR[3]; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); return; } break; @@ -1713,12 +1713,12 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) params[3] = (GLint) texUnit->EyePlaneQ[3]; } else { - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); return; } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(coord)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(coord)" ); return; } } @@ -1734,10 +1734,10 @@ _mesa_ActiveTextureARB( GLenum target ) if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) fprintf(stderr, "glActiveTexture %s\n", - gl_lookup_enum_by_nr(target)); + _mesa_lookup_enum_by_nr(target)); if (texUnit > ctx->Const.MaxTextureUnits) { - gl_error(ctx, GL_INVALID_OPERATION, "glActiveTextureARB(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glActiveTextureARB(target)"); return; } @@ -1759,7 +1759,7 @@ _mesa_ClientActiveTextureARB( GLenum target ) ASSERT_OUTSIDE_BEGIN_END(ctx); if (texUnit > ctx->Const.MaxTextureUnits) { - gl_error(ctx, GL_INVALID_OPERATION, "glActiveTextureARB(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glActiveTextureARB(target)"); return; } diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index f1d6d10..37aadbc 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -1,4 +1,4 @@ -/* $Id: texstore.c,v 1.8 2001/02/21 16:02:27 brianp Exp $ */ +/* $Id: texstore.c,v 1.9 2001/03/03 20:33:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -132,7 +132,7 @@ fetch_1d_texel(const struct gl_texture_image *img, return; } default: - gl_problem(NULL, "Bad format in fetch_1d_texel"); + _mesa_problem(NULL, "Bad format in fetch_1d_texel"); } } @@ -217,7 +217,7 @@ fetch_2d_texel(const struct gl_texture_image *img, return; } default: - gl_problem(NULL, "Bad format in fetch_2d_texel"); + _mesa_problem(NULL, "Bad format in fetch_2d_texel"); } } @@ -313,7 +313,7 @@ fetch_3d_texel(const struct gl_texture_image *img, return; } default: - gl_problem(NULL, "Bad format in fetch_3d_texel"); + _mesa_problem(NULL, "Bad format in fetch_3d_texel"); } } @@ -443,7 +443,7 @@ set_teximage_component_sizes( struct gl_texture_image *texImage ) texImage->DepthBits = 8 * sizeof(GLfloat); break; default: - gl_problem(NULL, "unexpected format in set_teximage_component_sizes"); + _mesa_problem(NULL, "unexpected format in set_teximage_component_sizes"); } } @@ -687,12 +687,12 @@ _mesa_transfer_teximage(GLcontext *ctx, GLuint dimensions, GLfloat *tmpImage, *convImage; tmpImage = (GLfloat *) MALLOC(srcWidth * srcHeight * 4 * sizeof(GLfloat)); if (!tmpImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); return; } convImage = (GLfloat *) MALLOC(srcWidth * srcHeight * 4 * sizeof(GLfloat)); if (!convImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); FREE(tmpImage); return; } @@ -1029,7 +1029,7 @@ read_color_image( GLcontext *ctx, GLint x, GLint y, dst = image; stride = width * 4; for (i = 0; i < height; i++) { - gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y + i, + _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y + i, (GLchan (*)[4]) dst ); dst += stride; } @@ -1112,7 +1112,7 @@ _mesa_copy_teximage1d( GLcontext *ctx, GLenum target, GLint level, /* read depth image from framebuffer */ GLfloat *image = read_depth_image(ctx, x, y, width, 1); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D"); return; } @@ -1127,7 +1127,7 @@ _mesa_copy_teximage1d( GLcontext *ctx, GLenum target, GLint level, /* read RGBA image from framebuffer */ GLchan *image = read_color_image(ctx, x, y, width, 1); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D"); return; } @@ -1166,7 +1166,7 @@ _mesa_copy_teximage2d( GLcontext *ctx, GLenum target, GLint level, /* read depth image from framebuffer */ GLfloat *image = read_depth_image(ctx, x, y, width, height); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D"); return; } @@ -1181,7 +1181,7 @@ _mesa_copy_teximage2d( GLcontext *ctx, GLenum target, GLint level, /* read RGBA image from framebuffer */ GLchan *image = read_color_image(ctx, x, y, width, height); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D"); return; } @@ -1218,7 +1218,7 @@ _mesa_copy_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, /* read depth image from framebuffer */ GLfloat *image = read_depth_image(ctx, x, y, width, 1); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage1D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage1D"); return; } @@ -1231,7 +1231,7 @@ _mesa_copy_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, else { GLchan *image = read_color_image(ctx, x, y, width, 1); if (!image) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage1D" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage1D" ); return; } @@ -1269,7 +1269,7 @@ _mesa_copy_texsubimage2d( GLcontext *ctx, /* read depth image from framebuffer */ GLfloat *image = read_depth_image(ctx, x, y, width, height); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage2D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage2D"); return; } @@ -1284,7 +1284,7 @@ _mesa_copy_texsubimage2d( GLcontext *ctx, /* read RGBA image from framebuffer */ GLchan *image = read_color_image(ctx, x, y, width, height); if (!image) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage2D" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage2D" ); return; } @@ -1323,7 +1323,7 @@ _mesa_copy_texsubimage3d( GLcontext *ctx, /* read depth image from framebuffer */ GLfloat *image = read_depth_image(ctx, x, y, width, height); if (!image) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage3D"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage3D"); return; } @@ -1338,7 +1338,7 @@ _mesa_copy_texsubimage3d( GLcontext *ctx, /* read RGBA image from framebuffer */ GLchan *image = read_color_image(ctx, x, y, width, height); if (!image) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage3D" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage3D" ); return; } diff --git a/src/mesa/main/texutil.c b/src/mesa/main/texutil.c index 428af03..b0c6793 100644 --- a/src/mesa/main/texutil.c +++ b/src/mesa/main/texutil.c @@ -1,4 +1,4 @@ -/* $Id: texutil.c,v 1.11 2000/12/26 05:09:29 keithw Exp $ */ +/* $Id: texutil.c,v 1.12 2001/03/03 20:33:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1642,7 +1642,7 @@ _mesa_unconvert_teximage(MesaIntTexFormat srcFormat, } break; default: - gl_problem(NULL, "bad srcFormat in _mesa_uncovert_teximage()"); + _mesa_problem(NULL, "bad srcFormat in _mesa_uncovert_teximage()"); } } @@ -1683,5 +1683,5 @@ _mesa_set_teximage_component_sizes(MesaIntTexFormat mesaFormat, return; } } - gl_problem(NULL, "bad format in _mesa_set_teximage_component_sizes"); + _mesa_problem(NULL, "bad format in _mesa_set_teximage_component_sizes"); } diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 6d9f346..fdc2a90 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1,4 +1,4 @@ -/* $Id: varray.c,v 1.36 2001/01/05 05:31:42 keithw Exp $ */ +/* $Id: varray.c,v 1.37 2001/03/03 20:33:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -51,17 +51,17 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (size<2 || size>4) { - gl_error( ctx, GL_INVALID_VALUE, "glVertexPointer(size)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glVertexPointer(size)" ); return; } if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glVertexPointer(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glVertexPointer(stride)" ); return; } if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) fprintf(stderr, "glVertexPointer( sz %d type %s stride %d )\n", size, - gl_lookup_enum_by_nr( type ), + _mesa_lookup_enum_by_nr( type ), stride); ctx->Array.Vertex.StrideB = stride; @@ -80,7 +80,7 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.Vertex.StrideB = size*sizeof(GLdouble); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glVertexPointer(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexPointer(type)" ); return; } } @@ -105,13 +105,13 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr ) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glNormalPointer(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glNormalPointer(stride)" ); return; } if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) fprintf(stderr, "glNormalPointer( type %s stride %d )\n", - gl_lookup_enum_by_nr( type ), + _mesa_lookup_enum_by_nr( type ), stride); ctx->Array.Normal.StrideB = stride; @@ -133,7 +133,7 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr ) ctx->Array.Normal.StrideB = 3*sizeof(GLdouble); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glNormalPointer(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glNormalPointer(type)" ); return; } } @@ -156,17 +156,17 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (size<3 || size>4) { - gl_error( ctx, GL_INVALID_VALUE, "glColorPointer(size)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glColorPointer(size)" ); return; } if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glColorPointer(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glColorPointer(stride)" ); return; } if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) fprintf(stderr, "glColorPointer( sz %d type %s stride %d )\n", size, - gl_lookup_enum_by_nr( type ), + _mesa_lookup_enum_by_nr( type ), stride); ctx->Array.Color.StrideB = stride; @@ -197,7 +197,7 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.Color.StrideB = size*sizeof(GLdouble); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glColorPointer(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glColorPointer(type)" ); return; } } @@ -221,7 +221,7 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glFogCoordPointer(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glFogCoordPointer(stride)" ); return; } @@ -235,7 +235,7 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.FogCoord.StrideB = sizeof(GLdouble); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glFogCoordPointer(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glFogCoordPointer(type)" ); return; } } @@ -257,7 +257,7 @@ _mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glIndexPointer(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glIndexPointer(stride)" ); return; } @@ -280,7 +280,7 @@ _mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr) ctx->Array.Index.StrideB = sizeof(GLdouble); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glIndexPointer(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glIndexPointer(type)" ); return; } } @@ -303,17 +303,17 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (size != 3 && size != 4) { - gl_error( ctx, GL_INVALID_VALUE, "glColorPointer(size)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glColorPointer(size)" ); return; } if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glColorPointer(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glColorPointer(stride)" ); return; } if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) fprintf(stderr, "glColorPointer( sz %d type %s stride %d )\n", size, - gl_lookup_enum_by_nr( type ), + _mesa_lookup_enum_by_nr( type ), stride); ctx->Array.SecondaryColor.StrideB = stride; @@ -344,7 +344,7 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type, ctx->Array.SecondaryColor.StrideB = size*sizeof(GLdouble); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glSecondaryColorPointer(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glSecondaryColorPointer(type)" ); return; } } @@ -369,11 +369,11 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (size<1 || size>4) { - gl_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(size)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(size)" ); return; } if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(stride)" ); return; } @@ -381,7 +381,7 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr fprintf(stderr, "glTexCoordPointer( unit %u sz %d type %s stride %d )\n", texUnit, size, - gl_lookup_enum_by_nr( type ), + _mesa_lookup_enum_by_nr( type ), stride); ctx->Array.TexCoord[texUnit].StrideB = stride; @@ -400,7 +400,7 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ctx->Array.TexCoord[texUnit].StrideB = size*sizeof(GLdouble); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glTexCoordPointer(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glTexCoordPointer(type)" ); return; } } @@ -428,7 +428,7 @@ _mesa_EdgeFlagPointer(GLsizei stride, const void *vptr) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glEdgeFlagPointer(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glEdgeFlagPointer(stride)" ); return; } ctx->Array.EdgeFlag.Stride = stride; @@ -521,7 +521,7 @@ _mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer) c = f * ((4*sizeof(GLubyte) + (f-1)) / f); if (stride<0) { - gl_error( ctx, GL_INVALID_VALUE, "glInterleavedArrays(stride)" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glInterleavedArrays(stride)" ); return; } @@ -632,7 +632,7 @@ _mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer) defstride = 15*f; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glInterleavedArrays(format)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glInterleavedArrays(format)" ); return; } -- cgit v1.1