#undef GET_PROGRAM_NAME
#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__)
+# if !defined(__GLIBC__) || (__GLIBC__ < 2)
+/* These aren't declared in any libc5 header */
+extern char *program_invocation_name, *program_invocation_short_name;
+# endif
# define GET_PROGRAM_NAME() program_invocation_short_name
#elif defined(__FreeBSD__) && (__FreeBSD__ >= 2)
# include <osreldate.h>
string = numStart;
/* scale of the first digit */
- scale = sign * powf (10.0f, (GLfloat)(pointPos-1 + exponent));
+ scale = sign * (GLfloat)pow (10.0, (GLdouble)(pointPos-1 + exponent));
/* second pass: parse digits */
do {
glXChooseVisual(Display *dpy, int screen, int *list)
{
struct _glxapi_table *t;
+printf("1\n");
GET_DISPATCH(dpy, t);
+printf("2\n");
if (!t)
return NULL;
+printf("3\n");
return (t->ChooseVisual)(dpy, screen, list);
}
case GL_TEXTURE_CUBE_MAP_ARB:
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
return ctx->Const.MaxCubeTextureLevels;
- break;
case GL_TEXTURE_RECTANGLE_NV:
case GL_PROXY_TEXTURE_RECTANGLE_NV:
return 1;
- break;
default:
return 0; /* bad target */
}
_mesa_problem(ctx, "Invalid material state in fetch_state");
return;
}
- };
- return;
+ }
case STATE_LIGHT:
{
/* state[1] is the light number */
return;
}
}
- return;
case STATE_LIGHTMODEL_AMBIENT:
COPY_4V(value, ctx->Light.Model.Ambient);
return;
return;
}
}
- return;
case STATE_TEXGEN:
{
/* state[1] is the texture unit */
return;
}
}
- return;
case STATE_TEXENV_COLOR:
{
/* state[1] is the texture unit */
switch (swrast->CurrentBufferBit) {
case DD_FRONT_LEFT_BIT:
return ctx->DrawBuffer->FrontLeftAlpha;
- break;
case DD_BACK_LEFT_BIT:
return ctx->DrawBuffer->BackLeftAlpha;
- break;
case DD_FRONT_RIGHT_BIT:
return ctx->DrawBuffer->FrontRightAlpha;
- break;
case DD_BACK_RIGHT_BIT:
return ctx->DrawBuffer->BackRightAlpha;
- break;
default:
_mesa_problem(ctx, "Bad CurrentBuffer in get_alpha_buffer()");
return (GLchan *) ctx->DrawBuffer->FrontLeftAlpha;
RENDER_SPAN( span );
#endif
+ (void)span;
+
}
ASSERT(t->MinFilter == GL_NEAREST);
return &sample_nearest_1d;
}
- break;
case GL_TEXTURE_2D:
if (format == GL_DEPTH_COMPONENT) {
return &sample_depth_texture;
return &sample_nearest_2d;
}
}
- break;
case GL_TEXTURE_3D:
if (needLambda) {
return &sample_lambda_3d;
ASSERT(t->MinFilter == GL_NEAREST);
return &sample_nearest_3d;
}
- break;
case GL_TEXTURE_CUBE_MAP:
if (needLambda) {
return &sample_lambda_cube;
ASSERT(t->MinFilter == GL_NEAREST);
return &sample_nearest_cube;
}
- break;
case GL_TEXTURE_RECTANGLE_NV:
if (needLambda) {
return &sample_lambda_rect;
ASSERT(t->MinFilter == GL_NEAREST);
return &sample_nearest_rect;
}
- break;
default:
_mesa_problem(ctx,
"invalid target in _swrast_choose_texture_sample_func");
/* define TRACE to trace lighting code */
-/* #define TRACE 1 */
+#define TRACE 1
/*
* ctx is the current context
const GLfloat *normal = (GLfloat *)VB->NormalPtr->data;
GLfloat (*Fcolor)[4] = (GLfloat (*)[4]) store->LitColor[0].data;
+#if IDX & LIGHT_TWOSIDE
GLfloat (*Bcolor)[4] = (GLfloat (*)[4]) store->LitColor[1].data;
- GLfloat (*color[2])[4];
+#endif
const GLuint nr = VB->Count;
(void) nstride;
(void) vstride;
- color[0] = Fcolor;
- color[1] = Bcolor;
-
VB->ColorPtr[0] = &store->LitColor[0];
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];