summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_save_api.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-11-27 20:07:08 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-11-27 20:07:08 +0000
commitb5b8d22c4ee921dff99b898a5907023b20670a27 (patch)
treef86cfa06e3fbe8c3d73fc665e79294c0257d53ff /src/mesa/tnl/t_save_api.c
parent0699b0bb171ffba453222154c4b2c047a30a2a8b (diff)
Change the dispatch offsets for the VertexAttrib*NV functions so they don't
alias with the corresponding ARB functions. GL_ARB_vertex_shader (and OpenGL 2.0's) VertexAttrib functions don't alias with conventional vertex attributes, as GL_NV_vertex_program does. So, the ARB and NV version of VertexAttrib need to be distinct.
Diffstat (limited to 'src/mesa/tnl/t_save_api.c')
-rw-r--r--src/mesa/tnl/t_save_api.c81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
index 5a7e6b5666..81b68f77be 100644
--- a/src/mesa/tnl/t_save_api.c
+++ b/src/mesa/tnl/t_save_api.c
@@ -991,6 +991,79 @@ static void GLAPIENTRY _save_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
}
+static void GLAPIENTRY
+_save_VertexAttrib1fARB( GLuint index, GLfloat x )
+{
+ if (index < VERT_ATTRIB_MAX)
+ DISPATCH_ATTR1F( index, x );
+ else
+ enum_error();
+}
+
+static void GLAPIENTRY
+_save_VertexAttrib1fvARB( GLuint index, const GLfloat *v )
+{
+ if (index < VERT_ATTRIB_MAX)
+ DISPATCH_ATTR1FV( index, v );
+ else
+ enum_error();
+}
+
+static void GLAPIENTRY
+_save_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y )
+{
+ if (index < VERT_ATTRIB_MAX)
+ DISPATCH_ATTR2F( index, x, y );
+ else
+ enum_error();
+}
+
+static void GLAPIENTRY
+_save_VertexAttrib2fvARB( GLuint index, const GLfloat *v )
+{
+ if (index < VERT_ATTRIB_MAX)
+ DISPATCH_ATTR2FV( index, v );
+ else
+ enum_error();
+}
+
+static void GLAPIENTRY
+_save_VertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z )
+{
+ if (index < VERT_ATTRIB_MAX)
+ DISPATCH_ATTR3F( index, x, y, z );
+ else
+ enum_error();
+}
+
+static void GLAPIENTRY
+_save_VertexAttrib3fvARB( GLuint index, const GLfloat *v )
+{
+ if (index < VERT_ATTRIB_MAX)
+ DISPATCH_ATTR3FV( index, v );
+ else
+ enum_error();
+}
+
+static void GLAPIENTRY
+_save_VertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+{
+ if (index < VERT_ATTRIB_MAX)
+ DISPATCH_ATTR4F( index, x, y, z, w );
+ else
+ enum_error();
+}
+
+static void GLAPIENTRY
+_save_VertexAttrib4fvARB( GLuint index, const GLfloat *v )
+{
+ if (index < VERT_ATTRIB_MAX)
+ DISPATCH_ATTR4FV( index, v );
+ else
+ enum_error();
+}
+
+
/* Materials:
*
* These are treated as per-vertex attributes, at indices above where
@@ -1427,6 +1500,14 @@ static void _save_vtxfmt_init( GLcontext *ctx )
vfmt->VertexAttrib3fvNV = _save_VertexAttrib3fvNV;
vfmt->VertexAttrib4fNV = _save_VertexAttrib4fNV;
vfmt->VertexAttrib4fvNV = _save_VertexAttrib4fvNV;
+ vfmt->VertexAttrib1fARB = _save_VertexAttrib1fARB;
+ vfmt->VertexAttrib1fvARB = _save_VertexAttrib1fvARB;
+ vfmt->VertexAttrib2fARB = _save_VertexAttrib2fARB;
+ vfmt->VertexAttrib2fvARB = _save_VertexAttrib2fvARB;
+ vfmt->VertexAttrib3fARB = _save_VertexAttrib3fARB;
+ vfmt->VertexAttrib3fvARB = _save_VertexAttrib3fvARB;
+ vfmt->VertexAttrib4fARB = _save_VertexAttrib4fARB;
+ vfmt->VertexAttrib4fvARB = _save_VertexAttrib4fvARB;
/* This will all require us to fallback to saving the list as opcodes:
*/