Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /**
  2.  * \file api_loopback.c
  3.  *
  4.  * \author Keith Whitwell <keith@tungstengraphics.com>
  5.  */
  6.  
  7. /*
  8.  * Mesa 3-D graphics library
  9.  *
  10.  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
  11.  *
  12.  * Permission is hereby granted, free of charge, to any person obtaining a
  13.  * copy of this software and associated documentation files (the "Software"),
  14.  * to deal in the Software without restriction, including without limitation
  15.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  16.  * and/or sell copies of the Software, and to permit persons to whom the
  17.  * Software is furnished to do so, subject to the following conditions:
  18.  *
  19.  * The above copyright notice and this permission notice shall be included
  20.  * in all copies or substantial portions of the Software.
  21.  *
  22.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  23.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  24.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  25.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  26.  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  27.  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  28.  * OTHER DEALINGS IN THE SOFTWARE.
  29.  */
  30.  
  31.  
  32. #include "glheader.h"
  33. #include "macros.h"
  34. #include "api_loopback.h"
  35. #include "mtypes.h"
  36. #include "glapi/glapi.h"
  37. #include "glapi/glthread.h"
  38. #include "main/dispatch.h"
  39. #include "main/context.h"
  40.  
  41. /* KW: A set of functions to convert unusual Color/Normal/Vertex/etc
  42.  * calls to a smaller set of driver-provided formats.  Currently just
  43.  * go back to dispatch to find these (eg. call glNormal3f directly),
  44.  * hence 'loopback'.
  45.  *
  46.  * The driver must supply all of the remaining entry points, which are
  47.  * listed in dd.h.  The easiest way for a driver to do this is to
  48.  * install the supplied software t&l module.
  49.  */
  50. #define COLORF(r,g,b,a)             CALL_Color4f(GET_DISPATCH(), (r,g,b,a))
  51. #define VERTEX2(x,y)                CALL_Vertex2f(GET_DISPATCH(), (x,y))
  52. #define VERTEX3(x,y,z)              CALL_Vertex3f(GET_DISPATCH(), (x,y,z))
  53. #define VERTEX4(x,y,z,w)            CALL_Vertex4f(GET_DISPATCH(), (x,y,z,w))
  54. #define NORMAL(x,y,z)               CALL_Normal3f(GET_DISPATCH(), (x,y,z))
  55. #define TEXCOORD1(s)                CALL_TexCoord1f(GET_DISPATCH(), (s))
  56. #define TEXCOORD2(s,t)              CALL_TexCoord2f(GET_DISPATCH(), (s,t))
  57. #define TEXCOORD3(s,t,u)            CALL_TexCoord3f(GET_DISPATCH(), (s,t,u))
  58. #define TEXCOORD4(s,t,u,v)          CALL_TexCoord4f(GET_DISPATCH(), (s,t,u,v))
  59. #define INDEX(c)                    CALL_Indexf(GET_DISPATCH(), (c))
  60. #define MULTI_TEXCOORD1(z,s)        CALL_MultiTexCoord1fARB(GET_DISPATCH(), (z,s))
  61. #define MULTI_TEXCOORD2(z,s,t)      CALL_MultiTexCoord2fARB(GET_DISPATCH(), (z,s,t))
  62. #define MULTI_TEXCOORD3(z,s,t,u)    CALL_MultiTexCoord3fARB(GET_DISPATCH(), (z,s,t,u))
  63. #define MULTI_TEXCOORD4(z,s,t,u,v)  CALL_MultiTexCoord4fARB(GET_DISPATCH(), (z,s,t,u,v))
  64. #define EVALCOORD1(x)               CALL_EvalCoord1f(GET_DISPATCH(), (x))
  65. #define EVALCOORD2(x,y)             CALL_EvalCoord2f(GET_DISPATCH(), (x,y))
  66. #define MATERIALFV(a,b,c)           CALL_Materialfv(GET_DISPATCH(), (a,b,c))
  67. #define RECTF(a,b,c,d)              CALL_Rectf(GET_DISPATCH(), (a,b,c,d))
  68.  
  69. #define FOGCOORDF(x)                CALL_FogCoordfEXT(GET_DISPATCH(), (x))
  70. #define SECONDARYCOLORF(a,b,c)      CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c))
  71.  
  72. #define ATTRIB1NV(index,x)          CALL_VertexAttrib1fNV(GET_DISPATCH(), (index,x))
  73. #define ATTRIB2NV(index,x,y)        CALL_VertexAttrib2fNV(GET_DISPATCH(), (index,x,y))
  74. #define ATTRIB3NV(index,x,y,z)      CALL_VertexAttrib3fNV(GET_DISPATCH(), (index,x,y,z))
  75. #define ATTRIB4NV(index,x,y,z,w)    CALL_VertexAttrib4fNV(GET_DISPATCH(), (index,x,y,z,w))
  76.  
  77. #define ATTRIB1ARB(index,x)         CALL_VertexAttrib1fARB(GET_DISPATCH(), (index,x))
  78. #define ATTRIB2ARB(index,x,y)       CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,x,y))
  79. #define ATTRIB3ARB(index,x,y,z)     CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,x,y,z))
  80. #define ATTRIB4ARB(index,x,y,z,w)   CALL_VertexAttrib4fARB(GET_DISPATCH(), (index,x,y,z,w))
  81.  
  82. #define ATTRIBI_1I(index,x)   CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index,x))
  83. #define ATTRIBI_1UI(index,x)   CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index,x))
  84. #define ATTRIBI_4I(index,x,y,z,w)   CALL_VertexAttribI4iEXT(GET_DISPATCH(), (index,x,y,z,w))
  85.  
  86. #define ATTRIBI_4UI(index,x,y,z,w)   CALL_VertexAttribI4uiEXT(GET_DISPATCH(), (index,x,y,z,w))
  87.  
  88.  
  89. void GLAPIENTRY
  90. _mesa_Color3b( GLbyte red, GLbyte green, GLbyte blue )
  91. {
  92.    COLORF( BYTE_TO_FLOAT(red),
  93.            BYTE_TO_FLOAT(green),
  94.            BYTE_TO_FLOAT(blue),
  95.            1.0 );
  96. }
  97.  
  98. void GLAPIENTRY
  99. _mesa_Color3d( GLdouble red, GLdouble green, GLdouble blue )
  100. {
  101.    COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, 1.0 );
  102. }
  103.  
  104. void GLAPIENTRY
  105. _mesa_Color3i( GLint red, GLint green, GLint blue )
  106. {
  107.    COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
  108.            INT_TO_FLOAT(blue), 1.0);
  109. }
  110.  
  111. void GLAPIENTRY
  112. _mesa_Color3s( GLshort red, GLshort green, GLshort blue )
  113. {
  114.    COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
  115.            SHORT_TO_FLOAT(blue), 1.0);
  116. }
  117.  
  118. void GLAPIENTRY
  119. _mesa_Color3ui( GLuint red, GLuint green, GLuint blue )
  120. {
  121.    COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
  122.            UINT_TO_FLOAT(blue), 1.0 );
  123. }
  124.  
  125. void GLAPIENTRY
  126. _mesa_Color3us( GLushort red, GLushort green, GLushort blue )
  127. {
  128.    COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
  129.            USHORT_TO_FLOAT(blue), 1.0 );
  130. }
  131.  
  132. void GLAPIENTRY
  133. _mesa_Color3ub( GLubyte red, GLubyte green, GLubyte blue )
  134. {
  135.    COLORF( UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
  136.            UBYTE_TO_FLOAT(blue), 1.0 );
  137. }
  138.  
  139.  
  140. void GLAPIENTRY
  141. _mesa_Color3bv( const GLbyte *v )
  142. {
  143.    COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
  144.            BYTE_TO_FLOAT(v[2]), 1.0 );
  145. }
  146.  
  147. void GLAPIENTRY
  148. _mesa_Color3dv( const GLdouble *v )
  149. {
  150.    COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0 );
  151. }
  152.  
  153. void GLAPIENTRY
  154. _mesa_Color3iv( const GLint *v )
  155. {
  156.    COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
  157.            INT_TO_FLOAT(v[2]), 1.0 );
  158. }
  159.  
  160. void GLAPIENTRY
  161. _mesa_Color3sv( const GLshort *v )
  162. {
  163.    COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
  164.            SHORT_TO_FLOAT(v[2]), 1.0 );
  165. }
  166.  
  167. void GLAPIENTRY
  168. _mesa_Color3uiv( const GLuint *v )
  169. {
  170.    COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
  171.            UINT_TO_FLOAT(v[2]), 1.0 );
  172. }
  173.  
  174. void GLAPIENTRY
  175. _mesa_Color3usv( const GLushort *v )
  176. {
  177.    COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
  178.            USHORT_TO_FLOAT(v[2]), 1.0 );
  179. }
  180.  
  181. void GLAPIENTRY
  182. _mesa_Color3ubv( const GLubyte *v )
  183. {
  184.    COLORF( UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
  185.            UBYTE_TO_FLOAT(v[2]), 1.0 );
  186. }
  187.  
  188.  
  189. void GLAPIENTRY
  190. _mesa_Color4b( GLbyte red, GLbyte green, GLbyte blue,
  191.                               GLbyte alpha )
  192. {
  193.    COLORF( BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green),
  194.            BYTE_TO_FLOAT(blue), BYTE_TO_FLOAT(alpha) );
  195. }
  196.  
  197. void GLAPIENTRY
  198. _mesa_Color4d( GLdouble red, GLdouble green, GLdouble blue,
  199.                               GLdouble alpha )
  200. {
  201.    COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha );
  202. }
  203.  
  204. void GLAPIENTRY
  205. _mesa_Color4i( GLint red, GLint green, GLint blue, GLint alpha )
  206. {
  207.    COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
  208.            INT_TO_FLOAT(blue), INT_TO_FLOAT(alpha) );
  209. }
  210.  
  211. void GLAPIENTRY
  212. _mesa_Color4s( GLshort red, GLshort green, GLshort blue,
  213.                               GLshort alpha )
  214. {
  215.    COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
  216.            SHORT_TO_FLOAT(blue), SHORT_TO_FLOAT(alpha) );
  217. }
  218.  
  219. void GLAPIENTRY
  220. _mesa_Color4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha )
  221. {
  222.    COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
  223.            UINT_TO_FLOAT(blue), UINT_TO_FLOAT(alpha) );
  224. }
  225.  
  226. void GLAPIENTRY
  227. _mesa_Color4us( GLushort red, GLushort green, GLushort blue, GLushort alpha )
  228. {
  229.    COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
  230.            USHORT_TO_FLOAT(blue), USHORT_TO_FLOAT(alpha) );
  231. }
  232.  
  233. void GLAPIENTRY
  234. _mesa_Color4ub( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
  235. {
  236.    COLORF( UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
  237.            UBYTE_TO_FLOAT(blue), UBYTE_TO_FLOAT(alpha) );
  238. }
  239.  
  240.  
  241. void GLAPIENTRY
  242. _mesa_Color4iv( const GLint *v )
  243. {
  244.    COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
  245.            INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) );
  246. }
  247.  
  248.  
  249. void GLAPIENTRY
  250. _mesa_Color4bv( const GLbyte *v )
  251. {
  252.    COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
  253.            BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]) );
  254. }
  255.  
  256. void GLAPIENTRY
  257. _mesa_Color4dv( const GLdouble *v )
  258. {
  259.    COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3] );
  260. }
  261.  
  262.  
  263. void GLAPIENTRY
  264. _mesa_Color4sv( const GLshort *v)
  265. {
  266.    COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
  267.            SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]) );
  268. }
  269.  
  270.  
  271. void GLAPIENTRY
  272. _mesa_Color4uiv( const GLuint *v)
  273. {
  274.    COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
  275.            UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]) );
  276. }
  277.  
  278. void GLAPIENTRY
  279. _mesa_Color4usv( const GLushort *v)
  280. {
  281.    COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
  282.            USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]) );
  283. }
  284.  
  285. void GLAPIENTRY
  286. _mesa_Color4ubv( const GLubyte *v)
  287. {
  288.    COLORF( UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
  289.            UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]) );
  290. }
  291.  
  292.  
  293. void GLAPIENTRY
  294. _mesa_FogCoordd( GLdouble d )
  295. {
  296.    FOGCOORDF( (GLfloat) d );
  297. }
  298.  
  299. void GLAPIENTRY
  300. _mesa_FogCoorddv( const GLdouble *v )
  301. {
  302.    FOGCOORDF( (GLfloat) *v );
  303. }
  304.  
  305.  
  306. void GLAPIENTRY
  307. _mesa_Indexd( GLdouble c )
  308. {
  309.    INDEX( (GLfloat) c );
  310. }
  311.  
  312. void GLAPIENTRY
  313. _mesa_Indexi( GLint c )
  314. {
  315.    INDEX( (GLfloat) c );
  316. }
  317.  
  318. void GLAPIENTRY
  319. _mesa_Indexs( GLshort c )
  320. {
  321.    INDEX( (GLfloat) c );
  322. }
  323.  
  324. void GLAPIENTRY
  325. _mesa_Indexub( GLubyte c )
  326. {
  327.    INDEX( (GLfloat) c );
  328. }
  329.  
  330. void GLAPIENTRY
  331. _mesa_Indexdv( const GLdouble *c )
  332. {
  333.    INDEX( (GLfloat) *c );
  334. }
  335.  
  336. void GLAPIENTRY
  337. _mesa_Indexiv( const GLint *c )
  338. {
  339.    INDEX( (GLfloat) *c );
  340. }
  341.  
  342. void GLAPIENTRY
  343. _mesa_Indexsv( const GLshort *c )
  344. {
  345.    INDEX( (GLfloat) *c );
  346. }
  347.  
  348. void GLAPIENTRY
  349. _mesa_Indexubv( const GLubyte *c )
  350. {
  351.    INDEX( (GLfloat) *c );
  352. }
  353.  
  354.  
  355. void GLAPIENTRY
  356. _mesa_EdgeFlagv(const GLboolean *flag)
  357. {
  358.    CALL_EdgeFlag(GET_DISPATCH(), (*flag));
  359. }
  360.  
  361.  
  362. void GLAPIENTRY
  363. _mesa_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz )
  364. {
  365.    NORMAL( BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz) );
  366. }
  367.  
  368. void GLAPIENTRY
  369. _mesa_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz )
  370. {
  371.    NORMAL((GLfloat) nx, (GLfloat) ny, (GLfloat) nz);
  372. }
  373.  
  374. void GLAPIENTRY
  375. _mesa_Normal3i( GLint nx, GLint ny, GLint nz )
  376. {
  377.    NORMAL( INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz) );
  378. }
  379.  
  380. void GLAPIENTRY
  381. _mesa_Normal3s( GLshort nx, GLshort ny, GLshort nz )
  382. {
  383.    NORMAL( SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz) );
  384. }
  385.  
  386. void GLAPIENTRY
  387. _mesa_Normal3bv( const GLbyte *v )
  388. {
  389.    NORMAL( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]) );
  390. }
  391.  
  392. void GLAPIENTRY
  393. _mesa_Normal3dv( const GLdouble *v )
  394. {
  395.    NORMAL( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
  396. }
  397.  
  398. void GLAPIENTRY
  399. _mesa_Normal3iv( const GLint *v )
  400. {
  401.    NORMAL( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]) );
  402. }
  403.  
  404. void GLAPIENTRY
  405. _mesa_Normal3sv( const GLshort *v )
  406. {
  407.    NORMAL( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]) );
  408. }
  409.  
  410. void GLAPIENTRY
  411. _mesa_TexCoord1d( GLdouble s )
  412. {
  413.    TEXCOORD1((GLfloat) s);
  414. }
  415.  
  416. void GLAPIENTRY
  417. _mesa_TexCoord1i( GLint s )
  418. {
  419.    TEXCOORD1((GLfloat) s);
  420. }
  421.  
  422. void GLAPIENTRY
  423. _mesa_TexCoord1s( GLshort s )
  424. {
  425.    TEXCOORD1((GLfloat) s);
  426. }
  427.  
  428. void GLAPIENTRY
  429. _mesa_TexCoord2d( GLdouble s, GLdouble t )
  430. {
  431.    TEXCOORD2((GLfloat) s,(GLfloat) t);
  432. }
  433.  
  434. void GLAPIENTRY
  435. _mesa_TexCoord2s( GLshort s, GLshort t )
  436. {
  437.    TEXCOORD2((GLfloat) s,(GLfloat) t);
  438. }
  439.  
  440. void GLAPIENTRY
  441. _mesa_TexCoord2i( GLint s, GLint t )
  442. {
  443.    TEXCOORD2((GLfloat) s,(GLfloat) t);
  444. }
  445.  
  446. void GLAPIENTRY
  447. _mesa_TexCoord3d( GLdouble s, GLdouble t, GLdouble r )
  448. {
  449.    TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
  450. }
  451.  
  452. void GLAPIENTRY
  453. _mesa_TexCoord3i( GLint s, GLint t, GLint r )
  454. {
  455.    TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
  456. }
  457.  
  458. void GLAPIENTRY
  459. _mesa_TexCoord3s( GLshort s, GLshort t, GLshort r )
  460. {
  461.    TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
  462. }
  463.  
  464. void GLAPIENTRY
  465. _mesa_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q )
  466. {
  467.    TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
  468. }
  469.  
  470. void GLAPIENTRY
  471. _mesa_TexCoord4i( GLint s, GLint t, GLint r, GLint q )
  472. {
  473.    TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
  474. }
  475.  
  476. void GLAPIENTRY
  477. _mesa_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q )
  478. {
  479.    TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
  480. }
  481.  
  482. void GLAPIENTRY
  483. _mesa_TexCoord1dv( const GLdouble *v )
  484. {
  485.    TEXCOORD1((GLfloat) v[0]);
  486. }
  487.  
  488. void GLAPIENTRY
  489. _mesa_TexCoord1iv( const GLint *v )
  490. {
  491.    TEXCOORD1((GLfloat) v[0]);
  492. }
  493.  
  494. void GLAPIENTRY
  495. _mesa_TexCoord1sv( const GLshort *v )
  496. {
  497.    TEXCOORD1((GLfloat) v[0]);
  498. }
  499.  
  500. void GLAPIENTRY
  501. _mesa_TexCoord2dv( const GLdouble *v )
  502. {
  503.    TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
  504. }
  505.  
  506. void GLAPIENTRY
  507. _mesa_TexCoord2iv( const GLint *v )
  508. {
  509.    TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
  510. }
  511.  
  512. void GLAPIENTRY
  513. _mesa_TexCoord2sv( const GLshort *v )
  514. {
  515.    TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
  516. }
  517.  
  518. void GLAPIENTRY
  519. _mesa_TexCoord3dv( const GLdouble *v )
  520. {
  521.    TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
  522. }
  523.  
  524. void GLAPIENTRY
  525. _mesa_TexCoord3iv( const GLint *v )
  526. {
  527.    TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
  528. }
  529.  
  530. void GLAPIENTRY
  531. _mesa_TexCoord3sv( const GLshort *v )
  532. {
  533.    TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
  534. }
  535.  
  536. void GLAPIENTRY
  537. _mesa_TexCoord4dv( const GLdouble *v )
  538. {
  539.    TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
  540. }
  541.  
  542. void GLAPIENTRY
  543. _mesa_TexCoord4iv( const GLint *v )
  544. {
  545.    TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
  546. }
  547.  
  548. void GLAPIENTRY
  549. _mesa_TexCoord4sv( const GLshort *v )
  550. {
  551.    TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
  552. }
  553.  
  554. void GLAPIENTRY
  555. _mesa_Vertex2d( GLdouble x, GLdouble y )
  556. {
  557.    VERTEX2( (GLfloat) x, (GLfloat) y );
  558. }
  559.  
  560. void GLAPIENTRY
  561. _mesa_Vertex2i( GLint x, GLint y )
  562. {
  563.    VERTEX2( (GLfloat) x, (GLfloat) y );
  564. }
  565.  
  566. void GLAPIENTRY
  567. _mesa_Vertex2s( GLshort x, GLshort y )
  568. {
  569.    VERTEX2( (GLfloat) x, (GLfloat) y );
  570. }
  571.  
  572. void GLAPIENTRY
  573. _mesa_Vertex3d( GLdouble x, GLdouble y, GLdouble z )
  574. {
  575.    VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
  576. }
  577.  
  578. void GLAPIENTRY
  579. _mesa_Vertex3i( GLint x, GLint y, GLint z )
  580. {
  581.    VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
  582. }
  583.  
  584. void GLAPIENTRY
  585. _mesa_Vertex3s( GLshort x, GLshort y, GLshort z )
  586. {
  587.    VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
  588. }
  589.  
  590. void GLAPIENTRY
  591. _mesa_Vertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w )
  592. {
  593.    VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
  594. }
  595.  
  596. void GLAPIENTRY
  597. _mesa_Vertex4i( GLint x, GLint y, GLint z, GLint w )
  598. {
  599.    VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
  600. }
  601.  
  602. void GLAPIENTRY
  603. _mesa_Vertex4s( GLshort x, GLshort y, GLshort z, GLshort w )
  604. {
  605.    VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
  606. }
  607.  
  608. void GLAPIENTRY
  609. _mesa_Vertex2dv( const GLdouble *v )
  610. {
  611.    VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
  612. }
  613.  
  614. void GLAPIENTRY
  615. _mesa_Vertex2iv( const GLint *v )
  616. {
  617.    VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
  618. }
  619.  
  620. void GLAPIENTRY
  621. _mesa_Vertex2sv( const GLshort *v )
  622. {
  623.    VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
  624. }
  625.  
  626. void GLAPIENTRY
  627. _mesa_Vertex3dv( const GLdouble *v )
  628. {
  629.    VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
  630. }
  631.  
  632. void GLAPIENTRY
  633. _mesa_Vertex3iv( const GLint *v )
  634. {
  635.    VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
  636. }
  637.  
  638. void GLAPIENTRY
  639. _mesa_Vertex3sv( const GLshort *v )
  640. {
  641.    VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
  642. }
  643.  
  644. void GLAPIENTRY
  645. _mesa_Vertex4dv( const GLdouble *v )
  646. {
  647.    VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
  648.             (GLfloat) v[2], (GLfloat) v[3] );
  649. }
  650.  
  651. void GLAPIENTRY
  652. _mesa_Vertex4iv( const GLint *v )
  653. {
  654.    VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
  655.             (GLfloat) v[2], (GLfloat) v[3] );
  656. }
  657.  
  658. void GLAPIENTRY
  659. _mesa_Vertex4sv( const GLshort *v )
  660. {
  661.    VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
  662.             (GLfloat) v[2], (GLfloat) v[3] );
  663. }
  664.  
  665. void GLAPIENTRY
  666. _mesa_MultiTexCoord1d(GLenum target, GLdouble s)
  667. {
  668.    MULTI_TEXCOORD1( target, (GLfloat) s );
  669. }
  670.  
  671. void GLAPIENTRY
  672. _mesa_MultiTexCoord1dv(GLenum target, const GLdouble *v)
  673. {
  674.    MULTI_TEXCOORD1( target, (GLfloat) v[0] );
  675. }
  676.  
  677. void GLAPIENTRY
  678. _mesa_MultiTexCoord1i(GLenum target, GLint s)
  679. {
  680.    MULTI_TEXCOORD1( target, (GLfloat) s );
  681. }
  682.  
  683. void GLAPIENTRY
  684. _mesa_MultiTexCoord1iv(GLenum target, const GLint *v)
  685. {
  686.    MULTI_TEXCOORD1( target, (GLfloat) v[0] );
  687. }
  688.  
  689. void GLAPIENTRY
  690. _mesa_MultiTexCoord1s(GLenum target, GLshort s)
  691. {
  692.    MULTI_TEXCOORD1( target, (GLfloat) s );
  693. }
  694.  
  695. void GLAPIENTRY
  696. _mesa_MultiTexCoord1sv(GLenum target, const GLshort *v)
  697. {
  698.    MULTI_TEXCOORD1( target, (GLfloat) v[0] );
  699. }
  700.  
  701. void GLAPIENTRY
  702. _mesa_MultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
  703. {
  704.    MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
  705. }
  706.  
  707. void GLAPIENTRY
  708. _mesa_MultiTexCoord2dv(GLenum target, const GLdouble *v)
  709. {
  710.    MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
  711. }
  712.  
  713. void GLAPIENTRY
  714. _mesa_MultiTexCoord2i(GLenum target, GLint s, GLint t)
  715. {
  716.    MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
  717. }
  718.  
  719. void GLAPIENTRY
  720. _mesa_MultiTexCoord2iv(GLenum target, const GLint *v)
  721. {
  722.    MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
  723. }
  724.  
  725. void GLAPIENTRY
  726. _mesa_MultiTexCoord2s(GLenum target, GLshort s, GLshort t)
  727. {
  728.    MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
  729. }
  730.  
  731. void GLAPIENTRY
  732. _mesa_MultiTexCoord2sv(GLenum target, const GLshort *v)
  733. {
  734.    MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
  735. }
  736.  
  737. void GLAPIENTRY
  738. _mesa_MultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
  739. {
  740.    MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
  741. }
  742.  
  743. void GLAPIENTRY
  744. _mesa_MultiTexCoord3dv(GLenum target, const GLdouble *v)
  745. {
  746.    MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
  747. }
  748.  
  749. void GLAPIENTRY
  750. _mesa_MultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
  751. {
  752.    MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
  753. }
  754.  
  755. void GLAPIENTRY
  756. _mesa_MultiTexCoord3iv(GLenum target, const GLint *v)
  757. {
  758.    MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
  759. }
  760.  
  761. void GLAPIENTRY
  762. _mesa_MultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
  763. {
  764.    MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
  765. }
  766.  
  767. void GLAPIENTRY
  768. _mesa_MultiTexCoord3sv(GLenum target, const GLshort *v)
  769. {
  770.    MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
  771. }
  772.  
  773. void GLAPIENTRY
  774. _mesa_MultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  775. {
  776.    MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
  777.                     (GLfloat) r, (GLfloat) q );
  778. }
  779.  
  780. void GLAPIENTRY
  781. _mesa_MultiTexCoord4dv(GLenum target, const GLdouble *v)
  782. {
  783.    MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
  784.                     (GLfloat) v[2], (GLfloat) v[3] );
  785. }
  786.  
  787. void GLAPIENTRY
  788. _mesa_MultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
  789. {
  790.    MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
  791.                     (GLfloat) r, (GLfloat) q );
  792. }
  793.  
  794. void GLAPIENTRY
  795. _mesa_MultiTexCoord4iv(GLenum target, const GLint *v)
  796. {
  797.    MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
  798.                     (GLfloat) v[2], (GLfloat) v[3] );
  799. }
  800.  
  801. void GLAPIENTRY
  802. _mesa_MultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
  803. {
  804.    MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
  805.                     (GLfloat) r, (GLfloat) q );
  806. }
  807.  
  808. void GLAPIENTRY
  809. _mesa_MultiTexCoord4sv(GLenum target, const GLshort *v)
  810. {
  811.    MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
  812.                     (GLfloat) v[2], (GLfloat) v[3] );
  813. }
  814.  
  815. void GLAPIENTRY
  816. _mesa_EvalCoord2dv( const GLdouble *u )
  817. {
  818.    EVALCOORD2( (GLfloat) u[0], (GLfloat) u[1] );
  819. }
  820.  
  821. void GLAPIENTRY
  822. _mesa_EvalCoord2fv( const GLfloat *u )
  823. {
  824.    EVALCOORD2( u[0], u[1] );
  825. }
  826.  
  827. void GLAPIENTRY
  828. _mesa_EvalCoord2d( GLdouble u, GLdouble v )
  829. {
  830.    EVALCOORD2( (GLfloat) u, (GLfloat) v );
  831. }
  832.  
  833. void GLAPIENTRY
  834. _mesa_EvalCoord1dv( const GLdouble *u )
  835. {
  836.    EVALCOORD1( (GLfloat) *u );
  837. }
  838.  
  839. void GLAPIENTRY
  840. _mesa_EvalCoord1fv( const GLfloat *u )
  841. {
  842.    EVALCOORD1( (GLfloat) *u );
  843. }
  844.  
  845. void GLAPIENTRY
  846. _mesa_EvalCoord1d( GLdouble u )
  847. {
  848.    EVALCOORD1( (GLfloat) u );
  849. }
  850.  
  851. void GLAPIENTRY
  852. _mesa_Materialf( GLenum face, GLenum pname, GLfloat param )
  853. {
  854.    GLfloat fparam[4];
  855.    fparam[0] = param;
  856.    MATERIALFV( face, pname, fparam );
  857. }
  858.  
  859. void GLAPIENTRY
  860. _mesa_Materiali(GLenum face, GLenum pname, GLint param )
  861. {
  862.    GLfloat p = (GLfloat) param;
  863.    MATERIALFV(face, pname, &p);
  864. }
  865.  
  866. void GLAPIENTRY
  867. _mesa_Materialiv(GLenum face, GLenum pname, const GLint *params )
  868. {
  869.    GLfloat fparam[4];
  870.    switch (pname) {
  871.    case GL_AMBIENT:
  872.    case GL_DIFFUSE:
  873.    case GL_SPECULAR:
  874.    case GL_EMISSION:
  875.    case GL_AMBIENT_AND_DIFFUSE:
  876.       fparam[0] = INT_TO_FLOAT( params[0] );
  877.       fparam[1] = INT_TO_FLOAT( params[1] );
  878.       fparam[2] = INT_TO_FLOAT( params[2] );
  879.       fparam[3] = INT_TO_FLOAT( params[3] );
  880.       break;
  881.    case GL_SHININESS:
  882.       fparam[0] = (GLfloat) params[0];
  883.       break;
  884.    case GL_COLOR_INDEXES:
  885.       fparam[0] = (GLfloat) params[0];
  886.       fparam[1] = (GLfloat) params[1];
  887.       fparam[2] = (GLfloat) params[2];
  888.       break;
  889.    default:
  890.       ;
  891.    }
  892.    MATERIALFV(face, pname, fparam);
  893. }
  894.  
  895.  
  896. void GLAPIENTRY
  897. _mesa_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
  898. {
  899.    RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
  900. }
  901.  
  902. void GLAPIENTRY
  903. _mesa_Rectdv(const GLdouble *v1, const GLdouble *v2)
  904. {
  905.    RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
  906. }
  907.  
  908. void GLAPIENTRY
  909. _mesa_Rectfv(const GLfloat *v1, const GLfloat *v2)
  910. {
  911.    RECTF(v1[0], v1[1], v2[0], v2[1]);
  912. }
  913.  
  914. void GLAPIENTRY
  915. _mesa_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
  916. {
  917.    RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
  918. }
  919.  
  920. void GLAPIENTRY
  921. _mesa_Rectiv(const GLint *v1, const GLint *v2)
  922. {
  923.    RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
  924. }
  925.  
  926. void GLAPIENTRY
  927. _mesa_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
  928. {
  929.    RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
  930. }
  931.  
  932. void GLAPIENTRY
  933. _mesa_Rectsv(const GLshort *v1, const GLshort *v2)
  934. {
  935.    RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
  936. }
  937.  
  938. void GLAPIENTRY
  939. _mesa_SecondaryColor3b( GLbyte red, GLbyte green, GLbyte blue )
  940. {
  941.    SECONDARYCOLORF( BYTE_TO_FLOAT(red),
  942.                     BYTE_TO_FLOAT(green),
  943.                     BYTE_TO_FLOAT(blue) );
  944. }
  945.  
  946. void GLAPIENTRY
  947. _mesa_SecondaryColor3d( GLdouble red, GLdouble green, GLdouble blue )
  948. {
  949.    SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue );
  950. }
  951.  
  952. void GLAPIENTRY
  953. _mesa_SecondaryColor3i( GLint red, GLint green, GLint blue )
  954. {
  955.    SECONDARYCOLORF( INT_TO_FLOAT(red),
  956.                     INT_TO_FLOAT(green),
  957.                     INT_TO_FLOAT(blue));
  958. }
  959.  
  960. void GLAPIENTRY
  961. _mesa_SecondaryColor3s( GLshort red, GLshort green, GLshort blue )
  962. {
  963.    SECONDARYCOLORF(SHORT_TO_FLOAT(red),
  964.                    SHORT_TO_FLOAT(green),
  965.                    SHORT_TO_FLOAT(blue));
  966. }
  967.  
  968. void GLAPIENTRY
  969. _mesa_SecondaryColor3ui( GLuint red, GLuint green, GLuint blue )
  970. {
  971.    SECONDARYCOLORF(UINT_TO_FLOAT(red),
  972.                    UINT_TO_FLOAT(green),
  973.                    UINT_TO_FLOAT(blue));
  974. }
  975.  
  976. void GLAPIENTRY
  977. _mesa_SecondaryColor3us( GLushort red, GLushort green, GLushort blue )
  978. {
  979.    SECONDARYCOLORF(USHORT_TO_FLOAT(red),
  980.                    USHORT_TO_FLOAT(green),
  981.                    USHORT_TO_FLOAT(blue));
  982. }
  983.  
  984. void GLAPIENTRY
  985. _mesa_SecondaryColor3ub( GLubyte red, GLubyte green, GLubyte blue )
  986. {
  987.    SECONDARYCOLORF(UBYTE_TO_FLOAT(red),
  988.                    UBYTE_TO_FLOAT(green),
  989.                    UBYTE_TO_FLOAT(blue));
  990. }
  991.  
  992. void GLAPIENTRY
  993. _mesa_SecondaryColor3bv( const GLbyte *v )
  994. {
  995.    SECONDARYCOLORF(BYTE_TO_FLOAT(v[0]),
  996.                    BYTE_TO_FLOAT(v[1]),
  997.                    BYTE_TO_FLOAT(v[2]));
  998. }
  999.  
  1000. void GLAPIENTRY
  1001. _mesa_SecondaryColor3dv( const GLdouble *v )
  1002. {
  1003.    SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
  1004. }
  1005. void GLAPIENTRY
  1006. _mesa_SecondaryColor3iv( const GLint *v )
  1007. {
  1008.    SECONDARYCOLORF(INT_TO_FLOAT(v[0]),
  1009.                    INT_TO_FLOAT(v[1]),
  1010.                    INT_TO_FLOAT(v[2]));
  1011. }
  1012.  
  1013. void GLAPIENTRY
  1014. _mesa_SecondaryColor3sv( const GLshort *v )
  1015. {
  1016.    SECONDARYCOLORF(SHORT_TO_FLOAT(v[0]),
  1017.                    SHORT_TO_FLOAT(v[1]),
  1018.                    SHORT_TO_FLOAT(v[2]));
  1019. }
  1020.  
  1021. void GLAPIENTRY
  1022. _mesa_SecondaryColor3uiv( const GLuint *v )
  1023. {
  1024.    SECONDARYCOLORF(UINT_TO_FLOAT(v[0]),
  1025.                    UINT_TO_FLOAT(v[1]),
  1026.                    UINT_TO_FLOAT(v[2]));
  1027. }
  1028.  
  1029. void GLAPIENTRY
  1030. _mesa_SecondaryColor3usv( const GLushort *v )
  1031. {
  1032.    SECONDARYCOLORF(USHORT_TO_FLOAT(v[0]),
  1033.                    USHORT_TO_FLOAT(v[1]),
  1034.                    USHORT_TO_FLOAT(v[2]));
  1035. }
  1036.  
  1037. void GLAPIENTRY
  1038. _mesa_SecondaryColor3ubv( const GLubyte *v )
  1039. {
  1040.    SECONDARYCOLORF(UBYTE_TO_FLOAT(v[0]),
  1041.                    UBYTE_TO_FLOAT(v[1]),
  1042.                    UBYTE_TO_FLOAT(v[2]));
  1043. }
  1044.  
  1045.  
  1046. /*
  1047.  * GL_NV_vertex_program:
  1048.  * Always loop-back to one of the VertexAttrib[1234]f[v]NV functions.
  1049.  * Note that attribute indexes DO alias conventional vertex attributes.
  1050.  */
  1051.  
  1052. void GLAPIENTRY
  1053. _mesa_VertexAttrib1sNV(GLuint index, GLshort x)
  1054. {
  1055.    ATTRIB1NV(index, (GLfloat) x);
  1056. }
  1057.  
  1058. void GLAPIENTRY
  1059. _mesa_VertexAttrib1dNV(GLuint index, GLdouble x)
  1060. {
  1061.    ATTRIB1NV(index, (GLfloat) x);
  1062. }
  1063.  
  1064. void GLAPIENTRY
  1065. _mesa_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
  1066. {
  1067.    ATTRIB2NV(index, (GLfloat) x, y);
  1068. }
  1069.  
  1070. void GLAPIENTRY
  1071. _mesa_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
  1072. {
  1073.    ATTRIB2NV(index, (GLfloat) x, (GLfloat) y);
  1074. }
  1075.  
  1076. void GLAPIENTRY
  1077. _mesa_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
  1078. {
  1079.    ATTRIB3NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
  1080. }
  1081.  
  1082. void GLAPIENTRY
  1083. _mesa_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
  1084. {
  1085.    ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
  1086. }
  1087.  
  1088. void GLAPIENTRY
  1089. _mesa_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
  1090. {
  1091.    ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  1092. }
  1093.  
  1094. void GLAPIENTRY
  1095. _mesa_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  1096. {
  1097.    ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  1098. }
  1099.  
  1100. void GLAPIENTRY
  1101. _mesa_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
  1102. {
  1103.    ATTRIB4NV(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
  1104.         UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
  1105. }
  1106.  
  1107. void GLAPIENTRY
  1108. _mesa_VertexAttrib1svNV(GLuint index, const GLshort *v)
  1109. {
  1110.    ATTRIB1NV(index, (GLfloat) v[0]);
  1111. }
  1112.  
  1113. void GLAPIENTRY
  1114. _mesa_VertexAttrib1dvNV(GLuint index, const GLdouble *v)
  1115. {
  1116.    ATTRIB1NV(index, (GLfloat) v[0]);
  1117. }
  1118.  
  1119. void GLAPIENTRY
  1120. _mesa_VertexAttrib2svNV(GLuint index, const GLshort *v)
  1121. {
  1122.    ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
  1123. }
  1124.  
  1125. void GLAPIENTRY
  1126. _mesa_VertexAttrib2dvNV(GLuint index, const GLdouble *v)
  1127. {
  1128.    ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
  1129. }
  1130.  
  1131. void GLAPIENTRY
  1132. _mesa_VertexAttrib3svNV(GLuint index, const GLshort *v)
  1133. {
  1134.    ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  1135. }
  1136.  
  1137. void GLAPIENTRY
  1138. _mesa_VertexAttrib3dvNV(GLuint index, const GLdouble *v)
  1139. {
  1140.    ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  1141. }
  1142.  
  1143. void GLAPIENTRY
  1144. _mesa_VertexAttrib4svNV(GLuint index, const GLshort *v)
  1145. {
  1146.    ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
  1147.           (GLfloat)v[3]);
  1148. }
  1149.  
  1150. void GLAPIENTRY
  1151. _mesa_VertexAttrib4dvNV(GLuint index, const GLdouble *v)
  1152. {
  1153.    ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1154. }
  1155.  
  1156. void GLAPIENTRY
  1157. _mesa_VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
  1158. {
  1159.    ATTRIB4NV(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
  1160.           UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
  1161. }
  1162.  
  1163.  
  1164. void GLAPIENTRY
  1165. _mesa_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v)
  1166. {
  1167.    GLint i;
  1168.    for (i = n - 1; i >= 0; i--)
  1169.       _mesa_VertexAttrib1svNV(index + i, v + i);
  1170. }
  1171.  
  1172. void GLAPIENTRY
  1173. _mesa_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v)
  1174. {
  1175.    GLint i;
  1176.    for (i = n - 1; i >= 0; i--)
  1177.       ATTRIB1NV(index + i, v[i]);
  1178. }
  1179.  
  1180. void GLAPIENTRY
  1181. _mesa_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v)
  1182. {
  1183.    GLint i;
  1184.    for (i = n - 1; i >= 0; i--)
  1185.       _mesa_VertexAttrib1dvNV(index + i, v + i);
  1186. }
  1187.  
  1188. void GLAPIENTRY
  1189. _mesa_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v)
  1190. {
  1191.    GLint i;
  1192.    for (i = n - 1; i >= 0; i--)
  1193.       _mesa_VertexAttrib2svNV(index + i, v + 2 * i);
  1194. }
  1195.  
  1196. void GLAPIENTRY
  1197. _mesa_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v)
  1198. {
  1199.    GLint i;
  1200.    for (i = n - 1; i >= 0; i--)
  1201.       ATTRIB2NV(index + i, v[2 * i], v[2 * i + 1]);
  1202. }
  1203.  
  1204. void GLAPIENTRY
  1205. _mesa_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v)
  1206. {
  1207.    GLint i;
  1208.    for (i = n - 1; i >= 0; i--)
  1209.       _mesa_VertexAttrib2dvNV(index + i, v + 2 * i);
  1210. }
  1211.  
  1212. void GLAPIENTRY
  1213. _mesa_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v)
  1214. {
  1215.    GLint i;
  1216.    for (i = n - 1; i >= 0; i--)
  1217.       _mesa_VertexAttrib3svNV(index + i, v + 3 * i);
  1218. }
  1219.  
  1220. void GLAPIENTRY
  1221. _mesa_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v)
  1222. {
  1223.    GLint i;
  1224.    for (i = n - 1; i >= 0; i--)
  1225.       ATTRIB3NV(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]);
  1226. }
  1227.  
  1228. void GLAPIENTRY
  1229. _mesa_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v)
  1230. {
  1231.    GLint i;
  1232.    for (i = n - 1; i >= 0; i--)
  1233.       _mesa_VertexAttrib3dvNV(index + i, v + 3 * i);
  1234. }
  1235.  
  1236. void GLAPIENTRY
  1237. _mesa_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v)
  1238. {
  1239.    GLint i;
  1240.    for (i = n - 1; i >= 0; i--)
  1241.       _mesa_VertexAttrib4svNV(index + i, v + 4 * i);
  1242. }
  1243.  
  1244. void GLAPIENTRY
  1245. _mesa_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v)
  1246. {
  1247.    GLint i;
  1248.    for (i = n - 1; i >= 0; i--)
  1249.       ATTRIB4NV(index + i, v[4 * i], v[4 * i + 1], v[4 * i + 2], v[4 * i + 3]);
  1250. }
  1251.  
  1252. void GLAPIENTRY
  1253. _mesa_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v)
  1254. {
  1255.    GLint i;
  1256.    for (i = n - 1; i >= 0; i--)
  1257.       _mesa_VertexAttrib4dvNV(index + i, v + 4 * i);
  1258. }
  1259.  
  1260. void GLAPIENTRY
  1261. _mesa_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
  1262. {
  1263.    GLint i;
  1264.    for (i = n - 1; i >= 0; i--)
  1265.       _mesa_VertexAttrib4ubvNV(index + i, v + 4 * i);
  1266. }
  1267.  
  1268.  
  1269. /*
  1270.  * GL_ARB_vertex_program
  1271.  * Always loop-back to one of the VertexAttrib[1234]f[v]ARB functions.
  1272.  * Note that attribute indexes do NOT alias conventional attributes.
  1273.  */
  1274.  
  1275. void GLAPIENTRY
  1276. _mesa_VertexAttrib1s(GLuint index, GLshort x)
  1277. {
  1278.    ATTRIB1ARB(index, (GLfloat) x);
  1279. }
  1280.  
  1281. void GLAPIENTRY
  1282. _mesa_VertexAttrib1d(GLuint index, GLdouble x)
  1283. {
  1284.    ATTRIB1ARB(index, (GLfloat) x);
  1285. }
  1286.  
  1287. void GLAPIENTRY
  1288. _mesa_VertexAttrib2s(GLuint index, GLshort x, GLshort y)
  1289. {
  1290.    ATTRIB2ARB(index, (GLfloat) x, y);
  1291. }
  1292.  
  1293. void GLAPIENTRY
  1294. _mesa_VertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
  1295. {
  1296.    ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
  1297. }
  1298.  
  1299. void GLAPIENTRY
  1300. _mesa_VertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
  1301. {
  1302.    ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
  1303. }
  1304.  
  1305. void GLAPIENTRY
  1306. _mesa_VertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
  1307. {
  1308.    ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
  1309. }
  1310.  
  1311. void GLAPIENTRY
  1312. _mesa_VertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
  1313. {
  1314.    ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  1315. }
  1316.  
  1317. void GLAPIENTRY
  1318. _mesa_VertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  1319. {
  1320.    ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  1321. }
  1322.  
  1323. void GLAPIENTRY
  1324. _mesa_VertexAttrib1sv(GLuint index, const GLshort *v)
  1325. {
  1326.    ATTRIB1ARB(index, (GLfloat) v[0]);
  1327. }
  1328.  
  1329. void GLAPIENTRY
  1330. _mesa_VertexAttrib1dv(GLuint index, const GLdouble *v)
  1331. {
  1332.    ATTRIB1ARB(index, (GLfloat) v[0]);
  1333. }
  1334.  
  1335. void GLAPIENTRY
  1336. _mesa_VertexAttrib2sv(GLuint index, const GLshort *v)
  1337. {
  1338.    ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
  1339. }
  1340.  
  1341. void GLAPIENTRY
  1342. _mesa_VertexAttrib2dv(GLuint index, const GLdouble *v)
  1343. {
  1344.    ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
  1345. }
  1346.  
  1347. void GLAPIENTRY
  1348. _mesa_VertexAttrib3sv(GLuint index, const GLshort *v)
  1349. {
  1350.    ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  1351. }
  1352.  
  1353. void GLAPIENTRY
  1354. _mesa_VertexAttrib3dv(GLuint index, const GLdouble *v)
  1355. {
  1356.    ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  1357. }
  1358.  
  1359. void GLAPIENTRY
  1360. _mesa_VertexAttrib4sv(GLuint index, const GLshort *v)
  1361. {
  1362.    ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
  1363.           (GLfloat)v[3]);
  1364. }
  1365.  
  1366. void GLAPIENTRY
  1367. _mesa_VertexAttrib4dv(GLuint index, const GLdouble *v)
  1368. {
  1369.    ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1370. }
  1371.  
  1372. void GLAPIENTRY
  1373. _mesa_VertexAttrib4bv(GLuint index, const GLbyte * v)
  1374. {
  1375.    ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1376. }
  1377.  
  1378. void GLAPIENTRY
  1379. _mesa_VertexAttrib4iv(GLuint index, const GLint * v)
  1380. {
  1381.    ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1382. }
  1383.  
  1384. void GLAPIENTRY
  1385. _mesa_VertexAttrib4ubv(GLuint index, const GLubyte * v)
  1386. {
  1387.    ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1388. }
  1389.  
  1390. void GLAPIENTRY
  1391. _mesa_VertexAttrib4usv(GLuint index, const GLushort * v)
  1392. {
  1393.    ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1394. }
  1395.  
  1396. void GLAPIENTRY
  1397. _mesa_VertexAttrib4uiv(GLuint index, const GLuint * v)
  1398. {
  1399.    ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1400. }
  1401.  
  1402. void GLAPIENTRY
  1403. _mesa_VertexAttrib4Nbv(GLuint index, const GLbyte * v)
  1404. {
  1405.    ATTRIB4ARB(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
  1406.           BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]));
  1407. }
  1408.  
  1409. void GLAPIENTRY
  1410. _mesa_VertexAttrib4Nsv(GLuint index, const GLshort * v)
  1411. {
  1412.    ATTRIB4ARB(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
  1413.           SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]));
  1414. }
  1415.  
  1416. void GLAPIENTRY
  1417. _mesa_VertexAttrib4Niv(GLuint index, const GLint * v)
  1418. {
  1419.    ATTRIB4ARB(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
  1420.           INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]));
  1421. }
  1422.  
  1423. void GLAPIENTRY
  1424. _mesa_VertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
  1425. {
  1426.    ATTRIB4ARB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
  1427.               UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
  1428. }
  1429.  
  1430. void GLAPIENTRY
  1431. _mesa_VertexAttrib4Nubv(GLuint index, const GLubyte * v)
  1432. {
  1433.    ATTRIB4ARB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
  1434.           UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
  1435. }
  1436.  
  1437. void GLAPIENTRY
  1438. _mesa_VertexAttrib4Nusv(GLuint index, const GLushort * v)
  1439. {
  1440.    ATTRIB4ARB(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
  1441.           USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]));
  1442. }
  1443.  
  1444. void GLAPIENTRY
  1445. _mesa_VertexAttrib4Nuiv(GLuint index, const GLuint * v)
  1446. {
  1447.    ATTRIB4ARB(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
  1448.           UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]));
  1449. }
  1450.  
  1451.  
  1452.  
  1453. /**
  1454.  * GL_EXT_gpu_shader / GL 3.0 signed/unsigned integer-valued attributes.
  1455.  * Note that attribute indexes do NOT alias conventional attributes.
  1456.  */
  1457.  
  1458. void GLAPIENTRY
  1459. _mesa_VertexAttribI1iv(GLuint index, const GLint *v)
  1460. {
  1461.    ATTRIBI_1I(index, v[0]);
  1462. }
  1463.  
  1464. void GLAPIENTRY
  1465. _mesa_VertexAttribI1uiv(GLuint index, const GLuint *v)
  1466. {
  1467.    ATTRIBI_1UI(index, v[0]);
  1468. }
  1469.  
  1470. void GLAPIENTRY
  1471. _mesa_VertexAttribI4bv(GLuint index, const GLbyte *v)
  1472. {
  1473.    ATTRIBI_4I(index, v[0], v[1], v[2], v[3]);
  1474. }
  1475.  
  1476. void GLAPIENTRY
  1477. _mesa_VertexAttribI4sv(GLuint index, const GLshort *v)
  1478. {
  1479.    ATTRIBI_4I(index, v[0], v[1], v[2], v[3]);
  1480. }
  1481.  
  1482. void GLAPIENTRY
  1483. _mesa_VertexAttribI4ubv(GLuint index, const GLubyte *v)
  1484. {
  1485.    ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
  1486. }
  1487.  
  1488. void GLAPIENTRY
  1489. _mesa_VertexAttribI4usv(GLuint index, const GLushort *v)
  1490. {
  1491.    ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
  1492. }
  1493.  
  1494.  
  1495.  
  1496.  
  1497. /*
  1498.  * This code never registers handlers for any of the entry points
  1499.  * listed in vtxfmt.h.
  1500.  */
  1501. void
  1502. _mesa_loopback_init_api_table(const struct gl_context *ctx,
  1503.                               struct _glapi_table *dest)
  1504. {
  1505.    if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
  1506.       SET_Color4ub(dest, _mesa_Color4ub);
  1507.       SET_Materialf(dest, _mesa_Materialf);
  1508.    }
  1509.    if (ctx->API == API_OPENGL_COMPAT) {
  1510.       SET_Color3b(dest, _mesa_Color3b);
  1511.       SET_Color3d(dest, _mesa_Color3d);
  1512.       SET_Color3i(dest, _mesa_Color3i);
  1513.       SET_Color3s(dest, _mesa_Color3s);
  1514.       SET_Color3ui(dest, _mesa_Color3ui);
  1515.       SET_Color3us(dest, _mesa_Color3us);
  1516.       SET_Color3ub(dest, _mesa_Color3ub);
  1517.       SET_Color4b(dest, _mesa_Color4b);
  1518.       SET_Color4d(dest, _mesa_Color4d);
  1519.       SET_Color4i(dest, _mesa_Color4i);
  1520.       SET_Color4s(dest, _mesa_Color4s);
  1521.       SET_Color4ui(dest, _mesa_Color4ui);
  1522.       SET_Color4us(dest, _mesa_Color4us);
  1523.       SET_Color3bv(dest, _mesa_Color3bv);
  1524.       SET_Color3dv(dest, _mesa_Color3dv);
  1525.       SET_Color3iv(dest, _mesa_Color3iv);
  1526.       SET_Color3sv(dest, _mesa_Color3sv);
  1527.       SET_Color3uiv(dest, _mesa_Color3uiv);
  1528.       SET_Color3usv(dest, _mesa_Color3usv);
  1529.       SET_Color3ubv(dest, _mesa_Color3ubv);
  1530.       SET_Color4bv(dest, _mesa_Color4bv);
  1531.       SET_Color4dv(dest, _mesa_Color4dv);
  1532.       SET_Color4iv(dest, _mesa_Color4iv);
  1533.       SET_Color4sv(dest, _mesa_Color4sv);
  1534.       SET_Color4uiv(dest, _mesa_Color4uiv);
  1535.       SET_Color4usv(dest, _mesa_Color4usv);
  1536.       SET_Color4ubv(dest, _mesa_Color4ubv);
  1537.  
  1538.       SET_SecondaryColor3b(dest, _mesa_SecondaryColor3b);
  1539.       SET_SecondaryColor3d(dest, _mesa_SecondaryColor3d);
  1540.       SET_SecondaryColor3i(dest, _mesa_SecondaryColor3i);
  1541.       SET_SecondaryColor3s(dest, _mesa_SecondaryColor3s);
  1542.       SET_SecondaryColor3ui(dest, _mesa_SecondaryColor3ui);
  1543.       SET_SecondaryColor3us(dest, _mesa_SecondaryColor3us);
  1544.       SET_SecondaryColor3ub(dest, _mesa_SecondaryColor3ub);
  1545.       SET_SecondaryColor3bv(dest, _mesa_SecondaryColor3bv);
  1546.       SET_SecondaryColor3dv(dest, _mesa_SecondaryColor3dv);
  1547.       SET_SecondaryColor3iv(dest, _mesa_SecondaryColor3iv);
  1548.       SET_SecondaryColor3sv(dest, _mesa_SecondaryColor3sv);
  1549.       SET_SecondaryColor3uiv(dest, _mesa_SecondaryColor3uiv);
  1550.       SET_SecondaryColor3usv(dest, _mesa_SecondaryColor3usv);
  1551.       SET_SecondaryColor3ubv(dest, _mesa_SecondaryColor3ubv);
  1552.      
  1553.       SET_EdgeFlagv(dest, _mesa_EdgeFlagv);
  1554.  
  1555.       SET_Indexd(dest, _mesa_Indexd);
  1556.       SET_Indexi(dest, _mesa_Indexi);
  1557.       SET_Indexs(dest, _mesa_Indexs);
  1558.       SET_Indexub(dest, _mesa_Indexub);
  1559.       SET_Indexdv(dest, _mesa_Indexdv);
  1560.       SET_Indexiv(dest, _mesa_Indexiv);
  1561.       SET_Indexsv(dest, _mesa_Indexsv);
  1562.       SET_Indexubv(dest, _mesa_Indexubv);
  1563.       SET_Normal3b(dest, _mesa_Normal3b);
  1564.       SET_Normal3d(dest, _mesa_Normal3d);
  1565.       SET_Normal3i(dest, _mesa_Normal3i);
  1566.       SET_Normal3s(dest, _mesa_Normal3s);
  1567.       SET_Normal3bv(dest, _mesa_Normal3bv);
  1568.       SET_Normal3dv(dest, _mesa_Normal3dv);
  1569.       SET_Normal3iv(dest, _mesa_Normal3iv);
  1570.       SET_Normal3sv(dest, _mesa_Normal3sv);
  1571.       SET_TexCoord1d(dest, _mesa_TexCoord1d);
  1572.       SET_TexCoord1i(dest, _mesa_TexCoord1i);
  1573.       SET_TexCoord1s(dest, _mesa_TexCoord1s);
  1574.       SET_TexCoord2d(dest, _mesa_TexCoord2d);
  1575.       SET_TexCoord2s(dest, _mesa_TexCoord2s);
  1576.       SET_TexCoord2i(dest, _mesa_TexCoord2i);
  1577.       SET_TexCoord3d(dest, _mesa_TexCoord3d);
  1578.       SET_TexCoord3i(dest, _mesa_TexCoord3i);
  1579.       SET_TexCoord3s(dest, _mesa_TexCoord3s);
  1580.       SET_TexCoord4d(dest, _mesa_TexCoord4d);
  1581.       SET_TexCoord4i(dest, _mesa_TexCoord4i);
  1582.       SET_TexCoord4s(dest, _mesa_TexCoord4s);
  1583.       SET_TexCoord1dv(dest, _mesa_TexCoord1dv);
  1584.       SET_TexCoord1iv(dest, _mesa_TexCoord1iv);
  1585.       SET_TexCoord1sv(dest, _mesa_TexCoord1sv);
  1586.       SET_TexCoord2dv(dest, _mesa_TexCoord2dv);
  1587.       SET_TexCoord2iv(dest, _mesa_TexCoord2iv);
  1588.       SET_TexCoord2sv(dest, _mesa_TexCoord2sv);
  1589.       SET_TexCoord3dv(dest, _mesa_TexCoord3dv);
  1590.       SET_TexCoord3iv(dest, _mesa_TexCoord3iv);
  1591.       SET_TexCoord3sv(dest, _mesa_TexCoord3sv);
  1592.       SET_TexCoord4dv(dest, _mesa_TexCoord4dv);
  1593.       SET_TexCoord4iv(dest, _mesa_TexCoord4iv);
  1594.       SET_TexCoord4sv(dest, _mesa_TexCoord4sv);
  1595.       SET_Vertex2d(dest, _mesa_Vertex2d);
  1596.       SET_Vertex2i(dest, _mesa_Vertex2i);
  1597.       SET_Vertex2s(dest, _mesa_Vertex2s);
  1598.       SET_Vertex3d(dest, _mesa_Vertex3d);
  1599.       SET_Vertex3i(dest, _mesa_Vertex3i);
  1600.       SET_Vertex3s(dest, _mesa_Vertex3s);
  1601.       SET_Vertex4d(dest, _mesa_Vertex4d);
  1602.       SET_Vertex4i(dest, _mesa_Vertex4i);
  1603.       SET_Vertex4s(dest, _mesa_Vertex4s);
  1604.       SET_Vertex2dv(dest, _mesa_Vertex2dv);
  1605.       SET_Vertex2iv(dest, _mesa_Vertex2iv);
  1606.       SET_Vertex2sv(dest, _mesa_Vertex2sv);
  1607.       SET_Vertex3dv(dest, _mesa_Vertex3dv);
  1608.       SET_Vertex3iv(dest, _mesa_Vertex3iv);
  1609.       SET_Vertex3sv(dest, _mesa_Vertex3sv);
  1610.       SET_Vertex4dv(dest, _mesa_Vertex4dv);
  1611.       SET_Vertex4iv(dest, _mesa_Vertex4iv);
  1612.       SET_Vertex4sv(dest, _mesa_Vertex4sv);
  1613.       SET_MultiTexCoord1d(dest, _mesa_MultiTexCoord1d);
  1614.       SET_MultiTexCoord1dv(dest, _mesa_MultiTexCoord1dv);
  1615.       SET_MultiTexCoord1i(dest, _mesa_MultiTexCoord1i);
  1616.       SET_MultiTexCoord1iv(dest, _mesa_MultiTexCoord1iv);
  1617.       SET_MultiTexCoord1s(dest, _mesa_MultiTexCoord1s);
  1618.       SET_MultiTexCoord1sv(dest, _mesa_MultiTexCoord1sv);
  1619.       SET_MultiTexCoord2d(dest, _mesa_MultiTexCoord2d);
  1620.       SET_MultiTexCoord2dv(dest, _mesa_MultiTexCoord2dv);
  1621.       SET_MultiTexCoord2i(dest, _mesa_MultiTexCoord2i);
  1622.       SET_MultiTexCoord2iv(dest, _mesa_MultiTexCoord2iv);
  1623.       SET_MultiTexCoord2s(dest, _mesa_MultiTexCoord2s);
  1624.       SET_MultiTexCoord2sv(dest, _mesa_MultiTexCoord2sv);
  1625.       SET_MultiTexCoord3d(dest, _mesa_MultiTexCoord3d);
  1626.       SET_MultiTexCoord3dv(dest, _mesa_MultiTexCoord3dv);
  1627.       SET_MultiTexCoord3i(dest, _mesa_MultiTexCoord3i);
  1628.       SET_MultiTexCoord3iv(dest, _mesa_MultiTexCoord3iv);
  1629.       SET_MultiTexCoord3s(dest, _mesa_MultiTexCoord3s);
  1630.       SET_MultiTexCoord3sv(dest, _mesa_MultiTexCoord3sv);
  1631.       SET_MultiTexCoord4d(dest, _mesa_MultiTexCoord4d);
  1632.       SET_MultiTexCoord4dv(dest, _mesa_MultiTexCoord4dv);
  1633.       SET_MultiTexCoord4i(dest, _mesa_MultiTexCoord4i);
  1634.       SET_MultiTexCoord4iv(dest, _mesa_MultiTexCoord4iv);
  1635.       SET_MultiTexCoord4s(dest, _mesa_MultiTexCoord4s);
  1636.       SET_MultiTexCoord4sv(dest, _mesa_MultiTexCoord4sv);
  1637.       SET_EvalCoord2dv(dest, _mesa_EvalCoord2dv);
  1638.       SET_EvalCoord2fv(dest, _mesa_EvalCoord2fv);
  1639.       SET_EvalCoord2d(dest, _mesa_EvalCoord2d);
  1640.       SET_EvalCoord1dv(dest, _mesa_EvalCoord1dv);
  1641.       SET_EvalCoord1fv(dest, _mesa_EvalCoord1fv);
  1642.       SET_EvalCoord1d(dest, _mesa_EvalCoord1d);
  1643.       SET_Materiali(dest, _mesa_Materiali);
  1644.       SET_Materialiv(dest, _mesa_Materialiv);
  1645.       SET_Rectd(dest, _mesa_Rectd);
  1646.       SET_Rectdv(dest, _mesa_Rectdv);
  1647.       SET_Rectfv(dest, _mesa_Rectfv);
  1648.       SET_Recti(dest, _mesa_Recti);
  1649.       SET_Rectiv(dest, _mesa_Rectiv);
  1650.       SET_Rects(dest, _mesa_Rects);
  1651.       SET_Rectsv(dest, _mesa_Rectsv);
  1652.       SET_FogCoordd(dest, _mesa_FogCoordd);
  1653.       SET_FogCoorddv(dest, _mesa_FogCoorddv);
  1654.    }
  1655.  
  1656.    if (ctx->API == API_OPENGL_COMPAT) {
  1657.       SET_VertexAttrib1sNV(dest, _mesa_VertexAttrib1sNV);
  1658.       SET_VertexAttrib1dNV(dest, _mesa_VertexAttrib1dNV);
  1659.       SET_VertexAttrib2sNV(dest, _mesa_VertexAttrib2sNV);
  1660.       SET_VertexAttrib2dNV(dest, _mesa_VertexAttrib2dNV);
  1661.       SET_VertexAttrib3sNV(dest, _mesa_VertexAttrib3sNV);
  1662.       SET_VertexAttrib3dNV(dest, _mesa_VertexAttrib3dNV);
  1663.       SET_VertexAttrib4sNV(dest, _mesa_VertexAttrib4sNV);
  1664.       SET_VertexAttrib4dNV(dest, _mesa_VertexAttrib4dNV);
  1665.       SET_VertexAttrib4ubNV(dest, _mesa_VertexAttrib4ubNV);
  1666.       SET_VertexAttrib1svNV(dest, _mesa_VertexAttrib1svNV);
  1667.       SET_VertexAttrib1dvNV(dest, _mesa_VertexAttrib1dvNV);
  1668.       SET_VertexAttrib2svNV(dest, _mesa_VertexAttrib2svNV);
  1669.       SET_VertexAttrib2dvNV(dest, _mesa_VertexAttrib2dvNV);
  1670.       SET_VertexAttrib3svNV(dest, _mesa_VertexAttrib3svNV);
  1671.       SET_VertexAttrib3dvNV(dest, _mesa_VertexAttrib3dvNV);
  1672.       SET_VertexAttrib4svNV(dest, _mesa_VertexAttrib4svNV);
  1673.       SET_VertexAttrib4dvNV(dest, _mesa_VertexAttrib4dvNV);
  1674.       SET_VertexAttrib4ubvNV(dest, _mesa_VertexAttrib4ubvNV);
  1675.       SET_VertexAttribs1svNV(dest, _mesa_VertexAttribs1svNV);
  1676.       SET_VertexAttribs1fvNV(dest, _mesa_VertexAttribs1fvNV);
  1677.       SET_VertexAttribs1dvNV(dest, _mesa_VertexAttribs1dvNV);
  1678.       SET_VertexAttribs2svNV(dest, _mesa_VertexAttribs2svNV);
  1679.       SET_VertexAttribs2fvNV(dest, _mesa_VertexAttribs2fvNV);
  1680.       SET_VertexAttribs2dvNV(dest, _mesa_VertexAttribs2dvNV);
  1681.       SET_VertexAttribs3svNV(dest, _mesa_VertexAttribs3svNV);
  1682.       SET_VertexAttribs3fvNV(dest, _mesa_VertexAttribs3fvNV);
  1683.       SET_VertexAttribs3dvNV(dest, _mesa_VertexAttribs3dvNV);
  1684.       SET_VertexAttribs4svNV(dest, _mesa_VertexAttribs4svNV);
  1685.       SET_VertexAttribs4fvNV(dest, _mesa_VertexAttribs4fvNV);
  1686.       SET_VertexAttribs4dvNV(dest, _mesa_VertexAttribs4dvNV);
  1687.       SET_VertexAttribs4ubvNV(dest, _mesa_VertexAttribs4ubvNV);
  1688.    }
  1689.  
  1690.    if (_mesa_is_desktop_gl(ctx)) {
  1691.       SET_VertexAttrib1s(dest, _mesa_VertexAttrib1s);
  1692.       SET_VertexAttrib1d(dest, _mesa_VertexAttrib1d);
  1693.       SET_VertexAttrib2s(dest, _mesa_VertexAttrib2s);
  1694.       SET_VertexAttrib2d(dest, _mesa_VertexAttrib2d);
  1695.       SET_VertexAttrib3s(dest, _mesa_VertexAttrib3s);
  1696.       SET_VertexAttrib3d(dest, _mesa_VertexAttrib3d);
  1697.       SET_VertexAttrib4s(dest, _mesa_VertexAttrib4s);
  1698.       SET_VertexAttrib4d(dest, _mesa_VertexAttrib4d);
  1699.       SET_VertexAttrib1sv(dest, _mesa_VertexAttrib1sv);
  1700.       SET_VertexAttrib1dv(dest, _mesa_VertexAttrib1dv);
  1701.       SET_VertexAttrib2sv(dest, _mesa_VertexAttrib2sv);
  1702.       SET_VertexAttrib2dv(dest, _mesa_VertexAttrib2dv);
  1703.       SET_VertexAttrib3sv(dest, _mesa_VertexAttrib3sv);
  1704.       SET_VertexAttrib3dv(dest, _mesa_VertexAttrib3dv);
  1705.       SET_VertexAttrib4sv(dest, _mesa_VertexAttrib4sv);
  1706.       SET_VertexAttrib4dv(dest, _mesa_VertexAttrib4dv);
  1707.       SET_VertexAttrib4Nub(dest, _mesa_VertexAttrib4Nub);
  1708.       SET_VertexAttrib4Nubv(dest, _mesa_VertexAttrib4Nubv);
  1709.       SET_VertexAttrib4bv(dest, _mesa_VertexAttrib4bv);
  1710.       SET_VertexAttrib4iv(dest, _mesa_VertexAttrib4iv);
  1711.       SET_VertexAttrib4ubv(dest, _mesa_VertexAttrib4ubv);
  1712.       SET_VertexAttrib4usv(dest, _mesa_VertexAttrib4usv);
  1713.       SET_VertexAttrib4uiv(dest, _mesa_VertexAttrib4uiv);
  1714.       SET_VertexAttrib4Nbv(dest, _mesa_VertexAttrib4Nbv);
  1715.       SET_VertexAttrib4Nsv(dest, _mesa_VertexAttrib4Nsv);
  1716.       SET_VertexAttrib4Nusv(dest, _mesa_VertexAttrib4Nusv);
  1717.       SET_VertexAttrib4Niv(dest, _mesa_VertexAttrib4Niv);
  1718.       SET_VertexAttrib4Nuiv(dest, _mesa_VertexAttrib4Nuiv);
  1719.  
  1720.       /* GL_EXT_gpu_shader4, GL 3.0 */
  1721.       SET_VertexAttribI1iv(dest, _mesa_VertexAttribI1iv);
  1722.       SET_VertexAttribI1uiv(dest, _mesa_VertexAttribI1uiv);
  1723.       SET_VertexAttribI4bv(dest, _mesa_VertexAttribI4bv);
  1724.       SET_VertexAttribI4sv(dest, _mesa_VertexAttribI4sv);
  1725.       SET_VertexAttribI4ubv(dest, _mesa_VertexAttribI4ubv);
  1726.       SET_VertexAttribI4usv(dest, _mesa_VertexAttribI4usv);
  1727.    }
  1728. }
  1729.