remove ^M chars, disable shading language extensions
[mesa.git] / src / mesa / main / api_noop.c
index e60720fff52f6f4715308fe3af2cf1656d8198c1..f42f166ae31508b0eaa296bc0665fee591e1e1d6 100644 (file)
@@ -1,9 +1,8 @@
-
 /*
  * Mesa 3-D graphics library
- * Version:  5.1
+ * Version:  6.5
  *
- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -34,6 +33,7 @@
 #include "macros.h"
 #include "mtypes.h"
 #include "dlist.h"
+#include "dispatch.h"
 
 
 /* In states where certain vertex components are required for t&l or
  * These functions provide this service by keeping uptodate the
  * 'ctx->Current' struct for all data elements not included in the
  * currently enabled hardware vertex.
- *
+ * I.e. these functions would typically be used when outside of glBegin/End.
  */
-void _mesa_noop_EdgeFlag( GLboolean b )
+
+
+void GLAPIENTRY _mesa_noop_EdgeFlag( GLboolean b )
 {
    GET_CURRENT_CONTEXT(ctx);
    ctx->Current.EdgeFlag = b;
 }
 
-void _mesa_noop_EdgeFlagv( const GLboolean *b )
+void GLAPIENTRY _mesa_noop_EdgeFlagv( const GLboolean *b )
 {
    GET_CURRENT_CONTEXT(ctx);
    ctx->Current.EdgeFlag = *b;
 }
 
-void _mesa_noop_Indexf( GLfloat f )
+void GLAPIENTRY _mesa_noop_Indexf( GLfloat f )
 {
    GET_CURRENT_CONTEXT(ctx);
    ctx->Current.Index = f;
 }
 
-void _mesa_noop_Indexfv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_Indexfv( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    ctx->Current.Index = *v;
 }
 
-void _mesa_noop_FogCoordfEXT( GLfloat a )
+void GLAPIENTRY _mesa_noop_FogCoordfEXT( GLfloat a )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_FOG];
@@ -77,17 +79,17 @@ void _mesa_noop_FogCoordfEXT( GLfloat a )
    dest[3] = 1.0;
 }
 
-void _mesa_noop_FogCoordfvEXT( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_FogCoordfvEXT( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
-   GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
+   GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_FOG];
    dest[0] = v[0];
    dest[1] = 0.0;
    dest[2] = 0.0;
    dest[3] = 1.0;
 }
 
-void _mesa_noop_Normal3f( GLfloat a, GLfloat b, GLfloat c )
+void GLAPIENTRY _mesa_noop_Normal3f( GLfloat a, GLfloat b, GLfloat c )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
@@ -97,7 +99,7 @@ void _mesa_noop_Normal3f( GLfloat a, GLfloat b, GLfloat c )
    dest[3] = 1.0;
 }
 
-void _mesa_noop_Normal3fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_Normal3fv( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
@@ -107,7 +109,7 @@ void _mesa_noop_Normal3fv( const GLfloat *v )
    dest[3] = 1.0;
 }
 
-void _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
+void GLAPIENTRY _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
@@ -117,7 +119,7 @@ void _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
    color[3] = d;
 }
 
-void _mesa_noop_Color4fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_Color4fv( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
@@ -127,7 +129,7 @@ void _mesa_noop_Color4fv( const GLfloat *v )
    color[3] = v[3];
 }
 
-void _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c )
+void GLAPIENTRY _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
@@ -137,7 +139,7 @@ void _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c )
    color[3] = 1.0;
 }
 
-void _mesa_noop_Color3fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_Color3fv( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
@@ -147,7 +149,7 @@ void _mesa_noop_Color3fv( const GLfloat *v )
    color[3] = 1.0;
 }
 
-void _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a )
+void GLAPIENTRY _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint unit = target - GL_TEXTURE0_ARB;
@@ -164,7 +166,7 @@ void _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a )
    }
 }
 
-void _mesa_noop_MultiTexCoord1fvARB( GLenum target, const GLfloat *v )
+void GLAPIENTRY _mesa_noop_MultiTexCoord1fvARB( GLenum target, const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint unit = target - GL_TEXTURE0_ARB;
@@ -181,7 +183,7 @@ void _mesa_noop_MultiTexCoord1fvARB( GLenum target, const GLfloat *v )
    }
 }
 
