summaryrefslogtreecommitdiff
path: root/src/mesa/shader/arbprogram.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-18 15:21:28 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-18 15:21:28 -0600
commitf9e1ef2a5b7951d36db56913b1366cf65b9d0976 (patch)
tree98ceaa6969fda04b8e3770cd05e92ac041fcfed1 /src/mesa/shader/arbprogram.c
parent0bf82c0111c9d5e33ffc76be2fd0d22eea316952 (diff)
alias ProgramEnvParameter4xyARB and ProgramParameter4xyNV (bug #12935)
these should be the same functions (as per spec). cherry-picked from master (86a4810b09097714942bf2b889e6c62357bba931)
Diffstat (limited to 'src/mesa/shader/arbprogram.c')
-rw-r--r--src/mesa/shader/arbprogram.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c
index ee75be315e..1656dc9450 100644
--- a/src/mesa/shader/arbprogram.c
+++ b/src/mesa/shader/arbprogram.c
@@ -247,6 +247,12 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
}
+/**
+ * Set a program env parameter register.
+ * \note Called from the GL API dispatcher.
+ * Note, this function is also used by the GL_NV_vertex_program extension
+ * (alias to ProgramParameterdNV)
+ */
void GLAPIENTRY
_mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index,
GLdouble x, GLdouble y, GLdouble z, GLdouble w)
@@ -256,6 +262,12 @@ _mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index,
}
+/**
+ * Set a program env parameter register.
+ * \note Called from the GL API dispatcher.
+ * Note, this function is also used by the GL_NV_vertex_program extension
+ * (alias to ProgramParameterdvNV)
+ */
void GLAPIENTRY
_mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
const GLdouble *params)
@@ -266,6 +278,12 @@ _mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
}
+/**
+ * Set a program env parameter register.
+ * \note Called from the GL API dispatcher.
+ * Note, this function is also used by the GL_NV_vertex_program extension
+ * (alias to ProgramParameterfNV)
+ */
void GLAPIENTRY
_mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
GLfloat x, GLfloat y, GLfloat z, GLfloat w)
@@ -283,8 +301,8 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
}
ASSIGN_4V(ctx->FragmentProgram.Parameters[index], x, y, z, w);
}
- else if (target == GL_VERTEX_PROGRAM_ARB
- && ctx->Extensions.ARB_vertex_program) {
+ else if (target == GL_VERTEX_PROGRAM_ARB /* == GL_VERTEX_PROGRAM_NV */
+ && (ctx->Extensions.ARB_vertex_program || ctx->Extensions.NV_vertex_program)) {
if (index >= ctx->Const.VertexProgram.MaxEnvParams) {
_mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter(index)");
return;
@@ -297,7 +315,12 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
}
}
-
+/**
+ * Set a program env parameter register.
+ * \note Called from the GL API dispatcher.
+ * Note, this function is also used by the GL_NV_vertex_program extension
+ * (alias to ProgramParameterfvNV)
+ */
void GLAPIENTRY
_mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index,
const GLfloat *params)