/*
* Mesa 3-D graphics library
- * Version: 5.1
+ * Version: 6.0
*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2004 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"),
OPCODE_BITMAP,
OPCODE_BLEND_COLOR,
OPCODE_BLEND_EQUATION,
- OPCODE_BLEND_FUNC,
+ OPCODE_BLEND_EQUATION_SEPARATE,
OPCODE_BLEND_FUNC_SEPARATE,
OPCODE_CALL_LIST,
OPCODE_CALL_LIST_OFFSET,
InstSize[OPCODE_BITMAP] = 8;
InstSize[OPCODE_BLEND_COLOR] = 5;
InstSize[OPCODE_BLEND_EQUATION] = 2;
- InstSize[OPCODE_BLEND_FUNC] = 3;
+ InstSize[OPCODE_BLEND_EQUATION_SEPARATE] = 3;
InstSize[OPCODE_BLEND_FUNC_SEPARATE] = 5;
InstSize[OPCODE_CALL_LIST] = 2;
InstSize[OPCODE_CALL_LIST_OFFSET] = 3;
}
-static void GLAPIENTRY save_BlendFunc( GLenum sfactor, GLenum dfactor )
+static void GLAPIENTRY save_BlendEquationSeparateEXT( GLenum modeRGB,
+ GLenum modeA )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_FUNC, 2 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_EQUATION_SEPARATE, 2 );
if (n) {
- n[1].e = sfactor;
- n[2].e = dfactor;
+ n[1].e = modeRGB;
+ n[2].e = modeA;
}
if (ctx->ExecuteFlag) {
- (*ctx->Exec->BlendFunc)( sfactor, dfactor );
+ (*ctx->Exec->BlendEquationSeparateEXT)( modeRGB, modeA );
}
}
/*
* GL_NV_vertex_program
*/
-#if FEATURE_NV_vertex_program
+#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
static void GLAPIENTRY
save_BindProgramNV(GLenum target, GLuint id)
{
(*ctx->Exec->BindProgramNV)( target, id );
}
}
+#endif /* FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */
+#if FEATURE_NV_vertex_program
static void GLAPIENTRY
save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
{
}
-static void enum_error()
+static void enum_error( void )
{
GET_CURRENT_CONTEXT( ctx );
_mesa_error( ctx, GL_INVALID_ENUM, "VertexAttribfNV" );
case OPCODE_BLEND_EQUATION:
(*ctx->Exec->BlendEquation)( n[1].e );
break;
- case OPCODE_BLEND_FUNC:
- (*ctx->Exec->BlendFunc)( n[1].e, n[2].e );
+ case OPCODE_BLEND_EQUATION_SEPARATE:
+ (*ctx->Exec->BlendEquationSeparateEXT)( n[1].e, n[2].e );
break;
case OPCODE_BLEND_FUNC_SEPARATE:
(*ctx->Exec->BlendFuncSeparateEXT)(n[1].e, n[2].e, n[3].e, n[4].e);
case OPCODE_WINDOW_POS_ARB: /* GL_ARB_window_pos */
(*ctx->Exec->WindowPos3fMESA)( n[1].f, n[2].f, n[3].f );
break;
-#if FEATURE_NV_vertex_program
+#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */
(*ctx->Exec->BindProgramNV)( n[1].e, n[2].ui );
break;
+#endif
+#if FEATURE_NV_vertex_program
case OPCODE_EXECUTE_PROGRAM_NV:
{
GLfloat v[4];
/* Allocate new display list */
ctx->ListState.CurrentListNum = list;
- ctx->ListState.CurrentBlock = (Node *) MALLOC( sizeof(Node) * BLOCK_SIZE );
+ ctx->ListState.CurrentBlock = (Node *) CALLOC( sizeof(Node) * BLOCK_SIZE );
ctx->ListState.CurrentListPtr = ctx->ListState.CurrentBlock;
ctx->ListState.CurrentPos = 0;
table->Accum = save_Accum;
table->AlphaFunc = save_AlphaFunc;
table->Bitmap = save_Bitmap;
- table->BlendFunc = save_BlendFunc;
table->CallList = _mesa_save_CallList;
table->CallLists = _mesa_save_CallLists;
table->Clear = save_Clear;
table->EnableVertexAttribArrayARB = _mesa_EnableVertexAttribArrayARB;
table->DisableVertexAttribArrayARB = _mesa_DisableVertexAttribArrayARB;
table->ProgramStringARB = save_ProgramStringARB;
- table->BindProgramNV = _mesa_BindProgram;
+ table->BindProgramNV = save_BindProgramNV;
table->DeleteProgramsNV = _mesa_DeletePrograms;
table->GenProgramsNV = _mesa_GenPrograms;
table->IsProgramNV = _mesa_IsProgram;
table->MapBufferARB = _mesa_MapBufferARB;
table->UnmapBufferARB = _mesa_UnmapBufferARB;
#endif
+
+ /* 299. GL_EXT_blend_equation_separate */
+ table->BlendEquationSeparateEXT = save_BlendEquationSeparateEXT;
}