-void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a, GLfloat b )
+void GLAPIENTRY _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a, GLfloat b )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint unit = target - GL_TEXTURE0_ARB;
@@ -198,7 +200,7 @@ void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a, GLfloat b )
    }
 }
 
-void _mesa_noop_MultiTexCoord2fvARB( GLenum target, const GLfloat *v )
+void GLAPIENTRY _mesa_noop_MultiTexCoord2fvARB( GLenum target, const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint unit = target - GL_TEXTURE0_ARB;
@@ -215,7 +217,7 @@ void _mesa_noop_MultiTexCoord2fvARB( GLenum target, const GLfloat *v )
    }
 }
 
-void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a, GLfloat b, GLfloat c)
+void GLAPIENTRY _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a, GLfloat b, GLfloat c)
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint unit = target - GL_TEXTURE0_ARB;
@@ -232,7 +234,7 @@ void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a, GLfloat b, GLfloat
    }
 }
 
-void _mesa_noop_MultiTexCoord3fvARB( GLenum target, const GLfloat *v )
+void GLAPIENTRY _mesa_noop_MultiTexCoord3fvARB( GLenum target, const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint unit = target - GL_TEXTURE0_ARB;
@@ -249,7 +251,7 @@ void _mesa_noop_MultiTexCoord3fvARB( GLenum target, const GLfloat *v )
    }
 }
 
-void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a, GLfloat b,
+void GLAPIENTRY _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a, GLfloat b,
                              GLfloat c, GLfloat d )
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -267,7 +269,7 @@ void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a, GLfloat b,
    }
 }
 
-void _mesa_noop_MultiTexCoord4fvARB( GLenum target, const GLfloat *v )
+void GLAPIENTRY _mesa_noop_MultiTexCoord4fvARB( GLenum target, const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLuint unit = target - GL_TEXTURE0_ARB;
@@ -284,7 +286,7 @@ void _mesa_noop_MultiTexCoord4fvARB( GLenum target, const GLfloat *v )
    }
 }
 
-void _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c )
+void GLAPIENTRY _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
@@ -294,7 +296,7 @@ void _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c )
    color[3] = 1.0;
 }
 
-void _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
@@ -304,7 +306,7 @@ void _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v )
    color[3] = 1.0;
 }
 
-void _mesa_noop_TexCoord1f( GLfloat a )
+void GLAPIENTRY _mesa_noop_TexCoord1f( GLfloat a )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
@@ -314,7 +316,7 @@ void _mesa_noop_TexCoord1f( GLfloat a )
    dest[3] = 1;
 }
 
-void _mesa_noop_TexCoord1fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_TexCoord1fv( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
@@ -324,7 +326,7 @@ void _mesa_noop_TexCoord1fv( const GLfloat *v )
    dest[3] = 1;
 }
 
-void _mesa_noop_TexCoord2f( GLfloat a, GLfloat b )
+void GLAPIENTRY _mesa_noop_TexCoord2f( GLfloat a, GLfloat b )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
@@ -334,7 +336,7 @@ void _mesa_noop_TexCoord2f( GLfloat a, GLfloat b )
    dest[3] = 1;
 }
 
-void _mesa_noop_TexCoord2fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_TexCoord2fv( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
@@ -344,7 +346,7 @@ void _mesa_noop_TexCoord2fv( const GLfloat *v )
    dest[3] = 1;
 }
 
-void _mesa_noop_TexCoord3f( GLfloat a, GLfloat b, GLfloat c )
+void GLAPIENTRY _mesa_noop_TexCoord3f( GLfloat a, GLfloat b, GLfloat c )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
@@ -354,7 +356,7 @@ void _mesa_noop_TexCoord3f( GLfloat a, GLfloat b, GLfloat c )
    dest[3] = 1;
 }
 
-void _mesa_noop_TexCoord3fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_TexCoord3fv( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
@@ -364,7 +366,7 @@ void _mesa_noop_TexCoord3fv( const GLfloat *v )
    dest[3] = 1;
 }
 
-void _mesa_noop_TexCoord4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
+void GLAPIENTRY _mesa_noop_TexCoord4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
@@ -374,7 +376,7 @@ void _mesa_noop_TexCoord4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
    dest[3] = d;
 }
 
