diff options
author | Roland Scheidegger <[email protected]> | 2006-03-03 15:03:04 +0000 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2006-03-03 15:03:04 +0000 |
commit | e1e03b32ab651e992f7b979eba046fdc84fedf2e (patch) | |
tree | 1927a955cf22ef8018a114846b8d1688452d2a02 /src/mesa/shader | |
parent | f8ba07a77db4fea16b842f77ae17dcfa8be72105 (diff) |
Use standard ARB names instead of vendor-specific NV names for the ARB/NV_vertex_program enums in common state handling code, and update comments accordingly. Change some slightly confusing code which gave the impression GL_VERTEX_PROGRAM_ARB and GL_VERTEX_PROGRAM_NV enums were different.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/program.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index a899618d148..d9c24c345c4 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -1699,10 +1699,9 @@ _mesa_BindProgram(GLenum target, GLuint id) FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if ((target == GL_VERTEX_PROGRAM_NV - && ctx->Extensions.NV_vertex_program) || - (target == GL_VERTEX_PROGRAM_ARB - && ctx->Extensions.ARB_vertex_program)) { + if ((target == GL_VERTEX_PROGRAM_ARB) && /* == GL_VERTEX_PROGRAM_NV */ + (ctx->Extensions.NV_vertex_program || + ctx->Extensions.ARB_vertex_program)) { /*** Vertex program binding ***/ struct vertex_program *curProg = ctx->VertexProgram.Current; if (curProg->Base.Id == id) { @@ -1750,7 +1749,7 @@ _mesa_BindProgram(GLenum target, GLuint id) if (id == 0) { /* Bind default program */ prog = NULL; - if (target == GL_VERTEX_PROGRAM_NV || target == GL_VERTEX_PROGRAM_ARB) + if (target == GL_VERTEX_PROGRAM_ARB) /* == GL_VERTEX_PROGRAM_NV */ prog = ctx->Shared->DefaultVertexProgram; else prog = ctx->Shared->DefaultFragmentProgram; @@ -1775,7 +1774,7 @@ _mesa_BindProgram(GLenum target, GLuint id) } /* bind now */ - if (target == GL_VERTEX_PROGRAM_NV || target == GL_VERTEX_PROGRAM_ARB) { + if (target == GL_VERTEX_PROGRAM_ARB) { /* == GL_VERTEX_PROGRAM_NV */ ctx->VertexProgram.Current = (struct vertex_program *) prog; } else if (target == GL_FRAGMENT_PROGRAM_NV || target == GL_FRAGMENT_PROGRAM_ARB) { @@ -1820,7 +1819,7 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids) } else if (prog) { /* Unbind program if necessary */ - if (prog->Target == GL_VERTEX_PROGRAM_NV || + if (prog->Target == GL_VERTEX_PROGRAM_ARB || /* == GL_VERTEX_PROGRAM_NV */ prog->Target == GL_VERTEX_STATE_PROGRAM_NV) { if (ctx->VertexProgram.Current && ctx->VertexProgram.Current->Base.Id == ids[i]) { @@ -1996,7 +1995,7 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, reg[len] = 0; switch (target) { - case GL_VERTEX_PROGRAM_NV: + case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */ if (!ctx->Extensions.ARB_vertex_program && !ctx->Extensions.NV_vertex_program) { _mesa_error(ctx, GL_INVALID_ENUM, |