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/drivers/allegro/amesa.c | 2 +- src/mesa/drivers/d3d/D3Dvbrender.c | 2 +- src/mesa/drivers/dos/dosmesa.c | 7 +- src/mesa/drivers/ggi/ggimesa.c | 2 +- src/mesa/drivers/glide/fxapi.c | 2 +- src/mesa/drivers/glide/fxdd.c | 4 +- src/mesa/drivers/glide/fxddtex.c | 8 +- src/mesa/drivers/glide/fxdrv.h | 2 +- src/mesa/drivers/glide/fxsetup.c | 12 +- src/mesa/drivers/osmesa/osmesa.c | 8 +- src/mesa/drivers/svga/svgamesa.c | 4 +- src/mesa/drivers/windows/wmesa.c | 4 +- src/mesa/drivers/windows/wmesaBackup.c | 7 +- src/mesa/drivers/windows/wmesaOld.c | 5 +- src/mesa/drivers/windows/wmesa_stereo.c | 2 +- src/mesa/drivers/x11/xfonts.c | 6 +- src/mesa/drivers/x11/xm_api.c | 8 +- src/mesa/drivers/x11/xm_dd.c | 4 +- src/mesa/drivers/x11/xm_span.c | 14 +- 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 ++++---- src/mesa/math/m_clip_tmp.h | 30 ++-- src/mesa/math/m_copy_tmp.h | 34 ++--- src/mesa/math/m_debug_norm.c | 4 +- src/mesa/math/m_debug_xform.c | 10 +- src/mesa/math/m_vector.c | 56 ++++---- src/mesa/math/m_vector.h | 58 ++++---- src/mesa/math/m_xform.c | 18 +-- src/mesa/math/m_xform.h | 20 +-- src/mesa/math/m_xform_tmp.h | 4 +- src/mesa/swrast/s_aatritemp.h | 26 ++-- src/mesa/swrast/s_accum.c | 14 +- src/mesa/swrast/s_alpha.c | 4 +- src/mesa/swrast/s_alphabuf.c | 10 +- src/mesa/swrast/s_bitmap.c | 4 +- src/mesa/swrast/s_blend.c | 14 +- src/mesa/swrast/s_context.c | 4 +- src/mesa/swrast/s_copypix.c | 52 +++---- src/mesa/swrast/s_depth.c | 14 +- src/mesa/swrast/s_drawpix.c | 48 +++---- src/mesa/swrast/s_feedback.c | 32 ++--- src/mesa/swrast/s_feedback.h | 14 +- src/mesa/swrast/s_fog.c | 4 +- src/mesa/swrast/s_lines.c | 40 +++--- src/mesa/swrast/s_logic.c | 8 +- src/mesa/swrast/s_masking.c | 8 +- src/mesa/swrast/s_points.c | 6 +- src/mesa/swrast/s_readpix.c | 26 ++-- src/mesa/swrast/s_span.c | 18 +-- src/mesa/swrast/s_span.h | 18 +-- src/mesa/swrast/s_stencil.c | 12 +- src/mesa/swrast/s_texture.c | 56 ++++---- src/mesa/swrast/s_triangle.c | 101 +++++++------- src/mesa/swrast/s_triangle.h | 4 +- src/mesa/swrast/s_zoom.c | 38 ++--- src/mesa/swrast/s_zoom.h | 32 ++--- src/mesa/tnl/t_array_api.c | 20 +-- src/mesa/tnl/t_eval_api.c | 6 +- src/mesa/tnl/t_imm_api.c | 12 +- src/mesa/tnl/t_imm_dlist.c | 6 +- src/mesa/tnl/t_imm_exec.c | 26 ++-- src/mesa/tnl/t_imm_fixup.c | 6 +- src/mesa/tnl/t_vb_fog.c | 12 +- src/mesa/tnl/t_vb_light.c | 30 ++-- src/mesa/tnl/t_vb_lighttmp.h | 32 ++--- src/mesa/tnl/t_vb_normals.c | 6 +- src/mesa/tnl/t_vb_points.c | 6 +- src/mesa/tnl/t_vb_texgen.c | 28 ++-- src/mesa/tnl/t_vb_texmat.c | 6 +- src/mesa/tnl/t_vb_vertex.c | 18 +-- src/mesa/x86/3dnow.c | 20 +-- src/mesa/x86/3dnow.h | 6 +- src/mesa/x86/common_x86.c | 20 +-- src/mesa/x86/common_x86_asm.h | 6 +- src/mesa/x86/x86.c | 20 +-- src/mesa/x86/x86.h | 6 +- 122 files changed, 1526 insertions(+), 1521 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/allegro/amesa.c b/src/mesa/drivers/allegro/amesa.c index 23ce888509..2585c218d8 100644 --- a/src/mesa/drivers/allegro/amesa.c +++ b/src/mesa/drivers/allegro/amesa.c @@ -371,7 +371,7 @@ GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer) setup_dd_pointers(context->GLContext); _mesa_make_current(context->GLContext, buffer->GLBuffer); - gl_Viewport(context->GLContext, 0, 0, buffer->Width, buffer->Height); + _mesa_set_viewport(context->GLContext, 0, 0, buffer->Width, buffer->Height); } else { destroy_bitmap(context->Buffer->Screen); diff --git a/src/mesa/drivers/d3d/D3Dvbrender.c b/src/mesa/drivers/d3d/D3Dvbrender.c index f04b1b4aae..a3a18323fe 100644 --- a/src/mesa/drivers/d3d/D3Dvbrender.c +++ b/src/mesa/drivers/d3d/D3Dvbrender.c @@ -394,7 +394,7 @@ GLboolean RenderVertexBuffer( GLcontext *ctx, GLboolean allDone ) default: /* should never get here */ - gl_problem( ctx, "invalid mode in gl_render_vb" ); + _mesa_problem( ctx, "invalid mode in gl_render_vb" ); } DPF(( DBG_PRIM_INFO, "ResetVB" )); diff --git a/src/mesa/drivers/dos/dosmesa.c b/src/mesa/drivers/dos/dosmesa.c index 89a8c2d616..6ee7291de1 100644 --- a/src/mesa/drivers/dos/dosmesa.c +++ b/src/mesa/drivers/dos/dosmesa.c @@ -1,4 +1,4 @@ -/* $Id: dosmesa.c,v 1.3 2000/11/22 08:55:52 joukj Exp $ */ +/* $Id: dosmesa.c,v 1.4 2001/03/03 20:33:29 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -23,6 +23,9 @@ /* * $Log: dosmesa.c,v $ + * Revision 1.4 2001/03/03 20:33:29 brianp + * lots of gl_*() to _mesa_*() namespace clean-up + * * Revision 1.3 2000/11/22 08:55:52 joukj * * @@ -1492,7 +1495,7 @@ void DOSMesaMakeCurrent( DOSMesaContext ctx ) /* setup initial viewport */ ctx->width = vga_getxdim(); ctx->height = vga_getydim(); - gl_Viewport( ctx->gl_ctx, 0, 0, ctx->width, ctx->height ); + _mesa_set_viewport( ctx->gl_ctx, 0, 0, ctx->width, ctx->height ); } } diff --git a/src/mesa/drivers/ggi/ggimesa.c b/src/mesa/drivers/ggi/ggimesa.c index 6bcb2d17cd..d7928dd243 100644 --- a/src/mesa/drivers/ggi/ggimesa.c +++ b/src/mesa/drivers/ggi/ggimesa.c @@ -534,7 +534,7 @@ void GGIMesaMakeCurrent(GGIMesaContext ctx) if (!ctx->viewport_init) { - gl_Viewport(ctx->gl_ctx, 0, 0, ctx->width, ctx->height); + _mesa_set_viewport(ctx->gl_ctx, 0, 0, ctx->width, ctx->height); ctx->viewport_init = GL_TRUE; } } diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c index 667f0fd022..40b1d5d79c 100644 --- a/src/mesa/drivers/glide/fxapi.c +++ b/src/mesa/drivers/glide/fxapi.c @@ -674,7 +674,7 @@ void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext fxMesa) /* The first time we call MakeCurrent we set the initial viewport size */ if(fxMesa->glCtx->Viewport.Width==0) - gl_Viewport(fxMesa->glCtx,0,0,fxMesa->width,fxMesa->height); + _mesa_set_viewport(fxMesa->glCtx,0,0,fxMesa->width,fxMesa->height); if (MESA_VERBOSE&VERBOSE_DRIVER) { fprintf(stderr,"fxmesa: fxMesaMakeCurrent(...) End\n"); diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 3378b8162c..dc7137a933 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -903,8 +903,8 @@ static GLboolean fxIsInHardware(GLcontext *ctx) if (MESA_VERBOSE & (VERBOSE_DRIVER|VERBOSE_TEXTURE)) fprintf(stderr, "fxMesa: fxIsInHardware, envmode is %s/%s\n", - gl_lookup_enum_by_nr(ctx->Texture.Unit[0].EnvMode), - gl_lookup_enum_by_nr(ctx->Texture.Unit[1].EnvMode)); + _mesa_lookup_enum_by_nr(ctx->Texture.Unit[0].EnvMode), + _mesa_lookup_enum_by_nr(ctx->Texture.Unit[1].EnvMode)); /* KW: This was wrong (I think) and I changed it... which doesn't mean * it is now correct... diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index 1ded0f4cca..4c4fb01825 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -1000,7 +1000,7 @@ fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level, GLboolean success; if (!fxIsTexSupported(target, internalFormat, texImage)) { - gl_problem(NULL, "fx Driver: unsupported texture in fxDDTexImg()\n"); + _mesa_problem(NULL, "fx Driver: unsupported texture in fxDDTexImg()\n"); return; } @@ -1112,7 +1112,7 @@ fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level, mesaFormat = MESA_A1_R5_G5_B5; break; default: - gl_problem(NULL, "tdfx driver: texbuildimagemap() bad format"); + _mesa_problem(NULL, "tdfx driver: texbuildimagemap() bad format"); return; } @@ -1199,7 +1199,7 @@ fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, MesaIntTexFormat mesaFormat; if (!texObj->DriverData) { - gl_problem(ctx, "problem in fxDDTexSubImage2D"); + _mesa_problem(ctx, "problem in fxDDTexSubImage2D"); return; } @@ -1240,7 +1240,7 @@ fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, mesaFormat = MESA_A1_R5_G5_B5; break; default: - gl_problem(NULL, "tdfx driver: fxTexBuildSubImageMap() bad format"); + _mesa_problem(NULL, "tdfx driver: fxTexBuildSubImageMap() bad format"); return; } diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h index a5a81dd597..2e2a71c88e 100644 --- a/src/mesa/drivers/glide/fxdrv.h +++ b/src/mesa/drivers/glide/fxdrv.h @@ -570,7 +570,7 @@ extern void fxDDTexPalette(GLcontext *, struct gl_texture_object *); extern void fxDDTexUseGlbPalette(GLcontext *, GLboolean); extern void fxDDEnable(GLcontext *, GLenum, GLboolean); -extern void fxDDAlphaFunc(GLcontext *, GLenum, GLclampf); +extern void fxDDAlphaFunc(GLcontext *, GLenum, GLchan); extern void fxDDBlendFunc(GLcontext *, GLenum, GLenum); extern void fxDDDepthMask(GLcontext *, GLboolean); extern void fxDDDepthFunc(GLcontext *, GLenum); diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index 5b768848ce..5d844473d8 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -501,7 +501,7 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset) if (MESA_VERBOSE & (VERBOSE_DRIVER|VERBOSE_TEXTURE)) fprintf(stderr, "fxMesa: fxSetupTextureSingleTMU, envmode is %s\n", - gl_lookup_enum_by_nr(ctx->Texture.Unit[textureset].EnvMode)); + _mesa_lookup_enum_by_nr(ctx->Texture.Unit[textureset].EnvMode)); switch(ctx->Texture.Unit[textureset].EnvMode) { case GL_DECAL: @@ -790,8 +790,8 @@ static void fxSetupTextureDoubleTMU_NoLock(GLcontext *ctx) if (MESA_VERBOSE & (VERBOSE_DRIVER|VERBOSE_TEXTURE)) fprintf(stderr, "fxMesa: fxSetupTextureDoubleTMU, envmode is %s/%s\n", - gl_lookup_enum_by_nr(ctx->Texture.Unit[0].EnvMode), - gl_lookup_enum_by_nr(ctx->Texture.Unit[1].EnvMode)); + _mesa_lookup_enum_by_nr(ctx->Texture.Unit[0].EnvMode), + _mesa_lookup_enum_by_nr(ctx->Texture.Unit[1].EnvMode)); if ((ti0->whichTMU==FX_TMU1) || (ti1->whichTMU==FX_TMU0)) { @@ -1253,7 +1253,7 @@ static void fxSetupBlend(GLcontext *ctx) /************************** Alpha Test SetUp ****************************/ /************************************************************************/ -void fxDDAlphaFunc(GLcontext *ctx, GLenum func, GLclampf ref) +void fxDDAlphaFunc(GLcontext *ctx, GLenum func, GLchan ref) { fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx; tfxUnitsState *us=&fxMesa->unitsState; @@ -1296,8 +1296,8 @@ void fxDDAlphaFunc(GLcontext *ctx, GLenum func, GLclampf ref) fxMesa->new_state |= FX_NEW_ALPHA; } - if(ctx->Color.AlphaRef!=us->alphaTestRefValue) { - us->alphaTestRefValue=ctx->Color.AlphaRef; + if (ref != us->alphaTestRefValue) { + us->alphaTestRefValue = ref; fxMesa->new_state |= FX_NEW_ALPHA; } } diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 517199601f..6724c329fb 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.47 2001/02/19 20:01:42 brianp Exp $ */ +/* $Id: osmesa.c,v 1.48 2001/03/03 20:33:29 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -472,7 +472,7 @@ void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value ) switch (pname) { case OSMESA_ROW_LENGTH: if (value<0) { - gl_error( &ctx->gl_ctx, GL_INVALID_VALUE, + _mesa_error( &ctx->gl_ctx, GL_INVALID_VALUE, "OSMesaPixelStore(value)" ); return; } @@ -483,7 +483,7 @@ void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value ) ctx->yup = value ? GL_TRUE : GL_FALSE; break; default: - gl_error( &ctx->gl_ctx, GL_INVALID_ENUM, "OSMesaPixelStore(pname)" ); + _mesa_error( &ctx->gl_ctx, GL_INVALID_ENUM, "OSMesaPixelStore(pname)" ); return; } @@ -515,7 +515,7 @@ void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value ) *value = ctx->yup; return; default: - gl_error(&ctx->gl_ctx, GL_INVALID_ENUM, "OSMesaGetIntergerv(pname)"); + _mesa_error(&ctx->gl_ctx, GL_INVALID_ENUM, "OSMesaGetIntergerv(pname)"); return; } } diff --git a/src/mesa/drivers/svga/svgamesa.c b/src/mesa/drivers/svga/svgamesa.c index 10ddc0d995..4ce7343c52 100644 --- a/src/mesa/drivers/svga/svgamesa.c +++ b/src/mesa/drivers/svga/svgamesa.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa.c,v 1.13 2001/02/06 00:03:47 brianp Exp $ */ +/* $Id: svgamesa.c,v 1.14 2001/03/03 20:33:29 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -473,7 +473,7 @@ void SVGAMesaMakeCurrent( SVGAMesaContext ctx ) /* setup initial viewport */ ctx->width = vga_getxdim(); ctx->height = vga_getydim(); - gl_Viewport( ctx->gl_ctx, 0, 0, ctx->width, ctx->height ); + _mesa_set_viewport( ctx->gl_ctx, 0, 0, ctx->width, ctx->height ); } #endif } diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c index 74fea18030..ff256e266e 100644 --- a/src/mesa/drivers/windows/wmesa.c +++ b/src/mesa/drivers/windows/wmesa.c @@ -1,4 +1,4 @@ -/* $Id: wmesa.c,v 1.13 2001/01/24 00:04:59 brianp Exp $ */ +/* $Id: wmesa.c,v 1.14 2001/03/03 20:33:29 brianp Exp $ */ /* * Windows (Win32) device driver for Mesa 3.4 @@ -1355,7 +1355,7 @@ void /*APIENTRY*/ WMesaMakeCurrent( WMesaContext c ) Current = c; if (Current->gl_ctx->Viewport.Width==0) { /* initialize viewport to window size */ - gl_Viewport( Current->gl_ctx, + _mesa_set_viewport( Current->gl_ctx, 0, 0, Current->width, Current->height ); } if ((c->cColorBits <= 8 ) && (c->rgb_flag == GL_TRUE)){ diff --git a/src/mesa/drivers/windows/wmesaBackup.c b/src/mesa/drivers/windows/wmesaBackup.c index baa57a4ee4..33a7c40de9 100644 --- a/src/mesa/drivers/windows/wmesaBackup.c +++ b/src/mesa/drivers/windows/wmesaBackup.c @@ -1,4 +1,4 @@ -/* $Id: wmesaBackup.c,v 1.2 2000/11/05 18:41:00 keithw Exp $ */ +/* $Id: wmesaBackup.c,v 1.3 2001/03/03 20:33:29 brianp Exp $ */ /* * File name : wmesa.c @@ -22,6 +22,9 @@ /* * $Log: wmesaBackup.c,v $ + * Revision 1.3 2001/03/03 20:33:29 brianp + * lots of gl_*() to _mesa_*() namespace clean-up + * * Revision 1.2 2000/11/05 18:41:00 keithw * - Changes for new software rasterizer modules * - Remove support for choosing software fallbacks from core code @@ -1407,7 +1410,7 @@ void WMesaMakeCurrent( WMesaContext c ) Current = c; if (Current->gl_ctx->Viewport.Width==0) { /* initialize viewport to window size */ - gl_Viewport( Current->gl_ctx, + _mesa_set_viewport( Current->gl_ctx, 0, 0, Current->width, Current->height ); } if ((c->cColorBits <= 8 ) && (c->rgb_flag == GL_TRUE)){ diff --git a/src/mesa/drivers/windows/wmesaOld.c b/src/mesa/drivers/windows/wmesaOld.c index 801d5724e7..a546676a5f 100644 --- a/src/mesa/drivers/windows/wmesaOld.c +++ b/src/mesa/drivers/windows/wmesaOld.c @@ -20,6 +20,9 @@ /* * $Log: wmesaOld.c,v $ + * Revision 1.3 2001/03/03 20:33:29 brianp + * lots of gl_*() to _mesa_*() namespace clean-up + * * Revision 1.2 2000/11/05 18:41:00 keithw * - Changes for new software rasterizer modules * - Remove support for choosing software fallbacks from core code @@ -1338,7 +1341,7 @@ void /*APIENTRY*/ WMesaMakeCurrent( WMesaContext c ) setup_DD_pointers(c->gl_ctx); if (Current->gl_ctx->Viewport.Width==0) { /* initialize viewport to window size */ - gl_Viewport( Current->gl_ctx, + _mesa_set_viewport( Current->gl_ctx, 0, 0, Current->width, Current->height ); } if ((c->cColorBits <= 8 ) && (c->rgb_flag == GL_TRUE)){ diff --git a/src/mesa/drivers/windows/wmesa_stereo.c b/src/mesa/drivers/windows/wmesa_stereo.c index b0b6f811dd..385f30b1b1 100644 --- a/src/mesa/drivers/windows/wmesa_stereo.c +++ b/src/mesa/drivers/windows/wmesa_stereo.c @@ -1273,7 +1273,7 @@ void /*APIENTRY*/ WMesaMakeCurrent( WMesaContext c ) setup_DD_pointers(c->gl_ctx); if (Current->gl_ctx->Viewport.Width==0) { /* initialize viewport to window size */ - gl_Viewport( Current->gl_ctx, + _mesa_set_viewport( Current->gl_ctx, 0, 0, Current->width, Current->height ); } } diff --git a/src/mesa/drivers/x11/xfonts.c b/src/mesa/drivers/x11/xfonts.c index 6e73504ba5..3bb27a0c53 100644 --- a/src/mesa/drivers/x11/xfonts.c +++ b/src/mesa/drivers/x11/xfonts.c @@ -1,4 +1,4 @@ -/* $Id: xfonts.c,v 1.11 2001/01/08 04:06:20 keithw Exp $ */ +/* $Id: xfonts.c,v 1.12 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -244,7 +244,7 @@ void Fake_glXUseXFont( Font font, int first, int count, int listbase ) fs = XQueryFont (dpy, font); if (!fs) { - gl_error(NULL, GL_INVALID_VALUE, + _mesa_error(NULL, GL_INVALID_VALUE, "Couldn't get font structure information"); return; } @@ -259,7 +259,7 @@ void Fake_glXUseXFont( Font font, int first, int count, int listbase ) (GLubyte)); if (!bm) { XFreeFontInfo( NULL, fs, 0 ); - gl_error(NULL, GL_OUT_OF_MEMORY, + _mesa_error(NULL, GL_OUT_OF_MEMORY, "Couldn't allocate bitmap in glXUseXFont()"); return; } diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 9ef37b54dd..8e1bd87517 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1,4 +1,4 @@ -/* $Id: xm_api.c,v 1.16 2001/01/23 23:39:37 brianp Exp $ */ +/* $Id: xm_api.c,v 1.17 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -431,7 +431,7 @@ static void free_xmesa_buffer(int client, XMesaBuffer buffer) prev = b; } /* buffer not found in XMesaBufferList */ - gl_problem(NULL,"free_xmesa_buffer() - buffer not found\n"); + _mesa_problem(NULL,"free_xmesa_buffer() - buffer not found\n"); } @@ -1410,7 +1410,7 @@ xmesa_color_to_pixel( XMesaContext xmesa, GLubyte r, GLubyte g, GLubyte b, GLuby return p; } default: - gl_problem(NULL, "Bad pixel format in xmesa_color_to_pixel"); + _mesa_problem(NULL, "Bad pixel format in xmesa_color_to_pixel"); } return 0; } @@ -2630,7 +2630,7 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y, return p; } default: - gl_problem(NULL, "Bad pixel format in XMesaDitherColor"); + _mesa_problem(NULL, "Bad pixel format in XMesaDitherColor"); } return 0; } diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index a6108e00f7..a73b3c6973 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,4 +1,4 @@ -/* $Id: xm_dd.c,v 1.17 2001/03/01 18:30:47 brianp Exp $ */ +/* $Id: xm_dd.c,v 1.18 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -215,7 +215,7 @@ set_read_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) xmesa_update_span_funcs(ctx); } else { - gl_problem(ctx, "invalid buffer in set_read_buffer() in xmesa2.c"); + _mesa_problem(ctx, "invalid buffer in set_read_buffer() in xmesa2.c"); } } diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c index a9269bfcbc..e87fd98a8a 100644 --- a/src/mesa/drivers/x11/xm_span.c +++ b/src/mesa/drivers/x11/xm_span.c @@ -1,4 +1,4 @@ -/* $Id: xm_span.c,v 1.9 2001/02/22 17:50:13 brianp Exp $ */ +/* $Id: xm_span.c,v 1.10 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -3685,7 +3685,7 @@ static void read_color_span( const GLcontext *ctx, } break; default: - gl_problem(NULL,"Problem in DD.read_color_span (1)"); + _mesa_problem(NULL,"Problem in DD.read_color_span (1)"); return; } } @@ -3876,7 +3876,7 @@ static void read_color_span( const GLcontext *ctx, } break; default: - gl_problem(NULL,"Problem in DD.read_color_span (2)"); + _mesa_problem(NULL,"Problem in DD.read_color_span (2)"); return; } } @@ -4051,7 +4051,7 @@ static void read_color_pixels( const GLcontext *ctx, } break; default: - gl_problem(NULL,"Problem in DD.read_color_pixels (1)"); + _mesa_problem(NULL,"Problem in DD.read_color_pixels (1)"); return; } } @@ -4168,7 +4168,7 @@ static void read_color_pixels( const GLcontext *ctx, } break; default: - gl_problem(NULL,"Problem in DD.read_color_pixels (1)"); + _mesa_problem(NULL,"Problem in DD.read_color_pixels (1)"); return; } } @@ -4338,7 +4338,7 @@ void xmesa_update_span_funcs( GLcontext *ctx ) ctx->Driver.WriteMonoRGBAPixels = write_pixels_mono_pixmap; break; default: - gl_problem(NULL,"Bad pixel format in xmesa_update_state (1)"); + _mesa_problem(NULL,"Bad pixel format in xmesa_update_state (1)"); return; } } @@ -4471,7 +4471,7 @@ void xmesa_update_span_funcs( GLcontext *ctx ) } break; default: - gl_problem(NULL,"Bad pixel format in xmesa_update_state (2)"); + _mesa_problem(NULL,"Bad pixel format in xmesa_update_state (2)"); return; } } diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index 59d3d59527..32c2298c74 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 8ee5b9fc6d..38fac3cfa1 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 9f265381ae..8d3cbafc64 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 746ca7332b..00394a7970 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 7232ae4d18..7aaf31e872 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 f7280e40cc..6d7bb9b375 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 c2c7ec3009..d2bbd8b9a0 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 1f6019f9e5..f9693c6ba7 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 3bbcb40404..85a437947a 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 d10953f751..792862c027 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 891e0aa5a6..0b1d4113c6 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 83e3a8b86b..62c3e1fc34 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 1fff95411e..929a877cf9 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 789260b860..82ca1bd345 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 b9791716cf..988bcd13c3 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 d43aed787b..ad98244e83 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 618c41a5b4..77da0f7ed8 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 5fcc44e8e5..3e0de24314 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 5a4d871226..de18c7c0fe 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 028c9b4654..a6b2141f7a 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 3d5e4c7205..d012ace8c5 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 096623752e..8db01370a6 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 1ddd12f320..806f3e2cd2 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 bc4c7ae207..be2dd9a75f 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 c0e4b4a907..0c1214e9a3 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 3258aadf8f..200d66cd94 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 0c6ddf27e9..4f132c4dd4 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 de5348deb4..e616e4cf67 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 1ae4925742..89bfcc2759 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 052c04618b..a7fce7e0f2 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 38ca33815f..82f6d7884c 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 520010c1a1..13e50832ad 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 1239f6e2e8..466911c987 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 f49a3f1693..53fd29aa31 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 ca1a758502..c40049d462 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 22575074b6..3b4cada93b 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 41788352a1..895bf75271 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 a0d103f904..396c897b70 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 c2f2226c4d..730d925685 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 badf180ce8..4bd1ade6dc 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 1352f34326..8a45096c66 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 6775d58677..1520fe8c96 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 e98a99cad1..87ed959b23 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 8881083e48..3f0aa196c5 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 7fbf2b7642..91763dc641 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 f1d6d10534..37aadbcb6e 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 428af0384a..b0c6793363 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 6d9f3462b9..fdc2a908ec 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; } diff --git a/src/mesa/math/m_clip_tmp.h b/src/mesa/math/m_clip_tmp.h index 8757154198..62c7e37ae9 100644 --- a/src/mesa/math/m_clip_tmp.h +++ b/src/mesa/math/m_clip_tmp.h @@ -1,10 +1,10 @@ -/* $Id: m_clip_tmp.h,v 1.3 2001/01/13 05:48:25 keithw Exp $ */ +/* $Id: m_clip_tmp.h,v 1.4 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.1 + * Version: 3.5 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -36,10 +36,10 @@ * and an asm implementation needn't replicate that behaviour. */ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) + GLvector4f *proj_vec, + GLubyte clipMask[], + GLubyte *orMask, + GLubyte *andMask ) { const GLuint stride = clip_vec->stride; const GLfloat *from = (GLfloat *)clip_vec->start; @@ -154,10 +154,10 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec, static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) + GLvector4f *proj_vec, + GLubyte clipMask[], + GLubyte *orMask, + GLubyte *andMask ) { const GLuint stride = clip_vec->stride; const GLuint count = clip_vec->count; @@ -187,10 +187,10 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec, static GLvector4f * _XFORMAPI TAG(cliptest_points2)( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) + GLvector4f *proj_vec, + GLubyte clipMask[], + GLubyte *orMask, + GLubyte *andMask ) { const GLuint stride = clip_vec->stride; const GLuint count = clip_vec->count; diff --git a/src/mesa/math/m_copy_tmp.h b/src/mesa/math/m_copy_tmp.h index 3119b95589..755536f3e2 100644 --- a/src/mesa/math/m_copy_tmp.h +++ b/src/mesa/math/m_copy_tmp.h @@ -1,4 +1,4 @@ -/* $Id: m_copy_tmp.h,v 1.2 2000/12/26 05:09:31 keithw Exp $ */ +/* $Id: m_copy_tmp.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -72,20 +72,20 @@ COPY_FUNC( 0xf ) static void TAG2(init_copy, 0 ) ( void ) { - gl_copy_tab[IDX][0x0] = TAG2(copy, 0x0); - gl_copy_tab[IDX][0x1] = TAG2(copy, 0x1); - gl_copy_tab[IDX][0x2] = TAG2(copy, 0x2); - gl_copy_tab[IDX][0x3] = TAG2(copy, 0x3); - gl_copy_tab[IDX][0x4] = TAG2(copy, 0x4); - gl_copy_tab[IDX][0x5] = TAG2(copy, 0x5); - gl_copy_tab[IDX][0x6] = TAG2(copy, 0x6); - gl_copy_tab[IDX][0x7] = TAG2(copy, 0x7); - gl_copy_tab[IDX][0x8] = TAG2(copy, 0x8); - gl_copy_tab[IDX][0x9] = TAG2(copy, 0x9); - gl_copy_tab[IDX][0xa] = TAG2(copy, 0xa); - gl_copy_tab[IDX][0xb] = TAG2(copy, 0xb); - gl_copy_tab[IDX][0xc] = TAG2(copy, 0xc); - gl_copy_tab[IDX][0xd] = TAG2(copy, 0xd); - gl_copy_tab[IDX][0xe] = TAG2(copy, 0xe); - gl_copy_tab[IDX][0xf] = TAG2(copy, 0xf); + _mesa_copy_tab[IDX][0x0] = TAG2(copy, 0x0); + _mesa_copy_tab[IDX][0x1] = TAG2(copy, 0x1); + _mesa_copy_tab[IDX][0x2] = TAG2(copy, 0x2); + _mesa_copy_tab[IDX][0x3] = TAG2(copy, 0x3); + _mesa_copy_tab[IDX][0x4] = TAG2(copy, 0x4); + _mesa_copy_tab[IDX][0x5] = TAG2(copy, 0x5); + _mesa_copy_tab[IDX][0x6] = TAG2(copy, 0x6); + _mesa_copy_tab[IDX][0x7] = TAG2(copy, 0x7); + _mesa_copy_tab[IDX][0x8] = TAG2(copy, 0x8); + _mesa_copy_tab[IDX][0x9] = TAG2(copy, 0x9); + _mesa_copy_tab[IDX][0xa] = TAG2(copy, 0xa); + _mesa_copy_tab[IDX][0xb] = TAG2(copy, 0xb); + _mesa_copy_tab[IDX][0xc] = TAG2(copy, 0xc); + _mesa_copy_tab[IDX][0xd] = TAG2(copy, 0xd); + _mesa_copy_tab[IDX][0xe] = TAG2(copy, 0xe); + _mesa_copy_tab[IDX][0xf] = TAG2(copy, 0xf); } diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c index 9515072dc6..3c37760032 100644 --- a/src/mesa/math/m_debug_norm.c +++ b/src/mesa/math/m_debug_norm.c @@ -1,4 +1,4 @@ -/* $Id: m_debug_norm.c,v 1.1 2001/02/03 08:41:04 gareth Exp $ */ +/* $Id: m_debug_norm.c,v 1.2 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -384,7 +384,7 @@ void _math_test_all_normal_transform_functions( char *description ) char buf[100]; sprintf( buf, "gl_normal_tab[%s][%s] failed test (%s)", cmastring, norm_strings[mtype], description ); - gl_problem( NULL, buf ); + _mesa_problem( NULL, buf ); } #ifdef RUN_DEBUG_BENCHMARK diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c index 49bbd9a830..8b26a233b4 100644 --- a/src/mesa/math/m_debug_xform.c +++ b/src/mesa/math/m_debug_xform.c @@ -1,4 +1,4 @@ -/* $Id: m_debug_xform.c,v 1.2 2001/02/03 08:41:04 gareth Exp $ */ +/* $Id: m_debug_xform.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -174,7 +174,7 @@ static int test_transform_function( transform_func func, int psize, int mtype, (void) cycles; if ( psize > 4 ) { - gl_problem( NULL, "test_transform_function called with psize > 4\n" ); + _mesa_problem( NULL, "test_transform_function called with psize > 4\n" ); return 0; } @@ -321,15 +321,15 @@ void _math_test_all_transform_functions( char *description ) for ( mtype = 0 ; mtype < 7 ; mtype++ ) { for ( psize = 1 ; psize <= 4 ; psize++ ) { - transform_func func = gl_transform_tab[cma][psize][mtypes[mtype]]; + transform_func func = _mesa_transform_tab[cma][psize][mtypes[mtype]]; long *cycles = &(benchmark_tab[cma][psize-1][mtype]); if ( test_transform_function( func, psize, mtype, masked, cycles ) == 0 ) { char buf[100]; - sprintf( buf, "gl_transform_tab[%s][%d][%s] failed test (%s)", + sprintf( buf, "_mesa_transform_tab[%s][%d][%s] failed test (%s)", cmastring, psize, mstrings[mtype], description ); - gl_problem( NULL, buf ); + _mesa_problem( NULL, buf ); } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) diff --git a/src/mesa/math/m_vector.c b/src/mesa/math/m_vector.c index 02a558ac38..2cb227594d 100644 --- a/src/mesa/math/m_vector.c +++ b/src/mesa/math/m_vector.c @@ -1,4 +1,4 @@ -/* $Id: m_vector.c,v 1.4 2001/02/20 18:28:52 keithw Exp $ */ +/* $Id: m_vector.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -41,7 +41,7 @@ * Given a vector [count][4] of floats, set all the [][elt] values * to 0 (if elt = 0, 1, 2) or 1.0 (if elt = 3). */ -void gl_vector4f_clean_elem( GLvector4f *vec, GLuint count, GLuint elt ) +void _mesa_vector4f_clean_elem( GLvector4f *vec, GLuint count, GLuint elt ) { static const GLubyte elem_bits[4] = { VEC_DIRTY_0, @@ -78,7 +78,7 @@ static const GLubyte size_bits[5] = { */ -void gl_vector4f_init( GLvector4f *v, GLuint flags, GLfloat (*storage)[4] ) +void _mesa_vector4f_init( GLvector4f *v, GLuint flags, GLfloat (*storage)[4] ) { v->stride = 4 * sizeof(GLfloat); v->size = 2; /* may change: 2-4 for vertices and 1-4 for texcoords */ @@ -88,7 +88,7 @@ void gl_vector4f_init( GLvector4f *v, GLuint flags, GLfloat (*storage)[4] ) v->flags = size_bits[4] | flags ; } -void gl_vector3f_init( GLvector3f *v, GLuint flags, GLfloat (*storage)[3] ) +void _mesa_vector3f_init( GLvector3f *v, GLuint flags, GLfloat (*storage)[3] ) { v->stride = 3 * sizeof(GLfloat); v->data = storage; @@ -97,7 +97,7 @@ void gl_vector3f_init( GLvector3f *v, GLuint flags, GLfloat (*storage)[3] ) v->flags = flags ; } -void gl_vector1f_init( GLvector1f *v, GLuint flags, GLfloat *storage ) +void _mesa_vector1f_init( GLvector1f *v, GLuint flags, GLfloat *storage ) { v->stride = 1*sizeof(GLfloat); v->data = storage; @@ -106,7 +106,7 @@ void gl_vector1f_init( GLvector1f *v, GLuint flags, GLfloat *storage ) v->flags = flags ; } -void gl_vector4ub_init( GLvector4ub *v, GLuint flags, GLubyte (*storage)[4] ) +void _mesa_vector4ub_init( GLvector4ub *v, GLuint flags, GLubyte (*storage)[4] ) { v->stride = 4 * sizeof(GLubyte); v->data = storage; @@ -115,7 +115,7 @@ void gl_vector4ub_init( GLvector4ub *v, GLuint flags, GLubyte (*storage)[4] ) v->flags = flags ; } -void gl_vector4chan_init( GLvector4chan *v, GLuint flags, GLchan (*storage)[4] ) +void _mesa_vector4chan_init( GLvector4chan *v, GLuint flags, GLchan (*storage)[4] ) { v->stride = 4 * sizeof(GLchan); v->data = storage; @@ -124,7 +124,7 @@ void gl_vector4chan_init( GLvector4chan *v, GLuint flags, GLchan (*storage)[4] ) v->flags = flags ; } -void gl_vector4us_init( GLvector4us *v, GLuint flags, GLushort (*storage)[4] ) +void _mesa_vector4us_init( GLvector4us *v, GLuint flags, GLushort (*storage)[4] ) { v->stride = 4 * sizeof(GLushort); v->data = storage; @@ -133,7 +133,7 @@ void gl_vector4us_init( GLvector4us *v, GLuint flags, GLushort (*storage)[4] ) v->flags = flags ; } -void gl_vector1ub_init( GLvector1ub *v, GLuint flags, GLubyte *storage ) +void _mesa_vector1ub_init( GLvector1ub *v, GLuint flags, GLubyte *storage ) { v->stride = 1 * sizeof(GLubyte); v->data = storage; @@ -142,7 +142,7 @@ void gl_vector1ub_init( GLvector1ub *v, GLuint flags, GLubyte *storage ) v->flags = flags ; } -void gl_vector1ui_init( GLvector1ui *v, GLuint flags, GLuint *storage ) +void _mesa_vector1ui_init( GLvector1ui *v, GLuint flags, GLuint *storage ) { v->stride = 1 * sizeof(GLuint); v->data = storage; @@ -162,7 +162,7 @@ void gl_vector1ui_init( GLvector1ui *v, GLuint flags, GLuint *storage ) */ -void gl_vector4f_alloc( GLvector4f *v, GLuint flags, GLuint count, +void _mesa_vector4f_alloc( GLvector4f *v, GLuint flags, GLuint count, GLuint alignment ) { v->stride = 4 * sizeof(GLfloat); @@ -174,7 +174,7 @@ void gl_vector4f_alloc( GLvector4f *v, GLuint flags, GLuint count, v->flags = size_bits[4] | flags | VEC_MALLOC ; } -void gl_vector3f_alloc( GLvector3f *v, GLuint flags, GLuint count, +void _mesa_vector3f_alloc( GLvector3f *v, GLuint flags, GLuint count, GLuint alignment ) { v->stride = 3 * sizeof(GLfloat); @@ -185,7 +185,7 @@ void gl_vector3f_alloc( GLvector3f *v, GLuint flags, GLuint count, v->flags = flags | VEC_MALLOC ; } -void gl_vector1f_alloc( GLvector1f *v, GLuint flags, GLuint count, +void _mesa_vector1f_alloc( GLvector1f *v, GLuint flags, GLuint count, GLuint alignment ) { v->stride = sizeof(GLfloat); @@ -196,7 +196,7 @@ void gl_vector1f_alloc( GLvector1f *v, GLuint flags, GLuint count, v->flags = flags | VEC_MALLOC ; } -void gl_vector4ub_alloc( GLvector4ub *v, GLuint flags, GLuint count, +void _mesa_vector4ub_alloc( GLvector4ub *v, GLuint flags, GLuint count, GLuint alignment ) { v->stride = 4 * sizeof(GLubyte); @@ -207,7 +207,7 @@ void gl_vector4ub_alloc( GLvector4ub *v, GLuint flags, GLuint count, v->flags = flags | VEC_MALLOC ; } -void gl_vector4chan_alloc( GLvector4chan *v, GLuint flags, GLuint count, +void _mesa_vector4chan_alloc( GLvector4chan *v, GLuint flags, GLuint count, GLuint alignment ) { v->stride = 4 * sizeof(GLchan); @@ -218,7 +218,7 @@ void gl_vector4chan_alloc( GLvector4chan *v, GLuint flags, GLuint count, v->flags = flags | VEC_MALLOC ; } -void gl_vector4us_alloc( GLvector4us *v, GLuint flags, GLuint count, +void _mesa_vector4us_alloc( GLvector4us *v, GLuint flags, GLuint count, GLuint alignment ) { v->stride = 4 * sizeof(GLushort); @@ -229,7 +229,7 @@ void gl_vector4us_alloc( GLvector4us *v, GLuint flags, GLuint count, v->flags = flags | VEC_MALLOC ; } -void gl_vector1ub_alloc( GLvector1ub *v, GLuint flags, GLuint count, +void _mesa_vector1ub_alloc( GLvector1ub *v, GLuint flags, GLuint count, GLuint alignment ) { v->stride = 1 * sizeof(GLubyte); @@ -240,7 +240,7 @@ void gl_vector1ub_alloc( GLvector1ub *v, GLuint flags, GLuint count, v->flags = flags | VEC_MALLOC ; } -void gl_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count, +void _mesa_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count, GLuint alignment ) { v->stride = 1 * sizeof(GLuint); @@ -260,7 +260,7 @@ void gl_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count, */ -void gl_vector4f_free( GLvector4f *v ) +void _mesa_vector4f_free( GLvector4f *v ) { if (v->flags & VEC_MALLOC) { ALIGN_FREE( v->storage ); @@ -271,7 +271,7 @@ void gl_vector4f_free( GLvector4f *v ) } } -void gl_vector3f_free( GLvector3f *v ) +void _mesa_vector3f_free( GLvector3f *v ) { if (v->flags & VEC_MALLOC) { ALIGN_FREE( v->storage ); @@ -282,7 +282,7 @@ void gl_vector3f_free( GLvector3f *v ) } } -void gl_vector1f_free( GLvector1f *v ) +void _mesa_vector1f_free( GLvector1f *v ) { if (v->flags & VEC_MALLOC) { ALIGN_FREE( v->storage ); @@ -293,7 +293,7 @@ void gl_vector1f_free( GLvector1f *v ) } } -void gl_vector4ub_free( GLvector4ub *v ) +void _mesa_vector4ub_free( GLvector4ub *v ) { if (v->flags & VEC_MALLOC) { ALIGN_FREE( v->storage ); @@ -304,7 +304,7 @@ void gl_vector4ub_free( GLvector4ub *v ) } } -void gl_vector4chan_free( GLvector4chan *v ) +void _mesa_vector4chan_free( GLvector4chan *v ) { if (v->flags & VEC_MALLOC) { ALIGN_FREE( v->storage ); @@ -315,7 +315,7 @@ void gl_vector4chan_free( GLvector4chan *v ) } } -void gl_vector4us_free( GLvector4us *v ) +void _mesa_vector4us_free( GLvector4us *v ) { if (v->flags & VEC_MALLOC) { ALIGN_FREE( v->storage ); @@ -326,7 +326,7 @@ void gl_vector4us_free( GLvector4us *v ) } } -void gl_vector1ub_free( GLvector1ub *v ) +void _mesa_vector1ub_free( GLvector1ub *v ) { if (v->flags & VEC_MALLOC) { ALIGN_FREE( v->storage ); @@ -337,7 +337,7 @@ void gl_vector1ub_free( GLvector1ub *v ) } } -void gl_vector1ui_free( GLvector1ui *v ) +void _mesa_vector1ui_free( GLvector1ui *v ) { if (v->flags & VEC_MALLOC) { ALIGN_FREE( v->storage ); @@ -352,7 +352,7 @@ void gl_vector1ui_free( GLvector1ui *v ) /* * For debugging */ -void gl_vector4f_print( GLvector4f *v, GLubyte *cullmask, GLboolean culling ) +void _mesa_vector4f_print( GLvector4f *v, GLubyte *cullmask, GLboolean culling ) { GLfloat c[4] = { 0, 0, 0, 1 }; const char *templates[5] = { @@ -405,7 +405,7 @@ void gl_vector4f_print( GLvector4f *v, GLubyte *cullmask, GLboolean culling ) /* * For debugging */ -void gl_vector3f_print( GLvector3f *v, GLubyte *cullmask, GLboolean culling ) +void _mesa_vector3f_print( GLvector3f *v, GLubyte *cullmask, GLboolean culling ) { GLfloat *d = (GLfloat *)v->data; GLuint i = 0, count; diff --git a/src/mesa/math/m_vector.h b/src/mesa/math/m_vector.h index fc51b2006c..0615d3056f 100644 --- a/src/mesa/math/m_vector.h +++ b/src/mesa/math/m_vector.h @@ -1,4 +1,4 @@ -/* $Id: m_vector.h,v 1.4 2001/02/20 18:28:52 keithw Exp $ */ +/* $Id: m_vector.h,v 1.5 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -58,7 +58,7 @@ * because they contain non-(0,0,0,1) values. * * The start field is used to reserve data for copied vertices at the - * end of gl_transform_vb, and avoids the need for a multiplication in + * end of _mesa_transform_vb, and avoids the need for a multiplication in * the transformation routines. */ typedef struct { @@ -72,13 +72,13 @@ typedef struct { } GLvector4f; -extern void gl_vector4f_init( GLvector4f *v, GLuint flags, +extern void _mesa_vector4f_init( GLvector4f *v, GLuint flags, GLfloat (*storage)[4] ); -extern void gl_vector4f_alloc( GLvector4f *v, GLuint flags, +extern void _mesa_vector4f_alloc( GLvector4f *v, GLuint flags, GLuint count, GLuint alignment ); -extern void gl_vector4f_free( GLvector4f *v ); -extern void gl_vector4f_print( GLvector4f *v, GLubyte *, GLboolean ); -extern void gl_vector4f_clean_elem( GLvector4f *vec, GLuint nr, GLuint elt ); +extern void _mesa_vector4f_free( GLvector4f *v ); +extern void _mesa_vector4f_print( GLvector4f *v, GLubyte *, GLboolean ); +extern void _mesa_vector4f_clean_elem( GLvector4f *vec, GLuint nr, GLuint elt ); /* Could use a single vector type for normals and vertices, but @@ -93,11 +93,11 @@ typedef struct { void *storage; } GLvector3f; -extern void gl_vector3f_init( GLvector3f *v, GLuint flags, GLfloat (*)[3] ); -extern void gl_vector3f_alloc( GLvector3f *v, GLuint flags, GLuint count, +extern void _mesa_vector3f_init( GLvector3f *v, GLuint flags, GLfloat (*)[3] ); +extern void _mesa_vector3f_alloc( GLvector3f *v, GLuint flags, GLuint count, GLuint alignment ); -extern void gl_vector3f_free( GLvector3f *v ); -extern void gl_vector3f_print( GLvector3f *v, GLubyte *, GLboolean ); +extern void _mesa_vector3f_free( GLvector3f *v ); +extern void _mesa_vector3f_print( GLvector3f *v, GLubyte *, GLboolean ); typedef struct { @@ -109,9 +109,9 @@ typedef struct { void *storage; } GLvector1f; -extern void gl_vector1f_free( GLvector1f *v ); -extern void gl_vector1f_init( GLvector1f *v, GLuint flags, GLfloat * ); -extern void gl_vector1f_alloc( GLvector1f *v, GLuint flags, GLuint count, +extern void _mesa_vector1f_free( GLvector1f *v ); +extern void _mesa_vector1f_init( GLvector1f *v, GLuint flags, GLfloat * ); +extern void _mesa_vector1f_alloc( GLvector1f *v, GLuint flags, GLuint count, GLuint alignment ); @@ -126,11 +126,11 @@ typedef struct { void *storage; } GLvector4ub; -extern void gl_vector4ub_init( GLvector4ub *v, GLuint flags, +extern void _mesa_vector4ub_init( GLvector4ub *v, GLuint flags, GLubyte (*storage)[4] ); -extern void gl_vector4ub_alloc( GLvector4ub *v, GLuint flags, GLuint count, +extern void _mesa_vector4ub_alloc( GLvector4ub *v, GLuint flags, GLuint count, GLuint alignment ); -extern void gl_vector4ub_free( GLvector4ub * ); +extern void _mesa_vector4ub_free( GLvector4ub * ); /* For 4 * GLchan values. @@ -144,11 +144,11 @@ typedef struct { void *storage; } GLvector4chan; -extern void gl_vector4chan_init( GLvector4chan *v, GLuint flags, +extern void _mesa_vector4chan_init( GLvector4chan *v, GLuint flags, GLchan (*storage)[4] ); -extern void gl_vector4chan_alloc( GLvector4chan *v, GLuint flags, GLuint count, +extern void _mesa_vector4chan_alloc( GLvector4chan *v, GLuint flags, GLuint count, GLuint alignment ); -extern void gl_vector4chan_free( GLvector4chan * ); +extern void _mesa_vector4chan_free( GLvector4chan * ); @@ -164,11 +164,11 @@ typedef struct { void *storage; } GLvector4us; -extern void gl_vector4us_init( GLvector4us *v, GLuint flags, +extern void _mesa_vector4us_init( GLvector4us *v, GLuint flags, GLushort (*storage)[4] ); -extern void gl_vector4us_alloc( GLvector4us *v, GLuint flags, GLuint count, +extern void _mesa_vector4us_alloc( GLvector4us *v, GLuint flags, GLuint count, GLuint alignment ); -extern void gl_vector4us_free( GLvector4us * ); +extern void _mesa_vector4us_free( GLvector4us * ); @@ -184,10 +184,10 @@ typedef struct { void *storage; } GLvector1ub; -extern void gl_vector1ub_init( GLvector1ub *v, GLuint flags, GLubyte *storage); -extern void gl_vector1ub_alloc( GLvector1ub *v, GLuint flags, GLuint count, +extern void _mesa_vector1ub_init( GLvector1ub *v, GLuint flags, GLubyte *storage); +extern void _mesa_vector1ub_alloc( GLvector1ub *v, GLuint flags, GLuint count, GLuint alignment ); -extern void gl_vector1ub_free( GLvector1ub * ); +extern void _mesa_vector1ub_free( GLvector1ub * ); @@ -203,10 +203,10 @@ typedef struct { void *storage; } GLvector1ui; -extern void gl_vector1ui_init( GLvector1ui *v, GLuint flags, GLuint *storage ); -extern void gl_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count, +extern void _mesa_vector1ui_init( GLvector1ui *v, GLuint flags, GLuint *storage ); +extern void _mesa_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count, GLuint alignment ); -extern void gl_vector1ui_free( GLvector1ui * ); +extern void _mesa_vector1ui_free( GLvector1ui * ); diff --git a/src/mesa/math/m_xform.c b/src/mesa/math/m_xform.c index 9c8fadf712..3a677ddfe6 100644 --- a/src/mesa/math/m_xform.c +++ b/src/mesa/math/m_xform.c @@ -1,4 +1,4 @@ -/* $Id: m_xform.c,v 1.8 2001/02/03 08:41:04 gareth Exp $ */ +/* $Id: m_xform.c,v 1.9 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -59,9 +59,9 @@ clip_func gl_clip_tab[5]; clip_func gl_clip_np_tab[5]; dotprod_func gl_dotprod_tab[2][5]; -vec_copy_func gl_copy_tab[2][0x10]; +vec_copy_func _mesa_copy_tab[2][0x10]; normal_func gl_normal_tab[0xf][0x4]; -transform_func **(gl_transform_tab[2]); +transform_func **(_mesa_transform_tab[2]); static transform_func *cull_transform_tab[5]; static transform_func *raw_transform_tab[5]; @@ -125,7 +125,7 @@ static transform_func *raw_transform_tab[5]; -GLvector4f *gl_project_points( GLvector4f *proj_vec, +GLvector4f *_mesa_project_points( GLvector4f *proj_vec, const GLvector4f *clip_vec ) { const GLuint stride = clip_vec->stride; @@ -163,7 +163,7 @@ GLvector4f *gl_project_points( GLvector4f *proj_vec, * m - transformation matrix * Output: u - transformed vector */ -void gl_transform_vector( GLfloat u[4], const GLfloat v[4], const GLfloat m[16] ) +void _mesa_transform_vector( GLfloat u[4], const GLfloat v[4], const GLfloat m[16] ) { GLfloat v0=v[0], v1=v[1], v2=v[2], v3=v[3]; #define M(row,col) m[row + col*4] @@ -179,7 +179,7 @@ void gl_transform_vector( GLfloat u[4], const GLfloat v[4], const GLfloat m[16] * Note that because the matrix isn't analysed we do too many * multiplies, and that the result is always 4-clean. */ -void gl_transform_point_sz( GLfloat Q[4], const GLfloat M[16], +void _mesa_transform_point_sz( GLfloat Q[4], const GLfloat M[16], const GLfloat P[4], GLuint sz ) { if (Q == P) @@ -224,8 +224,8 @@ void gl_transform_point_sz( GLfloat Q[4], const GLfloat M[16], void _math_init_transformation( void ) { - gl_transform_tab[0] = raw_transform_tab; - gl_transform_tab[1] = cull_transform_tab; + _mesa_transform_tab[0] = raw_transform_tab; + _mesa_transform_tab[1] = cull_transform_tab; init_c_transformations_raw(); init_c_transformations_masked(); @@ -243,7 +243,7 @@ _math_init_transformation( void ) #endif #ifdef USE_X86_ASM - gl_init_all_x86_transform_asm(); + _mesa_init_all_x86_transform_asm(); #endif } diff --git a/src/mesa/math/m_xform.h b/src/mesa/math/m_xform.h index f6b10d6ad3..27496feb78 100644 --- a/src/mesa/math/m_xform.h +++ b/src/mesa/math/m_xform.h @@ -1,4 +1,4 @@ -/* $Id: m_xform.h,v 1.5 2001/01/13 05:48:25 keithw Exp $ */ +/* $Id: m_xform.h,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -73,7 +73,7 @@ do { \ } while (0) -extern void gl_transform_vector( GLfloat u[4], +extern void _mesa_transform_vector( GLfloat u[4], CONST GLfloat v[4], CONST GLfloat m[16] ); @@ -185,21 +185,21 @@ typedef void (_XFORMAPIP transform_func)( GLvector4f *to_vec, CONST GLubyte flag ); -extern GLvector4f *gl_project_points( GLvector4f *to, +extern GLvector4f *_mesa_project_points( GLvector4f *to, CONST GLvector4f *from ); -extern void gl_transform_bounds3( GLubyte *orMask, GLubyte *andMask, +extern void _mesa_transform_bounds3( GLubyte *orMask, GLubyte *andMask, CONST GLfloat m[16], CONST GLfloat src[][3] ); -extern void gl_transform_bounds2( GLubyte *orMask, GLubyte *andMask, +extern void _mesa_transform_bounds2( GLubyte *orMask, GLubyte *andMask, CONST GLfloat m[16], CONST GLfloat src[][3] ); extern dotprod_func gl_dotprod_tab[2][5]; -extern vec_copy_func gl_copy_tab[2][0x10]; -extern vec_copy_func gl_copy_clean_tab[2][5]; +extern vec_copy_func _mesa_copy_tab[2][0x10]; +extern vec_copy_func _mesa_copy_clean_tab[2][5]; extern clip_func gl_clip_tab[5]; extern clip_func gl_clip_np_tab[5]; extern normal_func gl_normal_tab[0xf][0x4]; @@ -207,15 +207,15 @@ extern normal_func gl_normal_tab[0xf][0x4]; /* Use of 3 layers of linked 1-dimensional arrays to reduce * cost of lookup. */ -extern transform_func **(gl_transform_tab[2]); +extern transform_func **(_mesa_transform_tab[2]); -extern void gl_transform_point_sz( GLfloat Q[4], CONST GLfloat M[16], +extern void _mesa_transform_point_sz( GLfloat Q[4], CONST GLfloat M[16], CONST GLfloat P[4], GLuint sz ); #define TransformRaw( to, mat, from ) \ - ( (*gl_transform_tab[0][(from)->size][(mat)->type])( to, (mat)->m, from, 0, 0 ), \ + ( (*_mesa_transform_tab[0][(from)->size][(mat)->type])( to, (mat)->m, from, 0, 0 ), \ (to) ) diff --git a/src/mesa/math/m_xform_tmp.h b/src/mesa/math/m_xform_tmp.h index cb94f88ed1..eca41f5f76 100644 --- a/src/mesa/math/m_xform_tmp.h +++ b/src/mesa/math/m_xform_tmp.h @@ -1,4 +1,4 @@ -/* $Id: m_xform_tmp.h,v 1.2 2000/12/26 05:09:31 keithw Exp $ */ +/* $Id: m_xform_tmp.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -920,7 +920,7 @@ static transform_func _XFORMAPI TAG(transform_tab_4)[7]; */ static void _XFORMAPI TAG(init_c_transformations)( void ) { -#define TAG_TAB gl_transform_tab[IDX] +#define TAG_TAB _mesa_transform_tab[IDX] #define TAG_TAB_1 TAG(transform_tab_1) #define TAG_TAB_2 TAG(transform_tab_2) #define TAG_TAB_3 TAG(transform_tab_3) diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h index c50680c007..febc46f85d 100644 --- a/src/mesa/swrast/s_aatritemp.h +++ b/src/mesa/swrast/s_aatritemp.h @@ -1,4 +1,4 @@ -/* $Id: s_aatritemp.h,v 1.5 2001/01/05 02:26:49 keithw Exp $ */ +/* $Id: s_aatritemp.h,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -322,7 +322,7 @@ n = (GLuint) ix - (GLuint) startX; #ifdef DO_MULTITEX # ifdef DO_SPEC - gl_write_multitexture_span(ctx, n, startX, iy, z, fog, + _mesa_write_multitexture_span(ctx, n, startX, iy, z, fog, (const GLfloat (*)[MAX_WIDTH]) s, (const GLfloat (*)[MAX_WIDTH]) t, (const GLfloat (*)[MAX_WIDTH]) u, @@ -330,7 +330,7 @@ rgba, (const GLchan (*)[4]) spec, GL_POLYGON); # else - gl_write_multitexture_span(ctx, n, startX, iy, z, fog, + _mesa_write_multitexture_span(ctx, n, startX, iy, z, fog, (const GLfloat (*)[MAX_WIDTH]) s, (const GLfloat (*)[MAX_WIDTH]) t, (const GLfloat (*)[MAX_WIDTH]) u, @@ -338,18 +338,18 @@ # endif #elif defined(DO_TEX) # ifdef DO_SPEC - gl_write_texture_span(ctx, n, startX, iy, z, fog, + _mesa_write_texture_span(ctx, n, startX, iy, z, fog, s, t, u, lambda, rgba, (const GLchan (*)[4]) spec, GL_POLYGON); # else - gl_write_texture_span(ctx, n, startX, iy, z, fog, + _mesa_write_texture_span(ctx, n, startX, iy, z, fog, s, t, u, lambda, rgba, NULL, GL_POLYGON); # endif #elif defined(DO_RGBA) - gl_write_rgba_span(ctx, n, startX, iy, z, fog, rgba, GL_POLYGON); + _mesa_write_rgba_span(ctx, n, startX, iy, z, fog, rgba, GL_POLYGON); #elif defined(DO_INDEX) - gl_write_index_span(ctx, n, startX, iy, z, fog, index, GL_POLYGON); + _mesa_write_index_span(ctx, n, startX, iy, z, fog, index, GL_POLYGON); #endif } } @@ -447,7 +447,7 @@ } } # ifdef DO_SPEC - gl_write_multitexture_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_multitexture_span(ctx, n, left, iy, z + left, fog + left, (const GLfloat (*)[MAX_WIDTH]) s, (const GLfloat (*)[MAX_WIDTH]) t, (const GLfloat (*)[MAX_WIDTH]) u, @@ -455,7 +455,7 @@ (const GLchan (*)[4]) (spec + left), GL_POLYGON); # else - gl_write_multitexture_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_multitexture_span(ctx, n, left, iy, z + left, fog + left, (const GLfloat (*)[MAX_WIDTH]) s, (const GLfloat (*)[MAX_WIDTH]) t, (const GLfloat (*)[MAX_WIDTH]) u, @@ -464,22 +464,22 @@ # endif #elif defined(DO_TEX) # ifdef DO_SPEC - gl_write_texture_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_texture_span(ctx, n, left, iy, z + left, fog + left, s + left, t + left, u + left, lambda + left, rgba + left, (const GLchan (*)[4]) (spec + left), GL_POLYGON); # else - gl_write_texture_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_texture_span(ctx, n, left, iy, z + left, fog + left, s + left, t + left, u + left, lambda + left, rgba + left, NULL, GL_POLYGON); # endif #elif defined(DO_RGBA) - gl_write_rgba_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_rgba_span(ctx, n, left, iy, z + left, fog + left, rgba + left, GL_POLYGON); #elif defined(DO_INDEX) - gl_write_index_span(ctx, n, left, iy, z + left, fog + left, + _mesa_write_index_span(ctx, n, left, iy, z + left, fog + left, index + left, GL_POLYGON); #endif } diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index a70cab0364..d7f7dd9e0d 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -1,4 +1,4 @@ -/* $Id: s_accum.c,v 1.4 2001/01/23 23:39:37 brianp Exp $ */ +/* $Id: s_accum.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -82,7 +82,7 @@ _mesa_alloc_accum_buffer( GLcontext *ctx ) ctx->DrawBuffer->Accum = (GLaccum *) MALLOC( n ); if (!ctx->DrawBuffer->Accum) { /* unable to setup accumulation buffer */ - gl_error( ctx, GL_OUT_OF_MEMORY, "glAccum" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glAccum" ); } #ifdef USE_OPTIMIZED_ACCUM swrast->_IntegerAccumMode = GL_TRUE; @@ -332,7 +332,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, for (j = 0; j < height; j++) { GLuint i, i4; - gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i = i4 = 0; i < width; i++, i4+=4) { acc[i4+0] += rgba[i][RCOMP]; acc[i4+1] += rgba[i][GCOMP]; @@ -353,7 +353,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, for (j=0;jDrawBuffer->Accum + ypos * width4 + xpos * 4; GLuint i; - gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i=0;i_IntegerAccumScaler <= 1.0); for (j = 0; j < height; j++) { GLuint i, i4; - gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i = i4 = 0; i < width; i++, i4 += 4) { acc[i4+0] = rgba[i][RCOMP]; acc[i4+1] = rgba[i][GCOMP]; @@ -417,7 +417,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, GLuint i, j; for (j = 0; j < height; j++) { GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4; - gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i=0;iFrontLeftAlpha = (GLchan *) MALLOC( bytes ); if (!buf->FrontLeftAlpha) { /* out of memory */ - gl_error( ctx, GL_OUT_OF_MEMORY, + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate front-left alpha buffer" ); } @@ -77,7 +77,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf ) buf->BackLeftAlpha = (GLchan *) MALLOC( bytes ); if (!buf->BackLeftAlpha) { /* out of memory */ - gl_error( ctx, GL_OUT_OF_MEMORY, + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate back-left alpha buffer" ); } } @@ -89,7 +89,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf ) buf->FrontRightAlpha = (GLchan *) MALLOC( bytes ); if (!buf->FrontRightAlpha) { /* out of memory */ - gl_error( ctx, GL_OUT_OF_MEMORY, + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate front-right alpha buffer" ); } @@ -100,7 +100,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf ) buf->BackRightAlpha = (GLchan *) MALLOC( bytes ); if (!buf->BackRightAlpha) { /* out of memory */ - gl_error( ctx, GL_OUT_OF_MEMORY, + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate back-right alpha buffer" ); } } diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index ffeb268e7e..3a77004520 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -1,4 +1,4 @@ -/* $Id: s_bitmap.c,v 1.4 2001/01/23 23:39:37 brianp Exp $ */ +/* $Id: s_bitmap.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -123,7 +123,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, } } - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c index 9b13a10903..2c5d288931 100644 --- a/src/mesa/swrast/s_blend.c +++ b/src/mesa/swrast/s_blend.c @@ -1,4 +1,4 @@ -/* $Id: s_blend.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */ +/* $Id: s_blend.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -325,7 +325,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], break; default: /* this should never happen */ - gl_problem(ctx, "Bad blend source RGB factor in do_blend"); + _mesa_problem(ctx, "Bad blend source RGB factor in do_blend"); return; } @@ -379,7 +379,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], default: /* this should never happen */ sA = 0.0F; - gl_problem(ctx, "Bad blend source A factor in do_blend"); + _mesa_problem(ctx, "Bad blend source A factor in do_blend"); } /* Dest RGB factor */ @@ -441,7 +441,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], default: /* this should never happen */ dR = dG = dB = 0.0F; - gl_problem(ctx, "Bad blend dest RGB factor in do_blend"); + _mesa_problem(ctx, "Bad blend dest RGB factor in do_blend"); } /* Dest Alpha factor */ @@ -491,7 +491,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], default: /* this should never happen */ dA = 0.0F; - gl_problem(ctx, "Bad blend dest A factor in do_blend"); + _mesa_problem(ctx, "Bad blend dest A factor in do_blend"); return; } @@ -537,7 +537,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[], else { /* should never get here */ r = g = b = a = 0.0F; /* silence uninitialized var warning */ - gl_problem(ctx, "unexpected BlendEquation in blend_general()"); + _mesa_problem(ctx, "unexpected BlendEquation in blend_general()"); } /* final clamping */ @@ -622,7 +622,7 @@ _mesa_blend_span( GLcontext *ctx, GLuint n, GLint x, GLint y, } /* Read span of current frame buffer pixels */ - gl_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); SWRAST_CONTEXT(ctx)->BlendFunc( ctx, n, mask, rgba, (const GLchan (*)[4])dest ); diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 6f7ad2a4da..a681ac6d11 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -1,4 +1,4 @@ -/* $Id: s_context.c,v 1.15 2001/02/24 18:25:52 keithw Exp $ */ +/* $Id: s_context.c,v 1.16 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -422,7 +422,7 @@ _swrast_CreateContext( GLcontext *ctx ) if (!swrast) return GL_FALSE; - swrast->PB = gl_alloc_pb(); + swrast->PB = _mesa_alloc_pb(); if (!swrast->PB) { FREE(swrast); return GL_FALSE; diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index 46971b4654..22fcd3c2a8 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -1,4 +1,4 @@ -/* $Id: s_copypix.c,v 1.12 2001/02/22 17:59:24 brianp Exp $ */ +/* $Id: s_copypix.c,v 1.13 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -134,13 +134,13 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, /* allocate space for GLfloat image */ tmpImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); return; } convImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!convImage) { FREE(tmpImage); - gl_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); return; } @@ -164,7 +164,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, for (row = 0; row < height; row++) { GLchan rgba[MAX_WIDTH][4]; GLint i; - gl_read_rgba_span(ctx, ctx->ReadBuffer, width, srcx, srcy + row, rgba); + _mesa_read_rgba_span(ctx, ctx->ReadBuffer, width, srcx, srcy + row, rgba); /* convert GLchan to GLfloat */ for (i = 0; i < width; i++) { *dest++ = (GLfloat) rgba[i][RCOMP] * (1.0F / CHAN_MAXF); @@ -281,11 +281,11 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, (const GLchan (*)[4])rgba, NULL ); } else if (zoom) { - gl_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, + _mesa_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, (const GLchan (*)[4])rgba, desty); } else { - gl_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP ); + _mesa_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP ); } } @@ -364,7 +364,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint ssy = sy; tmpImage = (GLchan *) MALLOC(width * height * sizeof(GLchan) * 4); if (!tmpImage) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; } p = tmpImage; @@ -381,7 +381,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, ctx->ReadBuffer->Alpha = ctx->ReadBuffer->BackRightAlpha; } for (j = 0; j < height; j++, ssy += stepy) { - gl_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, ssy, + _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, ssy, (GLchan (*)[4]) p ); p += (width * sizeof(GLchan) * 4); } @@ -417,7 +417,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, ctx->ReadBuffer->Alpha = ctx->ReadBuffer->BackRightAlpha; } } - gl_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, sy, rgba ); + _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, sy, rgba ); } if (changeBuffer) { @@ -525,11 +525,11 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, (const GLchan (*)[4])rgba, NULL ); } else if (zoom) { - gl_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, + _mesa_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, (const GLchan (*)[4])rgba, desty); } else { - gl_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP ); + _mesa_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP ); } } @@ -591,7 +591,7 @@ static void copy_ci_pixels( GLcontext *ctx, GLint ssy = sy; tmpImage = (GLuint *) MALLOC(width * height * sizeof(GLuint)); if (!tmpImage) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; } p = tmpImage; @@ -600,7 +600,7 @@ static void copy_ci_pixels( GLcontext *ctx, ctx->Pixel.DriverReadBuffer ); } for (j = 0; j < height; j++, ssy += stepy) { - gl_read_index_span( ctx, ctx->ReadBuffer, width, srcx, ssy, p ); + _mesa_read_index_span( ctx, ctx->ReadBuffer, width, srcx, ssy, p ); p += width; } p = tmpImage; @@ -621,7 +621,7 @@ static void copy_ci_pixels( GLcontext *ctx, (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer, ctx->Pixel.DriverReadBuffer ); } - gl_read_index_span( ctx, ctx->ReadBuffer, width, srcx, sy, indexes ); + _mesa_read_index_span( ctx, ctx->ReadBuffer, width, srcx, sy, indexes ); } if (changeBuffer) { @@ -638,10 +638,10 @@ static void copy_ci_pixels( GLcontext *ctx, } if (zoom) { - gl_write_zoomed_index_span( ctx, width, destx, dy, zspan, 0, indexes, desty ); + _mesa_write_zoomed_index_span( ctx, width, destx, dy, zspan, 0, indexes, desty ); } else { - gl_write_index_span(ctx, width, destx, dy, zspan, 0, indexes, GL_BITMAP); + _mesa_write_index_span(ctx, width, destx, dy, zspan, 0, indexes, GL_BITMAP); } } @@ -673,7 +673,7 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLint overlapping; if (!ctx->Visual.depthBits) { - gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" ); return; } @@ -712,7 +712,7 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLint ssy = sy; tmpImage = (GLfloat *) MALLOC(width * height * sizeof(GLfloat)); if (!tmpImage) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; } p = tmpImage; @@ -743,21 +743,21 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, if (ctx->Visual.rgbMode) { if (zoom) { - gl_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, + _mesa_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0, (const GLchan (*)[4])rgba, desty ); } else { - gl_write_rgba_span( ctx, width, destx, dy, zspan, 0, + _mesa_write_rgba_span( ctx, width, destx, dy, zspan, 0, rgba, GL_BITMAP); } } else { if (zoom) { - gl_write_zoomed_index_span( ctx, width, destx, dy, + _mesa_write_zoomed_index_span( ctx, width, destx, dy, zspan, 0, indexes, desty ); } else { - gl_write_index_span( ctx, width, destx, dy, + _mesa_write_index_span( ctx, width, destx, dy, zspan, 0, indexes, GL_BITMAP ); } } @@ -781,7 +781,7 @@ static void copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLint overlapping; if (!ctx->Visual.stencilBits) { - gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" ); return; } @@ -806,7 +806,7 @@ static void copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLint ssy = sy; tmpImage = (GLstencil *) MALLOC(width * height * sizeof(GLstencil)); if (!tmpImage) { - gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; } p = tmpImage; @@ -840,7 +840,7 @@ static void copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, } if (zoom) { - gl_write_zoomed_stencil_span( ctx, width, destx, dy, stencil, desty ); + _mesa_write_zoomed_stencil_span( ctx, width, destx, dy, stencil, desty ); } else { _mesa_write_stencil_span( ctx, width, destx, dy, stencil ); @@ -876,6 +876,6 @@ _swrast_CopyPixels( GLcontext *ctx, copy_stencil_pixels( ctx, srcx, srcy, width, height, destx, desty ); } else { - gl_error( ctx, GL_INVALID_ENUM, "glCopyPixels" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glCopyPixels" ); } } diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index c5e1b45d10..1266d31848 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1,4 +1,4 @@ -/* $Id: s_depth.c,v 1.5 2001/02/08 15:57:01 brianp Exp $ */ +/* $Id: s_depth.c,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -294,7 +294,7 @@ depth_test_span16( GLcontext *ctx, GLuint n, GLint x, GLint y, BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in depth_test_span16"); + _mesa_problem(ctx, "Bad depth func in depth_test_span16"); } return passed; @@ -523,7 +523,7 @@ depth_test_span32( GLcontext *ctx, GLuint n, GLint x, GLint y, BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in depth_test_span32"); + _mesa_problem(ctx, "Bad depth func in depth_test_span32"); } return passed; @@ -806,7 +806,7 @@ software_depth_test_pixels16( GLcontext *ctx, GLuint n, BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in software_depth_test_pixels"); + _mesa_problem(ctx, "Bad depth func in software_depth_test_pixels"); } } @@ -1052,7 +1052,7 @@ software_depth_test_pixels32( GLcontext *ctx, GLuint n, BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in software_depth_test_pixels"); + _mesa_problem(ctx, "Bad depth func in software_depth_test_pixels"); } } @@ -1286,7 +1286,7 @@ hardware_depth_test_pixels( GLcontext *ctx, GLuint n, GLdepth zbuffer[], BZERO(mask, n * sizeof(GLubyte)); break; default: - gl_problem(ctx, "Bad depth func in hardware_depth_test_pixels"); + _mesa_problem(ctx, "Bad depth func in hardware_depth_test_pixels"); } } @@ -1507,7 +1507,7 @@ _mesa_alloc_depth_buffer( GLcontext *ctx ) /* out of memory */ ctx->Depth.Test = GL_FALSE; ctx->NewState |= _NEW_DEPTH; - gl_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate depth buffer" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "Couldn't allocate depth buffer" ); } } } diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 94d8d873a2..68caa3a23c 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -1,4 +1,4 @@ -/* $Id: s_drawpix.c,v 1.10 2001/02/20 16:42:26 brianp Exp $ */ +/* $Id: s_drawpix.c,v 1.11 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -130,7 +130,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, rowLength = width; /* If we're not using pixel zoom then do all clipping calculations - * now. Otherwise, we'll let the gl_write_zoomed_*_span() functions + * now. Otherwise, we'll let the _mesa_write_zoomed_*_span() functions * handle the clipping. */ if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) { @@ -230,7 +230,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, /* with zooming */ GLint row; for (row=0; rowUnpack, ctx->_ImageTransferState); if (zoom) { - gl_write_zoomed_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, desty); + _mesa_write_zoomed_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, desty); } else { - gl_write_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, GL_BITMAP); + _mesa_write_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, GL_BITMAP); } } } @@ -543,7 +543,7 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y, type != GL_UNSIGNED_INT && type != GL_FLOAT && type != GL_BITMAP) { - gl_error( ctx, GL_INVALID_ENUM, "glDrawPixels(stencil type)"); + _mesa_error( ctx, GL_INVALID_ENUM, "glDrawPixels(stencil type)"); return; } @@ -566,7 +566,7 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y, } if (zoom) { - gl_write_zoomed_stencil_span( ctx, (GLuint) drawWidth, x, y, + _mesa_write_zoomed_stencil_span( ctx, (GLuint) drawWidth, x, y, values, desty ); } else { @@ -599,7 +599,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, && type != GL_INT && type != GL_UNSIGNED_INT && type != GL_FLOAT) { - gl_error(ctx, GL_INVALID_ENUM, "glDrawPixels(type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawPixels(type)"); return; } @@ -636,7 +636,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, GLint i; for (i = 0; i < width; i++) zspan[i] = zptr[i]; - gl_write_rgba_span( ctx, width, x, y, zspan, 0, rgba, GL_BITMAP ); + _mesa_write_rgba_span( ctx, width, x, y, zspan, 0, rgba, GL_BITMAP ); } } else if (type==GL_UNSIGNED_INT && ctx->Visual.depthBits == 32 @@ -646,7 +646,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, for (row = 0; row < height; row++, y++) { const GLuint *zptr = _mesa_image_address(&ctx->Unpack, pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0); - gl_write_rgba_span( ctx, width, x, y, zptr, 0, rgba, GL_BITMAP ); + _mesa_write_rgba_span( ctx, width, x, y, zptr, 0, rgba, GL_BITMAP ); } } else { @@ -670,20 +670,20 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, if (ctx->Visual.rgbMode) { if (zoom) { - gl_write_zoomed_rgba_span(ctx, width, x, y, zspan, 0, + _mesa_write_zoomed_rgba_span(ctx, width, x, y, zspan, 0, (const GLchan (*)[4]) rgba, desty); } else { - gl_write_rgba_span(ctx, width, x, y, zspan, 0, rgba, GL_BITMAP); + _mesa_write_rgba_span(ctx, width, x, y, zspan, 0, rgba, GL_BITMAP); } } else { if (zoom) { - gl_write_zoomed_index_span(ctx, width, x, y, zspan, 0, + _mesa_write_zoomed_index_span(ctx, width, x, y, zspan, 0, ispan, GL_BITMAP); } else { - gl_write_index_span(ctx, width, x, y, zspan, 0, + _mesa_write_index_span(ctx, width, x, y, zspan, 0, ispan, GL_BITMAP); } } @@ -710,7 +710,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, GLuint transferOps = ctx->_ImageTransferState; if (!_mesa_is_legal_format_and_type(format, type)) { - gl_error(ctx, GL_INVALID_ENUM, "glDrawPixels(format or type)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glDrawPixels(format or type)"); return; } @@ -750,13 +750,13 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, tmpImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); return; } convImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!convImage) { FREE(tmpImage); - gl_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); return; } @@ -832,11 +832,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, (CONST GLchan (*)[]) rgba, NULL); } else if (zoom) { - gl_write_zoomed_rgba_span( ctx, width, x, y, zspan, 0, + _mesa_write_zoomed_rgba_span( ctx, width, x, y, zspan, 0, (CONST GLchan (*)[]) rgba, desty ); } else { - gl_write_rgba_span( ctx, (GLuint) width, x, y, zspan, 0, + _mesa_write_rgba_span( ctx, (GLuint) width, x, y, zspan, 0, rgba, GL_BITMAP); } } @@ -892,7 +892,7 @@ _swrast_DrawPixels( GLcontext *ctx, draw_rgba_pixels(ctx, x, y, width, height, format, type, pixels); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glDrawPixels(format)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glDrawPixels(format)" ); } } diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c index fa670d1639..2bb9f301e8 100644 --- a/src/mesa/swrast/s_feedback.c +++ b/src/mesa/swrast/s_feedback.c @@ -1,4 +1,4 @@ -/* $Id: s_feedback.c,v 1.5 2001/01/23 23:39:37 brianp Exp $ */ +/* $Id: s_feedback.c,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -79,19 +79,19 @@ static void feedback_vertex( GLcontext *ctx, index = v->index; - gl_feedback_vertex( ctx, win, color, index, tc ); + _mesa_feedback_vertex( ctx, win, color, index, tc ); } /* * Put triangle in feedback buffer. */ -void gl_feedback_triangle( GLcontext *ctx, +void _mesa_feedback_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2) { - if (gl_cull_triangle( ctx, v0, v1, v2 )) { + if (_mesa_cull_triangle( ctx, v0, v1, v2 )) { FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN ); FEEDBACK_TOKEN( ctx, (GLfloat) 3 ); /* three vertices */ @@ -108,7 +108,7 @@ void gl_feedback_triangle( GLcontext *ctx, } -void gl_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) +void _mesa_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) { GLenum token = GL_LINE_TOKEN; SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -130,40 +130,40 @@ void gl_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) } -void gl_feedback_point( GLcontext *ctx, const SWvertex *v ) +void _mesa_feedback_point( GLcontext *ctx, const SWvertex *v ) { FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POINT_TOKEN ); feedback_vertex( ctx, v, v ); } -void gl_select_triangle( GLcontext *ctx, +void _mesa_select_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2) { - if (gl_cull_triangle( ctx, v0, v1, v2 )) { + if (_mesa_cull_triangle( ctx, v0, v1, v2 )) { const GLfloat zs = 1.0F / ctx->DepthMaxF; - gl_update_hitflag( ctx, v0->win[2] * zs ); - gl_update_hitflag( ctx, v1->win[2] * zs ); - gl_update_hitflag( ctx, v2->win[2] * zs ); + _mesa_update_hitflag( ctx, v0->win[2] * zs ); + _mesa_update_hitflag( ctx, v1->win[2] * zs ); + _mesa_update_hitflag( ctx, v2->win[2] * zs ); } } -void gl_select_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) +void _mesa_select_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) { const GLfloat zs = 1.0F / ctx->DepthMaxF; - gl_update_hitflag( ctx, v0->win[2] * zs ); - gl_update_hitflag( ctx, v1->win[2] * zs ); + _mesa_update_hitflag( ctx, v0->win[2] * zs ); + _mesa_update_hitflag( ctx, v1->win[2] * zs ); } -void gl_select_point( GLcontext *ctx, const SWvertex *v ) +void _mesa_select_point( GLcontext *ctx, const SWvertex *v ) { const GLfloat zs = 1.0F / ctx->DepthMaxF; - gl_update_hitflag( ctx, v->win[2] * zs ); + _mesa_update_hitflag( ctx, v->win[2] * zs ); } diff --git a/src/mesa/swrast/s_feedback.h b/src/mesa/swrast/s_feedback.h index b0a1d04ee6..bd84f0dc8a 100644 --- a/src/mesa/swrast/s_feedback.h +++ b/src/mesa/swrast/s_feedback.h @@ -1,4 +1,4 @@ -/* $Id: s_feedback.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */ +/* $Id: s_feedback.h,v 1.4 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -33,20 +33,20 @@ #include "swrast.h" -extern void gl_feedback_point( GLcontext *ctx, const SWvertex *v ); +extern void _mesa_feedback_point( GLcontext *ctx, const SWvertex *v ); -extern void gl_feedback_line( GLcontext *ctx, +extern void _mesa_feedback_line( GLcontext *ctx, const SWvertex *v1, const SWvertex *v2 ); -extern void gl_feedback_triangle( GLcontext *ctx, const SWvertex *v0, +extern void _mesa_feedback_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ); -extern void gl_select_point( GLcontext *ctx, const SWvertex *v ); +extern void _mesa_select_point( GLcontext *ctx, const SWvertex *v ); -extern void gl_select_line( GLcontext *ctx, +extern void _mesa_select_line( GLcontext *ctx, const SWvertex *v1, const SWvertex *v2 ); -extern void gl_select_triangle( GLcontext *ctx, const SWvertex *v0, +extern void _mesa_select_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ); #endif diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index f103bdb02d..7c2d519173 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -1,4 +1,4 @@ -/* $Id: s_fog.c,v 1.8 2001/01/03 22:55:26 brianp Exp $ */ +/* $Id: s_fog.c,v 1.9 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -234,7 +234,7 @@ _mesa_win_fog_coords_from_z( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad fog mode in _mesa_win_fog_coords_from_z"); + _mesa_problem(ctx, "Bad fog mode in _mesa_win_fog_coords_from_z"); return; } } diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c index af62dba3d9..114ddeb320 100644 --- a/src/mesa/swrast/s_lines.c +++ b/src/mesa/swrast/s_lines.c @@ -1,4 +1,4 @@ -/* $Id: s_lines.c,v 1.11 2001/02/16 18:14:41 keithw Exp $ */ +/* $Id: s_lines.c,v 1.12 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -67,7 +67,7 @@ static void flat_ci_line( GLcontext *ctx, #include "s_linetemp.h" - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -86,7 +86,7 @@ static void flat_ci_z_line( GLcontext *ctx, #include "s_linetemp.h" - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -105,7 +105,7 @@ static void flat_rgba_line( GLcontext *ctx, #include "s_linetemp.h" - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -125,7 +125,7 @@ static void flat_rgba_z_line( GLcontext *ctx, #include "s_linetemp.h" - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -155,7 +155,7 @@ static void smooth_ci_line( GLcontext *ctx, #include "s_linetemp.h" PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -188,7 +188,7 @@ static void smooth_ci_z_line( GLcontext *ctx, #include "s_linetemp.h" PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -222,7 +222,7 @@ static void smooth_rgba_line( GLcontext *ctx, #include "s_linetemp.h" PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -262,14 +262,14 @@ static void smooth_rgba_z_line( GLcontext *ctx, #include "s_linetemp.h" PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } #define CHECK_FULL(count) \ if (count >= PB_SIZE-MAX_WIDTH) { \ PB->count = count; \ - gl_flush_pb(ctx); \ + _mesa_flush_pb(ctx); \ count = PB->count; \ } @@ -351,7 +351,7 @@ static void general_smooth_ci_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -423,7 +423,7 @@ static void general_flat_ci_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -526,7 +526,7 @@ static void general_smooth_rgba_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -569,7 +569,7 @@ static void general_flat_rgba_line( GLcontext *ctx, } } - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -634,7 +634,7 @@ static void flat_textured_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -712,7 +712,7 @@ static void smooth_textured_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -809,7 +809,7 @@ static void smooth_multitextured_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -906,7 +906,7 @@ static void flat_multitextured_line( GLcontext *ctx, } PB->count = count; - gl_flush_pb(ctx); + _mesa_flush_pb(ctx); } @@ -1060,11 +1060,11 @@ _swrast_choose_line( GLcontext *ctx ) } } else if (ctx->RenderMode==GL_FEEDBACK) { - swrast->Line = gl_feedback_line; + swrast->Line = _mesa_feedback_line; } else { /* GL_SELECT mode */ - swrast->Line = gl_select_line; + swrast->Line = _mesa_select_line; } /*_mesa_print_line_function(ctx);*/ diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c index 10a4654b8a..c16a4b63a9 100644 --- a/src/mesa/swrast/s_logic.c +++ b/src/mesa/swrast/s_logic.c @@ -1,4 +1,4 @@ -/* $Id: s_logic.c,v 1.3 2001/02/13 23:50:25 brianp Exp $ */ +/* $Id: s_logic.c,v 1.4 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -155,7 +155,7 @@ static void index_logicop( GLcontext *ctx, GLuint n, } break; default: - gl_problem(ctx, "bad mode in index_logic()"); + _mesa_problem(ctx, "bad mode in index_logic()"); } } @@ -321,7 +321,7 @@ static void rgba_logicop( const GLcontext *ctx, GLuint n, break; default: /* should never happen */ - gl_problem(ctx, "Bad function in rgba_logicop"); + _mesa_problem(ctx, "Bad function in rgba_logicop"); } } @@ -337,7 +337,7 @@ _mesa_logicop_rgba_span( GLcontext *ctx, GLchan rgba[][4], const GLubyte mask[] ) { GLchan dest[MAX_WIDTH][4]; - gl_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); rgba_logicop( ctx, n, mask, (GLuint *) rgba, (const GLuint *) dest ); } diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c index b246da2053..a2d763067d 100644 --- a/src/mesa/swrast/s_masking.c +++ b/src/mesa/swrast/s_masking.c @@ -1,4 +1,4 @@ -/* $Id: s_masking.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */ +/* $Id: s_masking.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -58,7 +58,7 @@ _mesa_mask_rgba_span( GLcontext *ctx, GLuint *rgba32 = (GLuint *) rgba; GLuint *dest32 = (GLuint *) dest; - gl_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); for (i = 0; i < n; i++) { rgba32[i] = (rgba32[i] & srcMask) | (dest32[i] & dstMask); } @@ -70,7 +70,7 @@ _mesa_mask_rgba_span( GLcontext *ctx, const GLint bMask = ctx->Color.ColorMask[BCOMP]; const GLint aMask = ctx->Color.ColorMask[ACOMP]; - gl_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); for (i = 0; i < n; i++) { if (!rMask) rgba[i][RCOMP] = dest[i][RCOMP]; if (!gMask) rgba[i][GCOMP] = dest[i][GCOMP]; @@ -145,7 +145,7 @@ _mesa_mask_index_span( GLcontext *ctx, GLuint fbindexes[MAX_WIDTH]; GLuint msrc, mdest; - gl_read_index_span( ctx, ctx->DrawBuffer, n, x, y, fbindexes ); + _mesa_read_index_span( ctx, ctx->DrawBuffer, n, x, y, fbindexes ); msrc = ctx->Color.IndexMask; mdest = ~msrc; diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 85001291e4..70ff376df8 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -1,4 +1,4 @@ -/* $Id: s_points.c,v 1.13 2001/02/16 18:14:41 keithw Exp $ */ +/* $Id: s_points.c,v 1.14 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -269,11 +269,11 @@ _swrast_choose_point( GLcontext *ctx ) } } else if (ctx->RenderMode==GL_FEEDBACK) { - USE(gl_feedback_point); + USE(_mesa_feedback_point); } else { /* GL_SELECT mode */ - USE(gl_select_point); + USE(_mesa_select_point); } } diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 8514b5a1f9..4ca5af4c8f 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -1,4 +1,4 @@ -/* $Id: s_readpix.c,v 1.7 2001/02/16 23:29:14 brianp Exp $ */ +/* $Id: s_readpix.c,v 1.8 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -57,7 +57,7 @@ read_index_pixels( GLcontext *ctx, /* error checking */ if (ctx->Visual.rgbMode) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); return; } @@ -100,7 +100,7 @@ read_depth_pixels( GLcontext *ctx, /* Error checking */ if (ctx->Visual.depthBits <= 0) { /* No depth buffer */ - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); return; } @@ -113,7 +113,7 @@ read_depth_pixels( GLcontext *ctx, type != GL_INT && type != GL_UNSIGNED_INT && type != GL_FLOAT) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels(depth type)"); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels(depth type)"); return; } @@ -179,7 +179,7 @@ read_stencil_pixels( GLcontext *ctx, type != GL_UNSIGNED_INT && type != GL_FLOAT && type != GL_BITMAP) { - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels(stencil type)"); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels(stencil type)"); return; } @@ -187,7 +187,7 @@ read_stencil_pixels( GLcontext *ctx, if (ctx->Visual.stencilBits <= 0) { /* No stencil buffer */ - gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); + _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels" ); return; } @@ -350,13 +350,13 @@ read_rgba_pixels( GLcontext *ctx, /* valid pixel type */ break; default: - gl_error( ctx, GL_INVALID_ENUM, "glReadPixels(type)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(type)" ); return; } if (!_mesa_is_legal_format_and_type(format, type) || format == GL_INTENSITY) { - gl_error(ctx, GL_INVALID_OPERATION, "glReadPixels(format or type)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(format or type)"); return; } @@ -367,13 +367,13 @@ read_rgba_pixels( GLcontext *ctx, tmpImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { - gl_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); return; } convImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat)); if (!convImage) { FREE(tmpImage); - gl_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); return; } @@ -382,7 +382,7 @@ read_rgba_pixels( GLcontext *ctx, for (row = 0; row < height; row++, y++) { GLchan rgba[MAX_WIDTH][4]; if (ctx->Visual.rgbMode) { - gl_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); + _mesa_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); } else { GLuint index[MAX_WIDTH]; @@ -428,7 +428,7 @@ read_rgba_pixels( GLcontext *ctx, GLchan rgba[MAX_WIDTH][4]; GLvoid *dst; if (ctx->Visual.rgbMode) { - gl_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); + _mesa_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); } else { GLuint index[MAX_WIDTH]; @@ -506,6 +506,6 @@ _swrast_ReadPixels( GLcontext *ctx, format, type, pixels, &ctx->Pack); break; default: - gl_error( ctx, GL_INVALID_ENUM, "glReadPixels(format)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(format)" ); } } diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index cb62a8a10b..4197167e2d 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1,4 +1,4 @@ -/* $Id: s_span.c,v 1.9 2001/02/20 16:42:26 brianp Exp $ */ +/* $Id: s_span.c,v 1.10 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -177,7 +177,7 @@ static void multi_write_index_span( GLcontext *ctx, GLuint n, * index - array of [n] color indexes * primitive - either GL_POINT, GL_LINE, GL_POLYGON, or GL_BITMAP */ -void gl_write_index_span( GLcontext *ctx, +void _mesa_write_index_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], GLuint indexIn[], GLenum primitive ) @@ -268,7 +268,7 @@ void gl_write_index_span( GLcontext *ctx, -void gl_write_monoindex_span( GLcontext *ctx, +void _mesa_write_monoindex_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -441,7 +441,7 @@ static void multi_write_rgba_span( GLcontext *ctx, GLuint n, -void gl_write_rgba_span( GLcontext *ctx, +void _mesa_write_rgba_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed *fog, GLchan rgbaIn[][4], @@ -577,7 +577,7 @@ void gl_write_rgba_span( GLcontext *ctx, * r, g, b, a - the color of the pixels * primitive - either GL_POINT, GL_LINE, GL_POLYGON or GL_BITMAP. */ -void gl_write_monocolor_span( GLcontext *ctx, +void _mesa_write_monocolor_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], const GLchan color[4], @@ -760,7 +760,7 @@ static void add_colors(GLuint n, GLchan rgba[][4], CONST GLchan specular[][4] ) * rgba - array of [n] color components * primitive - either GL_POINT, GL_LINE, GL_POLYGON or GL_BITMAP. */ -void gl_write_texture_span( GLcontext *ctx, +void _mesa_write_texture_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], const GLfloat s[], const GLfloat t[], @@ -902,7 +902,7 @@ void gl_write_texture_span( GLcontext *ctx, * As above but perform multiple stages of texture application. */ void -gl_write_multitexture_span( GLcontext *ctx, +_mesa_write_multitexture_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -1057,7 +1057,7 @@ gl_write_multitexture_span( GLcontext *ctx, * Read RGBA pixels from frame buffer. Clipping will be done to prevent * reading ouside the buffer's boundaries. */ -void gl_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, +void _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLchan rgba[][4] ) { @@ -1110,7 +1110,7 @@ void gl_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, * Read CI pixels from frame buffer. Clipping will be done to prevent * reading ouside the buffer's boundaries. */ -void gl_read_index_span( GLcontext *ctx, GLframebuffer *buffer, +void _mesa_read_index_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLuint indx[] ) { if (y < 0 || y >= buffer->Height diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index eb866d66ff..d4c77715c3 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -1,4 +1,4 @@ -/* $Id: s_span.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */ +/* $Id: s_span.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -36,26 +36,26 @@ #include "swrast.h" -extern void gl_write_index_span( GLcontext *ctx, +extern void _mesa_write_index_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], GLuint index[], GLenum primitive ); -extern void gl_write_monoindex_span( GLcontext *ctx, +extern void _mesa_write_monoindex_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], GLuint index, GLenum primitive ); -extern void gl_write_rgba_span( GLcontext *ctx, +extern void _mesa_write_rgba_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], GLchan rgba[][4], GLenum primitive ); -extern void gl_write_monocolor_span( GLcontext *ctx, +extern void _mesa_write_monocolor_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -63,7 +63,7 @@ extern void gl_write_monocolor_span( GLcontext *ctx, GLenum primitive ); -extern void gl_write_texture_span( GLcontext *ctx, +extern void _mesa_write_texture_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -74,7 +74,7 @@ extern void gl_write_texture_span( GLcontext *ctx, extern void -gl_write_multitexture_span( GLcontext *ctx, +_mesa_write_multitexture_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLfixed fog[], @@ -87,12 +87,12 @@ gl_write_multitexture_span( GLcontext *ctx, GLenum primitive ); -extern void gl_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, +extern void _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLchan rgba[][4] ); -extern void gl_read_index_span( GLcontext *ctx, GLframebuffer *buffer, +extern void _mesa_read_index_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLuint indx[] ); diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index dd17acfd2b..a69bd3c96c 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -1,4 +1,4 @@ -/* $Id: s_stencil.c,v 1.7 2001/02/23 23:14:11 brianp Exp $ */ +/* $Id: s_stencil.c,v 1.8 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -219,7 +219,7 @@ static void apply_stencil_op( const GLcontext *ctx, GLenum oper, } break; default: - gl_problem(ctx, "Bad stencil op in apply_stencil_op"); + _mesa_problem(ctx, "Bad stencil op in apply_stencil_op"); } } @@ -391,7 +391,7 @@ do_stencil_test( GLcontext *ctx, GLuint n, GLstencil stencil[], } break; default: - gl_problem(ctx, "Bad stencil func in gl_stencil_span"); + _mesa_problem(ctx, "Bad stencil func in gl_stencil_span"); return 0; } @@ -697,7 +697,7 @@ apply_stencil_op_to_pixels( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad stencilop in apply_stencil_op_to_pixels"); + _mesa_problem(ctx, "Bad stencilop in apply_stencil_op_to_pixels"); } } @@ -875,7 +875,7 @@ stencil_test_pixels( GLcontext *ctx, GLuint n, } break; default: - gl_problem(ctx, "Bad stencil func in gl_stencil_pixels"); + _mesa_problem(ctx, "Bad stencil func in gl_stencil_pixels"); return 0; } @@ -1118,7 +1118,7 @@ _mesa_alloc_stencil_buffer( GLcontext *ctx ) if (!ctx->DrawBuffer->Stencil) { /* out of memory */ /* _mesa_set_enable( ctx, GL_STENCIL_TEST, GL_FALSE ); */ - gl_error( ctx, GL_OUT_OF_MEMORY, "_mesa_alloc_stencil_buffer" ); + _mesa_error( ctx, GL_OUT_OF_MEMORY, "_mesa_alloc_stencil_buffer" ); } } diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 9c60c695c3..7b1b4e94e3 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -1,4 +1,4 @@ -/* $Id: s_texture.c,v 1.13 2001/02/26 18:24:37 brianp Exp $ */ +/* $Id: s_texture.c,v 1.14 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -208,7 +208,7 @@ palette_sample(const GLcontext *ctx, rgba[ACOMP] = palette[(index << 2) + 3]; return; default: - gl_problem(ctx, "Bad palette format in palette_sample"); + _mesa_problem(ctx, "Bad palette format in palette_sample"); } } @@ -467,7 +467,7 @@ sample_lambda_1d( GLcontext *ctx, GLuint texUnit, rgba[i]); break; default: - gl_problem(NULL, "Bad min filter in sample_1d_texture"); + _mesa_problem(NULL, "Bad min filter in sample_1d_texture"); return; } } @@ -483,7 +483,7 @@ sample_lambda_1d( GLcontext *ctx, GLuint texUnit, s[i], rgba[i]); break; default: - gl_problem(NULL, "Bad mag filter in sample_1d_texture"); + _mesa_problem(NULL, "Bad mag filter in sample_1d_texture"); return; } } @@ -767,7 +767,7 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit, s[i], t[i], rgba[i] ); break; default: - gl_problem(NULL, "Bad mag filter in sample_2d_texture"); + _mesa_problem(NULL, "Bad mag filter in sample_2d_texture"); } } else { @@ -800,7 +800,7 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit, lambda[i], rgba[i] ); break; default: - gl_problem(NULL, "Bad min filter in sample_2d_texture"); + _mesa_problem(NULL, "Bad min filter in sample_2d_texture"); return; } } @@ -816,7 +816,7 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit, s[i], t[i], rgba[i] ); break; default: - gl_problem(NULL, "Bad mag filter in sample_2d_texture"); + _mesa_problem(NULL, "Bad mag filter in sample_2d_texture"); } } } @@ -1249,7 +1249,7 @@ sample_lambda_3d( GLcontext *ctx, GLuint texUnit, lambda[i], rgba[i]); break; default: - gl_problem(NULL, "Bad min filterin sample_3d_texture"); + _mesa_problem(NULL, "Bad min filterin sample_3d_texture"); } } else { @@ -1264,7 +1264,7 @@ sample_lambda_3d( GLcontext *ctx, GLuint texUnit, s[i], t[i], u[i], rgba[i]); break; default: - gl_problem(NULL, "Bad mag filter in sample_3d_texture"); + _mesa_problem(NULL, "Bad mag filter in sample_3d_texture"); } } } @@ -1532,7 +1532,7 @@ sample_lambda_cube( GLcontext *ctx, GLuint texUnit, lambda[i], rgba[i]); break; default: - gl_problem(NULL, "Bad min filter in sample_lambda_cube"); + _mesa_problem(NULL, "Bad min filter in sample_lambda_cube"); } } else { @@ -1551,7 +1551,7 @@ sample_lambda_cube( GLcontext *ctx, GLuint texUnit, newS, newT, rgba[i]); break; default: - gl_problem(NULL, "Bad mag filter in sample_lambda_cube"); + _mesa_problem(NULL, "Bad mag filter in sample_lambda_cube"); } } } @@ -1664,7 +1664,7 @@ _swrast_choose_texture_sample_func( GLcontext *ctx, GLuint texUnit, } break; default: - gl_problem(NULL, "invalid dimensions in _mesa_set_texture_sampler"); + _mesa_problem(NULL, "invalid dimensions in _mesa_set_texture_sampler"); } } } @@ -1711,7 +1711,7 @@ texture_combine(const GLcontext *ctx, } break; default: - gl_problem(NULL, "invalid combine source"); + _mesa_problem(NULL, "invalid combine source"); } switch (textureUnit->CombineSourceRGB[j]) { @@ -1740,7 +1740,7 @@ texture_combine(const GLcontext *ctx, } break; default: - gl_problem(NULL, "invalid combine source"); + _mesa_problem(NULL, "invalid combine source"); } if (textureUnit->CombineOperandRGB[j] != GL_SRC_COLOR) { @@ -1909,7 +1909,7 @@ texture_combine(const GLcontext *ctx, } break; default: - gl_problem(NULL, "invalid combine mode"); + _mesa_problem(NULL, "invalid combine mode"); } switch (textureUnit->CombineModeA) { @@ -1976,7 +1976,7 @@ texture_combine(const GLcontext *ctx, } break; default: - gl_problem(NULL, "invalid combine mode"); + _mesa_problem(NULL, "invalid combine mode"); } /* Fix the alpha component for GL_DOT3_RGBA_EXT combining. @@ -2086,7 +2086,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_REPLACE) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_REPLACE) in apply_texture"); return; } break; @@ -2152,7 +2152,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_MODULATE) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_MODULATE) in apply_texture"); return; } break; @@ -2185,7 +2185,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_DECAL) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_DECAL) in apply_texture"); return; } break; @@ -2255,7 +2255,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_BLEND) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_BLEND) in apply_texture"); return; } break; @@ -2330,7 +2330,7 @@ apply_texture( const GLcontext *ctx, } break; default: - gl_problem(ctx, "Bad format (GL_ADD) in apply_texture"); + _mesa_problem(ctx, "Bad format (GL_ADD) in apply_texture"); return; } break; @@ -2340,7 +2340,7 @@ apply_texture( const GLcontext *ctx, break; default: - gl_problem(ctx, "Bad env mode in apply_texture"); + _mesa_problem(ctx, "Bad env mode in apply_texture"); return; } } @@ -2371,12 +2371,12 @@ sample_depth_texture(const GLcontext *ctx, GLboolean lequal, gequal; if (texObj->Dimensions != 2) { - gl_problem(ctx, "only 2-D depth textures supported at this time"); + _mesa_problem(ctx, "only 2-D depth textures supported at this time"); return; } if (texObj->MinFilter != texObj->MagFilter) { - gl_problem(ctx, "mipmapped depth textures not supported at this time"); + _mesa_problem(ctx, "mipmapped depth textures not supported at this time"); return; } @@ -2385,7 +2385,7 @@ sample_depth_texture(const GLcontext *ctx, * isn't a depth texture. */ if (texImage->Format != GL_DEPTH_COMPONENT) { - gl_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture"); + _mesa_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture"); return; } @@ -2548,12 +2548,12 @@ sample_depth_texture2(const GLcontext *ctx, GLboolean lequal, gequal; if (texObj->Dimensions != 2) { - gl_problem(ctx, "only 2-D depth textures supported at this time"); + _mesa_problem(ctx, "only 2-D depth textures supported at this time"); return; } if (texObj->MinFilter != texObj->MagFilter) { - gl_problem(ctx, "mipmapped depth textures not supported at this time"); + _mesa_problem(ctx, "mipmapped depth textures not supported at this time"); return; } @@ -2562,7 +2562,7 @@ sample_depth_texture2(const GLcontext *ctx, * isn't a depth texture. */ if (texImage->Format != GL_DEPTH_COMPONENT) { - gl_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture"); + _mesa_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture"); return; } diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 3b5d57c5d4..2baa2b5d29 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -1,4 +1,4 @@ -/* $Id: s_triangle.c,v 1.14 2001/03/03 00:37:27 brianp Exp $ */ +/* $Id: s_triangle.c,v 1.15 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -48,7 +48,7 @@ #include "s_span.h" #include "s_triangle.h" -GLboolean gl_cull_triangle( GLcontext *ctx, +GLboolean _mesa_cull_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ) @@ -89,7 +89,7 @@ static void flat_ci_triangle( GLcontext *ctx, fogspan[i] = fffog / 256; \ fffog += fdfogdx; \ } \ - gl_write_monoindex_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_monoindex_span( ctx, n, LEFT, Y, zspan, \ fogspan, v0->index, GL_POLYGON ); \ } \ } @@ -126,7 +126,7 @@ static void smooth_ci_triangle( GLcontext *ctx, fogspan[i] = fffog / 256; \ fffog += fdfogdx; \ } \ - gl_write_index_span( ctx, n, LEFT, Y, zspan, fogspan, \ + _mesa_write_index_span( ctx, n, LEFT, Y, zspan, fogspan, \ index, GL_POLYGON ); \ } \ } @@ -160,7 +160,7 @@ static void flat_rgba_triangle( GLcontext *ctx, fogspan[i] = fffog / 256; \ fffog += fdfogdx; \ } \ - gl_write_monocolor_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_monocolor_span( ctx, n, LEFT, Y, zspan, \ fogspan, v2->color, \ GL_POLYGON ); \ } \ @@ -210,7 +210,7 @@ static void smooth_rgba_triangle( GLcontext *ctx, ffb += fdbdx; \ ffa += fdadx; \ } \ - gl_write_rgba_span( ctx, n, LEFT, Y, \ + _mesa_write_rgba_span( ctx, n, LEFT, Y, \ (CONST GLdepth *) zspan, \ fogspan, \ rgba, GL_POLYGON ); \ @@ -409,7 +409,7 @@ static void affine_textured_triangle( GLcontext *ctx, comp = 4; \ break; \ default: \ - gl_problem(NULL, "Bad texture format in affine_texture_triangle");\ + _mesa_problem(NULL, "Bad texture format in affine_texture_triangle");\ return; \ } \ tbytesline = obj->Image[b]->Width * comp; \ @@ -648,7 +648,7 @@ static void affine_textured_triangle( GLcontext *ctx, } \ break; \ } \ - gl_write_rgba_span(ctx, n, LEFT, Y, zspan, \ + _mesa_write_rgba_span(ctx, n, LEFT, Y, zspan, \ fogspan, \ rgba, GL_POLYGON); \ /* explicit kill of variables: */ \ @@ -1385,7 +1385,7 @@ static void near_persp_textured_triangle(GLcontext *ctx, break; \ } \ } \ - gl_write_rgba_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_rgba_span( ctx, n, LEFT, Y, zspan, \ fogspan, rgba, GL_POLYGON); \ ffr = ffg = ffb = ffa = 0; \ } \ @@ -1465,7 +1465,7 @@ static void lin_persp_textured_triangle( GLcontext *ctx, comp = 4; \ break; \ default: \ - gl_problem(NULL, "Bad texture format in lin_persp_texture_triangle"); \ + _mesa_problem(NULL, "Bad texture format in lin_persp_texture_triangle"); \ return; \ } \ sscale = FIXED_SCALE * twidth; \ @@ -1570,7 +1570,7 @@ static void lin_persp_textured_triangle( GLcontext *ctx, abort(); \ } \ } \ - gl_write_rgba_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_rgba_span( ctx, n, LEFT, Y, zspan, \ fogspan, \ rgba, GL_POLYGON ); \ ffr = ffg = ffb = ffa = 0; \ @@ -1661,7 +1661,7 @@ static void general_textured_triangle( GLcontext *ctx, vv += dvdx; \ } \ } \ - gl_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ + _mesa_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ s, t, u, NULL, \ rgba, \ NULL, GL_POLYGON ); \ @@ -1765,7 +1765,7 @@ static void general_textured_spec_triangle1( GLcontext *ctx, vv += dvdx; \ } \ } \ - gl_write_texture_span( ctx, n, LEFT, Y, zspan, \ + _mesa_write_texture_span( ctx, n, LEFT, Y, zspan, \ fogspan, \ s, t, u, NULL, rgba, \ (CONST GLchan (*)[4]) spec, \ @@ -1869,7 +1869,7 @@ static void lambda_textured_triangle1( GLcontext *ctx, vv += dvdx; \ } \ } \ - gl_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ + _mesa_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ s, t, u, lambda, \ rgba, NULL, GL_POLYGON ); \ } \ @@ -1986,7 +1986,7 @@ static void lambda_textured_spec_triangle1( GLcontext *ctx, vv += dvdx; \ } \ } \ - gl_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ + _mesa_write_texture_span( ctx, n, LEFT, Y, zspan, fogspan, \ s, t, u, lambda, \ rgba, (CONST GLchan (*)[4]) spec, \ GL_POLYGON ); \ @@ -2042,8 +2042,6 @@ lambda_multitextured_triangle1( GLcontext *ctx, } \ } - - #define INNER_LOOP( LEFT, RIGHT, Y ) \ { \ GLint i; \ @@ -2054,6 +2052,7 @@ lambda_multitextured_triangle1( GLcontext *ctx, if (n > 0) { \ if (flat_shade) { \ for (i=0;iConst.MaxTextureUnits; unit++) {\ - if (ctx->Texture.Unit[unit]._ReallyEnabled) { \ - GLdouble invQ = 1.0 / vv[unit]; \ - s[unit][i] = ss[unit] * invQ; \ - t[unit][i] = tt[unit] * invQ; \ - u[unit][i] = uu[unit] * invQ; \ - COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit);\ - ss[unit] += dsdx[unit]; \ - tt[unit] += dtdx[unit]; \ - uu[unit] += dudx[unit]; \ - vv[unit] += dvdx[unit]; \ - } \ + for (unit=0; unit < ctx->Const.MaxTextureUnits; unit++) {\ + if (ctx->Texture.Unit[unit]._ReallyEnabled) { \ + GLdouble invQ = 1.0 / vv[unit]; \ + s[unit][i] = ss[unit] * invQ; \ + t[unit][i] = tt[unit] * invQ; \ + u[unit][i] = uu[unit] * invQ; \ + COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \ + ss[unit] += dsdx[unit]; \ + tt[unit] += dtdx[unit]; \ + uu[unit] += dudx[unit]; \ + vv[unit] += dvdx[unit]; \ } \ } \ } \ } \ else { /* smooth shade */ \ for (i=0;iConst.MaxTextureUnits; unit++) {\ - if (ctx->Texture.Unit[unit]._ReallyEnabled) { \ - GLdouble invQ = 1.0 / vv[unit]; \ - s[unit][i] = ss[unit] * invQ; \ - t[unit][i] = tt[unit] * invQ; \ - u[unit][i] = uu[unit] * invQ; \ - COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \ - ss[unit] += dsdx[unit]; \ - tt[unit] += dtdx[unit]; \ - uu[unit] += dudx[unit]; \ - vv[unit] += dvdx[unit]; \ - } \ + for (unit=0; unit < ctx->Const.MaxTextureUnits; unit++) {\ + if (ctx->Texture.Unit[unit]._ReallyEnabled) { \ + GLdouble invQ = 1.0 / vv[unit]; \ + s[unit][i] = ss[unit] * invQ; \ + t[unit][i] = tt[unit] * invQ; \ + u[unit][i] = uu[unit] * invQ; \ + COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \ + ss[unit] += dsdx[unit]; \ + tt[unit] += dtdx[unit]; \ + uu[unit] += dudx[unit]; \ + vv[unit] += dvdx[unit]; \ } \ } \ } \ } \ - gl_write_multitexture_span( ctx, n, LEFT, Y, zspan, fogspan, \ - (const GLfloat (*)[MAX_WIDTH]) s, \ - (const GLfloat (*)[MAX_WIDTH]) t, \ - (const GLfloat (*)[MAX_WIDTH]) u, \ - (GLfloat (*)[MAX_WIDTH]) lambda, \ - rgba, NULL, GL_POLYGON ); \ + _mesa_write_multitexture_span(ctx, n, LEFT, Y, zspan, fogspan, \ + (const GLfloat (*)[MAX_WIDTH]) s,\ + (const GLfloat (*)[MAX_WIDTH]) t,\ + (const GLfloat (*)[MAX_WIDTH]) u,\ + (GLfloat (*)[MAX_WIDTH]) lambda, \ + rgba, NULL, GL_POLYGON ); \ } \ } + #include "s_tritemp.h" } @@ -2406,10 +2401,10 @@ _swrast_choose_triangle( GLcontext *ctx ) } } else if (ctx->RenderMode==GL_FEEDBACK) { - swrast->Triangle = gl_feedback_triangle; + swrast->Triangle = _mesa_feedback_triangle; } else { /* GL_SELECT mode */ - swrast->Triangle = gl_select_triangle; + swrast->Triangle = _mesa_select_triangle; } } diff --git a/src/mesa/swrast/s_triangle.h b/src/mesa/swrast/s_triangle.h index 318b6a6671..8689441bea 100644 --- a/src/mesa/swrast/s_triangle.h +++ b/src/mesa/swrast/s_triangle.h @@ -1,4 +1,4 @@ -/* $Id: s_triangle.h,v 1.5 2001/02/16 18:14:41 keithw Exp $ */ +/* $Id: s_triangle.h,v 1.6 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -36,7 +36,7 @@ #include "swrast.h" -GLboolean gl_cull_triangle( GLcontext *ctx, +GLboolean _mesa_cull_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2); diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c index 890adb1c61..b2ecbf2d90 100644 --- a/src/mesa/swrast/s_zoom.c +++ b/src/mesa/swrast/s_zoom.c @@ -1,4 +1,4 @@ -/* $Id: s_zoom.c,v 1.2 2000/11/05 18:24:41 keithw Exp $ */ +/* $Id: s_zoom.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -44,10 +44,10 @@ * y0 - location of first row in the image we're drawing. */ void -gl_write_zoomed_rgba_span( GLcontext *ctx, - GLuint n, GLint x, GLint y, const GLdepth z[], - const GLfixed *fog, - CONST GLchan rgba[][4], GLint y0 ) +_mesa_write_zoomed_rgba_span( GLcontext *ctx, + GLuint n, GLint x, GLint y, const GLdepth z[], + const GLfixed *fog, + CONST GLchan rgba[][4], GLint y0 ) { GLint m; GLint r0, r1, row, r; @@ -142,7 +142,7 @@ gl_write_zoomed_rgba_span( GLcontext *ctx, /* write the span */ for (r=r0; rObj, 0, 0 ); - gl_vector3f_init( &tmp->Normal, 0, 0 ); - gl_vector4chan_init( &tmp->Color, 0, 0 ); - gl_vector4chan_init( &tmp->SecondaryColor, 0, 0 ); - gl_vector1f_init( &tmp->FogCoord, 0, 0 ); - gl_vector1ui_init( &tmp->Index, 0, 0 ); - gl_vector1ub_init( &tmp->EdgeFlag, 0, 0 ); + _mesa_vector4f_init( &tmp->Obj, 0, 0 ); + _mesa_vector3f_init( &tmp->Normal, 0, 0 ); + _mesa_vector4chan_init( &tmp->Color, 0, 0 ); + _mesa_vector4chan_init( &tmp->SecondaryColor, 0, 0 ); + _mesa_vector1f_init( &tmp->FogCoord, 0, 0 ); + _mesa_vector1ui_init( &tmp->Index, 0, 0 ); + _mesa_vector1ub_init( &tmp->EdgeFlag, 0, 0 ); for (i = 0; i < ctx->Const.MaxTextureUnits; i++) - gl_vector4f_init( &tmp->TexCoord[i], 0, 0); + _mesa_vector4f_init( &tmp->TexCoord[i], 0, 0); tnl->tmp_primitive = (GLuint *)MALLOC(sizeof(GLuint)*tnl->vb.Size); tnl->tmp_primitive_length = (GLuint *)MALLOC(sizeof(GLuint)*tnl->vb.Size); diff --git a/src/mesa/tnl/t_eval_api.c b/src/mesa/tnl/t_eval_api.c index 0a351eed89..81a65451fe 100644 --- a/src/mesa/tnl/t_eval_api.c +++ b/src/mesa/tnl/t_eval_api.c @@ -1,4 +1,4 @@ -/* $Id: t_eval_api.c,v 1.2 2001/01/08 21:56:00 keithw Exp $ */ +/* $Id: t_eval_api.c,v 1.3 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -69,7 +69,7 @@ _tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 ) prim = GL_LINE_STRIP; break; default: - gl_error( ctx, GL_INVALID_ENUM, "glEvalMesh1(mode)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh1(mode)" ); return; } @@ -186,7 +186,7 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) } break; default: - gl_error( ctx, GL_INVALID_ENUM, "glEvalMesh2(mode)" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh2(mode)" ); return; } diff --git a/src/mesa/tnl/t_imm_api.c b/src/mesa/tnl/t_imm_api.c index 5dd287cedc..64cf7b82f6 100644 --- a/src/mesa/tnl/t_imm_api.c +++ b/src/mesa/tnl/t_imm_api.c @@ -75,10 +75,10 @@ _tnl_begin( GLcontext *ctx, GLenum p ) GLuint inflags, state; if (MESA_VERBOSE&VERBOSE_API) - fprintf(stderr, "glBegin(IM %d) %s\n", IM->id, gl_lookup_enum_by_nr(p)); + fprintf(stderr, "glBegin(IM %d) %s\n", IM->id, _mesa_lookup_enum_by_nr(p)); if (ctx->NewState) - gl_update_state(ctx); + _mesa_update_state(ctx); /* if only a very few slots left, might as well flush now */ @@ -166,7 +166,7 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p ) GLuint count, last; if (ctx->NewState) - gl_update_state(ctx); + _mesa_update_state(ctx); /* If not compiling, treat as a normal begin(). */ @@ -261,7 +261,7 @@ _tnl_save_Begin( GLenum mode ) /* Preserve vtxfmt invarient: */ if (ctx->NewState) - gl_update_state( ctx ); + _mesa_update_state( ctx ); /* Slot in geomexec: No need to call setdispatch as we know * CurrentDispatch is Save. @@ -1224,7 +1224,7 @@ _tnl_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) struct immediate *IM = TNL_CURRENT_IM(ctx); GLuint count = IM->Count; struct gl_material *mat; - GLuint bitmask = gl_material_bitmask( ctx, face, pname, ~0, "Materialfv" ); + GLuint bitmask = _mesa_material_bitmask(ctx, face, pname, ~0, "Materialfv"); if (bitmask == 0) return; @@ -1236,7 +1236,7 @@ _tnl_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) IM->MaterialMask = (GLuint *) MALLOC( sizeof(GLuint) * IMM_SIZE ); } else if (IM->MaterialOrMask & ~bitmask) { - gl_copy_material_pairs( IM->Material[count], + _mesa_copy_material_pairs( IM->Material[count], IM->Material[IM->LastMaterial], IM->MaterialOrMask & ~bitmask ); } diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c index c722c9629e..33d3149ed0 100644 --- a/src/mesa/tnl/t_imm_dlist.c +++ b/src/mesa/tnl/t_imm_dlist.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_dlist.c,v 1.9 2001/02/16 00:35:35 keithw Exp $ */ +/* $Id: t_imm_dlist.c,v 1.10 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -165,7 +165,7 @@ execute_compiled_cassette( GLcontext *ctx, void *data ) struct immediate *IM = node->IM; if (ctx->NewState) - gl_update_state(ctx); + _mesa_update_state(ctx); if (tnl->pipeline.build_state_changes) _tnl_validate_pipeline( ctx ); @@ -208,7 +208,7 @@ execute_compiled_cassette( GLcontext *ctx, void *data ) * inside a begin/end object -- illegally. Reject it and * raise an error. */ - gl_error(ctx, GL_INVALID_OPERATION, "hard replay"); + _mesa_error(ctx, GL_INVALID_OPERATION, "hard replay"); return; } } diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c index 2e54123fa3..5de0652168 100644 --- a/src/mesa/tnl/t_imm_exec.c +++ b/src/mesa/tnl/t_imm_exec.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_exec.c,v 1.13 2001/02/20 18:28:52 keithw Exp $ */ +/* $Id: t_imm_exec.c,v 1.14 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -106,8 +106,8 @@ void _tnl_copy_to_current( GLcontext *ctx, struct immediate *IM, if (flag & VERT_RGBA) { COPY_4UBV(ctx->Current.Color, IM->Color[count]); if (ctx->Light.ColorMaterialEnabled) { - gl_update_color_material( ctx, ctx->Current.Color ); - gl_validate_all_lighting_tables( ctx ); + _mesa_update_color_material( ctx, ctx->Current.Color ); + _mesa_validate_all_lighting_tables( ctx ); } } @@ -127,11 +127,11 @@ void _tnl_copy_to_current( GLcontext *ctx, struct immediate *IM, } if (flag & VERT_MATERIAL) { - gl_update_material( ctx, + _mesa_update_material( ctx, IM->Material[IM->LastMaterial], IM->MaterialOrMask ); - gl_validate_all_lighting_tables( ctx ); + _mesa_validate_all_lighting_tables( ctx ); } } @@ -470,16 +470,16 @@ void _tnl_imm_init( GLcontext *ctx ) TNL_CURRENT_IM(ctx)->CopyStart = IMM_MAX_COPIED_VERTS; - gl_vector4f_init( &tmp->Obj, 0, 0 ); - gl_vector3f_init( &tmp->Normal, 0, 0 ); - gl_vector4chan_init( &tmp->Color, 0, 0 ); - gl_vector4chan_init( &tmp->SecondaryColor, 0, 0 ); - gl_vector1f_init( &tmp->FogCoord, 0, 0 ); - gl_vector1ui_init( &tmp->Index, 0, 0 ); - gl_vector1ub_init( &tmp->EdgeFlag, 0, 0 ); + _mesa_vector4f_init( &tmp->Obj, 0, 0 ); + _mesa_vector3f_init( &tmp->Normal, 0, 0 ); + _mesa_vector4chan_init( &tmp->Color, 0, 0 ); + _mesa_vector4chan_init( &tmp->SecondaryColor, 0, 0 ); + _mesa_vector1f_init( &tmp->FogCoord, 0, 0 ); + _mesa_vector1ui_init( &tmp->Index, 0, 0 ); + _mesa_vector1ub_init( &tmp->EdgeFlag, 0, 0 ); for (i = 0; i < ctx->Const.MaxTextureUnits; i++) - gl_vector4f_init( &tmp->TexCoord[i], 0, 0); + _mesa_vector4f_init( &tmp->TexCoord[i], 0, 0); /* Install the first immediate. Intially outside begin/end. */ diff --git a/src/mesa/tnl/t_imm_fixup.c b/src/mesa/tnl/t_imm_fixup.c index 5429994b6c..7827941d23 100644 --- a/src/mesa/tnl/t_imm_fixup.c +++ b/src/mesa/tnl/t_imm_fixup.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_fixup.c,v 1.7 2001/02/15 01:33:52 keithw Exp $ */ +/* $Id: t_imm_fixup.c,v 1.8 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -555,7 +555,7 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM ) GLuint i; if (IM->BeginState & VERT_ERROR_1) - gl_error( ctx, GL_INVALID_OPERATION, "glBegin/glEnd"); + _mesa_error( ctx, GL_INVALID_OPERATION, "glBegin/glEnd"); for (i = IM->Start ; i <= IM->Count ; i += IM->PrimitiveLength[i]) if (IM->Flag[i] & (VERT_BEGIN|VERT_END_VB)) @@ -579,7 +579,7 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM ) GLuint i; if (IM->BeginState & VERT_ERROR_0) - gl_error( ctx, GL_INVALID_OPERATION, "glBegin/glEnd"); + _mesa_error( ctx, GL_INVALID_OPERATION, "glBegin/glEnd"); if (IM->CopyStart == IM->Start && IM->Flag[IM->Start] & (VERT_END|VERT_END_VB)) diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index e6d0234d5f..cf01d4c9c3 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_fog.c,v 1.4 2001/02/27 21:58:59 brianp Exp $ */ +/* $Id: t_vb_fog.c,v 1.5 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -122,7 +122,7 @@ static void make_win_fog_coords( GLcontext *ctx, GLvector1f *out, } break; default: - gl_problem(ctx, "Bad fog mode in make_fog_coord"); + _mesa_problem(ctx, "Bad fog mode in make_fog_coord"); return; } } @@ -167,7 +167,7 @@ static GLboolean run_fog_stage( GLcontext *ctx, input = &store->input; if (VB->EyePtr->size < 2) - gl_vector4f_clean_elem( VB->EyePtr, VB->Count, 2 ); + _mesa_vector4f_clean_elem( VB->EyePtr, VB->Count, 2 ); input->data = &(VB->EyePtr->data[0][2]); input->start = VB->EyePtr->start+2; @@ -204,8 +204,8 @@ static GLboolean alloc_fog_data( GLcontext *ctx, if (!store) return GL_FALSE; - gl_vector1f_alloc( &store->fogcoord, 0, tnl->vb.Size, 32 ); - gl_vector1f_init( &store->input, 0, 0 ); + _mesa_vector1f_alloc( &store->fogcoord, 0, tnl->vb.Size, 32 ); + _mesa_vector1f_init( &store->input, 0, 0 ); if (!inited) init_static_data(); @@ -221,7 +221,7 @@ static void free_fog_data( struct gl_pipeline_stage *stage ) { struct fog_stage_data *store = FOG_STAGE_DATA(stage); if (store) { - gl_vector1f_free( &store->fogcoord ); + _mesa_vector1f_free( &store->fogcoord ); FREE( store ); stage->private = 0; } diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index 53f23ec4e1..6ccb1b0dff 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_light.c,v 1.9 2001/02/20 18:28:52 keithw Exp $ */ +/* $Id: t_vb_light.c,v 1.10 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -138,7 +138,7 @@ static GLboolean run_lighting( GLcontext *ctx, struct gl_pipeline_stage *stage ) ASSERT((input->flags & VEC_NOT_WRITEABLE) == 0); } - gl_vector4f_clean_elem(input, VB->Count, 2); + _mesa_vector4f_clean_elem(input, VB->Count, 2); } } @@ -191,7 +191,7 @@ static GLboolean run_validate_lighting( GLcontext *ctx, /* This and the above should only be done on _NEW_LIGHT: */ - gl_validate_all_lighting_tables( ctx ); + _mesa_validate_all_lighting_tables( ctx ); /* Now run the stage... */ @@ -218,12 +218,12 @@ static GLboolean run_init_lighting( GLcontext *ctx, */ init_lighting(); - gl_vector4chan_alloc( &store->LitColor[0], 0, size, 32 ); - gl_vector4chan_alloc( &store->LitColor[1], 0, size, 32 ); - gl_vector4chan_alloc( &store->LitSecondary[0], 0, size, 32 ); - gl_vector4chan_alloc( &store->LitSecondary[1], 0, size, 32 ); - gl_vector1ui_alloc( &store->LitIndex[0], 0, size, 32 ); - gl_vector1ui_alloc( &store->LitIndex[1], 0, size, 32 ); + _mesa_vector4chan_alloc( &store->LitColor[0], 0, size, 32 ); + _mesa_vector4chan_alloc( &store->LitColor[1], 0, size, 32 ); + _mesa_vector4chan_alloc( &store->LitSecondary[0], 0, size, 32 ); + _mesa_vector4chan_alloc( &store->LitSecondary[1], 0, size, 32 ); + _mesa_vector1ui_alloc( &store->LitIndex[0], 0, size, 32 ); + _mesa_vector1ui_alloc( &store->LitIndex[1], 0, size, 32 ); /* Now validate the stage derived data... */ @@ -261,12 +261,12 @@ static void dtr( struct gl_pipeline_stage *stage ) struct light_stage_data *store = LIGHT_STAGE_DATA(stage); if (store) { - gl_vector4chan_free( &store->LitColor[0] ); - gl_vector4chan_free( &store->LitColor[1] ); - gl_vector4chan_free( &store->LitSecondary[0] ); - gl_vector4chan_free( &store->LitSecondary[1] ); - gl_vector1ui_free( &store->LitIndex[0] ); - gl_vector1ui_free( &store->LitIndex[1] ); + _mesa_vector4chan_free( &store->LitColor[0] ); + _mesa_vector4chan_free( &store->LitColor[1] ); + _mesa_vector4chan_free( &store->LitSecondary[0] ); + _mesa_vector4chan_free( &store->LitSecondary[1] ); + _mesa_vector1ui_free( &store->LitIndex[0] ); + _mesa_vector1ui_free( &store->LitIndex[1] ); FREE( store ); stage->private = 0; } diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h index b9b50219b3..370061512f 100644 --- a/src/mesa/tnl/t_vb_lighttmp.h +++ b/src/mesa/tnl/t_vb_lighttmp.h @@ -1,4 +1,4 @@ -/* $Id: t_vb_lighttmp.h,v 1.8 2001/02/16 18:14:42 keithw Exp $ */ +/* $Id: t_vb_lighttmp.h,v 1.9 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -142,13 +142,13 @@ static void TAG(light_rgba_spec)( GLcontext *ctx, struct gl_light *light; if ( CHECK_COLOR_MATERIAL(j) ) - gl_update_color_material( ctx, CMcolor[j] ); + _mesa_update_color_material( ctx, CMcolor[j] ); if ( CHECK_MATERIAL(j) ) - gl_update_material( ctx, new_material[j], new_material_mask[j] ); + _mesa_update_material( ctx, new_material[j], new_material_mask[j] ); if ( CHECK_VALIDATE(j) ) - gl_validate_all_lighting_tables( ctx ); + _mesa_validate_all_lighting_tables( ctx ); COPY_3V(sum[0], base[0]); ZERO_3V(spec[0]); @@ -336,13 +336,13 @@ static void TAG(light_rgba)( GLcontext *ctx, struct gl_light *light; if ( CHECK_COLOR_MATERIAL(j) ) - gl_update_color_material( ctx, (GLchan *)CMcolor[j] ); + _mesa_update_color_material( ctx, (GLchan *)CMcolor[j] ); if ( CHECK_MATERIAL(j) ) - gl_update_material( ctx, new_material[j], new_material_mask[j] ); + _mesa_update_material( ctx, new_material[j], new_material_mask[j] ); if ( CHECK_VALIDATE(j) ) - gl_validate_all_lighting_tables( ctx ); + _mesa_validate_all_lighting_tables( ctx ); COPY_3V(sum[0], base[0]); @@ -527,13 +527,13 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx, do { if ( CHECK_COLOR_MATERIAL(j) ) - gl_update_color_material( ctx, (GLchan *)CMcolor[j] ); + _mesa_update_color_material( ctx, (GLchan *)CMcolor[j] ); if ( CHECK_MATERIAL(j) ) - gl_update_material( ctx, new_material[j], new_material_mask[j] ); + _mesa_update_material( ctx, new_material[j], new_material_mask[j] ); if ( CHECK_VALIDATE(j) ) - gl_validate_all_lighting_tables( ctx ); + _mesa_validate_all_lighting_tables( ctx ); baseubyte[0][3] = ctx->Light._BaseAlpha[0]; baseubyte[1][3] = ctx->Light._BaseAlpha[1]; @@ -646,13 +646,13 @@ static void TAG(light_fast_rgba)( GLcontext *ctx, GLfloat sum[2][3]; if ( CHECK_COLOR_MATERIAL(j) ) - gl_update_color_material( ctx, CMcolor[j] ); + _mesa_update_color_material( ctx, CMcolor[j] ); if ( CHECK_MATERIAL(j) ) - gl_update_material( ctx, new_material[j], new_material_mask[j] ); + _mesa_update_material( ctx, new_material[j], new_material_mask[j] ); if ( CHECK_VALIDATE(j) ) - gl_validate_all_lighting_tables( ctx ); + _mesa_validate_all_lighting_tables( ctx ); COPY_3V(sum[0], ctx->Light._BaseColor[0]); @@ -778,13 +778,13 @@ static void TAG(light_ci)( GLcontext *ctx, struct gl_light *light; if ( CHECK_COLOR_MATERIAL(j) ) - gl_update_color_material( ctx, (GLchan *)CMcolor[j] ); + _mesa_update_color_material( ctx, (GLchan *)CMcolor[j] ); if ( CHECK_MATERIAL(j) ) - gl_update_material( ctx, new_material[j], new_material_mask[j] ); + _mesa_update_material( ctx, new_material[j], new_material_mask[j] ); if ( CHECK_VALIDATE(j) ) - gl_validate_all_lighting_tables( ctx ); + _mesa_validate_all_lighting_tables( ctx ); diffuse[0] = specular[0] = 0.0F; diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c index 8c33d24442..91479a38d1 100644 --- a/src/mesa/tnl/t_vb_normals.c +++ b/src/mesa/tnl/t_vb_normals.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_normals.c,v 1.3 2001/02/15 01:33:52 keithw Exp $ */ +/* $Id: t_vb_normals.c,v 1.4 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -146,7 +146,7 @@ static GLboolean alloc_normal_data( GLcontext *ctx, if (!store) return GL_FALSE; - gl_vector3f_alloc( &store->normal, 0, tnl->vb.Size, 32 ); + _mesa_vector3f_alloc( &store->normal, 0, tnl->vb.Size, 32 ); /* Now run the stage. */ @@ -160,7 +160,7 @@ static void free_normal_data( struct gl_pipeline_stage *stage ) { struct normal_stage_data *store = NORMAL_STAGE_DATA(stage); if (store) { - gl_vector3f_free( &store->normal ); + _mesa_vector3f_free( &store->normal ); FREE( store ); stage->private = 0; } diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c index 16f9ca9722..94a9dc27a3 100644 --- a/src/mesa/tnl/t_vb_points.c +++ b/src/mesa/tnl/t_vb_points.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_points.c,v 1.1 2000/12/26 05:09:33 keithw Exp $ */ +/* $Id: t_vb_points.c,v 1.2 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -89,7 +89,7 @@ static GLboolean alloc_point_data( GLcontext *ctx, if (!store) return GL_FALSE; - gl_vector1f_alloc( &store->PointSize, 0, VB->Size, 32 ); + _mesa_vector1f_alloc( &store->PointSize, 0, VB->Size, 32 ); /* Now run the stage. */ @@ -102,7 +102,7 @@ static void free_point_data( struct gl_pipeline_stage *stage ) { struct point_stage_data *store = POINT_STAGE_DATA(stage); if (store) { - gl_vector1f_free( &store->PointSize ); + _mesa_vector1f_free( &store->PointSize ); FREE( store ); stage->private = 0; } diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index 70c53de7de..0789670da6 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_texgen.c,v 1.2 2001/01/29 20:47:39 keithw Exp $ */ +/* $Id: t_vb_texgen.c,v 1.3 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -270,7 +270,7 @@ static void texgen_reflection_map_nv( GLcontext *ctx, out->count = in->count; out->size = MAX2(in->size, 3); if (in->size == 4) - gl_copy_tab[0][0x8](out, in, 0); + _mesa_copy_tab[0][0x8](out, in, 0); } else { out->flags |= VEC_SIZE_3; @@ -307,7 +307,7 @@ static void texgen_normal_map_nv( GLcontext *ctx, out->count = in->count; out->size = MAX2(in->size, 3); if (in->size == 4) - gl_copy_tab[0][0x8](out, in, 0); + _mesa_copy_tab[0][0x8](out, in, 0); } else { out->flags |= VEC_SIZE_3; @@ -345,7 +345,7 @@ static void texgen_sphere_map( GLcontext *ctx, out->count = in->count; out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_2; if (in->size > 2) - gl_copy_tab[0][all_bits[in->size] & ~0x3](out, in, 0); + _mesa_copy_tab[0][all_bits[in->size] & ~0x3](out, in, 0); } else { out->size = 2; out->flags |= VEC_SIZE_2; @@ -394,7 +394,7 @@ static void texgen( GLcontext *ctx, else { GLuint copy = (all_bits[in->size] & ~texUnit->TexGenEnabled); if (copy) - gl_copy_tab[0][copy](out, in, 0); + _mesa_copy_tab[0][copy](out, in, 0); out->size = MAX2(in->size, store->TexgenSize[unit]); out->flags |= (in->flags & VEC_SIZE_FLAGS) | texUnit->TexGenEnabled; @@ -404,9 +404,9 @@ static void texgen( GLcontext *ctx, } if (holes) { - if (holes & VEC_DIRTY_2) gl_vector4f_clean_elem(out, count, 2); - if (holes & VEC_DIRTY_1) gl_vector4f_clean_elem(out, count, 1); - if (holes & VEC_DIRTY_0) gl_vector4f_clean_elem(out, count, 0); + if (holes & VEC_DIRTY_2) _mesa_vector4f_clean_elem(out, count, 2); + if (holes & VEC_DIRTY_1) _mesa_vector4f_clean_elem(out, count, 1); + if (holes & VEC_DIRTY_0) _mesa_vector4f_clean_elem(out, count, 0); } if (texUnit->TexGenEnabled & S_BIT) { @@ -438,7 +438,7 @@ static void texgen( GLcontext *ctx, break; } default: - gl_problem(ctx, "Bad S texgen"); + _mesa_problem(ctx, "Bad S texgen"); } } @@ -471,7 +471,7 @@ static void texgen( GLcontext *ctx, break; } default: - gl_problem(ctx, "Bad T texgen"); + _mesa_problem(ctx, "Bad T texgen"); } } @@ -500,7 +500,7 @@ static void texgen( GLcontext *ctx, break; } default: - gl_problem(ctx, "Bad R texgen"); + _mesa_problem(ctx, "Bad R texgen"); } } @@ -517,7 +517,7 @@ static void texgen( GLcontext *ctx, texUnit->EyePlaneQ, 0); break; default: - gl_problem(ctx, "Bad Q texgen"); + _mesa_problem(ctx, "Bad Q texgen"); } } } @@ -646,7 +646,7 @@ static GLboolean alloc_texgen_data( GLcontext *ctx, return GL_FALSE; for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) - gl_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 ); + _mesa_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 ); store->tmp_f = (GLfloat (*)[3]) MALLOC(VB->Size * sizeof(GLfloat) * 3); store->tmp_m = (GLfloat *) MALLOC(VB->Size * sizeof(GLfloat)); @@ -667,7 +667,7 @@ static void free_texgen_data( struct gl_pipeline_stage *stage ) if (store) { for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++) if (store->texcoord[i].data) - gl_vector4f_free( &store->texcoord[i] ); + _mesa_vector4f_free( &store->texcoord[i] ); if (store->tmp_f) FREE( store->tmp_f ); diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index ea415a550e..ca5707f9ff 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_texmat.c,v 1.1 2000/12/26 05:09:33 keithw Exp $ */ +/* $Id: t_vb_texmat.c,v 1.2 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -110,7 +110,7 @@ static GLboolean alloc_texmat_data( GLcontext *ctx, return GL_FALSE; for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) - gl_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 ); + _mesa_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 ); /* Now run the stage. */ @@ -127,7 +127,7 @@ static void free_texmat_data( struct gl_pipeline_stage *stage ) if (store) { for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++) if (store->texcoord[i].data) - gl_vector4f_free( &store->texcoord[i] ); + _mesa_vector4f_free( &store->texcoord[i] ); FREE( store ); stage->private = 0; } diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index fc35103395..0af2f65f7c 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_vertex.c,v 1.3 2001/01/29 20:47:39 keithw Exp $ */ +/* $Id: t_vb_vertex.c,v 1.4 2001/03/03 20:33:31 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -176,8 +176,8 @@ static GLboolean run_vertex_stage( GLcontext *ctx, VB->ClipPtr = VB->ObjPtr; } if (VB->ClipPtr->size == 2) - gl_vector4f_clean_elem( VB->ClipPtr, VB->Count, 2 ); - gl_vector4f_clean_elem( VB->ClipPtr, VB->Count, 3 ); + _mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 2 ); + _mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 3 ); } /* Cliptest and perspective divide. Clip functions must clear @@ -267,9 +267,9 @@ static GLboolean init_vertex_stage( GLcontext *ctx, if (!store) return GL_FALSE; - gl_vector4f_alloc( &store->eye, 0, size, 32 ); - gl_vector4f_alloc( &store->clip, 0, size, 32 ); - gl_vector4f_alloc( &store->proj, 0, size, 32 ); + _mesa_vector4f_alloc( &store->eye, 0, size, 32 ); + _mesa_vector4f_alloc( &store->clip, 0, size, 32 ); + _mesa_vector4f_alloc( &store->proj, 0, size, 32 ); store->clipmask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte)*size, 32 ); @@ -290,9 +290,9 @@ static void dtr( struct gl_pipeline_stage *stage ) struct vertex_stage_data *store = VERTEX_STAGE_DATA(stage); if (store) { - gl_vector4f_free( &store->eye ); - gl_vector4f_free( &store->clip ); - gl_vector4f_free( &store->proj ); + _mesa_vector4f_free( &store->eye ); + _mesa_vector4f_free( &store->clip ); + _mesa_vector4f_free( &store->proj ); ALIGN_FREE( store->clipmask ); FREE(store); stage->private = 0; diff --git a/src/mesa/x86/3dnow.c b/src/mesa/x86/3dnow.c index b81c0eef0f..2d67d9512d 100644 --- a/src/mesa/x86/3dnow.c +++ b/src/mesa/x86/3dnow.c @@ -1,4 +1,4 @@ -/* $Id: 3dnow.c,v 1.14 2001/02/03 08:41:03 gareth Exp $ */ +/* $Id: 3dnow.c,v 1.15 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -62,19 +62,19 @@ #define ASSIGN_XFORM_GROUP( pfx, cma, sz, masked ) \ - gl_transform_tab[cma][sz][MATRIX_GENERAL] = \ + _mesa_transform_tab[cma][sz][MATRIX_GENERAL] = \ gl_##pfx##_transform_points##sz##_general_##masked; \ - gl_transform_tab[cma][sz][MATRIX_IDENTITY] = \ + _mesa_transform_tab[cma][sz][MATRIX_IDENTITY] = \ gl_##pfx##_transform_points##sz##_identity_##masked; \ - gl_transform_tab[cma][sz][MATRIX_3D_NO_ROT] = \ + _mesa_transform_tab[cma][sz][MATRIX_3D_NO_ROT] = \ gl_##pfx##_transform_points##sz##_3d_no_rot_##masked; \ - gl_transform_tab[cma][sz][MATRIX_PERSPECTIVE] = \ + _mesa_transform_tab[cma][sz][MATRIX_PERSPECTIVE] = \ gl_##pfx##_transform_points##sz##_perspective_##masked; \ - gl_transform_tab[cma][sz][MATRIX_2D] = \ + _mesa_transform_tab[cma][sz][MATRIX_2D] = \ gl_##pfx##_transform_points##sz##_2d_##masked; \ - gl_transform_tab[cma][sz][MATRIX_2D_NO_ROT] = \ + _mesa_transform_tab[cma][sz][MATRIX_2D_NO_ROT] = \ gl_##pfx##_transform_points##sz##_2d_no_rot_##masked; \ - gl_transform_tab[cma][sz][MATRIX_3D] = \ + _mesa_transform_tab[cma][sz][MATRIX_3D] = \ gl_##pfx##_transform_points##sz##_3d_##masked; @@ -151,7 +151,7 @@ extern void _ASMAPI gl_3dnow_project_clipped_vertices( GLfloat *first, #endif -void gl_init_3dnow_transform_asm( void ) +void _mesa_init_3dnow_transform_asm( void ) { #ifdef USE_3DNOW_ASM ASSIGN_XFORM_GROUP( 3dnow, 0, 1, raw ); @@ -174,7 +174,7 @@ void gl_init_3dnow_transform_asm( void ) #endif } -void gl_init_3dnow_vertex_asm( void ) +void _mesa_init_3dnow_vertex_asm( void ) { #ifdef USE_3DNOW_ASM gl_xform_points3_v16_general = gl_v16_3dnow_general_xform; diff --git a/src/mesa/x86/3dnow.h b/src/mesa/x86/3dnow.h index ee87c5af3d..c26005d224 100644 --- a/src/mesa/x86/3dnow.h +++ b/src/mesa/x86/3dnow.h @@ -1,4 +1,4 @@ -/* $Id: 3dnow.h,v 1.3 2000/11/16 21:05:41 keithw Exp $ */ +/* $Id: 3dnow.h,v 1.4 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,7 +34,7 @@ #include "math/m_xform.h" -void gl_init_3dnow_transform_asm( void ); -void gl_init_3dnow_vertex_asm( void ); +void _mesa_init_3dnow_transform_asm( void ); +void _mesa_init_3dnow_vertex_asm( void ); #endif diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c index c6b307e640..a630fa60b1 100644 --- a/src/mesa/x86/common_x86.c +++ b/src/mesa/x86/common_x86.c @@ -1,4 +1,4 @@ -/* $Id: common_x86.c,v 1.9 2000/12/07 02:36:38 gareth Exp $ */ +/* $Id: common_x86.c,v 1.10 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -123,7 +123,7 @@ static void sigfpe_handler( int signal, struct sigcontext sc ) /* If we ever get here, we're completely hosed. */ message( "\n\n" ); - gl_problem( NULL, "SSE enabling test failed badly!" ); + _mesa_problem( NULL, "SSE enabling test failed badly!" ); } } #endif /* __linux__ && _POSIX_SOURCE */ @@ -224,7 +224,7 @@ static void check_os_katmai_support( void ) #endif /* USE_KATMAI_ASM */ -void gl_init_all_x86_transform_asm( void ) +void _mesa_init_all_x86_transform_asm( void ) { #ifdef USE_X86_ASM gl_x86_cpu_features = gl_identify_x86_cpu_features(); @@ -234,7 +234,7 @@ void gl_init_all_x86_transform_asm( void ) } if ( gl_x86_cpu_features ) { - gl_init_x86_transform_asm(); + _mesa_init_x86_transform_asm(); } #ifdef USE_MMX_ASM @@ -251,7 +251,7 @@ void gl_init_all_x86_transform_asm( void ) if ( cpu_has_3dnow ) { if ( getenv( "MESA_NO_3DNOW" ) == 0 ) { message( "3DNow! cpu detected.\n" ); - gl_init_3dnow_transform_asm(); + _mesa_init_3dnow_transform_asm(); } else { gl_x86_cpu_features &= ~(X86_FEATURE_3DNOW); } @@ -265,7 +265,7 @@ void gl_init_all_x86_transform_asm( void ) if ( cpu_has_xmm ) { if ( getenv( "MESA_NO_KATMAI" ) == 0 ) { message( "Katmai cpu detected.\n" ); - gl_init_katmai_transform_asm(); + _mesa_init_katmai_transform_asm(); } else { gl_x86_cpu_features &= ~(X86_FEATURE_XMM); } @@ -277,22 +277,22 @@ void gl_init_all_x86_transform_asm( void ) /* Note: the above function must be called before this one, so that * gl_x86_cpu_features gets correctly initialized. */ -void gl_init_all_x86_vertex_asm( void ) +void _mesa_init_all_x86_vertex_asm( void ) { #ifdef USE_X86_ASM if ( gl_x86_cpu_features ) { - gl_init_x86_vertex_asm(); + _mesa_init_x86_vertex_asm(); } #ifdef USE_3DNOW_ASM if ( cpu_has_3dnow && getenv( "MESA_NO_3DNOW" ) == 0 ) { - gl_init_3dnow_vertex_asm(); + _mesa_init_3dnow_vertex_asm(); } #endif #ifdef USE_KATMAI_ASM if ( cpu_has_xmm && getenv( "MESA_NO_KATMAI" ) == 0 ) { - gl_init_katmai_vertex_asm(); + _mesa_init_katmai_vertex_asm(); } #endif #endif diff --git a/src/mesa/x86/common_x86_asm.h b/src/mesa/x86/common_x86_asm.h index 517e668ddb..985155781d 100644 --- a/src/mesa/x86/common_x86_asm.h +++ b/src/mesa/x86/common_x86_asm.h @@ -1,4 +1,4 @@ -/* $Id: common_x86_asm.h,v 1.4 2000/11/24 10:25:10 keithw Exp $ */ +/* $Id: common_x86_asm.h,v 1.5 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -59,7 +59,7 @@ extern int gl_x86_cpu_features; -extern void gl_init_all_x86_transform_asm( void ); -extern void gl_init_all_x86_vertex_asm( void ); +extern void _mesa_init_all_x86_transform_asm( void ); +extern void _mesa_init_all_x86_vertex_asm( void ); #endif diff --git a/src/mesa/x86/x86.c b/src/mesa/x86/x86.c index 1c2539d959..b7600439a6 100644 --- a/src/mesa/x86/x86.c +++ b/src/mesa/x86/x86.c @@ -1,4 +1,4 @@ -/* $Id: x86.c,v 1.16 2001/02/03 08:41:03 gareth Exp $ */ +/* $Id: x86.c,v 1.17 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -61,19 +61,19 @@ #define ASSIGN_XFORM_GROUP( pfx, cma, sz, masked ) \ - gl_transform_tab[cma][sz][MATRIX_GENERAL] = \ + _mesa_transform_tab[cma][sz][MATRIX_GENERAL] = \ gl_##pfx##_transform_points##sz##_general_##masked; \ - gl_transform_tab[cma][sz][MATRIX_IDENTITY] = \ + _mesa_transform_tab[cma][sz][MATRIX_IDENTITY] = \ gl_##pfx##_transform_points##sz##_identity_##masked; \ - gl_transform_tab[cma][sz][MATRIX_3D_NO_ROT] = \ + _mesa_transform_tab[cma][sz][MATRIX_3D_NO_ROT] = \ gl_##pfx##_transform_points##sz##_3d_no_rot_##masked; \ - gl_transform_tab[cma][sz][MATRIX_PERSPECTIVE] = \ + _mesa_transform_tab[cma][sz][MATRIX_PERSPECTIVE] = \ gl_##pfx##_transform_points##sz##_perspective_##masked; \ - gl_transform_tab[cma][sz][MATRIX_2D] = \ + _mesa_transform_tab[cma][sz][MATRIX_2D] = \ gl_##pfx##_transform_points##sz##_2d_##masked; \ - gl_transform_tab[cma][sz][MATRIX_2D_NO_ROT] = \ + _mesa_transform_tab[cma][sz][MATRIX_2D_NO_ROT] = \ gl_##pfx##_transform_points##sz##_2d_no_rot_##masked; \ - gl_transform_tab[cma][sz][MATRIX_3D] = \ + _mesa_transform_tab[cma][sz][MATRIX_3D] = \ gl_##pfx##_transform_points##sz##_3d_##masked; @@ -115,7 +115,7 @@ extern void _ASMAPI gl_v16_x86_general_xform( GLfloat *dest, #endif -void gl_init_x86_transform_asm( void ) +void _mesa_init_x86_transform_asm( void ) { #ifdef USE_X86_ASM ASSIGN_XFORM_GROUP( x86, 0, 2, raw ); @@ -136,7 +136,7 @@ void gl_init_x86_transform_asm( void ) #endif } -void gl_init_x86_vertex_asm( void ) +void _mesa_init_x86_vertex_asm( void ) { #ifdef USE_X86_ASM gl_xform_points3_v16_general = gl_v16_x86_general_xform; diff --git a/src/mesa/x86/x86.h b/src/mesa/x86/x86.h index 88afd18737..44908a851a 100644 --- a/src/mesa/x86/x86.h +++ b/src/mesa/x86/x86.h @@ -1,4 +1,4 @@ -/* $Id: x86.h,v 1.2 2000/10/23 00:16:28 gareth Exp $ */ +/* $Id: x86.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -31,7 +31,7 @@ #ifndef __X86_H__ #define __X86_H__ -extern void gl_init_x86_transform_asm( void ); -extern void gl_init_x86_vertex_asm( void ); +extern void _mesa_init_x86_transform_asm( void ); +extern void _mesa_init_x86_vertex_asm( void ); #endif -- cgit v1.2.3