-void _mesa_noop_TexCoord4fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_TexCoord4fv( const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
@@ -386,47 +388,134 @@ void _mesa_noop_TexCoord4fv( const GLfloat *v )
 
 
 
-void _mesa_noop_VertexAttrib1fNV( GLuint index, GLfloat x )
+void GLAPIENTRY _mesa_noop_VertexAttrib1fNV( GLuint index, GLfloat x )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   if (index < VERT_ATTRIB_MAX) {
+      ASSIGN_4V(ctx->Current.Attrib[index], x, 0, 0, 1);
+   }
+   else
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fNV" );
+}
+
+void GLAPIENTRY _mesa_noop_VertexAttrib1fvNV( GLuint index, const GLfloat *v )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   if (index < VERT_ATTRIB_MAX) {
+      ASSIGN_4V(ctx->Current.Attrib[index], v[0], 0, 0, 1);
+   }
+   else
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fvNV" );
+}
+
+void GLAPIENTRY _mesa_noop_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   if (index < VERT_ATTRIB_MAX) {
+      ASSIGN_4V(ctx->Current.Attrib[index], x, y, 0, 1);
+   }
+   else
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fNV" );
+}
+
+void GLAPIENTRY _mesa_noop_VertexAttrib2fvNV( GLuint index, const GLfloat *v )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   if (index < VERT_ATTRIB_MAX) {
+      ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], 0, 1);
+   }
+   else
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fvNV" );
+}
+
+void GLAPIENTRY _mesa_noop_VertexAttrib3fNV( GLuint index, GLfloat x,
+                                  GLfloat y, GLfloat z )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   if (index < VERT_ATTRIB_MAX) {
+      ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, 1);
+   }
+   else
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fNV" );
+}
+
+void GLAPIENTRY _mesa_noop_VertexAttrib3fvNV( GLuint index, const GLfloat *v )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   if (index < VERT_ATTRIB_MAX) {
+      ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], 1);
+   }
+   else
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fvNV" );
+}
+
+void GLAPIENTRY _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x,
+                                  GLfloat y, GLfloat z, GLfloat w )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   if (index < VERT_ATTRIB_MAX) {
+      ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, w);
+   }
+   else
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fNV" );
+}
+
+void GLAPIENTRY _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   if (index < VERT_ATTRIB_MAX) {
+      ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]);
+   }
+   else
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fvNV" );
+}
+
+
+/*
+ * XXX Un-alias attribs here
+ */
+
+void GLAPIENTRY _mesa_noop_VertexAttrib1fARB( GLuint index, GLfloat x )
 {
    GET_CURRENT_CONTEXT(ctx);
    if (index < VERT_ATTRIB_MAX) {
       ASSIGN_4V(ctx->Current.Attrib[index], x, 0, 0, 1);
    }
    else
-      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1f" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fARB" );
 }
 
-void _mesa_noop_VertexAttrib1fvNV( GLuint index, const GLfloat *v )
+void GLAPIENTRY _mesa_noop_VertexAttrib1fvARB( GLuint index, const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    if (index < VERT_ATTRIB_MAX) {
       ASSIGN_4V(ctx->Current.Attrib[index], v[0], 0, 0, 1);
    }
    else
-      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fv" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fvARB" );
 }
 
-void _mesa_noop_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y )
+void GLAPIENTRY _mesa_noop_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y )
 {
    GET_CURRENT_CONTEXT(ctx);
    if (index < VERT_ATTRIB_MAX) {
       ASSIGN_4V(ctx->Current.Attrib[index], x, y, 0, 1);
    }
    else
-      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2f" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fARB" );
 }
 
-void _mesa_noop_VertexAttrib2fvNV( GLuint index, const GLfloat *v )
+void GLAPIENTRY _mesa_noop_VertexAttrib2fvARB( GLuint index, const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    if (index < VERT_ATTRIB_MAX) {
       ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], 0, 1);
    }
    else
-      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fv" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fvARB" );
 }
 
-void _mesa_noop_VertexAttrib3fNV( GLuint index, GLfloat x,
+void GLAPIENTRY _mesa_noop_VertexAttrib3fARB( GLuint index, GLfloat x,
                                   GLfloat y, GLfloat z )
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -434,20 +523,20 @@ void _mesa_noop_VertexAttrib3fNV( GLuint index, GLfloat x,
       ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, 1);
    }
    else
-      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3f" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fARB" );
 }
 
-void _mesa_noop_VertexAttrib3fvNV( GLuint index, const GLfloat *v )
+void GLAPIENTRY _mesa_noop_VertexAttrib3fvARB( GLuint index, const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    if (index < VERT_ATTRIB_MAX) {
       ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], 1);
    }
    else
