if (ctx->API == API_OPENGL) {
SET_BindProgramNV(exec, _mesa_BindProgram);
SET_DeleteProgramsNV(exec, _mesa_DeletePrograms);
- SET_ExecuteProgramNV(exec, _mesa_ExecuteProgramNV);
SET_GenProgramsNV(exec, _mesa_GenPrograms);
SET_AreProgramsResidentNV(exec, _mesa_AreProgramsResidentNV);
SET_RequestResidentProgramsNV(exec, _mesa_RequestResidentProgramsNV);
/* Unbind program if necessary */
switch (prog->Target) {
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
- case GL_VERTEX_STATE_PROGRAM_NV:
if (ctx->VertexProgram.Current &&
ctx->VertexProgram.Current->Base.Id == ids[i]) {
/* unbind this currently bound program */
OPCODE_WINDOW_POS_ARB,
/* GL_NV_vertex_program */
OPCODE_BIND_PROGRAM_NV,
- OPCODE_EXECUTE_PROGRAM_NV,
OPCODE_REQUEST_RESIDENT_PROGRAMS_NV,
OPCODE_LOAD_PROGRAM_NV,
/* GL_NV_fragment_program */
}
-static void GLAPIENTRY
-save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_EXECUTE_PROGRAM_NV, 6);
- if (n) {
- n[1].e = target;
- n[2].ui = id;
- n[3].f = params[0];
- n[4].f = params[1];
- n[5].f = params[2];
- n[6].f = params[3];
- }
- if (ctx->ExecuteFlag) {
- CALL_ExecuteProgramNV(ctx->Exec, (target, id, params));
- }
-}
-
-
static void GLAPIENTRY
save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
const GLubyte * program)
case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */
CALL_BindProgramNV(ctx->Exec, (n[1].e, n[2].ui));
break;
- case OPCODE_EXECUTE_PROGRAM_NV:
- {
- GLfloat v[4];
- v[0] = n[3].f;
- v[1] = n[4].f;
- v[2] = n[5].f;
- v[3] = n[6].f;
- CALL_ExecuteProgramNV(ctx->Exec, (n[1].e, n[2].ui, v));
- }
- break;
case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
CALL_RequestResidentProgramsNV(ctx->Exec, (n[1].ui,
(GLuint *) n[2].data));
*/
SET_BindProgramNV(table, save_BindProgramNV);
SET_DeleteProgramsNV(table, _mesa_DeletePrograms);
- SET_ExecuteProgramNV(table, save_ExecuteProgramNV);
SET_GenProgramsNV(table, _mesa_GenPrograms);
SET_AreProgramsResidentNV(table, _mesa_AreProgramsResidentNV);
SET_RequestResidentProgramsNV(table, save_RequestResidentProgramsNV);
#include "program/prog_parameter.h"
-
-/**
- * Execute a vertex state program.
- * \note Called from the GL API dispatcher.
- */
-void GLAPIENTRY
-_mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
-{
- struct gl_vertex_program *vprog;
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (target != GL_VERTEX_STATE_PROGRAM_NV) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glExecuteProgramNV");
- return;
- }
-
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
-
- vprog = gl_vertex_program(_mesa_lookup_program(ctx, id));
-
- if (!vprog || vprog->Base.Target != GL_VERTEX_STATE_PROGRAM_NV) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glExecuteProgramNV");
- return;
- }
-
- _mesa_problem(ctx, "glExecuteProgramNV() not supported");
-}
-
-
/**
* Determine if a set of programs is resident in hardware.
* \note Not compiled into display lists.
struct gl_context;
struct gl_program;
-extern void GLAPIENTRY
-_mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params);
-
extern GLboolean GLAPIENTRY
_mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids, GLboolean *residences);
struct gl_program *prog;
switch (target) {
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
- case GL_VERTEX_STATE_PROGRAM_NV:
prog = _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program),
target, id );
break;