OPCODE_ATTR_3F_ARB,
OPCODE_ATTR_4F_ARB,
OPCODE_MATERIAL,
- OPCODE_INDEX,
- OPCODE_EDGEFLAG,
OPCODE_BEGIN,
OPCODE_END,
OPCODE_RECTF,
static void GLAPIENTRY
save_Indexf(GLfloat x)
{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_INDEX, 1);
- if (n) {
- n[1].f = x;
- }
-
- ctx->ListState.ActiveIndex = 1;
- ctx->ListState.CurrentIndex = x;
-
- if (ctx->ExecuteFlag) {
- CALL_Indexf(ctx->Exec, (x));
- }
+ save_Attr1fNV(VERT_ATTRIB_COLOR_INDEX, x);
}
static void GLAPIENTRY
save_Indexfv(const GLfloat * v)
{
- save_Indexf(v[0]);
+ save_Attr1fNV(VERT_ATTRIB_COLOR_INDEX, v[0]);
}
static void GLAPIENTRY
save_EdgeFlag(GLboolean x)
{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EDGEFLAG, 1);
- if (n) {
- n[1].b = x;
- }
-
- ctx->ListState.ActiveEdgeFlag = 1;
- ctx->ListState.CurrentEdgeFlag = x;
-
- if (ctx->ExecuteFlag) {
- CALL_EdgeFlag(ctx->Exec, (x));
- }
+ save_Attr1fNV(VERT_ATTRIB_EDGEFLAG, x ? 1.0 : 0.0);
}
static void GLAPIENTRY
CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, f));
}
break;
- case OPCODE_INDEX:
- CALL_Indexf(ctx->Exec, (n[1].f));
- break;
- case OPCODE_EDGEFLAG:
- CALL_EdgeFlag(ctx->Exec, (n[1].b));
- break;
case OPCODE_BEGIN:
CALL_Begin(ctx->Exec, (n[1].e));
break;
for (i = 0; i < MAT_ATTRIB_MAX; i++)
ctx->ListState.ActiveMaterialSize[i] = 0;
- ctx->ListState.ActiveIndex = 0;
- ctx->ListState.ActiveEdgeFlag = 0;
-
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
ctx->Driver.NewList(ctx, list, mode);
_mesa_printf("MATERIAL %x %x: %f %f %f %f\n",
n[1].i, n[2].i, n[3].f, n[4].f, n[5].f, n[6].f);
break;
- case OPCODE_INDEX:
- _mesa_printf("INDEX: %f\n", n[1].f);
- break;
- case OPCODE_EDGEFLAG:
- _mesa_printf("EDGEFLAG: %d\n", n[1].i);
- break;
case OPCODE_BEGIN:
_mesa_printf("BEGIN %x\n", n[1].i);
break;