-      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fv" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fvARB" );
 }
 
-void _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x,
+void GLAPIENTRY _mesa_noop_VertexAttrib4fARB( GLuint index, GLfloat x,
                                   GLfloat y, GLfloat z, GLfloat w )
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -455,22 +544,24 @@ void _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x,
       ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, w);
    }
    else
-      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4f" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fARB" );
 }
 
-void _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
+void GLAPIENTRY _mesa_noop_VertexAttrib4fvARB( GLuint index, const GLfloat *v )
 {
    GET_CURRENT_CONTEXT(ctx);
    if (index < VERT_ATTRIB_MAX) {
       ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]);
    }
    else
-      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fv" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fvARB" );
 }
 
+
+
 /* Material
  */
-void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params )
+void GLAPIENTRY _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLint i, nr;
@@ -499,64 +590,64 @@ void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params )
 
 /* These really are noops outside begin/end:
  */
-void _mesa_noop_Vertex2fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_Vertex2fv( const GLfloat *v )
 {
    (void) v;
 }
 
-void _mesa_noop_Vertex3fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_Vertex3fv( const GLfloat *v )
 {
    (void) v;
 }
 
-void _mesa_noop_Vertex4fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_Vertex4fv( const GLfloat *v )
 {
    (void) v;
 }
 
-void _mesa_noop_Vertex2f( GLfloat a, GLfloat b )
+void GLAPIENTRY _mesa_noop_Vertex2f( GLfloat a, GLfloat b )
 {
    (void) a; (void) b;
 }
 
-void _mesa_noop_Vertex3f( GLfloat a, GLfloat b, GLfloat c )
+void GLAPIENTRY _mesa_noop_Vertex3f( GLfloat a, GLfloat b, GLfloat c )
 {
    (void) a; (void) b; (void) c;
 }
 
-void _mesa_noop_Vertex4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
+void GLAPIENTRY _mesa_noop_Vertex4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
 {
    (void) a; (void) b; (void) c; (void) d;
 }
 
 /* Similarly, these have no effect outside begin/end:
  */
-void _mesa_noop_EvalCoord1f( GLfloat a )
+void GLAPIENTRY _mesa_noop_EvalCoord1f( GLfloat a )
 {
    (void) a;
 }
 
-void _mesa_noop_EvalCoord1fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_EvalCoord1fv( const GLfloat *v )
 {
    (void) v;
 }
 
-void _mesa_noop_EvalCoord2f( GLfloat a, GLfloat b )
+void GLAPIENTRY _mesa_noop_EvalCoord2f( GLfloat a, GLfloat b )
 {
    (void) a; (void) b;
 }
 
-void _mesa_noop_EvalCoord2fv( const GLfloat *v )
+void GLAPIENTRY _mesa_noop_EvalCoord2fv( const GLfloat *v )
 {
    (void) v;
 }
 
-void _mesa_noop_EvalPoint1( GLint a )
+void GLAPIENTRY _mesa_noop_EvalPoint1( GLint a )
 {
    (void) a;
 }
 
-void _mesa_noop_EvalPoint2( GLint a, GLint b )
+void GLAPIENTRY _mesa_noop_EvalPoint2( GLint a, GLint b )
 {
    (void) a; (void) b;
 }
@@ -565,14 +656,15 @@ void _mesa_noop_EvalPoint2( GLint a, GLint b )
 /* Begin -- call into driver, should result in the vtxfmt being
  * swapped out:
  */
-void _mesa_noop_Begin( GLenum mode )
+void GLAPIENTRY _mesa_noop_Begin( GLenum mode )
 {
+   (void) mode;
 }
 
 
 /* End -- just raise an error
  */
