summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/eval.c')
-rw-r--r--src/mesa/main/eval.c61
1 files changed, 50 insertions, 11 deletions
diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c
index 3f89f9c1eae..95d6e231879 100644
--- a/src/mesa/main/eval.c
+++ b/src/mesa/main/eval.c
@@ -44,6 +44,10 @@
#include "eval.h"
#include "macros.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_evaluators
/*
@@ -417,7 +421,7 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride,
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride,
GLint order, const GLfloat *points )
{
@@ -425,7 +429,7 @@ _mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride,
GLint order, const GLdouble *points )
{
@@ -516,7 +520,7 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Map2f( GLenum target,
GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
@@ -527,7 +531,7 @@ _mesa_Map2f( GLenum target,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Map2d( GLenum target,
GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
@@ -539,7 +543,7 @@ _mesa_Map2d( GLenum target,
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v )
{
GET_CURRENT_CONTEXT(ctx);
@@ -604,7 +608,7 @@ _mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v )
{
GET_CURRENT_CONTEXT(ctx);
@@ -669,7 +673,7 @@ _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMapiv( GLenum target, GLenum query, GLint *v )
{
GET_CURRENT_CONTEXT(ctx);
@@ -735,7 +739,7 @@ _mesa_GetMapiv( GLenum target, GLenum query, GLint *v )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 )
{
GET_CURRENT_CONTEXT(ctx);
@@ -753,14 +757,14 @@ _mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 )
{
_mesa_MapGrid1f( un, (GLfloat) u1, (GLfloat) u2 );
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2,
GLint vn, GLfloat v1, GLfloat v2 )
{
@@ -788,7 +792,7 @@ _mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
GLint vn, GLdouble v1, GLdouble v2 )
{
@@ -797,6 +801,41 @@ _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
}
+void
+_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
+{
+ SET_EvalCoord1f(disp, vfmt->EvalCoord1f);
+ SET_EvalCoord1fv(disp, vfmt->EvalCoord1fv);
+ SET_EvalCoord2f(disp, vfmt->EvalCoord2f);
+ SET_EvalCoord2fv(disp, vfmt->EvalCoord2fv);
+ SET_EvalPoint1(disp, vfmt->EvalPoint1);
+ SET_EvalPoint2(disp, vfmt->EvalPoint2);
+
+ SET_EvalMesh1(disp, vfmt->EvalMesh1);
+ SET_EvalMesh2(disp, vfmt->EvalMesh2);
+}
+
+
+void
+_mesa_init_eval_dispatch(struct _glapi_table *disp)
+{
+ SET_GetMapdv(disp, _mesa_GetMapdv);
+ SET_GetMapfv(disp, _mesa_GetMapfv);
+ SET_GetMapiv(disp, _mesa_GetMapiv);
+ SET_Map1d(disp, _mesa_Map1d);
+ SET_Map1f(disp, _mesa_Map1f);
+ SET_Map2d(disp, _mesa_Map2d);
+ SET_Map2f(disp, _mesa_Map2f);
+ SET_MapGrid1d(disp, _mesa_MapGrid1d);
+ SET_MapGrid1f(disp, _mesa_MapGrid1f);
+ SET_MapGrid2d(disp, _mesa_MapGrid2d);
+ SET_MapGrid2f(disp, _mesa_MapGrid2f);
+}
+
+
+#endif /* FEATURE_evaluators */
+
/**********************************************************************/
/***** Initialization *****/