From: Brian Paul Date: Sat, 29 Mar 2003 16:37:07 +0000 (+0000) Subject: proper dispatch for NV_fragment_program functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52334967edb3bf79c3eecbd599dcef667ba63239;p=mesa.git proper dispatch for NV_fragment_program functions --- diff --git a/src/mesa/main/nvprogram.c b/src/mesa/main/nvprogram.c index 75518350b31..ef0f4795b8b 100644 --- a/src/mesa/main/nvprogram.c +++ b/src/mesa/main/nvprogram.c @@ -1,4 +1,4 @@ -/* $Id: nvprogram.c,v 1.9 2003/03/19 05:34:25 brianp Exp $ */ +/* $Id: nvprogram.c,v 1.10 2003/03/29 16:37:08 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1037,9 +1037,9 @@ _mesa_TrackMatrixNV(GLenum target, GLuint address, } -GLAPI void GLAPIENTRY -glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name, - GLfloat x, GLfloat y, GLfloat z, GLfloat w) +void +_mesa_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name, + GLfloat x, GLfloat y, GLfloat z, GLfloat w) { struct program *prog; struct fragment_program *fragProg; @@ -1073,35 +1073,35 @@ glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name, } -GLAPI void GLAPIENTRY -glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte *name, - const float v[]) +void +_mesa_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte *name, + const float v[]) { glProgramNamedParameter4fNV(id, len, name, v[0], v[1], v[2], v[3]); } -GLAPI void GLAPIENTRY -glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte *name, - GLdouble x, GLdouble y, GLdouble z, GLdouble w) +void +_mesa_ProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte *name, + GLdouble x, GLdouble y, GLdouble z, GLdouble w) { glProgramNamedParameter4fNV(id, len, name, (GLfloat)x, (GLfloat)y, (GLfloat)z, (GLfloat)w); } -GLAPI void GLAPIENTRY -glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte *name, - const double v[]) +void +_mesa_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte *name, + const double v[]) { glProgramNamedParameter4fNV(id, len, name, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]); } -GLAPI void GLAPIENTRY -glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name, - GLfloat *params) +void +_mesa_GetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name, + GLfloat *params) { struct program *prog; struct fragment_program *fragProg; @@ -1135,9 +1135,9 @@ glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name, } -GLAPI void GLAPIENTRY -glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name, - GLdouble *params) +void +_mesa_GetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name, + GLdouble *params) { GLfloat floatParams[4]; glGetProgramNamedParameterfvNV(id, len, name, floatParams); @@ -1145,9 +1145,9 @@ glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name, } -GLAPI void GLAPIENTRY -glProgramLocalParameter4fARB(GLenum target, GLuint index, - GLfloat x, GLfloat y, GLfloat z, GLfloat w) +void +_mesa_ProgramLocalParameter4fARB(GLenum target, GLuint index, + GLfloat x, GLfloat y, GLfloat z, GLfloat w) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -1174,27 +1174,28 @@ glProgramLocalParameter4fARB(GLenum target, GLuint index, } -GLAPI void GLAPIENTRY -glProgramLocalParameter4fvARB(GLenum target, GLuint index, - const GLfloat *params) +void +_mesa_ProgramLocalParameter4fvARB(GLenum target, GLuint index, + const GLfloat *params) { glProgramLocalParameter4fARB(target, index, params[0], params[1], params[2], params[3]); } -GLAPI void GLAPIENTRY -glProgramLocalParameter4dARB(GLenum target, GLuint index, - GLdouble x, GLdouble y, GLdouble z, GLdouble w) +void +_mesa_ProgramLocalParameter4dARB(GLenum target, GLuint index, + GLdouble x, GLdouble y, + GLdouble z, GLdouble w) { glProgramLocalParameter4fARB(target, index, (GLfloat)x, (GLfloat)y, (GLfloat)z, (GLfloat)w); } -GLAPI void GLAPIENTRY -glProgramLocalParameter4dvARB(GLenum target, GLuint index, - const GLdouble *params) +void +_mesa_ProgramLocalParameter4dvARB(GLenum target, GLuint index, + const GLdouble *params) { glProgramLocalParameter4fARB(target, index, (GLfloat)params[0], (GLfloat)params[1], (GLfloat)params[2], @@ -1202,8 +1203,9 @@ glProgramLocalParameter4dvARB(GLenum target, GLuint index, } -GLAPI void GLAPIENTRY -glGetProgramLocalParameterfvARB(GLenum target, GLuint index, GLfloat *params) +void +_mesa_GetProgramLocalParameterfvARB(GLenum target, GLuint index, + GLfloat *params) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -1230,8 +1232,9 @@ glGetProgramLocalParameterfvARB(GLenum target, GLuint index, GLfloat *params) } -GLAPI void GLAPIENTRY -glGetProgramLocalParameterdvARB(GLenum target, GLuint index, GLdouble *params) +void +_mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index, + GLdouble *params) { GLfloat floatParams[4]; glGetProgramLocalParameterfvARB(target, index, floatParams); diff --git a/src/mesa/main/nvprogram.h b/src/mesa/main/nvprogram.h index cb614449056..7293804500a 100644 --- a/src/mesa/main/nvprogram.h +++ b/src/mesa/main/nvprogram.h @@ -1,4 +1,4 @@ -/* $Id: nvprogram.h,v 1.5 2003/03/19 05:34:25 brianp Exp $ */ +/* $Id: nvprogram.h,v 1.6 2003/03/29 16:37:08 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -32,6 +32,7 @@ #define NVPROGRAM_H +/** Internal functions **/ extern void _mesa_set_program_error(GLcontext *ctx, GLint pos, const char *string); @@ -43,6 +44,9 @@ extern void _mesa_delete_program(GLcontext *ctx, GLuint id); + +/** API functions **/ + extern void _mesa_BindProgramNV(GLenum target, GLuint id); @@ -61,7 +65,6 @@ _mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids, GLboolean *residences) extern void _mesa_RequestResidentProgramsNV(GLsizei n, const GLuint *ids); - extern void _mesa_GetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat *params); @@ -118,43 +121,53 @@ _mesa_TrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transfo extern void -_mesa_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v); - -extern void -_mesa_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v); +_mesa_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name, + GLfloat x, GLfloat y, GLfloat z, GLfloat w); extern void -_mesa_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v); +_mesa_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte *name, + const float v[]); extern void -_mesa_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v); +_mesa_ProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte *name, + GLdouble x, GLdouble y, GLdouble z, GLdouble w); extern void -_mesa_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v); +_mesa_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte *name, + const double v[]); extern void -_mesa_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v); +_mesa_GetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name, + GLfloat *params); extern void -_mesa_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v); +_mesa_GetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name, + GLdouble *params); extern void -_mesa_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v); +_mesa_ProgramLocalParameter4fARB(GLenum target, GLuint index, + GLfloat x, GLfloat y, GLfloat z, GLfloat w); extern void -_mesa_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v); +_mesa_ProgramLocalParameter4fvARB(GLenum target, GLuint index, + const GLfloat *params); extern void -_mesa_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v); +_mesa_ProgramLocalParameter4dARB(GLenum target, GLuint index, + GLdouble x, GLdouble y, + GLdouble z, GLdouble w); extern void -_mesa_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v); +_mesa_ProgramLocalParameter4dvARB(GLenum target, GLuint index, + const GLdouble *params); extern void -_mesa_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v); +_mesa_GetProgramLocalParameterfvARB(GLenum target, GLuint index, + GLfloat *params); extern void -_mesa_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v); +_mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index, + GLdouble *params); #endif diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index f4f6a1cb6ef..a2cd89e4455 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -1,4 +1,4 @@ -/* $Id: state.c,v 1.100 2003/03/15 17:33:26 brianp Exp $ */ +/* $Id: state.c,v 1.101 2003/03/29 16:37:07 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -504,7 +504,7 @@ _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize) exec->VertexAttribPointerNV = _mesa_VertexAttribPointerNV; #endif -#if 0 && FEATURE_NV_fragment_program +#if FEATURE_NV_fragment_program exec->ProgramNamedParameter4fNV = _mesa_ProgramNamedParameter4fNV; exec->ProgramNamedParameter4dNV = _mesa_ProgramNamedParameter4dNV; exec->ProgramNamedParameter4fvNV = _mesa_ProgramNamedParameter4fvNV;