summaryrefslogtreecommitdiff
path: root/src/mesa/main/eval.h
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-09-08 10:25:22 +0800
committerChia-I Wu <olvaffe@gmail.com>2009-09-12 20:55:58 +0800
commit17f2649e269b9d98abd6a66f687ffa29904bf4a0 (patch)
treeac6322916e350b280b326327b749d063d48686f7 /src/mesa/main/eval.h
parent57ce3ab32382d08ac8f0aeca13677612af3adfc0 (diff)
mesa/main: Make FEATURE_evaluators follow feature conventions.
As shown in mfeatures.h, this allows users of eval.h to work without knowing if the feature is available. It is renamed to FEATURE_eval along the way.
Diffstat (limited to 'src/mesa/main/eval.h')
-rw-r--r--src/mesa/main/eval.h49
1 files changed, 38 insertions, 11 deletions
diff --git a/src/mesa/main/eval.h b/src/mesa/main/eval.h
index b3ff0a96f8..49fd37a057 100644
--- a/src/mesa/main/eval.h
+++ b/src/mesa/main/eval.h
@@ -37,13 +37,22 @@
#define EVAL_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
-extern void _mesa_init_eval( GLcontext *ctx );
-extern void _mesa_free_eval_data( GLcontext *ctx );
+#if FEATURE_eval
+#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) \
+ do { \
+ (vfmt)->EvalCoord1f = impl ## EvalCoord1f; \
+ (vfmt)->EvalCoord1fv = impl ## EvalCoord1fv; \
+ (vfmt)->EvalCoord2f = impl ## EvalCoord2f; \
+ (vfmt)->EvalCoord2fv = impl ## EvalCoord2fv; \
+ (vfmt)->EvalPoint1 = impl ## EvalPoint1; \
+ (vfmt)->EvalPoint2 = impl ## EvalPoint2; \
+ (vfmt)->EvalMesh1 = impl ## EvalMesh1; \
+ (vfmt)->EvalMesh2 = impl ## EvalMesh2; \
+ } while (0)
extern GLuint _mesa_evaluator_components( GLenum target );
@@ -115,14 +124,32 @@ _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v );
extern void GLAPIENTRY
_mesa_GetMapiv( GLenum target, GLenum query, GLint *v );
-#else
+extern void
+_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt);
+
+extern void
+_mesa_init_eval_dispatch(struct _glapi_table *disp);
+
+#else /* FEATURE_eval */
+
+#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) do { } while (0)
-/** No-op */
-#define _mesa_init_eval( c ) ((void)0)
+static INLINE void
+_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
+{
+}
-/** No-op */
-#define _mesa_free_eval_data( c ) ((void)0)
+static INLINE void
+_mesa_init_eval_dispatch(struct _glapi_table *disp)
+{
+}
+
+#endif /* FEATURE_eval */
+
+extern void _mesa_init_eval( GLcontext *ctx );
+extern void _mesa_free_eval_data( GLcontext *ctx );
-#endif
-#endif
+#endif /* EVAL_H */