2 * Mesa 3-D graphics library
4 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
27 #ifndef API_LOOPBACK_H
28 #define API_LOOPBACK_H
30 #include "main/compiler.h"
31 #include "main/glheader.h" // ?
32 #include "main/macros.h" // ?
33 #include "main/mtypes.h" // ?
34 #include "glapi/glapi.h" // ?
35 #include "glapi/glthread.h" // ?
36 #include "main/dispatch.h" // ?
37 #include "main/context.h" // ?
43 _mesa_loopback_init_api_table(const struct gl_context
*ctx
,
44 struct _glapi_table
*dest
);
46 _mesa_Color3b( GLbyte red
, GLbyte green
, GLbyte blue
);
48 _mesa_Color3d( GLdouble red
, GLdouble green
, GLdouble blue
);
50 _mesa_Color3i( GLint red
, GLint green
, GLint blue
);
52 _mesa_Color3s( GLshort red
, GLshort green
, GLshort blue
);
54 _mesa_Color3ui( GLuint red
, GLuint green
, GLuint blue
);
56 _mesa_Color3us( GLushort red
, GLushort green
, GLushort blue
);
58 _mesa_Color3ub( GLubyte red
, GLubyte green
, GLubyte blue
);
60 _mesa_Color3bv( const GLbyte
*v
);
62 _mesa_Color3dv( const GLdouble
*v
);
64 _mesa_Color3iv( const GLint
*v
);
66 _mesa_Color3sv( const GLshort
*v
);
68 _mesa_Color3uiv( const GLuint
*v
);
70 _mesa_Color3usv( const GLushort
*v
);
72 _mesa_Color3ubv( const GLubyte
*v
);
74 _mesa_Color4b( GLbyte red
, GLbyte green
, GLbyte blue
,
77 _mesa_Color4d( GLdouble red
, GLdouble green
, GLdouble blue
,
80 _mesa_Color4i( GLint red
, GLint green
, GLint blue
, GLint alpha
);
82 _mesa_Color4s( GLshort red
, GLshort green
, GLshort blue
,
85 _mesa_Color4ui( GLuint red
, GLuint green
, GLuint blue
, GLuint alpha
);
87 _mesa_Color4us( GLushort red
, GLushort green
, GLushort blue
,
90 _mesa_Color4ub( GLubyte red
, GLubyte green
, GLubyte blue
, GLubyte alpha
);
92 _mesa_Color4iv( const GLint
*v
);
94 _mesa_Color4bv( const GLbyte
*v
);
96 _mesa_Color4dv( const GLdouble
*v
);
98 _mesa_Color4sv( const GLshort
*v
);
100 _mesa_Color4uiv( const GLuint
*v
);
102 _mesa_Color4usv( const GLushort
*v
);
104 _mesa_Color4ubv( const GLubyte
*v
);
106 _mesa_FogCoordd( GLdouble d
);
108 _mesa_FogCoorddv( const GLdouble
*v
);
110 _mesa_Indexd( GLdouble c
);
112 _mesa_Indexi( GLint c
);
114 _mesa_Indexs( GLshort c
);
116 _mesa_Indexub( GLubyte c
);
118 _mesa_Indexdv( const GLdouble
*c
);
120 _mesa_Indexiv( const GLint
*c
);
122 _mesa_Indexsv( const GLshort
*c
);
124 _mesa_Indexubv( const GLubyte
*c
);
126 _mesa_EdgeFlagv(const GLboolean
*flag
);
128 _mesa_Normal3b( GLbyte nx
, GLbyte ny
, GLbyte nz
);
130 _mesa_Normal3d( GLdouble nx
, GLdouble ny
, GLdouble nz
);
132 _mesa_Normal3i( GLint nx
, GLint ny
, GLint nz
);
134 _mesa_Normal3s( GLshort nx
, GLshort ny
, GLshort nz
);
136 _mesa_Normal3bv( const GLbyte
*v
);
138 _mesa_Normal3dv( const GLdouble
*v
);
140 _mesa_Normal3iv( const GLint
*v
);
142 _mesa_Normal3sv( const GLshort
*v
);
144 _mesa_TexCoord1d( GLdouble s
);
146 _mesa_TexCoord1i( GLint s
);
148 _mesa_TexCoord1s( GLshort s
);
150 _mesa_TexCoord2d( GLdouble s
, GLdouble t
);
152 _mesa_TexCoord2s( GLshort s
, GLshort t
);
154 _mesa_TexCoord2i( GLint s
, GLint t
);
156 _mesa_TexCoord3d( GLdouble s
, GLdouble t
, GLdouble r
);
158 _mesa_TexCoord3i( GLint s
, GLint t
, GLint r
);
160 _mesa_TexCoord3s( GLshort s
, GLshort t
, GLshort r
);
162 _mesa_TexCoord4d( GLdouble s
, GLdouble t
, GLdouble r
, GLdouble q
);
164 _mesa_TexCoord4i( GLint s
, GLint t
, GLint r
, GLint q
);
166 _mesa_TexCoord4s( GLshort s
, GLshort t
, GLshort r
, GLshort q
);
168 _mesa_TexCoord1dv( const GLdouble
*v
);
170 _mesa_TexCoord1iv( const GLint
*v
);
172 _mesa_TexCoord1sv( const GLshort
*v
);
174 _mesa_TexCoord2dv( const GLdouble
*v
);
176 _mesa_TexCoord2iv( const GLint
*v
);
178 _mesa_TexCoord2sv( const GLshort
*v
);
180 _mesa_TexCoord3dv( const GLdouble
*v
);
182 _mesa_TexCoord3iv( const GLint
*v
);
184 _mesa_TexCoord3sv( const GLshort
*v
);
186 _mesa_TexCoord4dv( const GLdouble
*v
);
188 _mesa_TexCoord4iv( const GLint
*v
);
190 _mesa_TexCoord4sv( const GLshort
*v
);
192 _mesa_Vertex2d( GLdouble x
, GLdouble y
);
194 _mesa_Vertex2i( GLint x
, GLint y
);
196 _mesa_Vertex2s( GLshort x
, GLshort y
);
198 _mesa_Vertex3d( GLdouble x
, GLdouble y
, GLdouble z
);
200 _mesa_Vertex3i( GLint x
, GLint y
, GLint z
);
202 _mesa_Vertex3s( GLshort x
, GLshort y
, GLshort z
);
204 _mesa_Vertex4d( GLdouble x
, GLdouble y
, GLdouble z
, GLdouble w
);
206 _mesa_Vertex4i( GLint x
, GLint y
, GLint z
, GLint w
);
208 _mesa_Vertex4s( GLshort x
, GLshort y
, GLshort z
, GLshort w
);
210 _mesa_Vertex2dv( const GLdouble
*v
);
212 _mesa_Vertex2iv( const GLint
*v
);
214 _mesa_Vertex2sv( const GLshort
*v
);
216 _mesa_Vertex3dv( const GLdouble
*v
);
218 _mesa_Vertex3iv( const GLint
*v
);
220 _mesa_Vertex3sv( const GLshort
*v
);
222 _mesa_Vertex4dv( const GLdouble
*v
);
224 _mesa_Vertex4iv( const GLint
*v
);
226 _mesa_Vertex4sv( const GLshort
*v
);
228 _mesa_MultiTexCoord1d(GLenum target
, GLdouble s
);
230 _mesa_MultiTexCoord1dv(GLenum target
, const GLdouble
*v
);
232 _mesa_MultiTexCoord1i(GLenum target
, GLint s
);
234 _mesa_MultiTexCoord1iv(GLenum target
, const GLint
*v
);
236 _mesa_MultiTexCoord1s(GLenum target
, GLshort s
);
238 _mesa_MultiTexCoord1sv(GLenum target
, const GLshort
*v
);
240 _mesa_MultiTexCoord2d(GLenum target
, GLdouble s
, GLdouble t
);
242 _mesa_MultiTexCoord2dv(GLenum target
, const GLdouble
*v
);
244 _mesa_MultiTexCoord2i(GLenum target
, GLint s
, GLint t
);
246 _mesa_MultiTexCoord2iv(GLenum target
, const GLint
*v
);
248 _mesa_MultiTexCoord2s(GLenum target
, GLshort s
, GLshort t
);
250 _mesa_MultiTexCoord2sv(GLenum target
, const GLshort
*v
);
252 _mesa_MultiTexCoord3d(GLenum target
, GLdouble s
, GLdouble t
, GLdouble r
);
254 _mesa_MultiTexCoord3dv(GLenum target
, const GLdouble
*v
);
256 _mesa_MultiTexCoord3i(GLenum target
, GLint s
, GLint t
, GLint r
);
258 _mesa_MultiTexCoord3iv(GLenum target
, const GLint
*v
);
260 _mesa_MultiTexCoord3s(GLenum target
, GLshort s
, GLshort t
, GLshort r
);
262 _mesa_MultiTexCoord3sv(GLenum target
, const GLshort
*v
);
264 _mesa_MultiTexCoord4d(GLenum target
, GLdouble s
, GLdouble t
, GLdouble r
,
267 _mesa_MultiTexCoord4dv(GLenum target
, const GLdouble
*v
);
269 _mesa_MultiTexCoord4i(GLenum target
, GLint s
, GLint t
, GLint r
, GLint q
);
271 _mesa_MultiTexCoord4iv(GLenum target
, const GLint
*v
);
273 _mesa_MultiTexCoord4s(GLenum target
, GLshort s
, GLshort t
, GLshort r
,
276 _mesa_MultiTexCoord4sv(GLenum target
, const GLshort
*v
);
278 _mesa_EvalCoord2dv( const GLdouble
*u
);
280 _mesa_EvalCoord2fv( const GLfloat
*u
);
282 _mesa_EvalCoord2d( GLdouble u
, GLdouble v
);
284 _mesa_EvalCoord1dv( const GLdouble
*u
);
286 _mesa_EvalCoord1fv( const GLfloat
*u
);
288 _mesa_EvalCoord1d( GLdouble u
);
290 _mesa_Materialf( GLenum face
, GLenum pname
, GLfloat param
);
292 _mesa_Materiali(GLenum face
, GLenum pname
, GLint param
);
294 _mesa_Materialiv(GLenum face
, GLenum pname
, const GLint
*params
);
296 _mesa_Rectd(GLdouble x1
, GLdouble y1
, GLdouble x2
, GLdouble y2
);
298 _mesa_Rectdv(const GLdouble
*v1
, const GLdouble
*v2
);
300 _mesa_Rectfv(const GLfloat
*v1
, const GLfloat
*v2
);
302 _mesa_Recti(GLint x1
, GLint y1
, GLint x2
, GLint y2
);
304 _mesa_Rectiv(const GLint
*v1
, const GLint
*v2
);
306 _mesa_Rects(GLshort x1
, GLshort y1
, GLshort x2
, GLshort y2
);
308 _mesa_Rectsv(const GLshort
*v1
, const GLshort
*v2
);
310 _mesa_SecondaryColor3b( GLbyte red
, GLbyte green
, GLbyte blue
);
312 _mesa_SecondaryColor3d( GLdouble red
, GLdouble green
, GLdouble blue
);
314 _mesa_SecondaryColor3i( GLint red
, GLint green
, GLint blue
);
316 _mesa_SecondaryColor3s( GLshort red
, GLshort green
, GLshort blue
);
318 _mesa_SecondaryColor3ui( GLuint red
, GLuint green
, GLuint blue
);
320 _mesa_SecondaryColor3us( GLushort red
, GLushort green
, GLushort blue
);
322 _mesa_SecondaryColor3ub( GLubyte red
, GLubyte green
, GLubyte blue
);
324 _mesa_SecondaryColor3bv( const GLbyte
*v
);
326 _mesa_SecondaryColor3dv( const GLdouble
*v
);
328 _mesa_SecondaryColor3iv( const GLint
*v
);
330 _mesa_SecondaryColor3sv( const GLshort
*v
);
332 _mesa_SecondaryColor3uiv( const GLuint
*v
);
334 _mesa_SecondaryColor3usv( const GLushort
*v
);
336 _mesa_SecondaryColor3ubv( const GLubyte
*v
);
338 _mesa_VertexAttrib1sNV(GLuint index
, GLshort x
);
340 _mesa_VertexAttrib1dNV(GLuint index
, GLdouble x
);
342 _mesa_VertexAttrib2sNV(GLuint index
, GLshort x
, GLshort y
);
344 _mesa_VertexAttrib2dNV(GLuint index
, GLdouble x
, GLdouble y
);
346 _mesa_VertexAttrib3sNV(GLuint index
, GLshort x
, GLshort y
, GLshort z
);
348 _mesa_VertexAttrib3dNV(GLuint index
, GLdouble x
, GLdouble y
, GLdouble z
);
350 _mesa_VertexAttrib4sNV(GLuint index
, GLshort x
, GLshort y
, GLshort z
,
353 _mesa_VertexAttrib4dNV(GLuint index
, GLdouble x
, GLdouble y
, GLdouble z
,
356 _mesa_VertexAttrib4ubNV(GLuint index
, GLubyte x
, GLubyte y
, GLubyte z
,
359 _mesa_VertexAttrib1svNV(GLuint index
, const GLshort
*v
);
361 _mesa_VertexAttrib1dvNV(GLuint index
, const GLdouble
*v
);
363 _mesa_VertexAttrib2svNV(GLuint index
, const GLshort
*v
);
365 _mesa_VertexAttrib2dvNV(GLuint index
, const GLdouble
*v
);
367 _mesa_VertexAttrib3svNV(GLuint index
, const GLshort
*v
);
369 _mesa_VertexAttrib3dvNV(GLuint index
, const GLdouble
*v
);
371 _mesa_VertexAttrib4svNV(GLuint index
, const GLshort
*v
);
373 _mesa_VertexAttrib4dvNV(GLuint index
, const GLdouble
*v
);
375 _mesa_VertexAttrib4ubvNV(GLuint index
, const GLubyte
*v
);
377 _mesa_VertexAttribs1svNV(GLuint index
, GLsizei n
, const GLshort
*v
);
379 _mesa_VertexAttribs1fvNV(GLuint index
, GLsizei n
, const GLfloat
*v
);
381 _mesa_VertexAttribs1dvNV(GLuint index
, GLsizei n
, const GLdouble
*v
);
383 _mesa_VertexAttribs2svNV(GLuint index
, GLsizei n
, const GLshort
*v
);
385 _mesa_VertexAttribs2fvNV(GLuint index
, GLsizei n
, const GLfloat
*v
);
387 _mesa_VertexAttribs2dvNV(GLuint index
, GLsizei n
, const GLdouble
*v
);
389 _mesa_VertexAttribs3svNV(GLuint index
, GLsizei n
, const GLshort
*v
);
391 _mesa_VertexAttribs3fvNV(GLuint index
, GLsizei n
, const GLfloat
*v
);
393 _mesa_VertexAttribs3dvNV(GLuint index
, GLsizei n
, const GLdouble
*v
);
395 _mesa_VertexAttribs4svNV(GLuint index
, GLsizei n
, const GLshort
*v
);
397 _mesa_VertexAttribs4fvNV(GLuint index
, GLsizei n
, const GLfloat
*v
);
399 _mesa_VertexAttribs4dvNV(GLuint index
, GLsizei n
, const GLdouble
*v
);
401 _mesa_VertexAttribs4ubvNV(GLuint index
, GLsizei n
, const GLubyte
*v
);
403 _mesa_VertexAttrib1s(GLuint index
, GLshort x
);
405 _mesa_VertexAttrib1d(GLuint index
, GLdouble x
);
407 _mesa_VertexAttrib2s(GLuint index
, GLshort x
, GLshort y
);
409 _mesa_VertexAttrib2d(GLuint index
, GLdouble x
, GLdouble y
);
411 _mesa_VertexAttrib3s(GLuint index
, GLshort x
, GLshort y
, GLshort z
);
413 _mesa_VertexAttrib3d(GLuint index
, GLdouble x
, GLdouble y
, GLdouble z
);
415 _mesa_VertexAttrib4s(GLuint index
, GLshort x
, GLshort y
, GLshort z
,
418 _mesa_VertexAttrib4d(GLuint index
, GLdouble x
, GLdouble y
, GLdouble z
,
421 _mesa_VertexAttrib1sv(GLuint index
, const GLshort
*v
);
423 _mesa_VertexAttrib1dv(GLuint index
, const GLdouble
*v
);
425 _mesa_VertexAttrib2sv(GLuint index
, const GLshort
*v
);
427 _mesa_VertexAttrib2dv(GLuint index
, const GLdouble
*v
);
429 _mesa_VertexAttrib3sv(GLuint index
, const GLshort
*v
);
431 _mesa_VertexAttrib3dv(GLuint index
, const GLdouble
*v
);
433 _mesa_VertexAttrib4sv(GLuint index
, const GLshort
*v
);
435 _mesa_VertexAttrib4dv(GLuint index
, const GLdouble
*v
);
437 _mesa_VertexAttrib4bv(GLuint index
, const GLbyte
* v
);
439 _mesa_VertexAttrib4iv(GLuint index
, const GLint
* v
);
441 _mesa_VertexAttrib4ubv(GLuint index
, const GLubyte
* v
);
443 _mesa_VertexAttrib4usv(GLuint index
, const GLushort
* v
);
445 _mesa_VertexAttrib4uiv(GLuint index
, const GLuint
* v
);
447 _mesa_VertexAttrib4Nbv(GLuint index
, const GLbyte
* v
);
449 _mesa_VertexAttrib4Nsv(GLuint index
, const GLshort
* v
);
451 _mesa_VertexAttrib4Niv(GLuint index
, const GLint
* v
);
453 _mesa_VertexAttrib4Nub(GLuint index
, GLubyte x
, GLubyte y
, GLubyte z
,
456 _mesa_VertexAttrib4Nubv(GLuint index
, const GLubyte
* v
);
458 _mesa_VertexAttrib4Nusv(GLuint index
, const GLushort
* v
);
460 _mesa_VertexAttrib4Nuiv(GLuint index
, const GLuint
* v
);
462 _mesa_VertexAttribI1iv(GLuint index
, const GLint
*v
);
464 _mesa_VertexAttribI1uiv(GLuint index
, const GLuint
*v
);
466 _mesa_VertexAttribI4bv(GLuint index
, const GLbyte
*v
);
468 _mesa_VertexAttribI4sv(GLuint index
, const GLshort
*v
);
470 _mesa_VertexAttribI4ubv(GLuint index
, const GLubyte
*v
);
472 _mesa_VertexAttribI4usv(GLuint index
, const GLushort
*v
);
475 #endif /* API_LOOPBACK_H */