From 3a55750d4884dfaecde71d1584e69f46f14fce86 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 5 Sep 2006 23:15:29 +0000 Subject: [PATCH] Hack for Warcraft (bug 8060): allow 'vertex.weight' to be referenced in vertex program, even though it's not really supported. Results will be undefined, but Warcraft doesn't actually use the attribute. --- src/mesa/shader/arbprogparse.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 898be0f2006..6c6ec0736c5 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1491,8 +1491,13 @@ parse_attrib_binding(GLcontext * ctx, const GLubyte ** inst, GLint weight; err = parse_weight_num (ctx, inst, Program, &weight); *inputReg = VERT_ATTRIB_WEIGHT; +#if 1 + /* hack for Warcraft (see bug 8060) */ + _mesa_warning(ctx, "Application error: vertex program uses 'vertex.weight' but GL_ARB_vertex_blend not supported."); +#else program_error(ctx, Program->Position, "ARB_vertex_blend not supported"); +#endif } return 1; @@ -3784,6 +3789,11 @@ enable_parser_extensions(GLcontext *ctx, grammar id) && !enable_ext(ctx, id, "draw_buffers")) return GL_FALSE; +#if 1 + /* hack for Warcraft (see bug 8060) */ + enable_ext(ctx, id, "vertex_blend"); +#endif + return GL_TRUE; } -- 2.30.2