\r
setup_dd_pointers(context->GLContext);\r
_mesa_make_current(context->GLContext, buffer->GLBuffer);\r
- gl_Viewport(context->GLContext, 0, 0, buffer->Width, buffer->Height);\r
+ _mesa_set_viewport(context->GLContext, 0, 0, buffer->Width, buffer->Height);\r
}\r
else {\r
destroy_bitmap(context->Buffer->Screen);\r
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" ));
-/* $Id: dosmesa.c,v 1.3 2000/11/22 08:55:52 joukj Exp $ */\r
+/* $Id: dosmesa.c,v 1.4 2001/03/03 20:33:29 brianp Exp $ */\r
\r
/*\r
* Mesa 3-D graphics library\r
\r
/*\r
* $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
*
*
/* setup initial viewport */\r
ctx->width = vga_getxdim();\r
ctx->height = vga_getydim();\r
- gl_Viewport( ctx->gl_ctx, 0, 0, ctx->width, ctx->height );\r
+ _mesa_set_viewport( ctx->gl_ctx, 0, 0, ctx->width, ctx->height );\r
}\r
}\r
\r
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;
}
}
/* 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");
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...
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;
}
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;
}
MesaIntTexFormat mesaFormat;
if (!texObj->DriverData) {
- gl_problem(ctx, "problem in fxDDTexSubImage2D");
+ _mesa_problem(ctx, "problem in fxDDTexSubImage2D");
return;
}
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;
}
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);
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:
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)) {
/************************** 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;
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;
}
}
-/* $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
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;
}
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;
}
*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;
}
}
-/* $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
/* 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
}
-/* $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
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)){
-/* $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
/*
* $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
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)){
\r
/*\r
* $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
setup_DD_pointers(c->gl_ctx);\r
if (Current->gl_ctx->Viewport.Width==0) {\r
/* initialize viewport to window size */\r
- gl_Viewport( Current->gl_ctx,\r
+ _mesa_set_viewport( Current->gl_ctx,\r
0, 0, Current->width, Current->height );\r
}\r
if ((c->cColorBits <= 8 ) && (c->rgb_flag == GL_TRUE)){\r
setup_DD_pointers(c->gl_ctx);\r
if (Current->gl_ctx->Viewport.Width==0) {\r
/* initialize viewport to window size */\r
- gl_Viewport( Current->gl_ctx,\r
+ _mesa_set_viewport( Current->gl_ctx,\r
0, 0, Current->width, Current->height );\r
}\r
}\r
-/* $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
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;
}
(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;
}
-/* $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
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");
}
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;
}
return p;
}
default:
- gl_problem(NULL, "Bad pixel format in XMesaDitherColor");
+ _mesa_problem(NULL, "Bad pixel format in XMesaDitherColor");
}
return 0;
}
-/* $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
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");
}
}
-/* $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
}
break;
default:
- gl_problem(NULL,"Problem in DD.read_color_span (1)");
+ _mesa_problem(NULL,"Problem in DD.read_color_span (1)");
return;
}
}
}
break;
default:
- gl_problem(NULL,"Problem in DD.read_color_span (2)");
+ _mesa_problem(NULL,"Problem in DD.read_color_span (2)");
return;
}
}
}
break;
default:
- gl_problem(NULL,"Problem in DD.read_color_pixels (1)");
+ _mesa_problem(NULL,"Problem in DD.read_color_pixels (1)");
return;
}
}
}
break;
default:
- gl_problem(NULL,"Problem in DD.read_color_pixels (1)");
+ _mesa_problem(NULL,"Problem in DD.read_color_pixels (1)");
return;
}
}
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;
}
}
}
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;
}
}
-/* $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
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) {
-/* $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
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;
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 )
glArrayElement( ((GLuint *)indices)[i] );
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
break;
}
-/* $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
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;
}
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;
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(end<start)");
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDrawRangeElements(end<start)");
return GL_FALSE;
}
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;
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;
-/* $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
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;
}
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;
}
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:
}
break;
default:
- gl_problem( ctx, "Bad attrib flag in PopAttrib");
+ _mesa_problem( ctx, "Bad attrib flag in PopAttrib");
break;
}
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;
}
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;
}
ctx->NewState = _NEW_ARRAY;
break;
default:
- gl_problem( ctx, "Bad attrib flag in PopClientAttrib");
+ _mesa_problem( ctx, "Bad attrib flag in PopClientAttrib");
break;
}
-/* $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
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 */
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;
}
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 */
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;
}
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 */
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;
}
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 */
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;
}
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 */
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;
}
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 */
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;
}
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:
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;
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;
}
-/* $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
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) {
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:
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;
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)
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)
ctx->Color.DrawDestMask = 0;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glDrawBuffer" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glDrawBuffer" );
return;
}
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:
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:
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;
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;
}
-/* $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
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;
}
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;
/* 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 );
}
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;
}
-/* $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
table->LuminanceSize = 0;
break;
default:
- gl_problem(NULL, "unexpected format in set_component_sizes");
+ _mesa_problem(NULL, "unexpected format in set_component_sizes");
}
}
proxy = GL_TRUE;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
return;
}
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;
}
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;
}
table->Format = (GLenum) 0;
}
else {
- gl_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)");
+ _mesa_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)");
}
return;
}
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;
}
}
break;
default:
- gl_problem(ctx, "Bad format in _mesa_ColorTable");
+ _mesa_problem(ctx, "Bad format in _mesa_ColorTable");
return;
}
}
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,
aBias = ctx->Pixel.PCMCTbias[3];
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
return;
}
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;
}
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;
}
}
break;
default:
- gl_problem(ctx, "Bad format in _mesa_ColorSubTable");
+ _mesa_problem(ctx, "Bad format in _mesa_ColorSubTable");
return;
}
}
/* 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) */
/* 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) */
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
if (ctx->NewState) {
- gl_update_state(ctx);
+ _mesa_update_state(ctx);
}
switch (target) {
table = &ctx->PostColorMatrixColorTable;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
return;
}
}
break;
default:
- gl_problem(ctx, "bad table format in glGetColorTable");
+ _mesa_problem(ctx, "bad table format in glGetColorTable");
return;
}
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;
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;
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;
}
table = &ctx->ProxyPostColorMatrixColorTable;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(target)");
return;
}
*params = table->IntensitySize;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(pname)" );
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(pname)" );
return;
}
}
table = &ctx->ProxyPostColorMatrixColorTable;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(target)");
return;
}
*params = table->IntensitySize;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(pname)" );
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(pname)" );
return;
}
}
-/* $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
assert( sizeof(GLushort) >= 2 );
assert( sizeof(GLuint) >= 4 );
- gl_init_lists();
+ _mesa_init_lists();
_math_init();
_mesa_init_math();
while (1) {
GLuint list = _mesa_HashFirstEntry(ss->DisplayList);
if (list) {
- gl_destroy_list(ctx, list);
+ _mesa_destroy_list(ctx, list);
}
else {
break;
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;
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;
void
_mesa_context_initialize( GLcontext *ctx )
{
- gl_read_config_file( ctx );
+ _mesa_read_config_file( ctx );
}
newCtx->DrawBuffer = drawBuffer;
newCtx->ReadBuffer = readBuffer;
newCtx->NewState |= _NEW_BUFFERS;
- /* gl_update_state( newCtx ); */
+ /* _mesa_update_state( newCtx ); */
}
if (newCtx->Driver.MakeCurrent)
* 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" );
_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 );
}
* 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;
-/* $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
*/
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 );
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
-/* $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
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;
}
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;
}
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 ||
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;
}
c = 2;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(target)");
return;
}
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;
}
conv = &ctx->Separable2D;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)");
return;
}
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;
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;
}
c = 2;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(target)");
return;
}
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;
}
conv = &ctx->Separable2D;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)");
return;
}
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;
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;
}
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 */
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);
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;
}
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;
}
filter = &(ctx->Convolution2D);
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(target)");
return;
}
conv = &ctx->Separable2D;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(target)");
return;
}
*params = (GLfloat) ctx->Const.MaxConvolutionHeight;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(pname)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(pname)");
return;
}
}
conv = &ctx->Separable2D;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(target)");
return;
}
*params = (GLint) ctx->Const.MaxConvolutionHeight;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(pname)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(pname)");
return;
}
}
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;
}
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;
}
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;
}
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;
}
#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",
}
-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",
(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",
#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
-/* $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
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 */
case GL_NEVER:
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glDepth.Func" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glDepth.Func" );
return;
}
-/* $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
* 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;
/***** Public *****/
/**********************************************************************/
-void gl_init_lists( void )
+void _mesa_init_lists( void )
{
static int init_flag = 0;
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;
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;
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;
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;
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;
{
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;
}
}
-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;
}
-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;
}
-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;
}
-static void save_PixelTransferf( GLenum pname, GLfloat param )
+static void
+save_PixelTransferf( GLenum pname, GLfloat param )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
}
-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;
}
-static void save_PointParameterfvEXT( GLenum pname, const GLfloat *params )
+static void
+save_PointParameterfvEXT( GLenum pname, const GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
}
-static void save_MultTransposeMatrixdARB( const GLdouble m[16] )
+static void
+save_MultTransposeMatrixdARB( const GLdouble m[16] )
{
GLfloat tm[16];
_math_transposefd(tm, m);
}
-static void save_MultTransposeMatrixfARB( const GLfloat m[16] )
+static void
+save_MultTransposeMatrixfARB( const GLfloat m[16] )
{
GLfloat tm[16];
_math_transposef(tm, m);
}
-static void save_PixelTexGenSGIX(GLenum mode)
+static void
+save_PixelTexGenSGIX(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
/* 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);
/* 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);
/* 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);
/* 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);
/* 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);
/* 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);
/* 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;
}
-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);
}
* 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 );
* 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;
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 );
{
char msg[1000];
sprintf(msg, "Error in execute_list: opcode=%d", (int) opcode);
- gl_problem( ctx, msg );
+ _mesa_problem( ctx, msg );
}
done = GL_TRUE;
}
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;i<list+range;i++) {
- gl_destroy_list( ctx, i );
+ _mesa_destroy_list( ctx, i );
}
}
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
if (range<0) {
- gl_error( ctx, GL_INVALID_VALUE, "glGenLists" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glGenLists" );
return 0;
}
if (range==0) {
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
- fprintf(stderr, "glNewList %u %s\n", list, gl_lookup_enum_by_nr(mode));
+ fprintf(stderr, "glNewList %u %s\n", list, _mesa_lookup_enum_by_nr(mode));
if (list==0) {
- gl_error( ctx, GL_INVALID_VALUE, "glNewList" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glNewList" );
return;
}
if (mode!=GL_COMPILE && mode!=GL_COMPILE_AND_EXECUTE) {
- gl_error( ctx, GL_INVALID_ENUM, "glNewList" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glNewList" );
return;
}
if (ctx->CurrentListPtr) {
/* already compiling a display list */
- gl_error( ctx, GL_INVALID_OPERATION, "glNewList" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" );
return;
}
/* 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);
***/
static const char *enum_string( GLenum k )
{
- return gl_lookup_enum_by_nr( k );
+ return _mesa_lookup_enum_by_nr( k );
}
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;
/*
-/* $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
} 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 );
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 *
-/* $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
}
if (ctx->NewState) {
- gl_update_state(ctx);
+ _mesa_update_state(ctx);
}
x = (GLint) (ctx->Current.RasterPos[0] + 0.5F);
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] );
}
}
}
-/* $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
flag = _NEW_ARRAY_SECONDARYCOLOR;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glEnable/DisableClientState" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glEnable/DisableClientState" );
return;
}
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) {
}
/* 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 {
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:
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)
/* 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)
/* 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)
/* 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)
/* 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)
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)
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)
/* 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)
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)
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)
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)
/* 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)
/* 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)
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable");
+ _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable");
return;
}
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:
return ctx->Depth.OcclusionTest;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
return GL_FALSE;
}
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;
}
return ctx->Point.SpriteMode;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
return GL_FALSE;
}
}
-/* $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
-int gl_lookup_enum_by_name( const char *symbol )
+int _mesa_lookup_enum_by_name( const char *symbol )
{
enum_elt tmp;
enum_elt *e;
}
-const char *gl_lookup_enum_by_nr( int nr )
+const char *_mesa_lookup_enum_by_nr( int nr )
{
enum_elt tmp, *e, **f;
-/* $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
#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
-/* $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
* 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;
/*
* 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;
* 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 )
/*
* 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 )
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;
}
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);
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;
}
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);
* 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) {
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;
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)" );
}
}
* 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) {
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;
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)" );
}
}
* 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) {
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;
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)" );
}
}
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);
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;
}
-/* $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
#include "mtypes.h"
-extern void gl_init_eval( void );
+extern void _mesa_init_eval( void );
extern GLuint _mesa_evaluator_components( GLenum target );
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 );
-/* $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
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;
}
FB_TEXTURE);
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glFeedbackBuffer" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glFeedbackBuffer" );
return;
}
/*
* 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,
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 */
}
-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) {
return;
}
if (ctx->Select.NameStackDepth == 0) {
- gl_error( ctx, GL_INVALID_OPERATION, "glLoadName" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glLoadName" );
return;
}
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;
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--;
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);
ctx->Feedback.Count = 0;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glRenderMode" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glRenderMode" );
return 0;
}
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;
}
-/* $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
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
-/* $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
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)
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)
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)
break;
}
default:
- gl_error( ctx, GL_INVALID_ENUM, "glFog" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glFog" );
return;
}
-/* $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
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))
*params = ctx->Pixel.HistogramEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
return;
}
break;
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 */
*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) {
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 */
*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:
ctx->OcclusionResultSaved = GL_FALSE;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" );
}
return;
*params = ctx->Pixel.Convolution1DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
return;
}
break;
*params = ctx->Pixel.Convolution2DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
return;
}
break;
*params = ctx->Pixel.Separable2DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
return;
}
break;
*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" );
}
}
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;
*params = (GLdouble) ctx->Pixel.HistogramEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
return;
}
break;
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 */
*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) {
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 */
*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:
ctx->OcclusionResultSaved = GL_FALSE;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetDoublev" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetDoublev" );
}
return;
*params = (GLdouble) ctx->Pixel.Convolution1DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
return;
}
break;
*params = (GLdouble) ctx->Pixel.Convolution2DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
return;
}
break;
*params = (GLdouble) ctx->Pixel.Separable2DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
return;
}
break;
*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" );
}
}
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;
*params = (GLfloat) ctx->Pixel.HistogramEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
return;
}
break;
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 */
*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) {
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 */
*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:
ctx->OcclusionResultSaved = GL_FALSE;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetFloatv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" );
}
return;
*params = (GLfloat) ctx->Pixel.Convolution1DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
return;
}
break;
*params = (GLfloat) ctx->Pixel.Convolution2DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
return;
}
break;
*params = (GLfloat) ctx->Pixel.Separable2DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
return;
}
break;
*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" );
}
}
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))
*params = (GLint) ctx->Pixel.HistogramEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
return;
}
break;
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 */
*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) {
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 */
*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:
ctx->OcclusionResultSaved = GL_FALSE;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" );
}
return;
*params = (GLint) ctx->Pixel.Convolution1DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
return;
}
break;
*params = (GLint) ctx->Pixel.Convolution2DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
return;
}
break;
*params = (GLint) ctx->Pixel.Separable2DEnabled;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
return;
}
break;
*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:
*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:
*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:
*params = (GLint) ctx->Array.FogCoord.Stride;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" );
}
break;
*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" );
}
}
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))
*params = ctx->Select.Buffer;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glGetPointerv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerv" );
return;
}
}
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;
}
}
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;
-/* $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
_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;
}
/* 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)
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glHint(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)");
return GL_FALSE;
}
-/* $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
} \
break; \
default: \
- gl_problem(ctx, "bad format in pack_histogram"); \
+ _mesa_problem(ctx, "bad format in pack_histogram"); \
} \
}
}
break;
default:
- gl_problem(ctx, "Bad type in pack_histogram");
+ _mesa_problem(ctx, "Bad type in pack_histogram");
}
#undef PACK_MACRO
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;
}
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;
}
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;
}
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;
}
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;
}
*params = (GLfloat) ctx->Histogram.Sink;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameterfv(pname)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameterfv(pname)");
}
}
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;
}
*params = (GLint) ctx->Histogram.Sink;
break;
default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameteriv(pname)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameteriv(pname)");
}
}
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) {
*params = (GLfloat) ctx->MinMax.Sink;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameterfv(pname)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameterfv(pname)");
}
}
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) {
*params = (GLint) ctx->MinMax.Sink;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameteriv(pname)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameteriv(pname)");
}
}
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;
}
}
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;
}
}
error = GL_TRUE;
}
else {
- gl_error(ctx, GL_INVALID_VALUE, "glHistogram(width)");
+ _mesa_error(ctx, GL_INVALID_VALUE, "glHistogram(width)");
return;
}
}
error = GL_TRUE;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glHistogram(internalFormat)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glHistogram(internalFormat)");
return;
}
}
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;
}
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;
}
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;
}
-/* $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
}
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;
}
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;
}
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);
}
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 );
}
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 );
}
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 );
}
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 );
}
break;
default:
- gl_problem(ctx, "bad type in _mesa_pack_float_rgba_span");
+ _mesa_problem(ctx, "bad type in _mesa_pack_float_rgba_span");
}
}
}
break;
default:
- gl_problem(NULL, "bad srcType in extract_uint_indexes");
+ _mesa_problem(NULL, "bad srcType in extract_uint_indexes");
return;
}
}
stride = 4;
break;
default:
- gl_problem(NULL, "bad srcFormat in extract float data");
+ _mesa_problem(NULL, "bad srcFormat in extract float data");
return;
}
}
break;
default:
- gl_problem(NULL, "bad srcType in extract float data");
+ _mesa_problem(NULL, "bad srcType in extract float data");
break;
}
}
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;
}
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;
}
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");
}
}
}
}
break;
default:
- gl_problem(ctx, "bad type in _mesa_pack_index_span");
+ _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
}
}
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");
}
}
}
}
break;
default:
- gl_problem(ctx, "bad type in _mesa_pack_index_span");
+ _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
}
}
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;
}
}
break;
default:
- gl_problem(ctx, "bad type in _mesa_pack_depth_span");
+ _mesa_problem(ctx, "bad type in _mesa_pack_depth_span");
}
}
-/* $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
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;
}
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;
}
}
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])
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])
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])
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])
l->QuadraticAttenuation = params[0];
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glLight" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glLight" );
return;
}
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;
}
params[0] = ctx->Light.Light[l].QuadraticAttenuation;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glGetLightfv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightfv" );
break;
}
}
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;
}
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;
}
}
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)
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glLightModel" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glLightModel" );
break;
}
* 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;
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;
}
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;
}
/* 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 )
{
*
* 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 )
{
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;
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) {
* 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;
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) {
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 &&
if (ctx->Light.ColorMaterialEnabled) {
FLUSH_CURRENT( ctx, 0 );
- gl_update_color_material( ctx, ctx->Current.Color );
+ _mesa_update_color_material( ctx, ctx->Current.Color );
}
}
f = 1;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(face)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(face)" );
return;
}
switch (pname) {
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)" );
}
}
f = 1;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetMaterialiv(face)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialiv(face)" );
return;
}
switch (pname) {
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)" );
}
}
* 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;
}
* 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--;
}
void
-gl_validate_all_lighting_tables( GLcontext *ctx )
+_mesa_validate_all_lighting_tables( GLcontext *ctx )
{
GLint i;
GLfloat shininess;
* 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;
* 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 };
-/* $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
-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
-/* $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
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (width<=0.0) {
- gl_error( ctx, GL_INVALID_VALUE, "glLineWidth" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glLineWidth" );
return;
}
-/* $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
flags |= _NEW_COLOR_MATRIX; \
break; \
default: \
- gl_problem(ctx, where); \
+ _mesa_problem(ctx, where); \
} \
} while (0)
left == right ||
top == bottom)
{
- gl_error( ctx, GL_INVALID_VALUE, "glFrustum" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glFrustum" );
return;
}
bottom == top ||
nearval == farval)
{
- gl_error( ctx, GL_INVALID_VALUE, "glOrtho" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glOrtho" );
return;
}
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glMatrixMode" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glMatrixMode" );
}
}
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++],
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++],
{
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]++],
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");
}
}
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,
break;
case GL_PROJECTION:
if (ctx->ProjectionStackDepth==0) {
- gl_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix");
+ _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix");
return;
}
{
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],
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,
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");
}
}
{
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;
}
-/* $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
#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,
_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 );
-/* $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
#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)
-/* $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
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
ctx->Unpack.Alignment = param;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glPixelStore" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glPixelStore" );
return;
}
}
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;
}
}
}
if (!ok) {
- gl_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" );
return;
}
}
}
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glPixelMapfv(map)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glPixelMapfv(map)" );
}
}
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" );
}
}
}
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" );
}
}
}
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" );
}
}
ctx->Pixel.PostConvolutionBias[2] = param;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glPixelTransfer(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glPixelTransfer(pname)" );
return;
}
}
}
break;
default:
- gl_problem(NULL, "Bad format in _mesa_lookup_rgba");
+ _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba");
return;
}
}
-/* $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
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (size <= 0.0) {
- gl_error( ctx, GL_INVALID_VALUE, "glPointSize" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glPointSize" );
return;
}
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)
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)
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)
ctx->Point.Threshold = *params;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glPointParameterfvEXT" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glPointParameterfvEXT" );
return;
}
-/* $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
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;
}
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;
}
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;
}
ctx->Polygon.BackMode = mode;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glPolygonMode(face)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(face)" );
return;
}
-/* $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
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 );
}
if (ctx->RenderMode==GL_SELECT) {
- gl_update_hitflag( ctx, ctx->Current.RasterPos[2] );
+ _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] );
}
}
-/* $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
generic_noop(void)
{
#ifdef DEBUG
- gl_problem(NULL, "undefined function dispatch");
+ _mesa_problem(NULL, "undefined function dispatch");
#endif
return 0;
}
*/
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 );
calculate_model_project_matrix(ctx);
if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW))
- gl_compute_light_positions( ctx );
+ _mesa_compute_light_positions( 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 );
}
* _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 );
/* 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.
-/* $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
_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
-/* $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
case GL_ALWAYS:
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glStencilFunc" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glStencilFunc" );
return;
}
}
/* FALL-THROUGH */
default:
- gl_error(ctx, GL_INVALID_ENUM, "glStencilOp");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp");
return;
}
switch (zfail) {
}
/* FALL-THROUGH */
default:
- gl_error(ctx, GL_INVALID_ENUM, "glStencilOp");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp");
return;
}
switch (zpass) {
}
/* FALL-THROUGH */
default:
- gl_error(ctx, GL_INVALID_ENUM, "glStencilOp");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp");
return;
}
-/* $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
c = 4;
break;
default:
- gl_problem(NULL, "error in PrintTexture\n");
+ _mesa_problem(NULL, "error in PrintTexture\n");
return;
}
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;
}
}
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;
}
}
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;
}
}
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;
}
}
!(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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
}
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;
}
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;
}
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;
}
}
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;
}
}
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;
}
}
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;
}
}
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;
}
}
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;
}
|| 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;
}
|| 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;
}
}
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;
}
}
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;
}
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;
}
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;
}
}
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;
}
}
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;
}
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;
}
}
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;
}
}
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? */
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;
}
}
if (ctx->NewState & _NEW_PIXEL)
- gl_update_state(ctx);
+ _mesa_update_state(ctx);
if (is_color_format(format) &&
ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) {
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;
}
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;
}
}
border, internalFormat);
if (ctx->NewState & _NEW_PIXEL)
- gl_update_state(ctx);
+ _mesa_update_state(ctx);
ASSERT(ctx->Driver.TexImage1D);
if (pixels) {
}
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" );
return;
}
}
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;
}
}
border, internalFormat);
if (ctx->NewState & _NEW_PIXEL)
- gl_update_state(ctx);
+ _mesa_update_state(ctx);
ASSERT(ctx->Driver.TexImage2D);
if (pixels) {
}
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" );
return;
}
}
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;
}
}
internalFormat);
if (ctx->NewState & _NEW_PIXEL)
- gl_update_state(ctx);
+ _mesa_update_state(ctx);
ASSERT(ctx->Driver.TexImage3D);
if (pixels) {
}
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" );
return;
}
}
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)) {
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)) {
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)) {
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);
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;
}
}
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,
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;
}
}
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);
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);
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);
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 */
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;
}
}
}
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage1DARB(target)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage1DARB(target)" );
return;
}
}
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 */
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;
}
}
}
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage2DARB(target)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage2DARB(target)" );
return;
}
}
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 */
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;
}
}
}
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage3DARB(target)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage3DARB(target)" );
return;
}
}
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;
}
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;
}
-/* $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
}
else {
/* Dimensions = ??? */
- gl_problem(ctx, "Bug in gl_test_texture_object_completeness\n");
+ _mesa_problem(ctx, "Bug in gl_test_texture_object_completeness\n");
}
}
}
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (n < 0) {
- gl_error( ctx, GL_INVALID_VALUE, "glGenTextures" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glGenTextures" );
return;
}
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:
}
/* fallthrough */
default:
- gl_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" );
return;
}
/* 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;
}
}
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;
}
}
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 */
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;
}
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;
}
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 *)
}
}
else {
- gl_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)");
+ _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)");
return GL_FALSE;
}
}
-/* $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
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;
case GL_REPLACE:
break;
default:
- gl_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" );
return;
}
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)
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:
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;
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;
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;
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;
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;
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;
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;
newshift = 2;
}
else {
- gl_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" );
return;
}
if (texUnit->CombineScaleShiftRGB == newshift)
texUnit->CombineScaleShiftRGB = newshift;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)");
return;
}
break;
newshift = 2;
}
else {
- gl_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param)" );
return;
}
if (texUnit->CombineScaleShiftA == newshift)
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) {
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) {
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;
}
*params = 4.0;
}
else {
- gl_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
return;
}
break;
*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)" );
}
}
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;
}
*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:
*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:
*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:
*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:
*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:
*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:
*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:
*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:
*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:
*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:
*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:
*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:
*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:
*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)" );
}
}
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);
}
/* fallthrough */
default:
- gl_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
return;
}
texObj->MinFilter = eparam;
}
else {
- gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
return;
}
break;
texObj->MagFilter = eparam;
}
else {
- gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
return;
}
break;
texObj->WrapS = eparam;
}
else {
- gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
return;
}
break;
texObj->WrapT = eparam;
}
else {
- gl_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
return;
}
break;
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:
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];
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;
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;
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;
}
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;
}
}
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;
}
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 */
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:
*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)");
}
}
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;
}
*params = (GLfloat) obj->CompareFlag;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" );
return;
}
break;
*params = (GLfloat) obj->CompareOperator;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" );
return;
}
break;
*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)" );
}
}
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;
}
*params = (GLint) obj->CompareFlag;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" );
return;
}
break;
*params = (GLint) obj->CompareOperator;
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" );
return;
}
break;
*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)" );
}
}
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) {
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)
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;
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)
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;
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)
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;
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)
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;
}
COPY_4V( params, texUnit->EyePlaneS );
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" );
return;
}
break;
COPY_4V( params, texUnit->EyePlaneT );
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" );
return;
}
break;
COPY_4V( params, texUnit->EyePlaneR );
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" );
return;
}
break;
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;
}
}
COPY_4V( params, texUnit->EyePlaneS );
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" );
return;
}
break;
COPY_4V( params, texUnit->EyePlaneT );
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" );
return;
}
break;
COPY_4V( params, texUnit->EyePlaneR );
}
else {
- gl_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" );
return;
}
break;
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;
}
}
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;
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;
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;
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;
}
}
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;
}
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;
}
-/* $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
return;
}
default:
- gl_problem(NULL, "Bad format in fetch_1d_texel");
+ _mesa_problem(NULL, "Bad format in fetch_1d_texel");
}
}
return;
}
default:
- gl_problem(NULL, "Bad format in fetch_2d_texel");
+ _mesa_problem(NULL, "Bad format in fetch_2d_texel");
}
}
return;
}
default:
- gl_problem(NULL, "Bad format in fetch_3d_texel");
+ _mesa_problem(NULL, "Bad format in fetch_3d_texel");
}
}
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");
}
}
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;
}
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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
-/* $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
}
break;
default:
- gl_problem(NULL, "bad srcFormat in _mesa_uncovert_teximage()");
+ _mesa_problem(NULL, "bad srcFormat in _mesa_uncovert_teximage()");
}
}
return;
}
}
- gl_problem(NULL, "bad format in _mesa_set_teximage_component_sizes");
+ _mesa_problem(NULL, "bad format in _mesa_set_teximage_component_sizes");
}
-/* $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
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;
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;
}
}
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;
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;
}
}
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;
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;
}
}
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;
}
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;
}
}
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;
}
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;
}
}
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;
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;
}
}
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;
}
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;
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;
}
}
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;
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;
}
defstride = 15*f;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glInterleavedArrays(format)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glInterleavedArrays(format)" );
return;
}
-/* $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"),
* 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;
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;
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;
-/* $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
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);
}
-/* $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
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
-/* $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
(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;
}
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 )
-/* $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
* 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,
*/
-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 */
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;
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;
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;
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;
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;
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;
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;
*/
-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);
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);
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);
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);
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);
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);
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);
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);
*/
-void gl_vector4f_free( GLvector4f *v )
+void _mesa_vector4f_free( GLvector4f *v )
{
if (v->flags & VEC_MALLOC) {
ALIGN_FREE( v->storage );
}
}
-void gl_vector3f_free( GLvector3f *v )
+void _mesa_vector3f_free( GLvector3f *v )
{
if (v->flags & VEC_MALLOC) {
ALIGN_FREE( v->storage );
}
}
-void gl_vector1f_free( GLvector1f *v )
+void _mesa_vector1f_free( GLvector1f *v )
{
if (v->flags & VEC_MALLOC) {
ALIGN_FREE( v->storage );
}
}
-void gl_vector4ub_free( GLvector4ub *v )
+void _mesa_vector4ub_free( GLvector4ub *v )
{
if (v->flags & VEC_MALLOC) {
ALIGN_FREE( v->storage );
}
}
-void gl_vector4chan_free( GLvector4chan *v )
+void _mesa_vector4chan_free( GLvector4chan *v )
{
if (v->flags & VEC_MALLOC) {
ALIGN_FREE( v->storage );
}
}
-void gl_vector4us_free( GLvector4us *v )
+void _mesa_vector4us_free( GLvector4us *v )
{
if (v->flags & VEC_MALLOC) {
ALIGN_FREE( v->storage );
}
}
-void gl_vector1ub_free( GLvector1ub *v )
+void _mesa_vector1ub_free( GLvector1ub *v )
{
if (v->flags & VEC_MALLOC) {
ALIGN_FREE( v->storage );
}
}
-void gl_vector1ui_free( GLvector1ui *v )
+void _mesa_vector1ui_free( GLvector1ui *v )
{
if (v->flags & VEC_MALLOC) {
ALIGN_FREE( v->storage );
/*
* 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] = {
/*
* 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;
-/* $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
* 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 {
} 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
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 {
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 );
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.
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 * );
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 * );
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 * );
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 * );
-/* $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
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];
-GLvector4f *gl_project_points( GLvector4f *proj_vec,
+GLvector4f *_mesa_project_points( GLvector4f *proj_vec,
const GLvector4f *clip_vec )
{
const GLuint stride = clip_vec->stride;
* 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]
* 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)
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();
#endif
#ifdef USE_X86_ASM
- gl_init_all_x86_transform_asm();
+ _mesa_init_all_x86_transform_asm();
#endif
}
-/* $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
} 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] );
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];
/* 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) )
-/* $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
*/
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)
-/* $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
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,
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,
# 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
}
}
}
}
# 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,
(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,
# 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
}
-/* $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
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;
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];
for (j=0;j<height;j++) {
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
GLuint i;
- gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
+ _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i=0;i<width;i++) {
*acc += (GLaccum) ( (GLfloat) rgba[i][RCOMP] * rscale ); acc++;
*acc += (GLaccum) ( (GLfloat) rgba[i][GCOMP] * gscale ); acc++;
assert(swrast->_IntegerAccumScaler <= 1.0);
for (j = 0; j < height; j++) {
GLuint i, i4;
- gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
+ _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i = i4 = 0; i < width; i++, i4 += 4) {
acc[i4+0] = rgba[i][RCOMP];
acc[i4+1] = rgba[i][GCOMP];
GLuint i, j;
for (j = 0; j < height; j++) {
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
- gl_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
+ _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i=0;i<width;i++) {
*acc++ = (GLaccum) ((GLfloat) rgba[i][RCOMP] * rscale + d);
*acc++ = (GLaccum) ((GLfloat) rgba[i][GCOMP] * gscale + d);
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glAccum" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glAccum" );
}
}
-/* $Id: s_alpha.c,v 1.2 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: s_alpha.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
/* caller should check for zero! */
return 0;
default:
- gl_problem( ctx, "Invalid alpha test in gl_alpha_test" );
+ _mesa_problem( ctx, "Invalid alpha test in gl_alpha_test" );
return 0;
}
/* Never get here */
-/* $Id: s_alphabuf.c,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: s_alphabuf.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
buf->FrontLeftAlpha = (GLchan *) MALLOC( bytes );
if (!buf->FrontLeftAlpha) {
/* out of memory */
- gl_error( ctx, GL_OUT_OF_MEMORY,
+ _mesa_error( ctx, GL_OUT_OF_MEMORY,
"Couldn't allocate front-left alpha buffer" );
}
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" );
}
}
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" );
}
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" );
}
}
-/* $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
}
}
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
-/* $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
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;
}
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 */
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 */
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;
}
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 */
}
/* 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 );
-/* $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
if (!swrast)
return GL_FALSE;
- swrast->PB = gl_alloc_pb();
+ swrast->PB = _mesa_alloc_pb();
if (!swrast->PB) {
FREE(swrast);
return GL_FALSE;
-/* $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
/* 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;
}
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);
(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 );
}
}
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;
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);
}
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) {
(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 );
}
}
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;
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;
(*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) {
}
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);
}
}
GLint overlapping;
if (!ctx->Visual.depthBits) {
- gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" );
return;
}
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;
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 );
}
}
GLint overlapping;
if (!ctx->Visual.stencilBits) {
- gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" );
return;
}
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;
}
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 );
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" );
}
}
-/* $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
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;
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;
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");
}
}
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");
}
}
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");
}
}
/* 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" );
}
}
}
-/* $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
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) {
/* with zooming */
GLint row;
for (row=0; row<drawHeight; row++) {
- gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
+ _mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
zSpan, 0, (void *) src, zoomY0);
src += rowLength * 4;
destY++;
/* with zooming */
GLint row;
for (row=0; row<drawHeight; row++) {
- gl_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
+ _mesa_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
zSpan, 0, (void *) src, zoomY0);
src += rowLength * 3;
destY++;
rgb[i][1] = src[i];
rgb[i][2] = src[i];
}
- gl_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
+ _mesa_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
zSpan, 0, (void *) rgb, zoomY0);
src += rowLength;
destY++;
rgba[i][2] = *ptr++;
rgba[i][3] = *ptr++;
}
- gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
+ _mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
zSpan, 0, (void *) rgba, zoomY0);
src += rowLength*2;
destY++;
for (row=0; row<drawHeight; row++) {
ASSERT(drawWidth < MAX_WIDTH);
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
- gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
+ _mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
zSpan, 0, (void *) rgba, zoomY0);
src += rowLength;
destY++;
type, source, &ctx->Unpack,
ctx->_ImageTransferState);
if (zoom) {
- gl_write_zoomed_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, desty);
+ _mesa_write_zoomed_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, desty);
}
else {
- gl_write_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, GL_BITMAP);
+ _mesa_write_index_span(ctx, drawWidth, x, y, zspan, 0, indexes, GL_BITMAP);
}
}
}
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;
}
}
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 {
&& 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;
}
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
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 {
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);
}
}
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;
}
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;
}
(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);
}
}
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)" );
}
}
-/* $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
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 */
}
-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);
}
-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 );
}
-/* $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
#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
-/* $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
}
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;
}
}
-/* $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
#include "s_linetemp.h"
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
#include "s_linetemp.h"
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
#include "s_linetemp.h"
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
#include "s_linetemp.h"
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
#include "s_linetemp.h"
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
#include "s_linetemp.h"
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
#include "s_linetemp.h"
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(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; \
}
}
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
}
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
}
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
}
}
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
}
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
}
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
}
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(ctx);
}
}
PB->count = count;
- gl_flush_pb(ctx);
+ _mesa_flush_pb(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);*/
-/* $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
}
break;
default:
- gl_problem(ctx, "bad mode in index_logic()");
+ _mesa_problem(ctx, "bad mode in index_logic()");
}
}
break;
default:
/* should never happen */
- gl_problem(ctx, "Bad function in rgba_logicop");
+ _mesa_problem(ctx, "Bad function in rgba_logicop");
}
}
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 );
}
-/* $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
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);
}
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];
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;
-/* $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
}
}
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);
}
}
-/* $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
/* error checking */
if (ctx->Visual.rgbMode) {
- gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels" );
return;
}
/* 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;
}
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;
}
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;
}
if (ctx->Visual.stencilBits <= 0) {
/* No stencil buffer */
- gl_error( ctx, GL_INVALID_OPERATION, "glReadPixels" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glReadPixels" );
return;
}
/* 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;
}
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;
}
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];
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];
format, type, pixels, &ctx->Pack);
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glReadPixels(format)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(format)" );
}
}
-/* $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
* 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 )
-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[],
-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],
* 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],
* 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[],
* 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[],
* 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] )
{
* 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
-/* $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
#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[],
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[],
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[],
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[] );
-/* $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
}
break;
default:
- gl_problem(ctx, "Bad stencil op in apply_stencil_op");
+ _mesa_problem(ctx, "Bad stencil op in apply_stencil_op");
}
}
}
break;
default:
- gl_problem(ctx, "Bad stencil func in gl_stencil_span");
+ _mesa_problem(ctx, "Bad stencil func in gl_stencil_span");
return 0;
}
}
break;
default:
- gl_problem(ctx, "Bad stencilop in apply_stencil_op_to_pixels");
+ _mesa_problem(ctx, "Bad stencilop in apply_stencil_op_to_pixels");
}
}
}
break;
default:
- gl_problem(ctx, "Bad stencil func in gl_stencil_pixels");
+ _mesa_problem(ctx, "Bad stencil func in gl_stencil_pixels");
return 0;
}
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" );
}
}
-/* $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
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");
}
}
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;
}
}
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;
}
}
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 {
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;
}
}
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");
}
}
}
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 {
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");
}
}
}
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 {
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");
}
}
}
}
break;
default:
- gl_problem(NULL, "invalid dimensions in _mesa_set_texture_sampler");
+ _mesa_problem(NULL, "invalid dimensions in _mesa_set_texture_sampler");
}
}
}
}
break;
default:
- gl_problem(NULL, "invalid combine source");
+ _mesa_problem(NULL, "invalid combine source");
}
switch (textureUnit->CombineSourceRGB[j]) {
}
break;
default:
- gl_problem(NULL, "invalid combine source");
+ _mesa_problem(NULL, "invalid combine source");
}
if (textureUnit->CombineOperandRGB[j] != GL_SRC_COLOR) {
}
break;
default:
- gl_problem(NULL, "invalid combine mode");
+ _mesa_problem(NULL, "invalid combine mode");
}
switch (textureUnit->CombineModeA) {
}
break;
default:
- gl_problem(NULL, "invalid combine mode");
+ _mesa_problem(NULL, "invalid combine mode");
}
/* Fix the alpha component for GL_DOT3_RGBA_EXT combining.
}
break;
default:
- gl_problem(ctx, "Bad format (GL_REPLACE) in apply_texture");
+ _mesa_problem(ctx, "Bad format (GL_REPLACE) in apply_texture");
return;
}
break;
}
break;
default:
- gl_problem(ctx, "Bad format (GL_MODULATE) in apply_texture");
+ _mesa_problem(ctx, "Bad format (GL_MODULATE) in apply_texture");
return;
}
break;
}
break;
default:
- gl_problem(ctx, "Bad format (GL_DECAL) in apply_texture");
+ _mesa_problem(ctx, "Bad format (GL_DECAL) in apply_texture");
return;
}
break;
}
break;
default:
- gl_problem(ctx, "Bad format (GL_BLEND) in apply_texture");
+ _mesa_problem(ctx, "Bad format (GL_BLEND) in apply_texture");
return;
}
break;
}
break;
default:
- gl_problem(ctx, "Bad format (GL_ADD) in apply_texture");
+ _mesa_problem(ctx, "Bad format (GL_ADD) in apply_texture");
return;
}
break;
break;
default:
- gl_problem(ctx, "Bad env mode in apply_texture");
+ _mesa_problem(ctx, "Bad env mode in apply_texture");
return;
}
}
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;
}
* 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;
}
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;
}
* 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;
}
-/* $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
#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 )
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 ); \
} \
}
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 ); \
} \
}
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 ); \
} \
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 ); \
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; \
} \
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: */ \
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; \
} \
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; \
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; \
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 ); \
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, \
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 ); \
} \
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 ); \
} \
}
-
-
#define INNER_LOOP( LEFT, RIGHT, Y ) \
{ \
GLint i; \
if (n > 0) { \
if (flat_shade) { \
for (i=0;i<n;i++) { \
+ GLuint unit; \
zspan[i] = FixedToDepth(ffz); \
fogspan[i] = fffog / 256; \
fffog += fdfogdx; \
rgba[i][GCOMP] = g; \
rgba[i][BCOMP] = b; \
rgba[i][ACOMP] = a; \
- { \
- GLuint unit; \
- for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {\
- if (ctx->Texture.Unit[unit]._ReallyEnabled) { \
- GLdouble invQ = 1.0 / vv[unit]; \
- s[unit][i] = ss[unit] * invQ; \
- t[unit][i] = tt[unit] * invQ; \
- u[unit][i] = uu[unit] * invQ; \
- COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit);\
- ss[unit] += dsdx[unit]; \
- tt[unit] += dtdx[unit]; \
- uu[unit] += dudx[unit]; \
- vv[unit] += dvdx[unit]; \
- } \
+ for (unit=0; unit < ctx->Const.MaxTextureUnits; unit++) {\
+ if (ctx->Texture.Unit[unit]._ReallyEnabled) { \
+ GLdouble invQ = 1.0 / vv[unit]; \
+ s[unit][i] = ss[unit] * invQ; \
+ t[unit][i] = tt[unit] * invQ; \
+ u[unit][i] = uu[unit] * invQ; \
+ COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \
+ ss[unit] += dsdx[unit]; \
+ tt[unit] += dtdx[unit]; \
+ uu[unit] += dudx[unit]; \
+ vv[unit] += dvdx[unit]; \
} \
} \
} \
} \
else { /* smooth shade */ \
for (i=0;i<n;i++) { \
+ GLuint unit; \
zspan[i] = FixedToDepth(ffz); \
fogspan[i] = fffog / 256; \
ffz += fdzdx; \
ffg += fdgdx; \
ffb += fdbdx; \
ffa += fdadx; \
- { \
- GLuint unit; \
- for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {\
- if (ctx->Texture.Unit[unit]._ReallyEnabled) { \
- GLdouble invQ = 1.0 / vv[unit]; \
- s[unit][i] = ss[unit] * invQ; \
- t[unit][i] = tt[unit] * invQ; \
- u[unit][i] = uu[unit] * invQ; \
- COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \
- ss[unit] += dsdx[unit]; \
- tt[unit] += dtdx[unit]; \
- uu[unit] += dudx[unit]; \
- vv[unit] += dvdx[unit]; \
- } \
+ for (unit=0; unit < ctx->Const.MaxTextureUnits; unit++) {\
+ if (ctx->Texture.Unit[unit]._ReallyEnabled) { \
+ GLdouble invQ = 1.0 / vv[unit]; \
+ s[unit][i] = ss[unit] * invQ; \
+ t[unit][i] = tt[unit] * invQ; \
+ u[unit][i] = uu[unit] * invQ; \
+ COMPUTE_MULTILAMBDA(lambda[unit][i], invQ, unit); \
+ ss[unit] += dsdx[unit]; \
+ tt[unit] += dtdx[unit]; \
+ uu[unit] += dudx[unit]; \
+ vv[unit] += dvdx[unit]; \
} \
} \
} \
} \
- gl_write_multitexture_span( ctx, n, LEFT, Y, zspan, fogspan, \
- (const GLfloat (*)[MAX_WIDTH]) s, \
- (const GLfloat (*)[MAX_WIDTH]) t, \
- (const GLfloat (*)[MAX_WIDTH]) u, \
- (GLfloat (*)[MAX_WIDTH]) lambda, \
- rgba, NULL, GL_POLYGON ); \
+ _mesa_write_multitexture_span(ctx, n, LEFT, Y, zspan, fogspan, \
+ (const GLfloat (*)[MAX_WIDTH]) s,\
+ (const GLfloat (*)[MAX_WIDTH]) t,\
+ (const GLfloat (*)[MAX_WIDTH]) u,\
+ (GLfloat (*)[MAX_WIDTH]) lambda, \
+ rgba, NULL, GL_POLYGON ); \
} \
}
+
#include "s_tritemp.h"
}
}
}
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;
}
}
-/* $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
#include "swrast.h"
-GLboolean gl_cull_triangle( GLcontext *ctx,
+GLboolean _mesa_cull_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2);
-/* $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
* 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;
/* write the span */
for (r=r0; r<r1; r++) {
- gl_write_rgba_span( ctx, m, x+skipcol, r, zdepth,
+ _mesa_write_rgba_span( ctx, m, x+skipcol, r, zdepth,
(fog ? zfog : 0),
zrgba, GL_BITMAP );
}
void
-gl_write_zoomed_rgb_span( GLcontext *ctx,
- GLuint n, GLint x, GLint y, const GLdepth z[],
- const GLfixed *fog,
- CONST GLchan rgb[][3], GLint y0 )
+_mesa_write_zoomed_rgb_span( GLcontext *ctx,
+ GLuint n, GLint x, GLint y, const GLdepth z[],
+ const GLfixed *fog,
+ CONST GLchan rgb[][3], GLint y0 )
{
GLint m;
GLint r0, r1, row, r;
/* write the span */
for (r=r0; r<r1; r++) {
- gl_write_rgba_span( ctx, m, x+skipcol, r, zdepth,
+ _mesa_write_rgba_span( ctx, m, x+skipcol, r, zdepth,
(fog ? zfog : 0), zrgba, GL_BITMAP );
}
}
* As above, but write CI pixels.
*/
void
-gl_write_zoomed_index_span( GLcontext *ctx,
- GLuint n, GLint x, GLint y, const GLdepth z[],
- const GLfixed *fog,
- const GLuint indexes[], GLint y0 )
+_mesa_write_zoomed_index_span( GLcontext *ctx,
+ GLuint n, GLint x, GLint y, const GLdepth z[],
+ const GLfixed *fog,
+ const GLuint indexes[], GLint y0 )
{
GLint m;
GLint r0, r1, row, r;
/* write the span */
for (r=r0; r<r1; r++) {
- gl_write_index_span( ctx, m, x+skipcol, r, zdepth,
+ _mesa_write_index_span( ctx, m, x+skipcol, r, zdepth,
(fog ? zfog : 0), zindexes, GL_BITMAP );
}
}
* As above, but write stencil values.
*/
void
-gl_write_zoomed_stencil_span( GLcontext *ctx,
- GLuint n, GLint x, GLint y,
- const GLstencil stencil[], GLint y0 )
+_mesa_write_zoomed_stencil_span( GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ const GLstencil stencil[], GLint y0 )
{
GLint m;
GLint r0, r1, row, r;
-/* $Id: s_zoom.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_zoom.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
extern void
-gl_write_zoomed_rgba_span( GLcontext *ctx,
- GLuint n, GLint x, GLint y, const GLdepth z[],
- const GLfixed *fog,
- CONST GLchan rgba[][4], GLint y0 );
+_mesa_write_zoomed_rgba_span( GLcontext *ctx,
+ GLuint n, GLint x, GLint y, const GLdepth z[],
+ const GLfixed *fog,
+ CONST GLchan rgba[][4], GLint y0 );
extern void
-gl_write_zoomed_rgb_span( GLcontext *ctx,
- GLuint n, GLint x, GLint y, const GLdepth z[],
- const GLfixed *fog,
- CONST GLchan rgb[][3], GLint y0 );
+_mesa_write_zoomed_rgb_span( GLcontext *ctx,
+ GLuint n, GLint x, GLint y, const GLdepth z[],
+ const GLfixed *fog,
+ CONST GLchan rgb[][3], GLint y0 );
extern void
-gl_write_zoomed_index_span( GLcontext *ctx,
- GLuint n, GLint x, GLint y, const GLdepth z[],
- const GLfixed *fog,
- const GLuint indexes[], GLint y0 );
+_mesa_write_zoomed_index_span( GLcontext *ctx,
+ GLuint n, GLint x, GLint y, const GLdepth z[],
+ const GLfixed *fog,
+ const GLuint indexes[], GLint y0 );
extern void
-gl_write_zoomed_stencil_span( GLcontext *ctx,
- GLuint n, GLint x, GLint y,
- const GLstencil stencil[], GLint y0 );
+_mesa_write_zoomed_stencil_span( GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ const GLstencil stencil[], GLint y0 );
#endif
-/* $Id: t_array_api.c,v 1.7 2001/02/20 18:28:52 keithw Exp $ */
+/* $Id: t_array_api.c,v 1.8 2001/03/03 20:33:31 brianp Exp $ */
/*
* Mesa 3-D graphics library
*
* Or scan the list and replace bad indices?
*/
- gl_problem( ctx,
+ _mesa_problem( ctx,
"DrawRangeElements references "
"elements outside locked range.");
}
/* Setup vector pointers that will be used to bind arrays to VB's.
*/
- 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);
tnl->tmp_primitive = (GLuint *)MALLOC(sizeof(GLuint)*tnl->vb.Size);
tnl->tmp_primitive_length = (GLuint *)MALLOC(sizeof(GLuint)*tnl->vb.Size);
-/* $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
prim = GL_LINE_STRIP;
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glEvalMesh1(mode)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh1(mode)" );
return;
}
}
break;
default:
- gl_error( ctx, GL_INVALID_ENUM, "glEvalMesh2(mode)" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh2(mode)" );
return;
}
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
*/
GLuint count, last;
if (ctx->NewState)
- gl_update_state(ctx);
+ _mesa_update_state(ctx);
/* If not compiling, treat as a normal begin().
*/
/* 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.
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;
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 );
}
-/* $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
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 );
* 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;
}
}
-/* $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
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 );
}
}
}
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 );
}
}
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.
*/
-/* $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
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))
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))
-/* $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
}
break;
default:
- gl_problem(ctx, "Bad fog mode in make_fog_coord");
+ _mesa_problem(ctx, "Bad fog mode in make_fog_coord");
return;
}
}
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;
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();
{
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;
}
-/* $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
ASSERT((input->flags & VEC_NOT_WRITEABLE) == 0);
}
- gl_vector4f_clean_elem(input, VB->Count, 2);
+ _mesa_vector4f_clean_elem(input, VB->Count, 2);
}
}
/* 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...
*/
*/
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...
*/
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;
}
-/* $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
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]);
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]);
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];
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]);
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;
-/* $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
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.
*/
{
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;
}
-/* $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
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.
*/
{
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;
}
-/* $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
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;
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;
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;
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;
}
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) {
break;
}
default:
- gl_problem(ctx, "Bad S texgen");
+ _mesa_problem(ctx, "Bad S texgen");
}
}
break;
}
default:
- gl_problem(ctx, "Bad T texgen");
+ _mesa_problem(ctx, "Bad T texgen");
}
}
break;
}
default:
- gl_problem(ctx, "Bad R texgen");
+ _mesa_problem(ctx, "Bad R texgen");
}
}
texUnit->EyePlaneQ, 0);
break;
default:
- gl_problem(ctx, "Bad Q texgen");
+ _mesa_problem(ctx, "Bad Q texgen");
}
}
}
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));
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 );
-/* $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
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.
*/
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;
}
-/* $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
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
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 );
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;
-/* $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
#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;
#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 );
#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;
-/* $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
#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
-/* $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
/* 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 */
#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();
}
if ( gl_x86_cpu_features ) {
- gl_init_x86_transform_asm();
+ _mesa_init_x86_transform_asm();
}
#ifdef USE_MMX_ASM
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);
}
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);
}
/* 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
-/* $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
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
-/* $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
#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;
#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 );
#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;
-/* $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
#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