Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3621 lines
98 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: dl_lcomp.c
  3. *
  4. * Display list compilation routines.
  5. *
  6. * Created: 12-24-1995
  7. * Author: Hock San Lee [hockl]
  8. *
  9. * Copyright (c) 1995-96 Microsoft Corporation
  10. \**************************************************************************/
  11. /*
  12. ** Copyright 1992, Silicon Graphics, Inc.
  13. ** All Rights Reserved.
  14. **
  15. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  16. ** the contents of this file may not be disclosed to third parties, copied or
  17. ** duplicated in any form, in whole or in part, without the prior written
  18. ** permission of Silicon Graphics, Inc.
  19. **
  20. ** RESTRICTED RIGHTS LEGEND:
  21. ** Use, duplication or disclosure by the Government is subject to restrictions
  22. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  23. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  24. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  25. ** rights reserved under the Copyright Laws of the United States.
  26. */
  27. #include "precomp.h"
  28. #pragma hdrstop
  29. /*
  30. ** Compilation routines for building display lists for all of the basic
  31. ** OpenGL commands. These were automatically generated at one point,
  32. ** but now the basic format has stabilized, and we make minor changes to
  33. ** individual routines from time to time.
  34. */
  35. /***************************************************************************/
  36. // Color functions.
  37. // Compile only Color3ub, Color3f, Color4ub, and Color4f functions.
  38. // Convert the other functions to one of the compiled Color functions.
  39. void APIENTRY
  40. __gllc_Color3ub ( IN GLubyte red, IN GLubyte green, IN GLubyte blue )
  41. {
  42. struct __gllc_Color3ubv_Rec *data;
  43. __GL_SETUP();
  44. // If we are compiling poly array primitive, update the poly data record.
  45. if (gc->dlist.beginRec)
  46. {
  47. (*gc->savedCltProcTable.glDispatchTable.glColor3ub)(red, green, blue);
  48. // Record "otherColor" here
  49. if (gc->modes.colorIndexMode)
  50. {
  51. gc->dlist.beginRec->flags |= DLIST_BEGIN_HAS_OTHER_COLOR;
  52. gc->dlist.beginRec->otherColor = gc->paTeb->otherColor;
  53. }
  54. return;
  55. }
  56. data = (struct __gllc_Color3ubv_Rec *)
  57. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Color3ubv_Rec)),
  58. DLIST_GENERIC_OP(Color3ubv));
  59. if (data == NULL) return;
  60. data->v[0] = red;
  61. data->v[1] = green;
  62. data->v[2] = blue;
  63. #ifndef NT
  64. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_COLOR;
  65. #endif
  66. __glDlistAppendOp(gc, data, __glle_Color3ubv);
  67. }
  68. void APIENTRY
  69. __gllc_Color3ubv ( IN const GLubyte v[3] )
  70. {
  71. __gllc_Color3ub(v[0], v[1], v[2]);
  72. }
  73. void APIENTRY
  74. __gllc_Color3f ( IN GLfloat red, IN GLfloat green, IN GLfloat blue )
  75. {
  76. struct __gllc_Color3fv_Rec *data;
  77. __GL_SETUP();
  78. // If we are compiling poly array primitive, update the poly data record.
  79. if (gc->dlist.beginRec)
  80. {
  81. (*gc->savedCltProcTable.glDispatchTable.glColor3f)(red, green, blue);
  82. // Record "otherColor" here
  83. if (gc->modes.colorIndexMode)
  84. {
  85. gc->dlist.beginRec->flags |= DLIST_BEGIN_HAS_OTHER_COLOR;
  86. gc->dlist.beginRec->otherColor = gc->paTeb->otherColor;
  87. }
  88. return;
  89. }
  90. data = (struct __gllc_Color3fv_Rec *)
  91. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Color3fv_Rec)),
  92. DLIST_GENERIC_OP(Color3fv));
  93. if (data == NULL) return;
  94. data->v[0] = red;
  95. data->v[1] = green;
  96. data->v[2] = blue;
  97. #ifndef NT
  98. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_COLOR;
  99. #endif
  100. __glDlistAppendOp(gc, data, __glle_Color3fv);
  101. }
  102. void APIENTRY
  103. __gllc_Color3fv ( IN const GLfloat v[3] )
  104. {
  105. __gllc_Color3f(v[0], v[1], v[2]);
  106. }
  107. void APIENTRY
  108. __gllc_Color3b ( IN GLbyte red, IN GLbyte green, IN GLbyte blue )
  109. {
  110. __gllc_Color3f(__GL_B_TO_FLOAT(red), __GL_B_TO_FLOAT(green),
  111. __GL_B_TO_FLOAT(blue));
  112. }
  113. void APIENTRY
  114. __gllc_Color3bv ( IN const GLbyte v[3] )
  115. {
  116. __gllc_Color3f(__GL_B_TO_FLOAT(v[0]), __GL_B_TO_FLOAT(v[1]),
  117. __GL_B_TO_FLOAT(v[2]));
  118. }
  119. void APIENTRY
  120. __gllc_Color3d ( IN GLdouble red, IN GLdouble green, IN GLdouble blue )
  121. {
  122. __gllc_Color3f((GLfloat) red, (GLfloat) green, (GLfloat) blue);
  123. }
  124. void APIENTRY
  125. __gllc_Color3dv ( IN const GLdouble v[3] )
  126. {
  127. __gllc_Color3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  128. }
  129. void APIENTRY
  130. __gllc_Color3i ( IN GLint red, IN GLint green, IN GLint blue )
  131. {
  132. __gllc_Color3f(__GL_I_TO_FLOAT(red), __GL_I_TO_FLOAT(green),
  133. __GL_I_TO_FLOAT(blue));
  134. }
  135. void APIENTRY
  136. __gllc_Color3iv ( IN const GLint v[3] )
  137. {
  138. __gllc_Color3f(__GL_I_TO_FLOAT(v[0]), __GL_I_TO_FLOAT(v[1]),
  139. __GL_I_TO_FLOAT(v[2]));
  140. }
  141. void APIENTRY
  142. __gllc_Color3s ( IN GLshort red, IN GLshort green, IN GLshort blue )
  143. {
  144. __gllc_Color3f(__GL_S_TO_FLOAT(red), __GL_S_TO_FLOAT(green),
  145. __GL_S_TO_FLOAT(blue));
  146. }
  147. void APIENTRY
  148. __gllc_Color3sv ( IN const GLshort v[3] )
  149. {
  150. __gllc_Color3f(__GL_S_TO_FLOAT(v[0]), __GL_S_TO_FLOAT(v[1]),
  151. __GL_S_TO_FLOAT(v[2]));
  152. }
  153. void APIENTRY
  154. __gllc_Color3ui ( IN GLuint red, IN GLuint green, IN GLuint blue )
  155. {
  156. __gllc_Color3f(__GL_UI_TO_FLOAT(red), __GL_UI_TO_FLOAT(green),
  157. __GL_UI_TO_FLOAT(blue));
  158. }
  159. void APIENTRY
  160. __gllc_Color3uiv ( IN const GLuint v[3] )
  161. {
  162. __gllc_Color3f(__GL_UI_TO_FLOAT(v[0]), __GL_UI_TO_FLOAT(v[1]),
  163. __GL_UI_TO_FLOAT(v[2]));
  164. }
  165. void APIENTRY
  166. __gllc_Color3us ( IN GLushort red, IN GLushort green, IN GLushort blue )
  167. {
  168. __gllc_Color3f(__GL_US_TO_FLOAT(red), __GL_US_TO_FLOAT(green),
  169. __GL_US_TO_FLOAT(blue));
  170. }
  171. void APIENTRY
  172. __gllc_Color3usv ( IN const GLushort v[3] )
  173. {
  174. __gllc_Color3f(__GL_US_TO_FLOAT(v[0]), __GL_US_TO_FLOAT(v[1]),
  175. __GL_US_TO_FLOAT(v[2]));
  176. }
  177. void APIENTRY
  178. __gllc_Color4ub ( IN GLubyte red, IN GLubyte green, IN GLubyte blue, IN GLubyte alpha )
  179. {
  180. struct __gllc_Color4ubv_Rec *data;
  181. __GL_SETUP();
  182. // If we are compiling poly array primitive, update the poly data record.
  183. if (gc->dlist.beginRec)
  184. {
  185. (*gc->savedCltProcTable.glDispatchTable.glColor4ub)(red, green, blue, alpha);
  186. // Record "otherColor" here
  187. if (gc->modes.colorIndexMode)
  188. {
  189. gc->dlist.beginRec->flags |= DLIST_BEGIN_HAS_OTHER_COLOR;
  190. gc->dlist.beginRec->otherColor = gc->paTeb->otherColor;
  191. }
  192. return;
  193. }
  194. data = (struct __gllc_Color4ubv_Rec *)
  195. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Color4ubv_Rec)),
  196. DLIST_GENERIC_OP(Color4ubv));
  197. if (data == NULL) return;
  198. data->v[0] = red;
  199. data->v[1] = green;
  200. data->v[2] = blue;
  201. data->v[3] = alpha;
  202. #ifndef NT
  203. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_COLOR;
  204. #endif
  205. __glDlistAppendOp(gc, data, __glle_Color4ubv);
  206. }
  207. void APIENTRY
  208. __gllc_Color4ubv ( IN const GLubyte v[4] )
  209. {
  210. __gllc_Color4ub(v[0], v[1], v[2], v[3]);
  211. }
  212. void APIENTRY
  213. __gllc_Color4f ( IN GLfloat red, IN GLfloat green, IN GLfloat blue, IN GLfloat alpha )
  214. {
  215. struct __gllc_Color4fv_Rec *data;
  216. __GL_SETUP();
  217. // If we are compiling poly array primitive, update the poly data record.
  218. if (gc->dlist.beginRec)
  219. {
  220. (*gc->savedCltProcTable.glDispatchTable.glColor4f)(red, green, blue, alpha);
  221. // Record "otherColor" here
  222. if (gc->modes.colorIndexMode)
  223. {
  224. gc->dlist.beginRec->flags |= DLIST_BEGIN_HAS_OTHER_COLOR;
  225. gc->dlist.beginRec->otherColor = gc->paTeb->otherColor;
  226. }
  227. return;
  228. }
  229. data = (struct __gllc_Color4fv_Rec *)
  230. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Color4fv_Rec)),
  231. DLIST_GENERIC_OP(Color4fv));
  232. if (data == NULL) return;
  233. data->v[0] = red;
  234. data->v[1] = green;
  235. data->v[2] = blue;
  236. data->v[3] = alpha;
  237. #ifndef NT
  238. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_COLOR;
  239. #endif
  240. __glDlistAppendOp(gc, data, __glle_Color4fv);
  241. }
  242. void APIENTRY
  243. __gllc_Color4fv ( IN const GLfloat v[4] )
  244. {
  245. __gllc_Color4f(v[0], v[1], v[2], v[3]);
  246. }
  247. void APIENTRY
  248. __gllc_Color4b ( IN GLbyte red, IN GLbyte green, IN GLbyte blue, IN GLbyte alpha )
  249. {
  250. __gllc_Color4f(__GL_B_TO_FLOAT(red), __GL_B_TO_FLOAT(green),
  251. __GL_B_TO_FLOAT(blue), __GL_B_TO_FLOAT(alpha));
  252. }
  253. void APIENTRY
  254. __gllc_Color4bv ( IN const GLbyte v[4] )
  255. {
  256. __gllc_Color4f(__GL_B_TO_FLOAT(v[0]), __GL_B_TO_FLOAT(v[1]),
  257. __GL_B_TO_FLOAT(v[2]), __GL_B_TO_FLOAT(v[3]));
  258. }
  259. void APIENTRY
  260. __gllc_Color4d ( IN GLdouble red, IN GLdouble green, IN GLdouble blue, IN GLdouble alpha )
  261. {
  262. __gllc_Color4f((GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha);
  263. }
  264. void APIENTRY
  265. __gllc_Color4dv ( IN const GLdouble v[4] )
  266. {
  267. __gllc_Color4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  268. }
  269. void APIENTRY
  270. __gllc_Color4i ( IN GLint red, IN GLint green, IN GLint blue, IN GLint alpha )
  271. {
  272. __gllc_Color4f(__GL_I_TO_FLOAT(red), __GL_I_TO_FLOAT(green),
  273. __GL_I_TO_FLOAT(blue), __GL_I_TO_FLOAT(alpha));
  274. }
  275. void APIENTRY
  276. __gllc_Color4iv ( IN const GLint v[4] )
  277. {
  278. __gllc_Color4f(__GL_I_TO_FLOAT(v[0]), __GL_I_TO_FLOAT(v[1]),
  279. __GL_I_TO_FLOAT(v[2]), __GL_I_TO_FLOAT(v[3]));
  280. }
  281. void APIENTRY
  282. __gllc_Color4s ( IN GLshort red, IN GLshort green, IN GLshort blue, IN GLshort alpha )
  283. {
  284. __gllc_Color4f(__GL_S_TO_FLOAT(red), __GL_S_TO_FLOAT(green),
  285. __GL_S_TO_FLOAT(blue), __GL_S_TO_FLOAT(alpha));
  286. }
  287. void APIENTRY
  288. __gllc_Color4sv ( IN const GLshort v[4] )
  289. {
  290. __gllc_Color4f(__GL_S_TO_FLOAT(v[0]), __GL_S_TO_FLOAT(v[1]),
  291. __GL_S_TO_FLOAT(v[2]), __GL_S_TO_FLOAT(v[3]));
  292. }
  293. void APIENTRY
  294. __gllc_Color4ui ( IN GLuint red, IN GLuint green, IN GLuint blue, IN GLuint alpha )
  295. {
  296. __gllc_Color4f(__GL_UI_TO_FLOAT(red), __GL_UI_TO_FLOAT(green),
  297. __GL_UI_TO_FLOAT(blue), __GL_UI_TO_FLOAT(alpha));
  298. }
  299. void APIENTRY
  300. __gllc_Color4uiv ( IN const GLuint v[4] )
  301. {
  302. __gllc_Color4f(__GL_UI_TO_FLOAT(v[0]), __GL_UI_TO_FLOAT(v[1]),
  303. __GL_UI_TO_FLOAT(v[2]), __GL_UI_TO_FLOAT(v[3]));
  304. }
  305. void APIENTRY
  306. __gllc_Color4us ( IN GLushort red, IN GLushort green, IN GLushort blue, IN GLushort alpha )
  307. {
  308. __gllc_Color4f(__GL_US_TO_FLOAT(red), __GL_US_TO_FLOAT(green),
  309. __GL_US_TO_FLOAT(blue), __GL_US_TO_FLOAT(alpha));
  310. }
  311. void APIENTRY
  312. __gllc_Color4usv ( IN const GLushort v[4] )
  313. {
  314. __gllc_Color4f(__GL_US_TO_FLOAT(v[0]), __GL_US_TO_FLOAT(v[1]),
  315. __GL_US_TO_FLOAT(v[2]), __GL_US_TO_FLOAT(v[3]));
  316. }
  317. /***************************************************************************/
  318. // EdgeFlag functions.
  319. // Compile only EdgeFlag function.
  320. // Convert the other function to the compiled EdgeFlag function.
  321. void APIENTRY
  322. __gllc_EdgeFlag ( IN GLboolean flag )
  323. {
  324. struct __gllc_EdgeFlag_Rec *data;
  325. __GL_SETUP();
  326. // If we are compiling poly array primitive, update the poly data record.
  327. if (gc->dlist.beginRec)
  328. {
  329. (*gc->savedCltProcTable.glDispatchTable.glEdgeFlag)(flag);
  330. return;
  331. }
  332. data = (struct __gllc_EdgeFlag_Rec *)
  333. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_EdgeFlag_Rec)),
  334. DLIST_GENERIC_OP(EdgeFlag));
  335. if (data == NULL) return;
  336. data->flag = flag;
  337. __glDlistAppendOp(gc, data, __glle_EdgeFlag);
  338. }
  339. void APIENTRY
  340. __gllc_EdgeFlagv ( IN const GLboolean flag[1] )
  341. {
  342. __gllc_EdgeFlag(flag[0]);
  343. }
  344. /***************************************************************************/
  345. // Index functions.
  346. // Compile only Indexf function.
  347. // Convert the other functions to the compiled Indexf function.
  348. void APIENTRY
  349. __gllc_Indexf ( IN GLfloat c )
  350. {
  351. struct __gllc_Indexf_Rec *data;
  352. __GL_SETUP();
  353. // If we are compiling poly array primitive, update the poly data record.
  354. if (gc->dlist.beginRec)
  355. {
  356. (*gc->savedCltProcTable.glDispatchTable.glIndexf)(c);
  357. // Record "otherColor" here
  358. if (!gc->modes.colorIndexMode)
  359. {
  360. gc->dlist.beginRec->flags |= DLIST_BEGIN_HAS_OTHER_COLOR;
  361. gc->dlist.beginRec->otherColor.r = gc->paTeb->otherColor.r;
  362. }
  363. return;
  364. }
  365. data = (struct __gllc_Indexf_Rec *)
  366. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Indexf_Rec)),
  367. DLIST_GENERIC_OP(Indexf));
  368. if (data == NULL) return;
  369. data->c = c;
  370. #ifndef NT
  371. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_INDEX;
  372. #endif
  373. __glDlistAppendOp(gc, data, __glle_Indexf);
  374. }
  375. void APIENTRY
  376. __gllc_Indexfv ( IN const GLfloat c[1] )
  377. {
  378. __gllc_Indexf(c[0]);
  379. }
  380. void APIENTRY
  381. __gllc_Indexd ( IN GLdouble c )
  382. {
  383. __gllc_Indexf((GLfloat) c);
  384. }
  385. void APIENTRY
  386. __gllc_Indexdv ( IN const GLdouble c[1] )
  387. {
  388. __gllc_Indexf((GLfloat) c[0]);
  389. }
  390. void APIENTRY
  391. __gllc_Indexi ( IN GLint c )
  392. {
  393. __gllc_Indexf((GLfloat) c);
  394. }
  395. void APIENTRY
  396. __gllc_Indexiv ( IN const GLint c[1] )
  397. {
  398. __gllc_Indexf((GLfloat) c[0]);
  399. }
  400. void APIENTRY
  401. __gllc_Indexs ( IN GLshort c )
  402. {
  403. __gllc_Indexf((GLfloat) c);
  404. }
  405. void APIENTRY
  406. __gllc_Indexsv ( IN const GLshort c[1] )
  407. {
  408. __gllc_Indexf((GLfloat) c[0]);
  409. }
  410. void APIENTRY
  411. __gllc_Indexub ( IN GLubyte c )
  412. {
  413. __gllc_Indexf((GLfloat) c);
  414. }
  415. void APIENTRY
  416. __gllc_Indexubv ( IN const GLubyte c[1] )
  417. {
  418. __gllc_Indexf((GLfloat) c[0]);
  419. }
  420. /***************************************************************************/
  421. // Normal functions.
  422. // Compile only Normal3b and Normal3f functions.
  423. // Convert the other functions to one of the compiled Normal functions.
  424. void APIENTRY
  425. __gllc_Normal3b ( IN GLbyte nx, IN GLbyte ny, IN GLbyte nz )
  426. {
  427. struct __gllc_Normal3bv_Rec *data;
  428. __GL_SETUP();
  429. // If we are compiling poly array primitive, update the poly data record.
  430. if (gc->dlist.beginRec)
  431. {
  432. (*gc->savedCltProcTable.glDispatchTable.glNormal3b)(nx, ny, nz);
  433. return;
  434. }
  435. data = (struct __gllc_Normal3bv_Rec *)
  436. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Normal3bv_Rec)),
  437. DLIST_GENERIC_OP(Normal3bv));
  438. if (data == NULL) return;
  439. data->v[0] = nx;
  440. data->v[1] = ny;
  441. data->v[2] = nz;
  442. #ifndef NT
  443. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_NORMAL;
  444. #endif
  445. __glDlistAppendOp(gc, data, __glle_Normal3bv);
  446. }
  447. void APIENTRY
  448. __gllc_Normal3bv ( IN const GLbyte v[3] )
  449. {
  450. __gllc_Normal3b(v[0], v[1], v[2]);
  451. }
  452. void APIENTRY
  453. __gllc_Normal3f ( IN GLfloat nx, IN GLfloat ny, IN GLfloat nz )
  454. {
  455. struct __gllc_Normal3fv_Rec *data;
  456. __GL_SETUP();
  457. // If we are compiling poly array primitive, update the poly data record.
  458. if (gc->dlist.beginRec)
  459. {
  460. (*gc->savedCltProcTable.glDispatchTable.glNormal3f)(nx, ny, nz);
  461. return;
  462. }
  463. data = (struct __gllc_Normal3fv_Rec *)
  464. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Normal3fv_Rec)),
  465. DLIST_GENERIC_OP(Normal3fv));
  466. if (data == NULL) return;
  467. data->v[0] = nx;
  468. data->v[1] = ny;
  469. data->v[2] = nz;
  470. #ifndef NT
  471. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_NORMAL;
  472. #endif
  473. __glDlistAppendOp(gc, data, __glle_Normal3fv);
  474. }
  475. void APIENTRY
  476. __gllc_Normal3fv ( IN const GLfloat v[3] )
  477. {
  478. __gllc_Normal3f(v[0], v[1], v[2]);
  479. }
  480. void APIENTRY
  481. __gllc_Normal3d ( IN GLdouble nx, IN GLdouble ny, IN GLdouble nz )
  482. {
  483. __gllc_Normal3f((GLfloat) nx, (GLfloat) ny, (GLfloat) nz);
  484. }
  485. void APIENTRY
  486. __gllc_Normal3dv ( IN const GLdouble v[3] )
  487. {
  488. __gllc_Normal3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  489. }
  490. void APIENTRY
  491. __gllc_Normal3i ( IN GLint nx, IN GLint ny, IN GLint nz )
  492. {
  493. __gllc_Normal3f(__GL_I_TO_FLOAT(nx), __GL_I_TO_FLOAT(ny),
  494. __GL_I_TO_FLOAT(nz));
  495. }
  496. void APIENTRY
  497. __gllc_Normal3iv ( IN const GLint v[3] )
  498. {
  499. __gllc_Normal3f(__GL_I_TO_FLOAT(v[0]), __GL_I_TO_FLOAT(v[1]),
  500. __GL_I_TO_FLOAT(v[2]));
  501. }
  502. void APIENTRY
  503. __gllc_Normal3s ( IN GLshort nx, IN GLshort ny, IN GLshort nz )
  504. {
  505. __gllc_Normal3f(__GL_S_TO_FLOAT(nx), __GL_S_TO_FLOAT(ny),
  506. __GL_S_TO_FLOAT(nz));
  507. }
  508. void APIENTRY
  509. __gllc_Normal3sv ( IN const GLshort v[3] )
  510. {
  511. __gllc_Normal3f(__GL_S_TO_FLOAT(v[0]), __GL_S_TO_FLOAT(v[1]),
  512. __GL_S_TO_FLOAT(v[2]));
  513. }
  514. /***************************************************************************/
  515. // RasterPos functions.
  516. // Compile only RasterPos2f, RasterPos3f and RasterPos4f functions.
  517. // Convert the other functions to one of the compiled RasterPos functions.
  518. void APIENTRY
  519. __gllc_RasterPos2f ( IN GLfloat x, IN GLfloat y )
  520. {
  521. struct __gllc_RasterPos2f_Rec *data;
  522. __GL_SETUP();
  523. data = (struct __gllc_RasterPos2f_Rec *)
  524. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_RasterPos2f_Rec)),
  525. DLIST_GENERIC_OP(RasterPos2f));
  526. if (data == NULL) return;
  527. data->x = x;
  528. data->y = y;
  529. #ifndef NT
  530. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_RASTERPOS;
  531. #endif
  532. __glDlistAppendOp(gc, data, __glle_RasterPos2f);
  533. }
  534. void APIENTRY
  535. __gllc_RasterPos2fv ( IN const GLfloat v[2] )
  536. {
  537. __gllc_RasterPos2f(v[0], v[1]);
  538. }
  539. void APIENTRY
  540. __gllc_RasterPos2d ( IN GLdouble x, IN GLdouble y )
  541. {
  542. __gllc_RasterPos2f((GLfloat) x, (GLfloat) y);
  543. }
  544. void APIENTRY
  545. __gllc_RasterPos2dv ( IN const GLdouble v[2] )
  546. {
  547. __gllc_RasterPos2f((GLfloat) v[0], (GLfloat) v[1]);
  548. }
  549. void APIENTRY
  550. __gllc_RasterPos2i ( IN GLint x, IN GLint y )
  551. {
  552. __gllc_RasterPos2f((GLfloat) x, (GLfloat) y);
  553. }
  554. void APIENTRY
  555. __gllc_RasterPos2iv ( IN const GLint v[2] )
  556. {
  557. __gllc_RasterPos2f((GLfloat) v[0], (GLfloat) v[1]);
  558. }
  559. void APIENTRY
  560. __gllc_RasterPos2s ( IN GLshort x, IN GLshort y )
  561. {
  562. __gllc_RasterPos2f((GLfloat) x, (GLfloat) y);
  563. }
  564. void APIENTRY
  565. __gllc_RasterPos2sv ( IN const GLshort v[2] )
  566. {
  567. __gllc_RasterPos2f((GLfloat) v[0], (GLfloat) v[1]);
  568. }
  569. void APIENTRY
  570. __gllc_RasterPos3f ( IN GLfloat x, IN GLfloat y, IN GLfloat z )
  571. {
  572. struct __gllc_RasterPos3fv_Rec *data;
  573. __GL_SETUP();
  574. data = (struct __gllc_RasterPos3fv_Rec *)
  575. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_RasterPos3fv_Rec)),
  576. DLIST_GENERIC_OP(RasterPos3fv));
  577. if (data == NULL) return;
  578. data->v[0] = x;
  579. data->v[1] = y;
  580. data->v[2] = z;
  581. #ifndef NT
  582. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_RASTERPOS;
  583. #endif
  584. __glDlistAppendOp(gc, data, __glle_RasterPos3fv);
  585. }
  586. void APIENTRY
  587. __gllc_RasterPos3fv ( IN const GLfloat v[3] )
  588. {
  589. __gllc_RasterPos3f(v[0], v[1], v[2]);
  590. }
  591. void APIENTRY
  592. __gllc_RasterPos3d ( IN GLdouble x, IN GLdouble y, IN GLdouble z )
  593. {
  594. __gllc_RasterPos3f((GLfloat) x, (GLfloat) y, (GLfloat) z);
  595. }
  596. void APIENTRY
  597. __gllc_RasterPos3dv ( IN const GLdouble v[3] )
  598. {
  599. __gllc_RasterPos3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  600. }
  601. void APIENTRY
  602. __gllc_RasterPos3i ( IN GLint x, IN GLint y, IN GLint z )
  603. {
  604. __gllc_RasterPos3f((GLfloat) x, (GLfloat) y, (GLfloat) z);
  605. }
  606. void APIENTRY
  607. __gllc_RasterPos3iv ( IN const GLint v[3] )
  608. {
  609. __gllc_RasterPos3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  610. }
  611. void APIENTRY
  612. __gllc_RasterPos3s ( IN GLshort x, IN GLshort y, IN GLshort z )
  613. {
  614. __gllc_RasterPos3f((GLfloat) x, (GLfloat) y, (GLfloat) z);
  615. }
  616. void APIENTRY
  617. __gllc_RasterPos3sv ( IN const GLshort v[3] )
  618. {
  619. __gllc_RasterPos3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  620. }
  621. void APIENTRY
  622. __gllc_RasterPos4f ( IN GLfloat x, IN GLfloat y, IN GLfloat z, IN GLfloat w )
  623. {
  624. struct __gllc_RasterPos4fv_Rec *data;
  625. __GL_SETUP();
  626. data = (struct __gllc_RasterPos4fv_Rec *)
  627. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_RasterPos4fv_Rec)),
  628. DLIST_GENERIC_OP(RasterPos4fv));
  629. if (data == NULL) return;
  630. data->v[0] = x;
  631. data->v[1] = y;
  632. data->v[2] = z;
  633. data->v[3] = w;
  634. #ifndef NT
  635. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_RASTERPOS;
  636. #endif
  637. __glDlistAppendOp(gc, data, __glle_RasterPos4fv);
  638. }
  639. void APIENTRY
  640. __gllc_RasterPos4fv ( IN const GLfloat v[4] )
  641. {
  642. __gllc_RasterPos4f(v[0], v[1], v[2], v[3]);
  643. }
  644. void APIENTRY
  645. __gllc_RasterPos4d ( IN GLdouble x, IN GLdouble y, IN GLdouble z, IN GLdouble w )
  646. {
  647. __gllc_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  648. }
  649. void APIENTRY
  650. __gllc_RasterPos4dv ( IN const GLdouble v[4] )
  651. {
  652. __gllc_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  653. }
  654. void APIENTRY
  655. __gllc_RasterPos4i ( IN GLint x, IN GLint y, IN GLint z, IN GLint w )
  656. {
  657. __gllc_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  658. }
  659. void APIENTRY
  660. __gllc_RasterPos4iv ( IN const GLint v[4] )
  661. {
  662. __gllc_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  663. }
  664. void APIENTRY
  665. __gllc_RasterPos4s ( IN GLshort x, IN GLshort y, IN GLshort z, IN GLshort w )
  666. {
  667. __gllc_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  668. }
  669. void APIENTRY
  670. __gllc_RasterPos4sv ( IN const GLshort v[4] )
  671. {
  672. __gllc_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  673. }
  674. /***************************************************************************/
  675. // Rect functions.
  676. // Compile only Rectf function.
  677. // Convert the other functions to the compiled Rectf function.
  678. void APIENTRY
  679. __gllc_Rectf ( IN GLfloat x1, IN GLfloat y1, IN GLfloat x2, IN GLfloat y2 )
  680. {
  681. struct __gllc_Rectf_Rec *data;
  682. __GL_SETUP();
  683. data = (struct __gllc_Rectf_Rec *)
  684. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Rectf_Rec)),
  685. DLIST_GENERIC_OP(Rectf));
  686. if (data == NULL) return;
  687. data->x1 = x1;
  688. data->y1 = y1;
  689. data->x2 = x2;
  690. data->y2 = y2;
  691. #ifndef NT
  692. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_RECT;
  693. #endif
  694. __glDlistAppendOp(gc, data, __glle_Rectf);
  695. }
  696. void APIENTRY
  697. __gllc_Rectfv ( IN const GLfloat v1[2], IN const GLfloat v2[2] )
  698. {
  699. __gllc_Rectf(v1[0], v1[1], v2[0], v2[1]);
  700. }
  701. void APIENTRY
  702. __gllc_Rectd ( IN GLdouble x1, IN GLdouble y1, IN GLdouble x2, IN GLdouble y2 )
  703. {
  704. __gllc_Rectf((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
  705. }
  706. void APIENTRY
  707. __gllc_Rectdv ( IN const GLdouble v1[2], IN const GLdouble v2[2] )
  708. {
  709. __gllc_Rectf((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
  710. }
  711. void APIENTRY
  712. __gllc_Recti ( IN GLint x1, IN GLint y1, IN GLint x2, IN GLint y2 )
  713. {
  714. __gllc_Rectf((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
  715. }
  716. void APIENTRY
  717. __gllc_Rectiv ( IN const GLint v1[2], IN const GLint v2[2] )
  718. {
  719. __gllc_Rectf((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
  720. }
  721. void APIENTRY
  722. __gllc_Rects ( IN GLshort x1, IN GLshort y1, IN GLshort x2, IN GLshort y2 )
  723. {
  724. __gllc_Rectf((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
  725. }
  726. void APIENTRY
  727. __gllc_Rectsv ( IN const GLshort v1[2], IN const GLshort v2[2] )
  728. {
  729. __gllc_Rectf((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
  730. }
  731. /***************************************************************************/
  732. // TexCoord functions.
  733. // Compile only TexCoord1f, TexCoord2f, TexCoord3f and TexCoord4f functions.
  734. // Convert the other functions to one of the compiled TexCoord functions.
  735. void APIENTRY
  736. __gllc_TexCoord1f ( IN GLfloat s )
  737. {
  738. struct __gllc_TexCoord1f_Rec *data;
  739. __GL_SETUP();
  740. // If we are compiling poly array primitive, update the poly data record.
  741. if (gc->dlist.beginRec)
  742. {
  743. (*gc->savedCltProcTable.glDispatchTable.glTexCoord1f)(s);
  744. return;
  745. }
  746. data = (struct __gllc_TexCoord1f_Rec *)
  747. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_TexCoord1f_Rec)),
  748. DLIST_GENERIC_OP(TexCoord1f));
  749. if (data == NULL) return;
  750. data->s = s;
  751. #ifndef NT
  752. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_TEXCOORDS;
  753. #endif
  754. __glDlistAppendOp(gc, data, __glle_TexCoord1f);
  755. }
  756. void APIENTRY
  757. __gllc_TexCoord1fv ( IN const GLfloat v[1] )
  758. {
  759. __gllc_TexCoord1f(v[0]);
  760. }
  761. void APIENTRY
  762. __gllc_TexCoord1d ( IN GLdouble s )
  763. {
  764. __gllc_TexCoord1f((GLfloat) s);
  765. }
  766. void APIENTRY
  767. __gllc_TexCoord1dv ( IN const GLdouble v[1] )
  768. {
  769. __gllc_TexCoord1f((GLfloat) v[0]);
  770. }
  771. void APIENTRY
  772. __gllc_TexCoord1i ( IN GLint s )
  773. {
  774. __gllc_TexCoord1f((GLfloat) s);
  775. }
  776. void APIENTRY
  777. __gllc_TexCoord1iv ( IN const GLint v[1] )
  778. {
  779. __gllc_TexCoord1f((GLfloat) v[0]);
  780. }
  781. void APIENTRY
  782. __gllc_TexCoord1s ( IN GLshort s )
  783. {
  784. __gllc_TexCoord1f((GLfloat) s);
  785. }
  786. void APIENTRY
  787. __gllc_TexCoord1sv ( IN const GLshort v[1] )
  788. {
  789. __gllc_TexCoord1f((GLfloat) v[0]);
  790. }
  791. void APIENTRY
  792. __gllc_TexCoord2f ( IN GLfloat s, IN GLfloat t )
  793. {
  794. struct __gllc_TexCoord2f_Rec *data;
  795. __GL_SETUP();
  796. // If we are compiling poly array primitive, update the poly data record.
  797. if (gc->dlist.beginRec)
  798. {
  799. (*gc->savedCltProcTable.glDispatchTable.glTexCoord2f)(s, t);
  800. return;
  801. }
  802. data = (struct __gllc_TexCoord2f_Rec *)
  803. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_TexCoord2f_Rec)),
  804. DLIST_GENERIC_OP(TexCoord2f));
  805. if (data == NULL) return;
  806. data->s = s;
  807. data->t = t;
  808. #ifndef NT
  809. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_TEXCOORDS;
  810. #endif
  811. __glDlistAppendOp(gc, data, __glle_TexCoord2f);
  812. }
  813. void APIENTRY
  814. __gllc_TexCoord2fv ( IN const GLfloat v[2] )
  815. {
  816. __gllc_TexCoord2f(v[0], v[1]);
  817. }
  818. void APIENTRY
  819. __gllc_TexCoord2d ( IN GLdouble s, IN GLdouble t )
  820. {
  821. __gllc_TexCoord2f((GLfloat) s, (GLfloat) t);
  822. }
  823. void APIENTRY
  824. __gllc_TexCoord2dv ( IN const GLdouble v[2] )
  825. {
  826. __gllc_TexCoord2f((GLfloat) v[0], (GLfloat) v[1]);
  827. }
  828. void APIENTRY
  829. __gllc_TexCoord2i ( IN GLint s, IN GLint t )
  830. {
  831. __gllc_TexCoord2f((GLfloat) s, (GLfloat) t);
  832. }
  833. void APIENTRY
  834. __gllc_TexCoord2iv ( IN const GLint v[2] )
  835. {
  836. __gllc_TexCoord2f((GLfloat) v[0], (GLfloat) v[1]);
  837. }
  838. void APIENTRY
  839. __gllc_TexCoord2s ( IN GLshort s, IN GLshort t )
  840. {
  841. __gllc_TexCoord2f((GLfloat) s, (GLfloat) t);
  842. }
  843. void APIENTRY
  844. __gllc_TexCoord2sv ( IN const GLshort v[2] )
  845. {
  846. __gllc_TexCoord2f((GLfloat) v[0], (GLfloat) v[1]);
  847. }
  848. void APIENTRY
  849. __gllc_TexCoord3f ( IN GLfloat s, IN GLfloat t, IN GLfloat r )
  850. {
  851. struct __gllc_TexCoord3fv_Rec *data;
  852. __GL_SETUP();
  853. // If we are compiling poly array primitive, update the poly data record.
  854. if (gc->dlist.beginRec)
  855. {
  856. (*gc->savedCltProcTable.glDispatchTable.glTexCoord3f)(s, t, r);
  857. return;
  858. }
  859. data = (struct __gllc_TexCoord3fv_Rec *)
  860. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_TexCoord3fv_Rec)),
  861. DLIST_GENERIC_OP(TexCoord3fv));
  862. if (data == NULL) return;
  863. data->v[0] = s;
  864. data->v[1] = t;
  865. data->v[2] = r;
  866. #ifndef NT
  867. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_TEXCOORDS;
  868. #endif
  869. __glDlistAppendOp(gc, data, __glle_TexCoord3fv);
  870. }
  871. void APIENTRY
  872. __gllc_TexCoord3fv ( IN const GLfloat v[3] )
  873. {
  874. __gllc_TexCoord3f(v[0], v[1], v[2]);
  875. }
  876. void APIENTRY
  877. __gllc_TexCoord3d ( IN GLdouble s, IN GLdouble t, IN GLdouble r )
  878. {
  879. __gllc_TexCoord3f((GLfloat) s, (GLfloat) t, (GLfloat) r);
  880. }
  881. void APIENTRY
  882. __gllc_TexCoord3dv ( IN const GLdouble v[3] )
  883. {
  884. __gllc_TexCoord3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  885. }
  886. void APIENTRY
  887. __gllc_TexCoord3i ( IN GLint s, IN GLint t, IN GLint r )
  888. {
  889. __gllc_TexCoord3f((GLfloat) s, (GLfloat) t, (GLfloat) r);
  890. }
  891. void APIENTRY
  892. __gllc_TexCoord3iv ( IN const GLint v[3] )
  893. {
  894. __gllc_TexCoord3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  895. }
  896. void APIENTRY
  897. __gllc_TexCoord3s ( IN GLshort s, IN GLshort t, IN GLshort r )
  898. {
  899. __gllc_TexCoord3f((GLfloat) s, (GLfloat) t, (GLfloat) r);
  900. }
  901. void APIENTRY
  902. __gllc_TexCoord3sv ( IN const GLshort v[3] )
  903. {
  904. __gllc_TexCoord3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  905. }
  906. void APIENTRY
  907. __gllc_TexCoord4f ( IN GLfloat s, IN GLfloat t, IN GLfloat r, IN GLfloat q )
  908. {
  909. struct __gllc_TexCoord4fv_Rec *data;
  910. __GL_SETUP();
  911. // If we are compiling poly array primitive, update the poly data record.
  912. if (gc->dlist.beginRec)
  913. {
  914. (*gc->savedCltProcTable.glDispatchTable.glTexCoord4f)(s, t, r, q);
  915. return;
  916. }
  917. data = (struct __gllc_TexCoord4fv_Rec *)
  918. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_TexCoord4fv_Rec)),
  919. DLIST_GENERIC_OP(TexCoord4fv));
  920. if (data == NULL) return;
  921. data->v[0] = s;
  922. data->v[1] = t;
  923. data->v[2] = r;
  924. data->v[3] = q;
  925. #ifndef NT
  926. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_TEXCOORDS;
  927. #endif
  928. __glDlistAppendOp(gc, data, __glle_TexCoord4fv);
  929. }
  930. void APIENTRY
  931. __gllc_TexCoord4fv ( IN const GLfloat v[4] )
  932. {
  933. __gllc_TexCoord4f(v[0], v[1], v[2], v[3]);
  934. }
  935. void APIENTRY
  936. __gllc_TexCoord4d ( IN GLdouble s, IN GLdouble t, IN GLdouble r, IN GLdouble q )
  937. {
  938. __gllc_TexCoord4f((GLfloat) s, (GLfloat) t, (GLfloat) r, (GLfloat) q);
  939. }
  940. void APIENTRY
  941. __gllc_TexCoord4dv ( IN const GLdouble v[4] )
  942. {
  943. __gllc_TexCoord4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  944. }
  945. void APIENTRY
  946. __gllc_TexCoord4i ( IN GLint s, IN GLint t, IN GLint r, IN GLint q )
  947. {
  948. __gllc_TexCoord4f((GLfloat) s, (GLfloat) t, (GLfloat) r, (GLfloat) q);
  949. }
  950. void APIENTRY
  951. __gllc_TexCoord4iv ( IN const GLint v[4] )
  952. {
  953. __gllc_TexCoord4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  954. }
  955. void APIENTRY
  956. __gllc_TexCoord4s ( IN GLshort s, IN GLshort t, IN GLshort r, IN GLshort q )
  957. {
  958. __gllc_TexCoord4f((GLfloat) s, (GLfloat) t, (GLfloat) r, (GLfloat) q);
  959. }
  960. void APIENTRY
  961. __gllc_TexCoord4sv ( IN const GLshort v[4] )
  962. {
  963. __gllc_TexCoord4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  964. }
  965. #ifdef GL_WIN_multiple_textures
  966. void APIENTRY __gllc_MultiTexCoord1dWIN
  967. (GLbitfield mask, GLdouble s)
  968. {
  969. }
  970. void APIENTRY __gllc_MultiTexCoord1dvWIN
  971. (GLbitfield mask, const GLdouble *v)
  972. {
  973. }
  974. void APIENTRY __gllc_MultiTexCoord1fWIN
  975. (GLbitfield mask, GLfloat s)
  976. {
  977. }
  978. void APIENTRY __gllc_MultiTexCoord1fvWIN
  979. (GLbitfield mask, const GLfloat *v)
  980. {
  981. }
  982. void APIENTRY __gllc_MultiTexCoord1iWIN
  983. (GLbitfield mask, GLint s)
  984. {
  985. }
  986. void APIENTRY __gllc_MultiTexCoord1ivWIN
  987. (GLbitfield mask, const GLint *v)
  988. {
  989. }
  990. void APIENTRY __gllc_MultiTexCoord1sWIN
  991. (GLbitfield mask, GLshort s)
  992. {
  993. }
  994. void APIENTRY __gllc_MultiTexCoord1svWIN
  995. (GLbitfield mask, const GLshort *v)
  996. {
  997. }
  998. void APIENTRY __gllc_MultiTexCoord2dWIN
  999. (GLbitfield mask, GLdouble s, GLdouble t)
  1000. {
  1001. }
  1002. void APIENTRY __gllc_MultiTexCoord2dvWIN
  1003. (GLbitfield mask, const GLdouble *v)
  1004. {
  1005. }
  1006. void APIENTRY __gllc_MultiTexCoord2fWIN
  1007. (GLbitfield mask, GLfloat s, GLfloat t)
  1008. {
  1009. }
  1010. void APIENTRY __gllc_MultiTexCoord2fvWIN
  1011. (GLbitfield mask, const GLfloat *v)
  1012. {
  1013. }
  1014. void APIENTRY __gllc_MultiTexCoord2iWIN
  1015. (GLbitfield mask, GLint s, GLint t)
  1016. {
  1017. }
  1018. void APIENTRY __gllc_MultiTexCoord2ivWIN
  1019. (GLbitfield mask, const GLint *v)
  1020. {
  1021. }
  1022. void APIENTRY __gllc_MultiTexCoord2sWIN
  1023. (GLbitfield mask, GLshort s, GLshort t)
  1024. {
  1025. }
  1026. void APIENTRY __gllc_MultiTexCoord2svWIN
  1027. (GLbitfield mask, const GLshort *v)
  1028. {
  1029. }
  1030. void APIENTRY __gllc_MultiTexCoord3dWIN
  1031. (GLbitfield mask, GLdouble s, GLdouble t, GLdouble r)
  1032. {
  1033. }
  1034. void APIENTRY __gllc_MultiTexCoord3dvWIN
  1035. (GLbitfield mask, const GLdouble *v)
  1036. {
  1037. }
  1038. void APIENTRY __gllc_MultiTexCoord3fWIN
  1039. (GLbitfield mask, GLfloat s, GLfloat t, GLfloat r)
  1040. {
  1041. }
  1042. void APIENTRY __gllc_MultiTexCoord3fvWIN
  1043. (GLbitfield mask, const GLfloat *v)
  1044. {
  1045. }
  1046. void APIENTRY __gllc_MultiTexCoord3iWIN
  1047. (GLbitfield mask, GLint s, GLint t, GLint r)
  1048. {
  1049. }
  1050. void APIENTRY __gllc_MultiTexCoord3ivWIN
  1051. (GLbitfield mask, const GLint *v)
  1052. {
  1053. }
  1054. void APIENTRY __gllc_MultiTexCoord3sWIN
  1055. (GLbitfield mask, GLshort s, GLshort t, GLshort r)
  1056. {
  1057. }
  1058. void APIENTRY __gllc_MultiTexCoord3svWIN
  1059. (GLbitfield mask, const GLshort *v)
  1060. {
  1061. }
  1062. void APIENTRY __gllc_MultiTexCoord4dWIN
  1063. (GLbitfield mask, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  1064. {
  1065. }
  1066. void APIENTRY __gllc_MultiTexCoord4dvWIN
  1067. (GLbitfield mask, const GLdouble *v)
  1068. {
  1069. }
  1070. void APIENTRY __gllc_MultiTexCoord4fWIN
  1071. (GLbitfield mask, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  1072. {
  1073. }
  1074. void APIENTRY __gllc_MultiTexCoord4fvWIN
  1075. (GLbitfield mask, const GLfloat *v)
  1076. {
  1077. }
  1078. void APIENTRY __gllc_MultiTexCoord4iWIN
  1079. (GLbitfield mask, GLint s, GLint t, GLint r, GLint q)
  1080. {
  1081. }
  1082. void APIENTRY __gllc_MultiTexCoord4ivWIN
  1083. (GLbitfield mask, const GLint *v)
  1084. {
  1085. }
  1086. void APIENTRY __gllc_MultiTexCoord4sWIN
  1087. (GLbitfield mask, GLshort s, GLshort t, GLshort r, GLshort q)
  1088. {
  1089. }
  1090. void APIENTRY __gllc_MultiTexCoord4svWIN
  1091. (GLbitfield mask, const GLshort *v)
  1092. {
  1093. }
  1094. #endif // GL_WIN_multiple_textures
  1095. /***************************************************************************/
  1096. // Vertex functions.
  1097. // Compile only Vertex2f, Vertex3f and Vertex4f functions.
  1098. // Convert the other functions to one of the compiled Vertex functions.
  1099. void APIENTRY
  1100. __gllc_Vertex2f ( IN GLfloat x, IN GLfloat y )
  1101. {
  1102. struct __gllc_Vertex2f_Rec *data;
  1103. __GL_SETUP();
  1104. // If we are compiling poly array primitive, update and record the poly data
  1105. // record.
  1106. if (gc->dlist.beginRec)
  1107. {
  1108. POLYARRAY *pa;
  1109. pa = gc->paTeb;
  1110. // If we are in COMPILE_AND_EXECUTE mode or there are attribute
  1111. // changes associated with the vertex, process the poly data.
  1112. if (gc->dlist.mode == GL_COMPILE_AND_EXECUTE
  1113. || pa->pdNextVertex->flags)
  1114. {
  1115. (*gc->savedCltProcTable.glDispatchTable.glVertex2f)(x, y);
  1116. __glDlistCompilePolyData(gc, GL_FALSE);
  1117. return;
  1118. }
  1119. // Otherwise, increment vertex count and compile a Vertex record
  1120. // instead.
  1121. gc->dlist.beginRec->nVertices++;
  1122. }
  1123. data = (struct __gllc_Vertex2f_Rec *)
  1124. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Vertex2f_Rec)),
  1125. DLIST_GENERIC_OP(Vertex2f));
  1126. if (data == NULL) return;
  1127. data->x = x;
  1128. data->y = y;
  1129. #ifndef NT
  1130. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_VERTEX;
  1131. #endif
  1132. __glDlistAppendOp(gc, data, __glle_Vertex2f);
  1133. }
  1134. void APIENTRY
  1135. __gllc_Vertex2fv ( IN const GLfloat v[2] )
  1136. {
  1137. __gllc_Vertex2f(v[0], v[1]);
  1138. }
  1139. void APIENTRY
  1140. __gllc_Vertex2d ( IN GLdouble x, IN GLdouble y )
  1141. {
  1142. __gllc_Vertex2f((GLfloat) x, (GLfloat) y);
  1143. }
  1144. void APIENTRY
  1145. __gllc_Vertex2dv ( IN const GLdouble v[2] )
  1146. {
  1147. __gllc_Vertex2f((GLfloat) v[0], (GLfloat) v[1]);
  1148. }
  1149. void APIENTRY
  1150. __gllc_Vertex2i ( IN GLint x, IN GLint y )
  1151. {
  1152. __gllc_Vertex2f((GLfloat) x, (GLfloat) y);
  1153. }
  1154. void APIENTRY
  1155. __gllc_Vertex2iv ( IN const GLint v[2] )
  1156. {
  1157. __gllc_Vertex2f((GLfloat) v[0], (GLfloat) v[1]);
  1158. }
  1159. void APIENTRY
  1160. __gllc_Vertex2s ( IN GLshort x, IN GLshort y )
  1161. {
  1162. __gllc_Vertex2f((GLfloat) x, (GLfloat) y);
  1163. }
  1164. void APIENTRY
  1165. __gllc_Vertex2sv ( IN const GLshort v[2] )
  1166. {
  1167. __gllc_Vertex2f((GLfloat) v[0], (GLfloat) v[1]);
  1168. }
  1169. void APIENTRY
  1170. __gllc_Vertex3f ( IN GLfloat x, IN GLfloat y, IN GLfloat z )
  1171. {
  1172. struct __gllc_Vertex3fv_Rec *data;
  1173. __GL_SETUP();
  1174. // If we are compiling poly array primitive, update and record the poly data
  1175. // record.
  1176. if (gc->dlist.beginRec)
  1177. {
  1178. POLYARRAY *pa;
  1179. pa = gc->paTeb;
  1180. // If we are in COMPILE_AND_EXECUTE mode or there are attribute
  1181. // changes associated with the vertex, process the poly data.
  1182. if (gc->dlist.mode == GL_COMPILE_AND_EXECUTE
  1183. || pa->pdNextVertex->flags)
  1184. {
  1185. (*gc->savedCltProcTable.glDispatchTable.glVertex3f)(x, y, z);
  1186. __glDlistCompilePolyData(gc, GL_FALSE);
  1187. return;
  1188. }
  1189. // Otherwise, increment vertex count and compile a Vertex record
  1190. // instead.
  1191. gc->dlist.beginRec->nVertices++;
  1192. }
  1193. data = (struct __gllc_Vertex3fv_Rec *)
  1194. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Vertex3fv_Rec)),
  1195. DLIST_GENERIC_OP(Vertex3fv));
  1196. if (data == NULL) return;
  1197. data->v[0] = x;
  1198. data->v[1] = y;
  1199. data->v[2] = z;
  1200. #ifndef NT
  1201. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_VERTEX;
  1202. #endif
  1203. __glDlistAppendOp(gc, data, __glle_Vertex3fv);
  1204. }
  1205. void APIENTRY
  1206. __gllc_Vertex3fv ( IN const GLfloat v[3] )
  1207. {
  1208. __gllc_Vertex3f(v[0], v[1], v[2]);
  1209. }
  1210. void APIENTRY
  1211. __gllc_Vertex3d ( IN GLdouble x, IN GLdouble y, IN GLdouble z )
  1212. {
  1213. __gllc_Vertex3f((GLfloat) x, (GLfloat) y, (GLfloat) z);
  1214. }
  1215. void APIENTRY
  1216. __gllc_Vertex3dv ( IN const GLdouble v[3] )
  1217. {
  1218. __gllc_Vertex3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  1219. }
  1220. void APIENTRY
  1221. __gllc_Vertex3i ( IN GLint x, IN GLint y, IN GLint z )
  1222. {
  1223. __gllc_Vertex3f((GLfloat) x, (GLfloat) y, (GLfloat) z);
  1224. }
  1225. void APIENTRY
  1226. __gllc_Vertex3iv ( IN const GLint v[3] )
  1227. {
  1228. __gllc_Vertex3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  1229. }
  1230. void APIENTRY
  1231. __gllc_Vertex3s ( IN GLshort x, IN GLshort y, IN GLshort z )
  1232. {
  1233. __gllc_Vertex3f((GLfloat) x, (GLfloat) y, (GLfloat) z);
  1234. }
  1235. void APIENTRY
  1236. __gllc_Vertex3sv ( IN const GLshort v[3] )
  1237. {
  1238. __gllc_Vertex3f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
  1239. }
  1240. void APIENTRY
  1241. __gllc_Vertex4f ( IN GLfloat x, IN GLfloat y, IN GLfloat z, IN GLfloat w )
  1242. {
  1243. struct __gllc_Vertex4fv_Rec *data;
  1244. __GL_SETUP();
  1245. // If we are compiling poly array primitive, update and record the poly data
  1246. // record.
  1247. if (gc->dlist.beginRec)
  1248. {
  1249. POLYARRAY *pa;
  1250. pa = gc->paTeb;
  1251. // If we are in COMPILE_AND_EXECUTE mode or there are attribute
  1252. // changes associated with the vertex, process the poly data.
  1253. if (gc->dlist.mode == GL_COMPILE_AND_EXECUTE
  1254. || pa->pdNextVertex->flags)
  1255. {
  1256. (*gc->savedCltProcTable.glDispatchTable.glVertex4f)(x, y, z, w);
  1257. __glDlistCompilePolyData(gc, GL_FALSE);
  1258. return;
  1259. }
  1260. // Otherwise, increment vertex count and compile a Vertex record
  1261. // instead.
  1262. gc->dlist.beginRec->nVertices++;
  1263. }
  1264. data = (struct __gllc_Vertex4fv_Rec *)
  1265. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Vertex4fv_Rec)),
  1266. DLIST_GENERIC_OP(Vertex4fv));
  1267. if (data == NULL) return;
  1268. data->v[0] = x;
  1269. data->v[1] = y;
  1270. data->v[2] = z;
  1271. data->v[3] = w;
  1272. #ifndef NT
  1273. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_VERTEX;
  1274. #endif
  1275. __glDlistAppendOp(gc, data, __glle_Vertex4fv);
  1276. }
  1277. void APIENTRY
  1278. __gllc_Vertex4fv ( IN const GLfloat v[4] )
  1279. {
  1280. __gllc_Vertex4f(v[0], v[1], v[2], v[3]);
  1281. }
  1282. void APIENTRY
  1283. __gllc_Vertex4d ( IN GLdouble x, IN GLdouble y, IN GLdouble z, IN GLdouble w )
  1284. {
  1285. __gllc_Vertex4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  1286. }
  1287. void APIENTRY
  1288. __gllc_Vertex4dv ( IN const GLdouble v[4] )
  1289. {
  1290. __gllc_Vertex4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1291. }
  1292. void APIENTRY
  1293. __gllc_Vertex4i ( IN GLint x, IN GLint y, IN GLint z, IN GLint w )
  1294. {
  1295. __gllc_Vertex4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  1296. }
  1297. void APIENTRY
  1298. __gllc_Vertex4iv ( IN const GLint v[4] )
  1299. {
  1300. __gllc_Vertex4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1301. }
  1302. void APIENTRY
  1303. __gllc_Vertex4s ( IN GLshort x, IN GLshort y, IN GLshort z, IN GLshort w )
  1304. {
  1305. __gllc_Vertex4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
  1306. }
  1307. void APIENTRY
  1308. __gllc_Vertex4sv ( IN const GLshort v[4] )
  1309. {
  1310. __gllc_Vertex4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
  1311. }
  1312. /***************************************************************************/
  1313. // Fog functions.
  1314. // Compile only Fogfv function.
  1315. // Convert the other functions to the compiled Fogfv function.
  1316. void APIENTRY
  1317. __gllc_Fogfv ( IN GLenum pname, IN const GLfloat params[] )
  1318. {
  1319. GLuint size;
  1320. GLint arraySize;
  1321. struct __gllc_Fogfv_Rec *data;
  1322. __GL_SETUP();
  1323. arraySize = __glFogfv_size(pname) * 4;
  1324. if (arraySize < 0) {
  1325. __gllc_InvalidEnum();
  1326. return;
  1327. }
  1328. size = sizeof(struct __gllc_Fogfv_Rec) + arraySize;
  1329. data = (struct __gllc_Fogfv_Rec *)
  1330. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(Fogfv));
  1331. if (data == NULL) return;
  1332. data->pname = pname;
  1333. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_Fogfv_Rec),
  1334. params, arraySize);
  1335. __glDlistAppendOp(gc, data, __glle_Fogfv);
  1336. }
  1337. void APIENTRY
  1338. __gllc_Fogf ( IN GLenum pname, IN GLfloat param )
  1339. {
  1340. // FOG_ASSERT
  1341. if (!RANGE(pname,GL_FOG_INDEX,GL_FOG_MODE))
  1342. {
  1343. __gllc_InvalidEnum();
  1344. return;
  1345. }
  1346. __gllc_Fogfv(pname, &param);
  1347. }
  1348. void APIENTRY
  1349. __gllc_Fogi ( IN GLenum pname, IN GLint param )
  1350. {
  1351. GLfloat fParam;
  1352. // FOG_ASSERT
  1353. if (!RANGE(pname,GL_FOG_INDEX,GL_FOG_MODE))
  1354. {
  1355. __gllc_InvalidEnum();
  1356. return;
  1357. }
  1358. fParam = (GLfloat) param;
  1359. __gllc_Fogfv(pname, &fParam);
  1360. }
  1361. void APIENTRY
  1362. __gllc_Fogiv ( IN GLenum pname, IN const GLint params[] )
  1363. {
  1364. GLfloat fParams[4];
  1365. switch (pname)
  1366. {
  1367. case GL_FOG_INDEX:
  1368. case GL_FOG_DENSITY:
  1369. case GL_FOG_START:
  1370. case GL_FOG_END:
  1371. case GL_FOG_MODE:
  1372. fParams[0] = (GLfloat) params[0];
  1373. break;
  1374. case GL_FOG_COLOR:
  1375. fParams[0] = __GL_I_TO_FLOAT(params[0]);
  1376. fParams[1] = __GL_I_TO_FLOAT(params[1]);
  1377. fParams[2] = __GL_I_TO_FLOAT(params[2]);
  1378. fParams[3] = __GL_I_TO_FLOAT(params[3]);
  1379. break;
  1380. }
  1381. __gllc_Fogfv(pname, fParams);
  1382. }
  1383. /***************************************************************************/
  1384. // Light functions.
  1385. // Compile only Lightfv function.
  1386. // Convert the other functions to the compiled Lightfv function.
  1387. void APIENTRY
  1388. __gllc_Lightfv ( IN GLenum light, IN GLenum pname, IN const GLfloat params[] )
  1389. {
  1390. GLuint size;
  1391. GLint arraySize;
  1392. struct __gllc_Lightfv_Rec *data;
  1393. __GL_SETUP();
  1394. arraySize = __glLightfv_size(pname) * 4;
  1395. if (arraySize < 0) {
  1396. __gllc_InvalidEnum();
  1397. return;
  1398. }
  1399. size = sizeof(struct __gllc_Lightfv_Rec) + arraySize;
  1400. data = (struct __gllc_Lightfv_Rec *)
  1401. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(Lightfv));
  1402. if (data == NULL) return;
  1403. data->light = light;
  1404. data->pname = pname;
  1405. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_Lightfv_Rec),
  1406. params, arraySize);
  1407. __glDlistAppendOp(gc, data, __glle_Lightfv);
  1408. }
  1409. void APIENTRY
  1410. __gllc_Lightf ( IN GLenum light, IN GLenum pname, IN GLfloat param )
  1411. {
  1412. // LIGHT_SOURCE_ASSERT
  1413. if (!RANGE(pname,GL_SPOT_EXPONENT,GL_QUADRATIC_ATTENUATION))
  1414. {
  1415. __gllc_InvalidEnum();
  1416. return;
  1417. }
  1418. __gllc_Lightfv(light, pname, &param);
  1419. }
  1420. void APIENTRY
  1421. __gllc_Lighti ( IN GLenum light, IN GLenum pname, IN GLint param )
  1422. {
  1423. GLfloat fParam;
  1424. // LIGHT_SOURCE_ASSERT
  1425. if (!RANGE(pname,GL_SPOT_EXPONENT,GL_QUADRATIC_ATTENUATION))
  1426. {
  1427. __gllc_InvalidEnum();
  1428. return;
  1429. }
  1430. fParam = (GLfloat) param;
  1431. __gllc_Lightfv(light, pname, &fParam);
  1432. }
  1433. void APIENTRY
  1434. __gllc_Lightiv ( IN GLenum light, IN GLenum pname, IN const GLint params[] )
  1435. {
  1436. GLfloat fParams[4];
  1437. switch (pname)
  1438. {
  1439. case GL_AMBIENT:
  1440. case GL_DIFFUSE:
  1441. case GL_SPECULAR:
  1442. fParams[0] = __GL_I_TO_FLOAT(params[0]);
  1443. fParams[1] = __GL_I_TO_FLOAT(params[1]);
  1444. fParams[2] = __GL_I_TO_FLOAT(params[2]);
  1445. fParams[3] = __GL_I_TO_FLOAT(params[3]);
  1446. break;
  1447. case GL_POSITION:
  1448. fParams[3] = (GLfloat) params[3];
  1449. case GL_SPOT_DIRECTION:
  1450. fParams[2] = (GLfloat) params[2];
  1451. fParams[1] = (GLfloat) params[1];
  1452. case GL_SPOT_EXPONENT:
  1453. case GL_SPOT_CUTOFF:
  1454. case GL_CONSTANT_ATTENUATION:
  1455. case GL_LINEAR_ATTENUATION:
  1456. case GL_QUADRATIC_ATTENUATION:
  1457. fParams[0] = (GLfloat) params[0];
  1458. break;
  1459. }
  1460. __gllc_Lightfv(light, pname, fParams);
  1461. }
  1462. /***************************************************************************/
  1463. // LightModel functions.
  1464. // Compile only LightModelfv function.
  1465. // Convert the other functions to the compiled LightModelfv function.
  1466. void APIENTRY
  1467. __gllc_LightModelfv ( IN GLenum pname, IN const GLfloat params[] )
  1468. {
  1469. GLuint size;
  1470. GLint arraySize;
  1471. struct __gllc_LightModelfv_Rec *data;
  1472. __GL_SETUP();
  1473. arraySize = __glLightModelfv_size(pname) * 4;
  1474. if (arraySize < 0) {
  1475. __gllc_InvalidEnum();
  1476. return;
  1477. }
  1478. size = sizeof(struct __gllc_LightModelfv_Rec) + arraySize;
  1479. data = (struct __gllc_LightModelfv_Rec *)
  1480. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(LightModelfv));
  1481. if (data == NULL) return;
  1482. data->pname = pname;
  1483. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_LightModelfv_Rec),
  1484. params, arraySize);
  1485. __glDlistAppendOp(gc, data, __glle_LightModelfv);
  1486. }
  1487. void APIENTRY
  1488. __gllc_LightModelf ( IN GLenum pname, IN GLfloat param )
  1489. {
  1490. // LIGHT_MODEL_ASSERT
  1491. if (!RANGE(pname,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE))
  1492. {
  1493. __gllc_InvalidEnum();
  1494. return;
  1495. }
  1496. __gllc_LightModelfv(pname, &param);
  1497. }
  1498. void APIENTRY
  1499. __gllc_LightModeli ( IN GLenum pname, IN GLint param )
  1500. {
  1501. GLfloat fParam;
  1502. // LIGHT_MODEL_ASSERT
  1503. if (!RANGE(pname,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE))
  1504. {
  1505. __gllc_InvalidEnum();
  1506. return;
  1507. }
  1508. fParam = (GLfloat) param;
  1509. __gllc_LightModelfv(pname, &fParam);
  1510. }
  1511. void APIENTRY
  1512. __gllc_LightModeliv ( IN GLenum pname, IN const GLint params[] )
  1513. {
  1514. GLfloat fParams[4];
  1515. switch (pname)
  1516. {
  1517. case GL_LIGHT_MODEL_AMBIENT:
  1518. fParams[0] = __GL_I_TO_FLOAT(params[0]);
  1519. fParams[1] = __GL_I_TO_FLOAT(params[1]);
  1520. fParams[2] = __GL_I_TO_FLOAT(params[2]);
  1521. fParams[3] = __GL_I_TO_FLOAT(params[3]);
  1522. break;
  1523. case GL_LIGHT_MODEL_LOCAL_VIEWER:
  1524. case GL_LIGHT_MODEL_TWO_SIDE:
  1525. fParams[0] = (GLfloat) params[0];
  1526. break;
  1527. }
  1528. __gllc_LightModelfv(pname, fParams);
  1529. }
  1530. /***************************************************************************/
  1531. // Material functions.
  1532. // Compile only Materialfv function.
  1533. // Convert the other functions to the compiled Materialfv function.
  1534. void APIENTRY
  1535. __gllc_Materialfv ( IN GLenum face, IN GLenum pname, IN const GLfloat params[] )
  1536. {
  1537. GLuint size;
  1538. GLint arraySize;
  1539. GLenum error;
  1540. struct __gllc_Materialfv_Rec *data;
  1541. __GL_SETUP();
  1542. #ifdef SGI
  1543. // Check this at playback time
  1544. error = __glErrorCheckMaterial(face, pname, params[0]);
  1545. if (error != GL_NO_ERROR) {
  1546. __gllc_Error(gc, error);
  1547. return;
  1548. }
  1549. #endif
  1550. arraySize = __glMaterialfv_size(pname) * 4;
  1551. if (arraySize < 0) {
  1552. __gllc_InvalidEnum();
  1553. return;
  1554. }
  1555. // If we are compiling poly array primitive, update the poly data record.
  1556. if (gc->dlist.beginRec)
  1557. {
  1558. (*gc->savedCltProcTable.glDispatchTable.glMaterialfv)(face, pname, params);
  1559. return;
  1560. }
  1561. size = sizeof(struct __gllc_Materialfv_Rec) + arraySize;
  1562. data = (struct __gllc_Materialfv_Rec *)
  1563. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(Materialfv));
  1564. if (data == NULL) return;
  1565. data->face = face;
  1566. data->pname = pname;
  1567. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_Materialfv_Rec),
  1568. params, arraySize);
  1569. #ifndef NT
  1570. gc->dlist.listData.genericFlags |= __GL_DLFLAG_HAS_MATERIAL;
  1571. #endif
  1572. __glDlistAppendOp(gc, data, __glle_Materialfv);
  1573. }
  1574. void APIENTRY
  1575. __gllc_Materialf ( IN GLenum face, IN GLenum pname, IN GLfloat param )
  1576. {
  1577. if (pname != GL_SHININESS)
  1578. {
  1579. __gllc_InvalidEnum();
  1580. return;
  1581. }
  1582. __gllc_Materialfv(face, pname, &param);
  1583. }
  1584. void APIENTRY
  1585. __gllc_Materiali ( IN GLenum face, IN GLenum pname, IN GLint param )
  1586. {
  1587. GLfloat fParams[1];
  1588. if (pname != GL_SHININESS)
  1589. {
  1590. __gllc_InvalidEnum();
  1591. return;
  1592. }
  1593. fParams[0] = (GLfloat) param;
  1594. __gllc_Materialfv(face, pname, fParams);
  1595. }
  1596. void APIENTRY
  1597. __gllc_Materialiv ( IN GLenum face, IN GLenum pname, IN const GLint params[] )
  1598. {
  1599. GLfloat fParams[4];
  1600. switch (pname)
  1601. {
  1602. case GL_EMISSION:
  1603. case GL_AMBIENT:
  1604. case GL_DIFFUSE:
  1605. case GL_SPECULAR:
  1606. case GL_AMBIENT_AND_DIFFUSE:
  1607. fParams[0] = __GL_I_TO_FLOAT(params[0]);
  1608. fParams[1] = __GL_I_TO_FLOAT(params[1]);
  1609. fParams[2] = __GL_I_TO_FLOAT(params[2]);
  1610. fParams[3] = __GL_I_TO_FLOAT(params[3]);
  1611. break;
  1612. case GL_COLOR_INDEXES:
  1613. fParams[2] = (GLfloat) params[2];
  1614. fParams[1] = (GLfloat) params[1];
  1615. case GL_SHININESS:
  1616. fParams[0] = (GLfloat) params[0];
  1617. break;
  1618. }
  1619. __gllc_Materialfv(face, pname, fParams);
  1620. }
  1621. /***************************************************************************/
  1622. // TexParameter functions.
  1623. // Compile only TexParameterfv and TexParameteriv functions.
  1624. // Convert the other functions to one of the compiled TexParameter functions.
  1625. void APIENTRY
  1626. __gllc_TexParameterfv ( IN GLenum target, IN GLenum pname, IN const GLfloat params[] )
  1627. {
  1628. GLuint size;
  1629. GLint arraySize;
  1630. struct __gllc_TexParameterfv_Rec *data;
  1631. __GL_SETUP();
  1632. arraySize = __glTexParameterfv_size(pname) * 4;
  1633. if (arraySize < 0) {
  1634. __gllc_InvalidEnum();
  1635. return;
  1636. }
  1637. size = sizeof(struct __gllc_TexParameterfv_Rec) + arraySize;
  1638. data = (struct __gllc_TexParameterfv_Rec *)
  1639. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(TexParameterfv));
  1640. if (data == NULL) return;
  1641. data->target = target;
  1642. data->pname = pname;
  1643. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_TexParameterfv_Rec),
  1644. params, arraySize);
  1645. __glDlistAppendOp(gc, data, __glle_TexParameterfv);
  1646. }
  1647. void APIENTRY
  1648. __gllc_TexParameterf ( IN GLenum target, IN GLenum pname, IN GLfloat param )
  1649. {
  1650. // TEX_PARAMETER_ASSERT
  1651. if (!RANGE(pname,GL_TEXTURE_MAG_FILTER,GL_TEXTURE_WRAP_T) &&
  1652. pname != GL_TEXTURE_PRIORITY)
  1653. {
  1654. __gllc_InvalidEnum();
  1655. return;
  1656. }
  1657. __gllc_TexParameterfv(target, pname, &param);
  1658. }
  1659. void APIENTRY
  1660. __gllc_TexParameteriv ( IN GLenum target, IN GLenum pname, IN const GLint params[] )
  1661. {
  1662. GLuint size;
  1663. GLint arraySize;
  1664. struct __gllc_TexParameteriv_Rec *data;
  1665. __GL_SETUP();
  1666. arraySize = __glTexParameteriv_size(pname) * 4;
  1667. if (arraySize < 0) {
  1668. __gllc_InvalidEnum();
  1669. return;
  1670. }
  1671. size = sizeof(struct __gllc_TexParameteriv_Rec) + arraySize;
  1672. data = (struct __gllc_TexParameteriv_Rec *)
  1673. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(TexParameteriv));
  1674. if (data == NULL) return;
  1675. data->target = target;
  1676. data->pname = pname;
  1677. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_TexParameteriv_Rec),
  1678. params, arraySize);
  1679. __glDlistAppendOp(gc, data, __glle_TexParameteriv);
  1680. }
  1681. void APIENTRY
  1682. __gllc_TexParameteri ( IN GLenum target, IN GLenum pname, IN GLint param )
  1683. {
  1684. // TEX_PARAMETER_ASSERT
  1685. if (!RANGE(pname,GL_TEXTURE_MAG_FILTER,GL_TEXTURE_WRAP_T) &&
  1686. pname != GL_TEXTURE_PRIORITY)
  1687. {
  1688. __gllc_InvalidEnum();
  1689. return;
  1690. }
  1691. __gllc_TexParameteriv(target, pname, &param);
  1692. }
  1693. /***************************************************************************/
  1694. // TexEnv functions.
  1695. // Compile only TexEnvfv and TexEnviv functions.
  1696. // Convert the other functions to one of the compiled TexEnv functions.
  1697. void APIENTRY
  1698. __gllc_TexEnvfv ( IN GLenum target, IN GLenum pname, IN const GLfloat params[] )
  1699. {
  1700. GLuint size;
  1701. GLint arraySize;
  1702. struct __gllc_TexEnvfv_Rec *data;
  1703. __GL_SETUP();
  1704. arraySize = __glTexEnvfv_size(pname) * 4;
  1705. if (arraySize < 0) {
  1706. __gllc_InvalidEnum();
  1707. return;
  1708. }
  1709. size = sizeof(struct __gllc_TexEnvfv_Rec) + arraySize;
  1710. data = (struct __gllc_TexEnvfv_Rec *)
  1711. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(TexEnvfv));
  1712. if (data == NULL) return;
  1713. data->target = target;
  1714. data->pname = pname;
  1715. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_TexEnvfv_Rec),
  1716. params, arraySize);
  1717. __glDlistAppendOp(gc, data, __glle_TexEnvfv);
  1718. }
  1719. void APIENTRY
  1720. __gllc_TexEnvf ( IN GLenum target, IN GLenum pname, IN GLfloat param )
  1721. {
  1722. if (pname != GL_TEXTURE_ENV_MODE)
  1723. {
  1724. __gllc_InvalidEnum();
  1725. return;
  1726. }
  1727. __gllc_TexEnvfv(target, pname, &param);
  1728. }
  1729. void APIENTRY
  1730. __gllc_TexEnviv ( IN GLenum target, IN GLenum pname, IN const GLint params[] )
  1731. {
  1732. GLuint size;
  1733. GLint arraySize;
  1734. struct __gllc_TexEnviv_Rec *data;
  1735. __GL_SETUP();
  1736. arraySize = __glTexEnviv_size(pname) * 4;
  1737. if (arraySize < 0) {
  1738. __gllc_InvalidEnum();
  1739. return;
  1740. }
  1741. size = sizeof(struct __gllc_TexEnviv_Rec) + arraySize;
  1742. data = (struct __gllc_TexEnviv_Rec *)
  1743. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(TexEnviv));
  1744. if (data == NULL) return;
  1745. data->target = target;
  1746. data->pname = pname;
  1747. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_TexEnviv_Rec),
  1748. params, arraySize);
  1749. __glDlistAppendOp(gc, data, __glle_TexEnviv);
  1750. }
  1751. void APIENTRY
  1752. __gllc_TexEnvi ( IN GLenum target, IN GLenum pname, IN GLint param )
  1753. {
  1754. if (pname != GL_TEXTURE_ENV_MODE)
  1755. {
  1756. __gllc_InvalidEnum();
  1757. return;
  1758. }
  1759. __gllc_TexEnviv(target, pname, &param);
  1760. }
  1761. /***************************************************************************/
  1762. // TexGen functions.
  1763. // Compile only TexGenfv function.
  1764. // Convert the other functions to the compiled TexGenfv function.
  1765. void APIENTRY
  1766. __gllc_TexGenfv ( IN GLenum coord, IN GLenum pname, IN const GLfloat params[] )
  1767. {
  1768. GLuint size;
  1769. GLint arraySize;
  1770. struct __gllc_TexGenfv_Rec *data;
  1771. __GL_SETUP();
  1772. arraySize = __glTexGenfv_size(pname) * 4;
  1773. if (arraySize < 0) {
  1774. __gllc_InvalidEnum();
  1775. return;
  1776. }
  1777. size = sizeof(struct __gllc_TexGenfv_Rec) + arraySize;
  1778. data = (struct __gllc_TexGenfv_Rec *)
  1779. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(TexGenfv));
  1780. if (data == NULL) return;
  1781. data->coord = coord;
  1782. data->pname = pname;
  1783. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_TexGenfv_Rec),
  1784. params, arraySize);
  1785. __glDlistAppendOp(gc, data, __glle_TexGenfv);
  1786. }
  1787. void APIENTRY
  1788. __gllc_TexGend ( IN GLenum coord, IN GLenum pname, IN GLdouble param )
  1789. {
  1790. GLfloat fParam;
  1791. if (pname != GL_TEXTURE_GEN_MODE)
  1792. {
  1793. __gllc_InvalidEnum();
  1794. return;
  1795. }
  1796. fParam = (GLfloat) param;
  1797. __gllc_TexGenfv(coord, pname, &fParam);
  1798. }
  1799. void APIENTRY
  1800. __gllc_TexGendv ( IN GLenum coord, IN GLenum pname, IN const GLdouble params[] )
  1801. {
  1802. GLfloat fParams[4];
  1803. switch (pname)
  1804. {
  1805. case GL_OBJECT_PLANE:
  1806. case GL_EYE_PLANE:
  1807. fParams[3] = (GLfloat) params[3];
  1808. fParams[2] = (GLfloat) params[2];
  1809. fParams[1] = (GLfloat) params[1];
  1810. // fall through
  1811. case GL_TEXTURE_GEN_MODE:
  1812. fParams[0] = (GLfloat) params[0];
  1813. break;
  1814. }
  1815. __gllc_TexGenfv(coord, pname, fParams);
  1816. }
  1817. void APIENTRY
  1818. __gllc_TexGenf ( IN GLenum coord, IN GLenum pname, IN GLfloat param )
  1819. {
  1820. if (pname != GL_TEXTURE_GEN_MODE)
  1821. {
  1822. __gllc_InvalidEnum();
  1823. return;
  1824. }
  1825. __gllc_TexGenfv(coord, pname, &param);
  1826. }
  1827. void APIENTRY
  1828. __gllc_TexGeni ( IN GLenum coord, IN GLenum pname, IN GLint param )
  1829. {
  1830. GLfloat fParam;
  1831. if (pname != GL_TEXTURE_GEN_MODE)
  1832. {
  1833. __gllc_InvalidEnum();
  1834. return;
  1835. }
  1836. fParam = (GLfloat) param;
  1837. __gllc_TexGenfv(coord, pname, &fParam);
  1838. }
  1839. void APIENTRY
  1840. __gllc_TexGeniv ( IN GLenum coord, IN GLenum pname, IN const GLint params[] )
  1841. {
  1842. GLfloat fParams[4];
  1843. switch (pname)
  1844. {
  1845. case GL_OBJECT_PLANE:
  1846. case GL_EYE_PLANE:
  1847. fParams[3] = (GLfloat) params[3];
  1848. fParams[2] = (GLfloat) params[2];
  1849. fParams[1] = (GLfloat) params[1];
  1850. // fall through
  1851. case GL_TEXTURE_GEN_MODE:
  1852. fParams[0] = (GLfloat) params[0];
  1853. break;
  1854. }
  1855. __gllc_TexGenfv(coord, pname, fParams);
  1856. }
  1857. /***************************************************************************/
  1858. // MapGrid functions.
  1859. // Compile only MapGrid1f and MapGrid2f functions.
  1860. // Convert the other functions to one of the compiled MapGrid functions.
  1861. void APIENTRY
  1862. __gllc_MapGrid1f ( IN GLint un, IN GLfloat u1, IN GLfloat u2 )
  1863. {
  1864. struct __gllc_MapGrid1f_Rec *data;
  1865. __GL_SETUP();
  1866. data = (struct __gllc_MapGrid1f_Rec *)
  1867. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_MapGrid1f_Rec)),
  1868. DLIST_GENERIC_OP(MapGrid1f));
  1869. if (data == NULL) return;
  1870. data->un = un;
  1871. data->u1 = u1;
  1872. data->u2 = u2;
  1873. __glDlistAppendOp(gc, data, __glle_MapGrid1f);
  1874. }
  1875. void APIENTRY
  1876. __gllc_MapGrid1d ( IN GLint un, IN GLdouble u1, IN GLdouble u2 )
  1877. {
  1878. __gllc_MapGrid1f(un, (GLfloat) u1, (GLfloat) u2);
  1879. }
  1880. void APIENTRY
  1881. __gllc_MapGrid2f ( IN GLint un, IN GLfloat u1, IN GLfloat u2, IN GLint vn, IN GLfloat v1, IN GLfloat v2 )
  1882. {
  1883. struct __gllc_MapGrid2f_Rec *data;
  1884. __GL_SETUP();
  1885. data = (struct __gllc_MapGrid2f_Rec *)
  1886. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_MapGrid2f_Rec)),
  1887. DLIST_GENERIC_OP(MapGrid2f));
  1888. if (data == NULL) return;
  1889. data->un = un;
  1890. data->u1 = u1;
  1891. data->u2 = u2;
  1892. data->vn = vn;
  1893. data->v1 = v1;
  1894. data->v2 = v2;
  1895. __glDlistAppendOp(gc, data, __glle_MapGrid2f);
  1896. }
  1897. void APIENTRY
  1898. __gllc_MapGrid2d ( IN GLint un, IN GLdouble u1, IN GLdouble u2, IN GLint vn, IN GLdouble v1, IN GLdouble v2 )
  1899. {
  1900. __gllc_MapGrid2f(un, (GLfloat) u1, (GLfloat) u2, vn, (GLfloat) v1, (GLfloat) v2);
  1901. }
  1902. /***************************************************************************/
  1903. // EvalCoord functions.
  1904. // Compile only EvalCoord1f and EvalCoord2f functions.
  1905. // Convert the other functions to one of the compiled EvalCoord functions.
  1906. void APIENTRY
  1907. __gllc_EvalCoord1f ( IN GLfloat u )
  1908. {
  1909. struct __gllc_EvalCoord1f_Rec *data;
  1910. __GL_SETUP();
  1911. // If we are compiling poly array primitive, update and record the poly data
  1912. // record.
  1913. if (gc->dlist.beginRec)
  1914. {
  1915. POLYARRAY *pa;
  1916. pa = gc->paTeb;
  1917. // If we are in COMPILE_AND_EXECUTE mode or there are attribute
  1918. // changes associated with the vertex, process the poly data.
  1919. if (gc->dlist.mode == GL_COMPILE_AND_EXECUTE
  1920. || pa->pdNextVertex->flags)
  1921. {
  1922. (*gc->savedCltProcTable.glDispatchTable.glEvalCoord1f)(u);
  1923. __glDlistCompilePolyData(gc, GL_FALSE);
  1924. return;
  1925. }
  1926. // Otherwise, increment vertex count and compile a EvalCoord record
  1927. // instead.
  1928. gc->dlist.beginRec->nVertices++;
  1929. }
  1930. data = (struct __gllc_EvalCoord1f_Rec *)
  1931. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_EvalCoord1f_Rec)),
  1932. DLIST_GENERIC_OP(EvalCoord1f));
  1933. if (data == NULL) return;
  1934. data->u = u;
  1935. __glDlistAppendOp(gc, data, __glle_EvalCoord1f);
  1936. }
  1937. void APIENTRY
  1938. __gllc_EvalCoord1d ( IN GLdouble u )
  1939. {
  1940. __gllc_EvalCoord1f((GLfloat) u);
  1941. }
  1942. void APIENTRY
  1943. __gllc_EvalCoord1dv ( IN const GLdouble u[1] )
  1944. {
  1945. __gllc_EvalCoord1f((GLfloat) u[0]);
  1946. }
  1947. void APIENTRY
  1948. __gllc_EvalCoord1fv ( IN const GLfloat u[1] )
  1949. {
  1950. __gllc_EvalCoord1f((GLfloat) u[0]);
  1951. }
  1952. void APIENTRY
  1953. __gllc_EvalCoord2f ( IN GLfloat u, IN GLfloat v )
  1954. {
  1955. struct __gllc_EvalCoord2f_Rec *data;
  1956. __GL_SETUP();
  1957. // If we are compiling poly array primitive, update and record the poly data
  1958. // record.
  1959. if (gc->dlist.beginRec)
  1960. {
  1961. POLYARRAY *pa;
  1962. pa = gc->paTeb;
  1963. // If we are in COMPILE_AND_EXECUTE mode or there are attribute
  1964. // changes associated with the vertex, process the poly data.
  1965. if (gc->dlist.mode == GL_COMPILE_AND_EXECUTE
  1966. || pa->pdNextVertex->flags)
  1967. {
  1968. (*gc->savedCltProcTable.glDispatchTable.glEvalCoord2f)(u, v);
  1969. __glDlistCompilePolyData(gc, GL_FALSE);
  1970. return;
  1971. }
  1972. // Otherwise, increment vertex count and compile a EvalCoord record
  1973. // instead.
  1974. gc->dlist.beginRec->nVertices++;
  1975. }
  1976. data = (struct __gllc_EvalCoord2f_Rec *)
  1977. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_EvalCoord2f_Rec)),
  1978. DLIST_GENERIC_OP(EvalCoord2f));
  1979. if (data == NULL) return;
  1980. data->u = u;
  1981. data->v = v;
  1982. __glDlistAppendOp(gc, data, __glle_EvalCoord2f);
  1983. }
  1984. void APIENTRY
  1985. __gllc_EvalCoord2d ( IN GLdouble u, IN GLdouble v )
  1986. {
  1987. __gllc_EvalCoord2f((GLfloat) u, (GLfloat) v);
  1988. }
  1989. void APIENTRY
  1990. __gllc_EvalCoord2dv ( IN const GLdouble u[2] )
  1991. {
  1992. __gllc_EvalCoord2f((GLfloat) u[0], (GLfloat) u[1]);
  1993. }
  1994. void APIENTRY
  1995. __gllc_EvalCoord2fv ( IN const GLfloat u[2] )
  1996. {
  1997. __gllc_EvalCoord2f((GLfloat) u[0], (GLfloat) u[1]);
  1998. }
  1999. /***************************************************************************/
  2000. // LoadMatrix functions.
  2001. // Compile only LoadMatrixf function.
  2002. // Convert the other functions to the compiled LoadMatrixf function.
  2003. void APIENTRY
  2004. __gllc_LoadMatrixf ( IN const GLfloat m[16] )
  2005. {
  2006. struct __gllc_LoadMatrixf_Rec *data;
  2007. __GL_SETUP();
  2008. data = (struct __gllc_LoadMatrixf_Rec *)
  2009. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_LoadMatrixf_Rec)),
  2010. DLIST_GENERIC_OP(LoadMatrixf));
  2011. if (data == NULL) return;
  2012. __GL_MEMCOPY(data->m, m, sizeof(data->m));
  2013. __glDlistAppendOp(gc, data, __glle_LoadMatrixf);
  2014. }
  2015. void APIENTRY
  2016. __gllc_LoadMatrixd ( IN const GLdouble m[16] )
  2017. {
  2018. GLfloat fm[16];
  2019. fm[ 0] = (GLfloat) m[ 0];
  2020. fm[ 1] = (GLfloat) m[ 1];
  2021. fm[ 2] = (GLfloat) m[ 2];
  2022. fm[ 3] = (GLfloat) m[ 3];
  2023. fm[ 4] = (GLfloat) m[ 4];
  2024. fm[ 5] = (GLfloat) m[ 5];
  2025. fm[ 6] = (GLfloat) m[ 6];
  2026. fm[ 7] = (GLfloat) m[ 7];
  2027. fm[ 8] = (GLfloat) m[ 8];
  2028. fm[ 9] = (GLfloat) m[ 9];
  2029. fm[10] = (GLfloat) m[10];
  2030. fm[11] = (GLfloat) m[11];
  2031. fm[12] = (GLfloat) m[12];
  2032. fm[13] = (GLfloat) m[13];
  2033. fm[14] = (GLfloat) m[14];
  2034. fm[15] = (GLfloat) m[15];
  2035. __gllc_LoadMatrixf(fm);
  2036. }
  2037. /***************************************************************************/
  2038. // MultMatrix functions.
  2039. // Compile only MultMatrixf function.
  2040. // Convert the other functions to the compiled MultMatrixf function.
  2041. void APIENTRY
  2042. __gllc_MultMatrixf ( IN const GLfloat m[16] )
  2043. {
  2044. struct __gllc_MultMatrixf_Rec *data;
  2045. __GL_SETUP();
  2046. data = (struct __gllc_MultMatrixf_Rec *)
  2047. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_MultMatrixf_Rec)),
  2048. DLIST_GENERIC_OP(MultMatrixf));
  2049. if (data == NULL) return;
  2050. __GL_MEMCOPY(data->m, m, sizeof(data->m));
  2051. __glDlistAppendOp(gc, data, __glle_MultMatrixf);
  2052. }
  2053. void APIENTRY
  2054. __gllc_MultMatrixd ( IN const GLdouble m[16] )
  2055. {
  2056. GLfloat fm[16];
  2057. fm[ 0] = (GLfloat) m[ 0];
  2058. fm[ 1] = (GLfloat) m[ 1];
  2059. fm[ 2] = (GLfloat) m[ 2];
  2060. fm[ 3] = (GLfloat) m[ 3];
  2061. fm[ 4] = (GLfloat) m[ 4];
  2062. fm[ 5] = (GLfloat) m[ 5];
  2063. fm[ 6] = (GLfloat) m[ 6];
  2064. fm[ 7] = (GLfloat) m[ 7];
  2065. fm[ 8] = (GLfloat) m[ 8];
  2066. fm[ 9] = (GLfloat) m[ 9];
  2067. fm[10] = (GLfloat) m[10];
  2068. fm[11] = (GLfloat) m[11];
  2069. fm[12] = (GLfloat) m[12];
  2070. fm[13] = (GLfloat) m[13];
  2071. fm[14] = (GLfloat) m[14];
  2072. fm[15] = (GLfloat) m[15];
  2073. __gllc_MultMatrixf(fm);
  2074. }
  2075. /***************************************************************************/
  2076. // Rotate functions.
  2077. // Compile only Rotatef function.
  2078. // Convert the other functions to the compiled Rotatef function.
  2079. void APIENTRY
  2080. __gllc_Rotatef ( IN GLfloat angle, IN GLfloat x, IN GLfloat y, IN GLfloat z )
  2081. {
  2082. struct __gllc_Rotatef_Rec *data;
  2083. __GL_SETUP();
  2084. data = (struct __gllc_Rotatef_Rec *)
  2085. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Rotatef_Rec)),
  2086. DLIST_GENERIC_OP(Rotatef));
  2087. if (data == NULL) return;
  2088. data->angle = angle;
  2089. data->x = x;
  2090. data->y = y;
  2091. data->z = z;
  2092. __glDlistAppendOp(gc, data, __glle_Rotatef);
  2093. }
  2094. void APIENTRY
  2095. __gllc_Rotated ( IN GLdouble angle, IN GLdouble x, IN GLdouble y, IN GLdouble z )
  2096. {
  2097. __gllc_Rotatef((GLfloat) angle, (GLfloat) x, (GLfloat) y, (GLfloat) z);
  2098. }
  2099. /***************************************************************************/
  2100. // Scale functions.
  2101. // Compile only Scalef function.
  2102. // Convert the other functions to the compiled Scalef function.
  2103. void APIENTRY
  2104. __gllc_Scalef ( IN GLfloat x, IN GLfloat y, IN GLfloat z )
  2105. {
  2106. struct __gllc_Scalef_Rec *data;
  2107. __GL_SETUP();
  2108. data = (struct __gllc_Scalef_Rec *)
  2109. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Scalef_Rec)),
  2110. DLIST_GENERIC_OP(Scalef));
  2111. if (data == NULL) return;
  2112. data->x = x;
  2113. data->y = y;
  2114. data->z = z;
  2115. __glDlistAppendOp(gc, data, __glle_Scalef);
  2116. }
  2117. void APIENTRY
  2118. __gllc_Scaled ( IN GLdouble x, IN GLdouble y, IN GLdouble z )
  2119. {
  2120. __gllc_Scalef((GLfloat) x, (GLfloat) y, (GLfloat) z);
  2121. }
  2122. /***************************************************************************/
  2123. // Translate functions.
  2124. // Compile only Translatef function.
  2125. // Convert the other functions to the compiled Translatef function.
  2126. void APIENTRY
  2127. __gllc_Translatef ( IN GLfloat x, IN GLfloat y, IN GLfloat z )
  2128. {
  2129. struct __gllc_Translatef_Rec *data;
  2130. __GL_SETUP();
  2131. data = (struct __gllc_Translatef_Rec *)
  2132. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Translatef_Rec)),
  2133. DLIST_GENERIC_OP(Translatef));
  2134. if (data == NULL) return;
  2135. data->x = x;
  2136. data->y = y;
  2137. data->z = z;
  2138. __glDlistAppendOp(gc, data, __glle_Translatef);
  2139. }
  2140. void APIENTRY
  2141. __gllc_Translated ( IN GLdouble x, IN GLdouble y, IN GLdouble z )
  2142. {
  2143. __gllc_Translatef((GLfloat) x, (GLfloat) y, (GLfloat) z);
  2144. }
  2145. /***************************************************************************/
  2146. // Other functions.
  2147. void APIENTRY
  2148. __gllc_ListBase ( IN GLuint base )
  2149. {
  2150. struct __gllc_ListBase_Rec *data;
  2151. __GL_SETUP();
  2152. data = (struct __gllc_ListBase_Rec *)
  2153. __glDlistAddOpUnaligned(gc,
  2154. DLIST_SIZE(sizeof(struct __gllc_ListBase_Rec)),
  2155. DLIST_GENERIC_OP(ListBase));
  2156. if (data == NULL) return;
  2157. data->base = base;
  2158. __glDlistAppendOp(gc, data, __glle_ListBase);
  2159. }
  2160. void APIENTRY
  2161. __gllc_ClipPlane ( IN GLenum plane, IN const GLdouble equation[4] )
  2162. {
  2163. struct __gllc_ClipPlane_Rec *data;
  2164. __GL_SETUP();
  2165. data = (struct __gllc_ClipPlane_Rec *)
  2166. __glDlistAddOpAligned(gc, DLIST_SIZE(sizeof(struct __gllc_ClipPlane_Rec)),
  2167. DLIST_GENERIC_OP(ClipPlane));
  2168. if (data == NULL) return;
  2169. data->plane = plane;
  2170. data->equation[0] = equation[0];
  2171. data->equation[1] = equation[1];
  2172. data->equation[2] = equation[2];
  2173. data->equation[3] = equation[3];
  2174. __glDlistAppendOp(gc, data, __glle_ClipPlane);
  2175. }
  2176. void APIENTRY
  2177. __gllc_ColorMaterial ( IN GLenum face, IN GLenum mode )
  2178. {
  2179. struct __gllc_ColorMaterial_Rec *data;
  2180. __GL_SETUP();
  2181. data = (struct __gllc_ColorMaterial_Rec *)
  2182. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ColorMaterial_Rec)),
  2183. DLIST_GENERIC_OP(ColorMaterial));
  2184. if (data == NULL) return;
  2185. data->face = face;
  2186. data->mode = mode;
  2187. __glDlistAppendOp(gc, data, __glle_ColorMaterial);
  2188. }
  2189. void APIENTRY
  2190. __gllc_CullFace ( IN GLenum mode )
  2191. {
  2192. struct __gllc_CullFace_Rec *data;
  2193. __GL_SETUP();
  2194. data = (struct __gllc_CullFace_Rec *)
  2195. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_CullFace_Rec)),
  2196. DLIST_GENERIC_OP(CullFace));
  2197. if (data == NULL) return;
  2198. data->mode = mode;
  2199. __glDlistAppendOp(gc, data, __glle_CullFace);
  2200. }
  2201. void APIENTRY
  2202. __gllc_FrontFace ( IN GLenum mode )
  2203. {
  2204. struct __gllc_FrontFace_Rec *data;
  2205. __GL_SETUP();
  2206. data = (struct __gllc_FrontFace_Rec *)
  2207. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_FrontFace_Rec)),
  2208. DLIST_GENERIC_OP(FrontFace));
  2209. if (data == NULL) return;
  2210. data->mode = mode;
  2211. __glDlistAppendOp(gc, data, __glle_FrontFace);
  2212. }
  2213. void APIENTRY
  2214. __gllc_Hint ( IN GLenum target, IN GLenum mode )
  2215. {
  2216. struct __gllc_Hint_Rec *data;
  2217. __GL_SETUP();
  2218. data = (struct __gllc_Hint_Rec *)
  2219. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Hint_Rec)),
  2220. DLIST_GENERIC_OP(Hint));
  2221. if (data == NULL) return;
  2222. data->target = target;
  2223. data->mode = mode;
  2224. __glDlistAppendOp(gc, data, __glle_Hint);
  2225. }
  2226. void APIENTRY
  2227. __gllc_LineStipple ( IN GLint factor, IN GLushort pattern )
  2228. {
  2229. struct __gllc_LineStipple_Rec *data;
  2230. __GL_SETUP();
  2231. data = (struct __gllc_LineStipple_Rec *)
  2232. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_LineStipple_Rec)),
  2233. DLIST_GENERIC_OP(LineStipple));
  2234. if (data == NULL) return;
  2235. data->factor = factor;
  2236. data->pattern = pattern;
  2237. __glDlistAppendOp(gc, data, __glle_LineStipple);
  2238. }
  2239. void APIENTRY
  2240. __gllc_LineWidth ( IN GLfloat width )
  2241. {
  2242. struct __gllc_LineWidth_Rec *data;
  2243. __GL_SETUP();
  2244. data = (struct __gllc_LineWidth_Rec *)
  2245. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_LineWidth_Rec)),
  2246. DLIST_GENERIC_OP(LineWidth));
  2247. if (data == NULL) return;
  2248. data->width = width;
  2249. __glDlistAppendOp(gc, data, __glle_LineWidth);
  2250. }
  2251. void APIENTRY
  2252. __gllc_PointSize ( IN GLfloat size )
  2253. {
  2254. struct __gllc_PointSize_Rec *data;
  2255. __GL_SETUP();
  2256. data = (struct __gllc_PointSize_Rec *)
  2257. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PointSize_Rec)),
  2258. DLIST_GENERIC_OP(PointSize));
  2259. if (data == NULL) return;
  2260. data->size = size;
  2261. __glDlistAppendOp(gc, data, __glle_PointSize);
  2262. }
  2263. void APIENTRY
  2264. __gllc_PolygonMode ( IN GLenum face, IN GLenum mode )
  2265. {
  2266. struct __gllc_PolygonMode_Rec *data;
  2267. __GL_SETUP();
  2268. data = (struct __gllc_PolygonMode_Rec *)
  2269. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PolygonMode_Rec)),
  2270. DLIST_GENERIC_OP(PolygonMode));
  2271. if (data == NULL) return;
  2272. data->face = face;
  2273. data->mode = mode;
  2274. __glDlistAppendOp(gc, data, __glle_PolygonMode);
  2275. }
  2276. void APIENTRY
  2277. __gllc_Scissor ( IN GLint x, IN GLint y, IN GLsizei width, IN GLsizei height )
  2278. {
  2279. struct __gllc_Scissor_Rec *data;
  2280. __GL_SETUP();
  2281. data = (struct __gllc_Scissor_Rec *)
  2282. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Scissor_Rec)),
  2283. DLIST_GENERIC_OP(Scissor));
  2284. if (data == NULL) return;
  2285. data->x = x;
  2286. data->y = y;
  2287. data->width = width;
  2288. data->height = height;
  2289. __glDlistAppendOp(gc, data, __glle_Scissor);
  2290. }
  2291. void APIENTRY
  2292. __gllc_ShadeModel ( IN GLenum mode )
  2293. {
  2294. struct __gllc_ShadeModel_Rec *data;
  2295. __GL_SETUP();
  2296. data = (struct __gllc_ShadeModel_Rec *)
  2297. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ShadeModel_Rec)),
  2298. DLIST_GENERIC_OP(ShadeModel));
  2299. if (data == NULL) return;
  2300. data->mode = mode;
  2301. __glDlistAppendOp(gc, data, __glle_ShadeModel);
  2302. }
  2303. void APIENTRY
  2304. __gllc_InitNames ( void )
  2305. {
  2306. void *data;
  2307. __GL_SETUP();
  2308. data = __glDlistAddOpUnaligned(gc, DLIST_SIZE(0), DLIST_GENERIC_OP(InitNames));
  2309. if (data == NULL) return;
  2310. __glDlistAppendOp(gc, data, __glle_InitNames);
  2311. }
  2312. void APIENTRY
  2313. __gllc_LoadName ( IN GLuint name )
  2314. {
  2315. struct __gllc_LoadName_Rec *data;
  2316. __GL_SETUP();
  2317. data = (struct __gllc_LoadName_Rec *)
  2318. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_LoadName_Rec)),
  2319. DLIST_GENERIC_OP(LoadName));
  2320. if (data == NULL) return;
  2321. data->name = name;
  2322. __glDlistAppendOp(gc, data, __glle_LoadName);
  2323. }
  2324. void APIENTRY
  2325. __gllc_PassThrough ( IN GLfloat token )
  2326. {
  2327. struct __gllc_PassThrough_Rec *data;
  2328. __GL_SETUP();
  2329. data = (struct __gllc_PassThrough_Rec *)
  2330. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PassThrough_Rec)),
  2331. DLIST_GENERIC_OP(PassThrough));
  2332. if (data == NULL) return;
  2333. data->token = token;
  2334. __glDlistAppendOp(gc, data, __glle_PassThrough);
  2335. }
  2336. void APIENTRY
  2337. __gllc_PopName ( void )
  2338. {
  2339. void *data;
  2340. __GL_SETUP();
  2341. data = __glDlistAddOpUnaligned(gc, DLIST_SIZE(0), DLIST_GENERIC_OP(PopName));
  2342. if (data == NULL) return;
  2343. __glDlistAppendOp(gc, data, __glle_PopName);
  2344. }
  2345. void APIENTRY
  2346. __gllc_PushName ( IN GLuint name )
  2347. {
  2348. struct __gllc_PushName_Rec *data;
  2349. __GL_SETUP();
  2350. data = (struct __gllc_PushName_Rec *)
  2351. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PushName_Rec)),
  2352. DLIST_GENERIC_OP(PushName));
  2353. if (data == NULL) return;
  2354. data->name = name;
  2355. __glDlistAppendOp(gc, data, __glle_PushName);
  2356. }
  2357. void APIENTRY
  2358. __gllc_DrawBuffer ( IN GLenum mode )
  2359. {
  2360. struct __gllc_DrawBuffer_Rec *data;
  2361. __GL_SETUP();
  2362. data = (struct __gllc_DrawBuffer_Rec *)
  2363. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_DrawBuffer_Rec)),
  2364. DLIST_GENERIC_OP(DrawBuffer));
  2365. if (data == NULL) return;
  2366. data->mode = mode;
  2367. __glDlistAppendOp(gc, data, __glle_DrawBuffer);
  2368. #if 0
  2369. #ifdef NT
  2370. gc->dlist.drawBuffer = GL_TRUE;
  2371. #endif
  2372. #endif
  2373. }
  2374. void APIENTRY
  2375. __gllc_Clear ( IN GLbitfield mask )
  2376. {
  2377. struct __gllc_Clear_Rec *data;
  2378. __GL_SETUP();
  2379. data = (struct __gllc_Clear_Rec *)
  2380. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Clear_Rec)),
  2381. DLIST_GENERIC_OP(Clear));
  2382. if (data == NULL) return;
  2383. data->mask = mask;
  2384. __glDlistAppendOp(gc, data, __glle_Clear);
  2385. }
  2386. void APIENTRY
  2387. __gllc_ClearAccum ( IN GLfloat red, IN GLfloat green, IN GLfloat blue, IN GLfloat alpha )
  2388. {
  2389. struct __gllc_ClearAccum_Rec *data;
  2390. __GL_SETUP();
  2391. data = (struct __gllc_ClearAccum_Rec *)
  2392. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ClearAccum_Rec)),
  2393. DLIST_GENERIC_OP(ClearAccum));
  2394. if (data == NULL) return;
  2395. data->red = red;
  2396. data->green = green;
  2397. data->blue = blue;
  2398. data->alpha = alpha;
  2399. __glDlistAppendOp(gc, data, __glle_ClearAccum);
  2400. }
  2401. void APIENTRY
  2402. __gllc_ClearIndex ( IN GLfloat c )
  2403. {
  2404. struct __gllc_ClearIndex_Rec *data;
  2405. __GL_SETUP();
  2406. data = (struct __gllc_ClearIndex_Rec *)
  2407. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ClearIndex_Rec)),
  2408. DLIST_GENERIC_OP(ClearIndex));
  2409. if (data == NULL) return;
  2410. data->c = c;
  2411. __glDlistAppendOp(gc, data, __glle_ClearIndex);
  2412. }
  2413. void APIENTRY
  2414. __gllc_ClearColor ( IN GLclampf red, IN GLclampf green, IN GLclampf blue, IN GLclampf alpha )
  2415. {
  2416. struct __gllc_ClearColor_Rec *data;
  2417. __GL_SETUP();
  2418. data = (struct __gllc_ClearColor_Rec *)
  2419. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ClearColor_Rec)),
  2420. DLIST_GENERIC_OP(ClearColor));
  2421. if (data == NULL) return;
  2422. data->red = red;
  2423. data->green = green;
  2424. data->blue = blue;
  2425. data->alpha = alpha;
  2426. __glDlistAppendOp(gc, data, __glle_ClearColor);
  2427. }
  2428. void APIENTRY
  2429. __gllc_ClearStencil ( IN GLint s )
  2430. {
  2431. struct __gllc_ClearStencil_Rec *data;
  2432. __GL_SETUP();
  2433. data = (struct __gllc_ClearStencil_Rec *)
  2434. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ClearStencil_Rec)),
  2435. DLIST_GENERIC_OP(ClearStencil));
  2436. if (data == NULL) return;
  2437. data->s = s;
  2438. __glDlistAppendOp(gc, data, __glle_ClearStencil);
  2439. }
  2440. void APIENTRY
  2441. __gllc_ClearDepth ( IN GLclampd depth )
  2442. {
  2443. struct __gllc_ClearDepth_Rec *data;
  2444. __GL_SETUP();
  2445. data = (struct __gllc_ClearDepth_Rec *)
  2446. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ClearDepth_Rec)),
  2447. DLIST_GENERIC_OP(ClearDepth));
  2448. if (data == NULL) return;
  2449. data->depth = depth;
  2450. __glDlistAppendOp(gc, data, __glle_ClearDepth);
  2451. }
  2452. void APIENTRY
  2453. __gllc_StencilMask ( IN GLuint mask )
  2454. {
  2455. struct __gllc_StencilMask_Rec *data;
  2456. __GL_SETUP();
  2457. data = (struct __gllc_StencilMask_Rec *)
  2458. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_StencilMask_Rec)),
  2459. DLIST_GENERIC_OP(StencilMask));
  2460. if (data == NULL) return;
  2461. data->mask = mask;
  2462. __glDlistAppendOp(gc, data, __glle_StencilMask);
  2463. }
  2464. void APIENTRY
  2465. __gllc_ColorMask ( IN GLboolean red, IN GLboolean green, IN GLboolean blue, IN GLboolean alpha )
  2466. {
  2467. struct __gllc_ColorMask_Rec *data;
  2468. __GL_SETUP();
  2469. data = (struct __gllc_ColorMask_Rec *)
  2470. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ColorMask_Rec)),
  2471. DLIST_GENERIC_OP(ColorMask));
  2472. if (data == NULL) return;
  2473. data->red = red;
  2474. data->green = green;
  2475. data->blue = blue;
  2476. data->alpha = alpha;
  2477. __glDlistAppendOp(gc, data, __glle_ColorMask);
  2478. }
  2479. void APIENTRY
  2480. __gllc_DepthMask ( IN GLboolean flag )
  2481. {
  2482. struct __gllc_DepthMask_Rec *data;
  2483. __GL_SETUP();
  2484. data = (struct __gllc_DepthMask_Rec *)
  2485. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_DepthMask_Rec)),
  2486. DLIST_GENERIC_OP(DepthMask));
  2487. if (data == NULL) return;
  2488. data->flag = flag;
  2489. __glDlistAppendOp(gc, data, __glle_DepthMask);
  2490. }
  2491. void APIENTRY
  2492. __gllc_IndexMask ( IN GLuint mask )
  2493. {
  2494. struct __gllc_IndexMask_Rec *data;
  2495. __GL_SETUP();
  2496. data = (struct __gllc_IndexMask_Rec *)
  2497. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_IndexMask_Rec)),
  2498. DLIST_GENERIC_OP(IndexMask));
  2499. if (data == NULL) return;
  2500. data->mask = mask;
  2501. __glDlistAppendOp(gc, data, __glle_IndexMask);
  2502. }
  2503. void APIENTRY
  2504. __gllc_Accum ( IN GLenum op, IN GLfloat value )
  2505. {
  2506. struct __gllc_Accum_Rec *data;
  2507. __GL_SETUP();
  2508. data = (struct __gllc_Accum_Rec *)
  2509. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Accum_Rec)),
  2510. DLIST_GENERIC_OP(Accum));
  2511. if (data == NULL) return;
  2512. data->op = op;
  2513. data->value = value;
  2514. __glDlistAppendOp(gc, data, __glle_Accum);
  2515. }
  2516. void APIENTRY
  2517. __gllc_Disable ( IN GLenum cap )
  2518. {
  2519. struct __gllc_Disable_Rec *data;
  2520. __GL_SETUP();
  2521. data = (struct __gllc_Disable_Rec *)
  2522. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Disable_Rec)),
  2523. DLIST_GENERIC_OP(Disable));
  2524. if (data == NULL) return;
  2525. data->cap = cap;
  2526. __glDlistAppendOp(gc, data, __glle_Disable);
  2527. }
  2528. void APIENTRY
  2529. __gllc_Enable ( IN GLenum cap )
  2530. {
  2531. struct __gllc_Enable_Rec *data;
  2532. __GL_SETUP();
  2533. data = (struct __gllc_Enable_Rec *)
  2534. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Enable_Rec)),
  2535. DLIST_GENERIC_OP(Enable));
  2536. if (data == NULL) return;
  2537. data->cap = cap;
  2538. __glDlistAppendOp(gc, data, __glle_Enable);
  2539. }
  2540. void APIENTRY
  2541. __gllc_PopAttrib ( void )
  2542. {
  2543. void *data;
  2544. __GL_SETUP();
  2545. data = __glDlistAddOpUnaligned(gc, DLIST_SIZE(0), DLIST_GENERIC_OP(PopAttrib));
  2546. if (data == NULL) return;
  2547. __glDlistAppendOp(gc, data, __glle_PopAttrib);
  2548. }
  2549. void APIENTRY
  2550. __gllc_PushAttrib ( IN GLbitfield mask )
  2551. {
  2552. struct __gllc_PushAttrib_Rec *data;
  2553. __GL_SETUP();
  2554. data = (struct __gllc_PushAttrib_Rec *)
  2555. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PushAttrib_Rec)),
  2556. DLIST_GENERIC_OP(PushAttrib));
  2557. if (data == NULL) return;
  2558. data->mask = mask;
  2559. __glDlistAppendOp(gc, data, __glle_PushAttrib);
  2560. }
  2561. void APIENTRY
  2562. __gllc_EvalMesh1 ( IN GLenum mode, IN GLint i1, IN GLint i2 )
  2563. {
  2564. struct __gllc_EvalMesh1_Rec *data;
  2565. __GL_SETUP();
  2566. data = (struct __gllc_EvalMesh1_Rec *)
  2567. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_EvalMesh1_Rec)),
  2568. DLIST_GENERIC_OP(EvalMesh1));
  2569. if (data == NULL) return;
  2570. data->mode = mode;
  2571. data->i1 = i1;
  2572. data->i2 = i2;
  2573. __glDlistAppendOp(gc, data, __glle_EvalMesh1);
  2574. }
  2575. void APIENTRY
  2576. __gllc_EvalPoint1 ( IN GLint i )
  2577. {
  2578. struct __gllc_EvalPoint1_Rec *data;
  2579. __GL_SETUP();
  2580. // If we are compiling poly array primitive, update and record the poly data
  2581. // record.
  2582. if (gc->dlist.beginRec)
  2583. {
  2584. POLYARRAY *pa;
  2585. pa = gc->paTeb;
  2586. // If we are in COMPILE_AND_EXECUTE mode or there are attribute
  2587. // changes associated with the vertex, process the poly data.
  2588. if (gc->dlist.mode == GL_COMPILE_AND_EXECUTE
  2589. || pa->pdNextVertex->flags)
  2590. {
  2591. (*gc->savedCltProcTable.glDispatchTable.glEvalPoint1)(i);
  2592. __glDlistCompilePolyData(gc, GL_FALSE);
  2593. return;
  2594. }
  2595. // Otherwise, increment vertex count and compile a EvalPoint record
  2596. // instead.
  2597. gc->dlist.beginRec->nVertices++;
  2598. }
  2599. data = (struct __gllc_EvalPoint1_Rec *)
  2600. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_EvalPoint1_Rec)),
  2601. DLIST_GENERIC_OP(EvalPoint1));
  2602. if (data == NULL) return;
  2603. data->i = i;
  2604. __glDlistAppendOp(gc, data, __glle_EvalPoint1);
  2605. }
  2606. void APIENTRY
  2607. __gllc_EvalMesh2 ( IN GLenum mode, IN GLint i1, IN GLint i2, IN GLint j1, IN GLint j2 )
  2608. {
  2609. struct __gllc_EvalMesh2_Rec *data;
  2610. __GL_SETUP();
  2611. data = (struct __gllc_EvalMesh2_Rec *)
  2612. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_EvalMesh2_Rec)),
  2613. DLIST_GENERIC_OP(EvalMesh2));
  2614. if (data == NULL) return;
  2615. data->mode = mode;
  2616. data->i1 = i1;
  2617. data->i2 = i2;
  2618. data->j1 = j1;
  2619. data->j2 = j2;
  2620. __glDlistAppendOp(gc, data, __glle_EvalMesh2);
  2621. }
  2622. void APIENTRY
  2623. __gllc_EvalPoint2 ( IN GLint i, IN GLint j )
  2624. {
  2625. struct __gllc_EvalPoint2_Rec *data;
  2626. __GL_SETUP();
  2627. // If we are compiling poly array primitive, update and record the poly data
  2628. // record.
  2629. if (gc->dlist.beginRec)
  2630. {
  2631. POLYARRAY *pa;
  2632. pa = gc->paTeb;
  2633. // If we are in COMPILE_AND_EXECUTE mode or there are attribute
  2634. // changes associated with the vertex, process the poly data.
  2635. if (gc->dlist.mode == GL_COMPILE_AND_EXECUTE
  2636. || pa->pdNextVertex->flags)
  2637. {
  2638. (*gc->savedCltProcTable.glDispatchTable.glEvalPoint2)(i, j);
  2639. __glDlistCompilePolyData(gc, GL_FALSE);
  2640. return;
  2641. }
  2642. // Otherwise, increment vertex count and compile a EvalPoint record
  2643. // instead.
  2644. gc->dlist.beginRec->nVertices++;
  2645. }
  2646. data = (struct __gllc_EvalPoint2_Rec *)
  2647. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_EvalPoint2_Rec)),
  2648. DLIST_GENERIC_OP(EvalPoint2));
  2649. if (data == NULL) return;
  2650. data->i = i;
  2651. data->j = j;
  2652. __glDlistAppendOp(gc, data, __glle_EvalPoint2);
  2653. }
  2654. void APIENTRY
  2655. __gllc_AlphaFunc ( IN GLenum func, IN GLclampf ref )
  2656. {
  2657. struct __gllc_AlphaFunc_Rec *data;
  2658. __GL_SETUP();
  2659. data = (struct __gllc_AlphaFunc_Rec *)
  2660. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_AlphaFunc_Rec)),
  2661. DLIST_GENERIC_OP(AlphaFunc));
  2662. if (data == NULL) return;
  2663. data->func = func;
  2664. data->ref = ref;
  2665. __glDlistAppendOp(gc, data, __glle_AlphaFunc);
  2666. }
  2667. void APIENTRY
  2668. __gllc_BlendFunc ( IN GLenum sfactor, IN GLenum dfactor )
  2669. {
  2670. struct __gllc_BlendFunc_Rec *data;
  2671. __GL_SETUP();
  2672. data = (struct __gllc_BlendFunc_Rec *)
  2673. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_BlendFunc_Rec)),
  2674. DLIST_GENERIC_OP(BlendFunc));
  2675. if (data == NULL) return;
  2676. data->sfactor = sfactor;
  2677. data->dfactor = dfactor;
  2678. __glDlistAppendOp(gc, data, __glle_BlendFunc);
  2679. }
  2680. void APIENTRY
  2681. __gllc_LogicOp ( IN GLenum opcode )
  2682. {
  2683. struct __gllc_LogicOp_Rec *data;
  2684. __GL_SETUP();
  2685. data = (struct __gllc_LogicOp_Rec *)
  2686. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_LogicOp_Rec)),
  2687. DLIST_GENERIC_OP(LogicOp));
  2688. if (data == NULL) return;
  2689. data->opcode = opcode;
  2690. __glDlistAppendOp(gc, data, __glle_LogicOp);
  2691. }
  2692. void APIENTRY
  2693. __gllc_StencilFunc ( IN GLenum func, IN GLint ref, IN GLuint mask )
  2694. {
  2695. struct __gllc_StencilFunc_Rec *data;
  2696. __GL_SETUP();
  2697. data = (struct __gllc_StencilFunc_Rec *)
  2698. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_StencilFunc_Rec)),
  2699. DLIST_GENERIC_OP(StencilFunc));
  2700. if (data == NULL) return;
  2701. data->func = func;
  2702. data->ref = ref;
  2703. data->mask = mask;
  2704. __glDlistAppendOp(gc, data, __glle_StencilFunc);
  2705. }
  2706. void APIENTRY
  2707. __gllc_StencilOp ( IN GLenum fail, IN GLenum zfail, IN GLenum zpass )
  2708. {
  2709. struct __gllc_StencilOp_Rec *data;
  2710. __GL_SETUP();
  2711. data = (struct __gllc_StencilOp_Rec *)
  2712. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_StencilOp_Rec)),
  2713. DLIST_GENERIC_OP(StencilOp));
  2714. if (data == NULL) return;
  2715. data->fail = fail;
  2716. data->zfail = zfail;
  2717. data->zpass = zpass;
  2718. __glDlistAppendOp(gc, data, __glle_StencilOp);
  2719. }
  2720. void APIENTRY
  2721. __gllc_DepthFunc ( IN GLenum func )
  2722. {
  2723. struct __gllc_DepthFunc_Rec *data;
  2724. __GL_SETUP();
  2725. data = (struct __gllc_DepthFunc_Rec *)
  2726. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_DepthFunc_Rec)),
  2727. DLIST_GENERIC_OP(DepthFunc));
  2728. if (data == NULL) return;
  2729. data->func = func;
  2730. __glDlistAppendOp(gc, data, __glle_DepthFunc);
  2731. }
  2732. void APIENTRY
  2733. __gllc_PixelZoom ( IN GLfloat xfactor, IN GLfloat yfactor )
  2734. {
  2735. struct __gllc_PixelZoom_Rec *data;
  2736. __GL_SETUP();
  2737. data = (struct __gllc_PixelZoom_Rec *)
  2738. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PixelZoom_Rec)),
  2739. DLIST_GENERIC_OP(PixelZoom));
  2740. if (data == NULL) return;
  2741. data->xfactor = xfactor;
  2742. data->yfactor = yfactor;
  2743. __glDlistAppendOp(gc, data, __glle_PixelZoom);
  2744. }
  2745. void APIENTRY
  2746. __gllc_PixelTransferf ( IN GLenum pname, IN GLfloat param )
  2747. {
  2748. struct __gllc_PixelTransferf_Rec *data;
  2749. __GL_SETUP();
  2750. data = (struct __gllc_PixelTransferf_Rec *)
  2751. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PixelTransferf_Rec)),
  2752. DLIST_GENERIC_OP(PixelTransferf));
  2753. if (data == NULL) return;
  2754. data->pname = pname;
  2755. data->param = param;
  2756. __glDlistAppendOp(gc, data, __glle_PixelTransferf);
  2757. }
  2758. void APIENTRY
  2759. __gllc_PixelTransferi ( IN GLenum pname, IN GLint param )
  2760. {
  2761. struct __gllc_PixelTransferi_Rec *data;
  2762. __GL_SETUP();
  2763. data = (struct __gllc_PixelTransferi_Rec *)
  2764. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PixelTransferi_Rec)),
  2765. DLIST_GENERIC_OP(PixelTransferi));
  2766. if (data == NULL) return;
  2767. data->pname = pname;
  2768. data->param = param;
  2769. __glDlistAppendOp(gc, data, __glle_PixelTransferi);
  2770. }
  2771. void APIENTRY
  2772. __gllc_PixelMapfv ( IN GLenum map, IN GLint mapsize, IN const GLfloat values[] )
  2773. {
  2774. GLuint size;
  2775. GLint arraySize;
  2776. struct __gllc_PixelMapfv_Rec *data;
  2777. __GL_SETUP();
  2778. arraySize = mapsize * 4;
  2779. if (arraySize < 0) {
  2780. __gllc_InvalidValue();
  2781. return;
  2782. }
  2783. size = sizeof(struct __gllc_PixelMapfv_Rec) + arraySize;
  2784. data = (struct __gllc_PixelMapfv_Rec *)
  2785. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(PixelMapfv));
  2786. if (data == NULL) return;
  2787. data->map = map;
  2788. data->mapsize = mapsize;
  2789. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_PixelMapfv_Rec),
  2790. values, arraySize);
  2791. __glDlistAppendOp(gc, data, __glle_PixelMapfv);
  2792. }
  2793. void APIENTRY
  2794. __gllc_PixelMapuiv ( IN GLenum map, IN GLint mapsize, IN const GLuint values[] )
  2795. {
  2796. GLuint size;
  2797. GLint arraySize;
  2798. struct __gllc_PixelMapuiv_Rec *data;
  2799. __GL_SETUP();
  2800. arraySize = mapsize * 4;
  2801. if (arraySize < 0) {
  2802. __gllc_InvalidValue();
  2803. return;
  2804. }
  2805. size = sizeof(struct __gllc_PixelMapuiv_Rec) + arraySize;
  2806. data = (struct __gllc_PixelMapuiv_Rec *)
  2807. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(PixelMapuiv));
  2808. if (data == NULL) return;
  2809. data->map = map;
  2810. data->mapsize = mapsize;
  2811. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_PixelMapuiv_Rec),
  2812. values, arraySize);
  2813. __glDlistAppendOp(gc, data, __glle_PixelMapuiv);
  2814. }
  2815. void APIENTRY
  2816. __gllc_PixelMapusv ( IN GLenum map, IN GLint mapsize, IN const GLushort values[] )
  2817. {
  2818. GLuint size;
  2819. GLint arraySize;
  2820. struct __gllc_PixelMapusv_Rec *data;
  2821. __GL_SETUP();
  2822. arraySize = mapsize * 2;
  2823. if (arraySize < 0) {
  2824. __gllc_InvalidValue();
  2825. return;
  2826. }
  2827. #ifdef NT
  2828. size = sizeof(struct __gllc_PixelMapusv_Rec) + __GL_PAD(arraySize);
  2829. #else
  2830. arraySize = __GL_PAD(arraySize);
  2831. size = sizeof(struct __gllc_PixelMapusv_Rec) + arraySize;
  2832. #endif
  2833. data = (struct __gllc_PixelMapusv_Rec *)
  2834. __glDlistAddOpUnaligned(gc, DLIST_SIZE(size), DLIST_GENERIC_OP(PixelMapusv));
  2835. if (data == NULL) return;
  2836. data->map = map;
  2837. data->mapsize = mapsize;
  2838. __GL_MEMCOPY((GLubyte *)data + sizeof(struct __gllc_PixelMapusv_Rec),
  2839. values, arraySize);
  2840. __glDlistAppendOp(gc, data, __glle_PixelMapusv);
  2841. }
  2842. void APIENTRY
  2843. __gllc_ReadBuffer ( IN GLenum mode )
  2844. {
  2845. struct __gllc_ReadBuffer_Rec *data;
  2846. __GL_SETUP();
  2847. data = (struct __gllc_ReadBuffer_Rec *)
  2848. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_ReadBuffer_Rec)),
  2849. DLIST_GENERIC_OP(ReadBuffer));
  2850. if (data == NULL) return;
  2851. data->mode = mode;
  2852. __glDlistAppendOp(gc, data, __glle_ReadBuffer);
  2853. }
  2854. void APIENTRY
  2855. __gllc_CopyPixels ( IN GLint x, IN GLint y, IN GLsizei width, IN GLsizei height, IN GLenum type )
  2856. {
  2857. struct __gllc_CopyPixels_Rec *data;
  2858. __GL_SETUP();
  2859. data = (struct __gllc_CopyPixels_Rec *)
  2860. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_CopyPixels_Rec)),
  2861. DLIST_GENERIC_OP(CopyPixels));
  2862. if (data == NULL) return;
  2863. data->x = x;
  2864. data->y = y;
  2865. data->width = width;
  2866. data->height = height;
  2867. data->type = type;
  2868. __glDlistAppendOp(gc, data, __glle_CopyPixels);
  2869. }
  2870. void APIENTRY
  2871. __gllc_DepthRange ( IN GLclampd zNear, IN GLclampd zFar )
  2872. {
  2873. struct __gllc_DepthRange_Rec *data;
  2874. __GL_SETUP();
  2875. data = (struct __gllc_DepthRange_Rec *)
  2876. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_DepthRange_Rec)),
  2877. DLIST_GENERIC_OP(DepthRange));
  2878. if (data == NULL) return;
  2879. data->zNear = zNear;
  2880. data->zFar = zFar;
  2881. __glDlistAppendOp(gc, data, __glle_DepthRange);
  2882. }
  2883. void APIENTRY
  2884. __gllc_Frustum ( IN GLdouble left, IN GLdouble right, IN GLdouble bottom, IN GLdouble top, IN GLdouble zNear, IN GLdouble zFar )
  2885. {
  2886. struct __gllc_Frustum_Rec *data;
  2887. __GL_SETUP();
  2888. data = (struct __gllc_Frustum_Rec *)
  2889. __glDlistAddOpAligned(gc, DLIST_SIZE(sizeof(struct __gllc_Frustum_Rec)),
  2890. DLIST_GENERIC_OP(Frustum));
  2891. if (data == NULL) return;
  2892. data->left = left;
  2893. data->right = right;
  2894. data->bottom = bottom;
  2895. data->top = top;
  2896. data->zNear = zNear;
  2897. data->zFar = zFar;
  2898. __glDlistAppendOp(gc, data, __glle_Frustum);
  2899. }
  2900. void APIENTRY
  2901. __gllc_LoadIdentity ( void )
  2902. {
  2903. void *data;
  2904. __GL_SETUP();
  2905. data = __glDlistAddOpUnaligned(gc, DLIST_SIZE(0), DLIST_GENERIC_OP(LoadIdentity));
  2906. if (data == NULL) return;
  2907. __glDlistAppendOp(gc, data, __glle_LoadIdentity);
  2908. }
  2909. void APIENTRY
  2910. __gllc_MatrixMode ( IN GLenum mode )
  2911. {
  2912. struct __gllc_MatrixMode_Rec *data;
  2913. __GL_SETUP();
  2914. data = (struct __gllc_MatrixMode_Rec *)
  2915. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_MatrixMode_Rec)),
  2916. DLIST_GENERIC_OP(MatrixMode));
  2917. if (data == NULL) return;
  2918. data->mode = mode;
  2919. __glDlistAppendOp(gc, data, __glle_MatrixMode);
  2920. }
  2921. void APIENTRY
  2922. __gllc_Ortho ( IN GLdouble left, IN GLdouble right, IN GLdouble bottom, IN GLdouble top, IN GLdouble zNear, IN GLdouble zFar )
  2923. {
  2924. struct __gllc_Ortho_Rec *data;
  2925. __GL_SETUP();
  2926. data = (struct __gllc_Ortho_Rec *)
  2927. __glDlistAddOpAligned(gc, DLIST_SIZE(sizeof(struct __gllc_Ortho_Rec)),
  2928. DLIST_GENERIC_OP(Ortho));
  2929. if (data == NULL) return;
  2930. data->left = left;
  2931. data->right = right;
  2932. data->bottom = bottom;
  2933. data->top = top;
  2934. data->zNear = zNear;
  2935. data->zFar = zFar;
  2936. __glDlistAppendOp(gc, data, __glle_Ortho);
  2937. }
  2938. void APIENTRY
  2939. __gllc_PopMatrix ( void )
  2940. {
  2941. void *data;
  2942. __GL_SETUP();
  2943. data = __glDlistAddOpUnaligned(gc, DLIST_SIZE(0), DLIST_GENERIC_OP(PopMatrix));
  2944. if (data == NULL) return;
  2945. __glDlistAppendOp(gc, data, __glle_PopMatrix);
  2946. }
  2947. void APIENTRY
  2948. __gllc_PushMatrix ( void )
  2949. {
  2950. void *data;
  2951. __GL_SETUP();
  2952. data = __glDlistAddOpUnaligned(gc, DLIST_SIZE(0), DLIST_GENERIC_OP(PushMatrix));
  2953. if (data == NULL) return;
  2954. __glDlistAppendOp(gc, data, __glle_PushMatrix);
  2955. }
  2956. void APIENTRY
  2957. __gllc_Viewport ( IN GLint x, IN GLint y, IN GLsizei width, IN GLsizei height )
  2958. {
  2959. struct __gllc_Viewport_Rec *data;
  2960. __GL_SETUP();
  2961. data = (struct __gllc_Viewport_Rec *)
  2962. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_Viewport_Rec)),
  2963. DLIST_GENERIC_OP(Viewport));
  2964. if (data == NULL) return;
  2965. data->x = x;
  2966. data->y = y;
  2967. data->width = width;
  2968. data->height = height;
  2969. __glDlistAppendOp(gc, data, __glle_Viewport);
  2970. }
  2971. void APIENTRY __gllc_BindTexture(GLenum target, GLuint texture)
  2972. {
  2973. struct __gllc_BindTexture_Rec *data;
  2974. __GL_SETUP();
  2975. data = (struct __gllc_BindTexture_Rec *)
  2976. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_BindTexture_Rec)),
  2977. DLIST_GENERIC_OP(BindTexture));
  2978. if (data == NULL) return;
  2979. data->target = target;
  2980. data->texture = texture;
  2981. __glDlistAppendOp(gc, data, __glle_BindTexture);
  2982. }
  2983. void APIENTRY __gllc_PrioritizeTextures(GLsizei n, const GLuint *textures,
  2984. const GLclampf *priorities)
  2985. {
  2986. struct __gllc_PrioritizeTextures_Rec *data;
  2987. __GL_SETUP();
  2988. GLuint size;
  2989. GLubyte *extra;
  2990. size = DLIST_SIZE(sizeof(struct __gllc_PrioritizeTextures_Rec)+
  2991. n*(sizeof(GLuint)+sizeof(GLclampf)));
  2992. data = (struct __gllc_PrioritizeTextures_Rec *)
  2993. __glDlistAddOpUnaligned(gc, size,
  2994. DLIST_GENERIC_OP(PrioritizeTextures));
  2995. if (data == NULL) return;
  2996. data->n = n;
  2997. extra = (GLubyte *)data+sizeof(struct __gllc_PrioritizeTextures_Rec);
  2998. __GL_MEMCOPY(extra, textures, n*sizeof(GLuint));
  2999. extra += n*sizeof(GLuint);
  3000. __GL_MEMCOPY(extra, priorities, n*sizeof(GLclampf));
  3001. __glDlistAppendOp(gc, data, __glle_PrioritizeTextures);
  3002. }
  3003. void APIENTRY __gllc_CopyTexImage1D(GLenum target, GLint level,
  3004. GLenum internalformat, GLint x, GLint y,
  3005. GLsizei width, GLint border)
  3006. {
  3007. struct __gllc_CopyTexImage1D_Rec *data;
  3008. __GL_SETUP();
  3009. data = (struct __gllc_CopyTexImage1D_Rec *)
  3010. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_CopyTexImage1D_Rec)),
  3011. DLIST_GENERIC_OP(CopyTexImage1D));
  3012. if (data == NULL) return;
  3013. data->target = target;
  3014. data->level = level;
  3015. data->internalformat = internalformat;
  3016. data->x = x;
  3017. data->y = y;
  3018. data->width = width;
  3019. data->border = border;
  3020. __glDlistAppendOp(gc, data, __glle_CopyTexImage1D);
  3021. }
  3022. void APIENTRY __gllc_CopyTexImage2D(GLenum target, GLint level,
  3023. GLenum internalformat, GLint x, GLint y,
  3024. GLsizei width, GLsizei height, GLint border)
  3025. {
  3026. struct __gllc_CopyTexImage2D_Rec *data;
  3027. __GL_SETUP();
  3028. data = (struct __gllc_CopyTexImage2D_Rec *)
  3029. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_CopyTexImage2D_Rec)),
  3030. DLIST_GENERIC_OP(CopyTexImage2D));
  3031. if (data == NULL) return;
  3032. data->target = target;
  3033. data->level = level;
  3034. data->internalformat = internalformat;
  3035. data->x = x;
  3036. data->y = y;
  3037. data->width = width;
  3038. data->height = height;
  3039. data->border = border;
  3040. __glDlistAppendOp(gc, data, __glle_CopyTexImage2D);
  3041. }
  3042. void APIENTRY __gllc_CopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
  3043. GLint x, GLint y, GLsizei width)
  3044. {
  3045. struct __gllc_CopyTexSubImage1D_Rec *data;
  3046. __GL_SETUP();
  3047. data = (struct __gllc_CopyTexSubImage1D_Rec *)
  3048. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_CopyTexSubImage1D_Rec)),
  3049. DLIST_GENERIC_OP(CopyTexSubImage1D));
  3050. if (data == NULL) return;
  3051. data->target = target;
  3052. data->level = level;
  3053. data->xoffset = xoffset;
  3054. data->x = x;
  3055. data->y = y;
  3056. data->width = width;
  3057. __glDlistAppendOp(gc, data, __glle_CopyTexSubImage1D);
  3058. }
  3059. void APIENTRY __gllc_CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset,
  3060. GLint yoffset, GLint x, GLint y,
  3061. GLsizei width, GLsizei height)
  3062. {
  3063. struct __gllc_CopyTexSubImage2D_Rec *data;
  3064. __GL_SETUP();
  3065. data = (struct __gllc_CopyTexSubImage2D_Rec *)
  3066. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_CopyTexSubImage2D_Rec)),
  3067. DLIST_GENERIC_OP(CopyTexSubImage2D));
  3068. if (data == NULL) return;
  3069. data->target = target;
  3070. data->level = level;
  3071. data->xoffset = xoffset;
  3072. data->yoffset = yoffset;
  3073. data->x = x;
  3074. data->y = y;
  3075. data->width = width;
  3076. data->height = height;
  3077. __glDlistAppendOp(gc, data, __glle_CopyTexSubImage2D);
  3078. }
  3079. void APIENTRY __gllc_PolygonOffset(GLfloat factor, GLfloat units)
  3080. {
  3081. struct __gllc_PolygonOffset_Rec *data;
  3082. __GL_SETUP();
  3083. data = (struct __gllc_PolygonOffset_Rec *)
  3084. __glDlistAddOpUnaligned(gc, DLIST_SIZE(sizeof(struct __gllc_PolygonOffset_Rec)),
  3085. DLIST_GENERIC_OP(PolygonOffset));
  3086. if (data == NULL) return;
  3087. data->factor = factor;
  3088. data->units = units;
  3089. __glDlistAppendOp(gc, data, __glle_PolygonOffset);
  3090. }