-void _mesa_noop_End( void )
+void GLAPIENTRY _mesa_noop_End( void )
 {
    GET_CURRENT_CONTEXT(ctx);
    _mesa_error( ctx, GL_INVALID_OPERATION, "glEnd" );
@@ -587,19 +679,19 @@ void _mesa_noop_End( void )
  * (None of the functions in this file are suitable for GL_COMPILE
  * modes).
  */
-void _mesa_noop_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
+void GLAPIENTRY _mesa_noop_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
 {
    {
       GET_CURRENT_CONTEXT(ctx);
       ASSERT_OUTSIDE_BEGIN_END(ctx);
    }
 
-   glBegin( GL_QUADS );
-   glVertex2f( x1, y1 );
-   glVertex2f( x2, y1 );
-   glVertex2f( x2, y2 );
-   glVertex2f( x1, y2 );
-   glEnd();
+   CALL_Begin(GET_DISPATCH(), (GL_QUADS));
+   CALL_Vertex2f(GET_DISPATCH(), (x1, y1));
+   CALL_Vertex2f(GET_DISPATCH(), (x2, y1));
+   CALL_Vertex2f(GET_DISPATCH(), (x2, y2));
+   CALL_Vertex2f(GET_DISPATCH(), (x1, y2));
+   CALL_End(GET_DISPATCH(), ());
 }
 
 
@@ -607,7 +699,7 @@ void _mesa_noop_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
  * support can hook these in, but still need to supply an array-elt
  * implementation.
  */
-void _mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count)
+void GLAPIENTRY _mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count)
 {
    GET_CURRENT_CONTEXT(ctx);
    GLint i;
@@ -615,14 +707,14 @@ void _mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count)
    if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
       return;
 
-   glBegin(mode);
-   for (i = start ; i < count ; i++)
-      glArrayElement( i );
-   glEnd();
+   CALL_Begin(GET_DISPATCH(), (mode));
+   for (i = 0; i < count; i++)
+       CALL_ArrayElement(GET_DISPATCH(), (start + i));
+   CALL_End(GET_DISPATCH(), ());
 }
 
 
-void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
+void GLAPIENTRY _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
                             const GLvoid *indices)
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -631,30 +723,30 @@ void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
    if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
       return;
 
-   glBegin(mode);
+   CALL_Begin(GET_DISPATCH(), (mode));
 
    switch (type) {
    case GL_UNSIGNED_BYTE:
       for (i = 0 ; i < count ; i++)
-        glArrayElement( ((GLubyte *)indices)[i] );
+         CALL_ArrayElement(GET_DISPATCH(), ( ((GLubyte *)indices)[i] ));
       break;
    case GL_UNSIGNED_SHORT:
       for (i = 0 ; i < count ; i++)
-        glArrayElement( ((GLushort *)indices)[i] );
+         CALL_ArrayElement(GET_DISPATCH(), ( ((GLushort *)indices)[i] ));
       break;
    case GL_UNSIGNED_INT:
       for (i = 0 ; i < count ; i++)
-        glArrayElement( ((GLuint *)indices)[i] );
+         CALL_ArrayElement(GET_DISPATCH(), ( ((GLuint *)indices)[i] ));
       break;
    default:
       _mesa_error( ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
       break;
    }
 
-   glEnd();
+   CALL_End(GET_DISPATCH(), ());
 }
 
-void _mesa_noop_DrawRangeElements(GLenum mode,
+void GLAPIENTRY _mesa_noop_DrawRangeElements(GLenum mode,
                                  GLuint start, GLuint end,
                                  GLsizei count, GLenum type,
                                  const GLvoid *indices)
@@ -664,7 +756,7 @@ void _mesa_noop_DrawRangeElements(GLenum mode,
    if (_mesa_validate_DrawRangeElements( ctx, mode,
                                         start, end,
                                         count, type, indices ))
-      glDrawElements( mode, count, type, indices );
+       CALL_DrawElements(GET_DISPATCH(), (mode, count, type, indices));
 }
 
 /*
@@ -680,7 +772,7 @@ void _mesa_noop_DrawRangeElements(GLenum mode,
  *     map(1,2)_vertex is disabled, and to purge those vertices from
  *     the vb.
  */
-void _mesa_noop_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
+void GLAPIENTRY _mesa_noop_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLint i;
@@ -703,22 +795,22 @@ void _mesa_noop_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
     */
    if (!ctx->Eval.Map1Vertex4 && 
        !ctx->Eval.Map1Vertex3 &&
-       !(ctx->VertexProgram.Enabled && ctx->Eval.Map1Attrib[VERT_ATTRIB_POS]))
+       !(ctx->VertexProgram._Enabled && ctx->Eval.Map1Attrib[VERT_ATTRIB_POS]))
       return;
 
    du = ctx->Eval.MapGrid1du;
    u = ctx->Eval.MapGrid1u1 + i1 * du;
 
