OSDN Git Service

19cd8906239c9c99967995284a1e2964f58a9e44
[android-x86/external-mesa.git] / src / mesa / main / eval.h
1 /**
2  * \file eval.h
3  * Eval operations.
4  * 
5  * \if subset
6  * (No-op)
7  *
8  * \endif
9  */
10
11 /*
12  * Mesa 3-D graphics library
13  * Version:  3.5
14  *
15  * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining a
18  * copy of this software and associated documentation files (the "Software"),
19  * to deal in the Software without restriction, including without limitation
20  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
21  * and/or sell copies of the Software, and to permit persons to whom the
22  * Software is furnished to do so, subject to the following conditions:
23  *
24  * The above copyright notice and this permission notice shall be included
25  * in all copies or substantial portions of the Software.
26  *
27  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
28  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
30  * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
31  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33  */
34
35
36 #ifndef EVAL_H
37 #define EVAL_H
38
39
40 #include "main/mtypes.h"
41 #include <stdbool.h>
42
43
44 #define _MESA_INIT_EVAL_VTXFMT(vfmt, impl)         \
45    do {                                            \
46       (vfmt)->EvalCoord1f  = impl ## EvalCoord1f;  \
47       (vfmt)->EvalCoord1fv = impl ## EvalCoord1fv; \
48       (vfmt)->EvalCoord2f  = impl ## EvalCoord2f;  \
49       (vfmt)->EvalCoord2fv = impl ## EvalCoord2fv; \
50       (vfmt)->EvalPoint1   = impl ## EvalPoint1;   \
51       (vfmt)->EvalPoint2   = impl ## EvalPoint2;   \
52       (vfmt)->EvalMesh1    = impl ## EvalMesh1;    \
53       (vfmt)->EvalMesh2    = impl ## EvalMesh2;    \
54    } while (0)
55
56 extern GLuint _mesa_evaluator_components( GLenum target );
57
58
59 extern GLfloat *_mesa_copy_map_points1f( GLenum target,
60                                       GLint ustride, GLint uorder,
61                                       const GLfloat *points );
62
63 extern GLfloat *_mesa_copy_map_points1d( GLenum target,
64                                       GLint ustride, GLint uorder,
65                                       const GLdouble *points );
66
67 extern GLfloat *_mesa_copy_map_points2f( GLenum target,
68                                       GLint ustride, GLint uorder,
69                                       GLint vstride, GLint vorder,
70                                       const GLfloat *points );
71
72 extern GLfloat *_mesa_copy_map_points2d(GLenum target,
73                                      GLint ustride, GLint uorder,
74                                      GLint vstride, GLint vorder,
75                                      const GLdouble *points );
76
77 extern void
78 _mesa_install_eval_vtxfmt(struct _glapi_table *disp,
79                           const GLvertexformat *vfmt,
80                           bool beginend);
81
82 extern void _mesa_init_eval( struct gl_context *ctx );
83 extern void _mesa_free_eval_data( struct gl_context *ctx );
84
85 void GLAPIENTRY
86 _mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride,
87              GLint order, const GLfloat *points );
88 void GLAPIENTRY
89 _mesa_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride,
90              GLint order, const GLdouble *points );
91 void GLAPIENTRY
92 _mesa_Map2f( GLenum target,
93              GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
94              GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
95              const GLfloat *points);
96 void GLAPIENTRY
97 _mesa_Map2d( GLenum target,
98              GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
99              GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
100              const GLdouble *points );
101 void GLAPIENTRY
102 _mesa_GetnMapdvARB( GLenum target, GLenum query, GLsizei bufSize,
103                     GLdouble *v );
104 void GLAPIENTRY
105 _mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v );
106 void GLAPIENTRY
107 _mesa_GetnMapfvARB( GLenum target, GLenum query, GLsizei bufSize, GLfloat *v );
108 void GLAPIENTRY
109 _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v );
110 void GLAPIENTRY
111 _mesa_GetnMapivARB( GLenum target, GLenum query, GLsizei bufSize, GLint *v );
112 void GLAPIENTRY
113 _mesa_GetMapiv( GLenum target, GLenum query, GLint *v );
114 void GLAPIENTRY
115 _mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
116 void GLAPIENTRY
117 _mesa_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
118 void GLAPIENTRY
119 _mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2,
120                  GLint vn, GLfloat v1, GLfloat v2 );
121 void GLAPIENTRY
122 _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
123                  GLint vn, GLdouble v1, GLdouble v2 );
124
125 #endif /* EVAL_H */