varray.h revision 4a49301e
1/*
2 * Mesa 3-D graphics library
3 * Version:  7.6
4 *
5 * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
6 * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26
27#ifndef VARRAY_H
28#define VARRAY_H
29
30
31#include "mtypes.h"
32
33#if _HAVE_FULL_GL
34
35extern void GLAPIENTRY
36_mesa_VertexPointer(GLint size, GLenum type, GLsizei stride,
37                    const GLvoid *ptr);
38
39extern void GLAPIENTRY
40_mesa_UnlockArraysEXT( void );
41
42extern void GLAPIENTRY
43_mesa_LockArraysEXT(GLint first, GLsizei count);
44
45
46extern void GLAPIENTRY
47_mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr);
48
49
50extern void GLAPIENTRY
51_mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr);
52
53
54extern void GLAPIENTRY
55_mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr);
56
57
58extern void GLAPIENTRY
59_mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
60                      const GLvoid *ptr);
61
62
63extern void GLAPIENTRY
64_mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr);
65
66
67extern void GLAPIENTRY
68_mesa_VertexPointerEXT(GLint size, GLenum type, GLsizei stride,
69                       GLsizei count, const GLvoid *ptr);
70
71
72extern void GLAPIENTRY
73_mesa_NormalPointerEXT(GLenum type, GLsizei stride, GLsizei count,
74                       const GLvoid *ptr);
75
76
77extern void GLAPIENTRY
78_mesa_ColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count,
79                      const GLvoid *ptr);
80
81
82extern void GLAPIENTRY
83_mesa_IndexPointerEXT(GLenum type, GLsizei stride, GLsizei count,
84                      const GLvoid *ptr);
85
86
87extern void GLAPIENTRY
88_mesa_TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride,
89                         GLsizei count, const GLvoid *ptr);
90
91
92extern void GLAPIENTRY
93_mesa_EdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *ptr);
94
95
96extern void GLAPIENTRY
97_mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr);
98
99
100extern void GLAPIENTRY
101_mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
102			       GLsizei stride, const GLvoid *ptr);
103
104
105extern void GLAPIENTRY
106_mesa_PointSizePointer(GLenum type, GLsizei stride, const GLvoid *ptr);
107
108
109extern void GLAPIENTRY
110_mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
111                            GLsizei stride, const GLvoid *pointer);
112
113
114extern void GLAPIENTRY
115_mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
116                             GLboolean normalized, GLsizei stride,
117                             const GLvoid *pointer);
118
119
120extern void GLAPIENTRY
121_mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer);
122
123
124extern void GLAPIENTRY
125_mesa_MultiDrawArraysEXT( GLenum mode, GLint *first,
126                          GLsizei *count, GLsizei primcount );
127
128extern void GLAPIENTRY
129_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
130                            const GLvoid **indices, GLsizei primcount );
131
132extern void GLAPIENTRY
133_mesa_MultiDrawElementsBaseVertex( GLenum mode,
134				   const GLsizei *count, GLenum type,
135				   const GLvoid **indices, GLsizei primcount,
136				   const GLint *basevertex);
137
138extern void GLAPIENTRY
139_mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first,
140			      const GLsizei * count,
141			      GLsizei primcount, GLint modestride );
142
143
144extern void GLAPIENTRY
145_mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
146				GLenum type, const GLvoid * const * indices,
147				GLsizei primcount, GLint modestride );
148
149extern void GLAPIENTRY
150_mesa_LockArraysEXT(GLint first, GLsizei count);
151
152extern void GLAPIENTRY
153_mesa_UnlockArraysEXT( void );
154
155
156extern void GLAPIENTRY
157_mesa_DrawArrays(GLenum mode, GLint first, GLsizei count);
158
159extern void GLAPIENTRY
160_mesa_DrawElements(GLenum mode, GLsizei count, GLenum type,
161                   const GLvoid *indices);
162
163extern void GLAPIENTRY
164_mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count,
165                        GLenum type, const GLvoid *indices);
166
167extern void GLAPIENTRY
168_mesa_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
169			     const GLvoid *indices, GLint basevertex);
170
171extern void GLAPIENTRY
172_mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end,
173				  GLsizei count, GLenum type,
174				  const GLvoid *indices,
175				  GLint basevertex);
176
177
178extern void
179_mesa_copy_client_array(GLcontext *ctx,
180                        struct gl_client_array *dst,
181                        struct gl_client_array *src);
182
183
184extern void
185_mesa_print_arrays(GLcontext *ctx);
186
187extern void
188_mesa_init_varray( GLcontext * ctx );
189
190extern void
191_mesa_free_varray_data(GLcontext *ctx);
192
193#else
194
195/** No-op */
196#define _mesa_init_varray( c )  ((void)0)
197#define _mesa_free_varray_data( c )  ((void)0)
198
199#endif
200
201#endif
202