-   glBegin( prim );
+   CALL_Begin(GET_DISPATCH(), (prim));
    for (i=i1;i<=i2;i++,u+=du) {
-      glEvalCoord1f( u );
+      CALL_EvalCoord1f(GET_DISPATCH(), (u));
    }
-   glEnd();
+   CALL_End(GET_DISPATCH(), ());
 }
 
 
 
-void _mesa_noop_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
+void GLAPIENTRY _mesa_noop_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat u, du, v, dv, v1, u1;
@@ -738,7 +830,7 @@ void _mesa_noop_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
     */
    if (!ctx->Eval.Map2Vertex4 && 
        !ctx->Eval.Map2Vertex3 &&
-       !(ctx->VertexProgram.Enabled && ctx->Eval.Map2Attrib[VERT_ATTRIB_POS]))
+       !(ctx->VertexProgram._Enabled && ctx->Eval.Map2Attrib[VERT_ATTRIB_POS]))
       return;
 
    du = ctx->Eval.MapGrid2du;
@@ -748,38 +840,38 @@ void _mesa_noop_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
 
    switch (mode) {
    case GL_POINT:
-      glBegin( GL_POINTS );
+      CALL_Begin(GET_DISPATCH(), (GL_POINTS));
       for (v=v1,j=j1;j<=j2;j++,v+=dv) {
         for (u=u1,i=i1;i<=i2;i++,u+=du) {
-           glEvalCoord2f(u, v );
+           CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
         }
       }
-      glEnd();
+      CALL_End(GET_DISPATCH(), ());
       break;
    case GL_LINE:
       for (v=v1,j=j1;j<=j2;j++,v+=dv) {
-        glBegin( GL_LINE_STRIP );
+        CALL_Begin(GET_DISPATCH(), (GL_LINE_STRIP));
         for (u=u1,i=i1;i<=i2;i++,u+=du) {
-           glEvalCoord2f(u, v );
+           CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
         }
-        glEnd();
+        CALL_End(GET_DISPATCH(), ());
       }
       for (u=u1,i=i1;i<=i2;i++,u+=du) {
-        glBegin( GL_LINE_STRIP );
+        CALL_Begin(GET_DISPATCH(), (GL_LINE_STRIP));
         for (v=v1,j=j1;j<=j2;j++,v+=dv) {
-           glEvalCoord2f(u, v );
+           CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
         }
-        glEnd();
+        CALL_End(GET_DISPATCH(), ());
       }
       break;
    case GL_FILL:
       for (v=v1,j=j1;j<j2;j++,v+=dv) {
-        glBegin( GL_TRIANGLE_STRIP );
+        CALL_Begin(GET_DISPATCH(), (GL_TRIANGLE_STRIP));
         for (u=u1,i=i1;i<=i2;i++,u+=du) {
-           glEvalCoord2f(u, v );
-           glEvalCoord2f(u, v+dv );
+           CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
+           CALL_EvalCoord2f(GET_DISPATCH(), (u, v+dv));
         }
-        glEnd();
+        CALL_End(GET_DISPATCH(), ());
       }
       break;
    default:
@@ -853,6 +945,14 @@ void _mesa_noop_vtxfmt_init( GLvertexformat *vfmt )
    vfmt->VertexAttrib3fvNV = _mesa_noop_VertexAttrib3fvNV;
    vfmt->VertexAttrib4fNV = _mesa_noop_VertexAttrib4fNV;
    vfmt->VertexAttrib4fvNV = _mesa_noop_VertexAttrib4fvNV;
+   vfmt->VertexAttrib1fARB = _mesa_noop_VertexAttrib1fARB;
+   vfmt->VertexAttrib1fvARB = _mesa_noop_VertexAttrib1fvARB;
+   vfmt->VertexAttrib2fARB = _mesa_noop_VertexAttrib2fARB;
+   vfmt->VertexAttrib2fvARB = _mesa_noop_VertexAttrib2fvARB;
+   vfmt->VertexAttrib3fARB = _mesa_noop_VertexAttrib3fARB;
+   vfmt->VertexAttrib3fvARB = _mesa_noop_VertexAttrib3fvARB;
+   vfmt->VertexAttrib4fARB = _mesa_noop_VertexAttrib4fARB;
+   vfmt->VertexAttrib4fvARB = _mesa_noop_VertexAttrib4fvARB;
 
    vfmt->Rectf = _mesa_noop_Rectf;