Source code of Windows XP (NT5)
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.

953 lines
32 KiB

  1. /*
  2. ** Copyright 1991-1993, Silicon Graphics, Inc.
  3. ** All Rights Reserved.
  4. **
  5. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6. ** the contents of this file may not be disclosed to third parties, copied or
  7. ** duplicated in any form, in whole or in part, without the prior written
  8. ** permission of Silicon Graphics, Inc.
  9. **
  10. ** RESTRICTED RIGHTS LEGEND:
  11. ** Use, duplication or disclosure by the Government is subject to restrictions
  12. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15. ** rights reserved under the Copyright Laws of the United States.
  16. */
  17. /*
  18. * AUTOMATICALLY UPDATED OR GENERATED BY SGI: DO NOT EDIT
  19. * IF YOU MUST MODIFY THIS FILE, PLEASE CONTACT ptar@sgi.com 415-390-1483
  20. */
  21. /* Client Side Procedure Table */
  22. #include "precomp.h"
  23. #pragma hdrstop
  24. #include "glclt.h"
  25. #ifdef GL_METAFILE
  26. #include "metasup.h"
  27. #endif
  28. // There are now 2 tables!
  29. // One table is used for RGBA mode and the other is for CI mode.
  30. GLCLTPROCTABLE glCltRGBAProcTable = {
  31. /* Number of function entries in the table */
  32. sizeof(GLDISPATCHTABLE) / sizeof(PROC),
  33. /* gl Entry points */
  34. {
  35. glcltNewList ,
  36. glcltEndList ,
  37. glcltCallList ,
  38. glcltCallLists ,
  39. glcltDeleteLists ,
  40. glcltGenLists ,
  41. glcltListBase ,
  42. glcltBegin ,
  43. glcltBitmap ,
  44. glcltColor3b_InRGBA ,
  45. glcltColor3bv_InRGBA ,
  46. glcltColor3d_InRGBA ,
  47. glcltColor3dv_InRGBA ,
  48. glcltColor3f_InRGBA ,
  49. glcltColor3fv_InRGBA ,
  50. glcltColor3i_InRGBA ,
  51. glcltColor3iv_InRGBA ,
  52. glcltColor3s_InRGBA ,
  53. glcltColor3sv_InRGBA ,
  54. glcltColor3ub_InRGBA ,
  55. glcltColor3ubv_InRGBA ,
  56. glcltColor3ui_InRGBA ,
  57. glcltColor3uiv_InRGBA ,
  58. glcltColor3us_InRGBA ,
  59. glcltColor3usv_InRGBA ,
  60. glcltColor4b_InRGBA ,
  61. glcltColor4bv_InRGBA ,
  62. glcltColor4d_InRGBA ,
  63. glcltColor4dv_InRGBA ,
  64. glcltColor4f_InRGBA ,
  65. glcltColor4fv_InRGBA ,
  66. glcltColor4i_InRGBA ,
  67. glcltColor4iv_InRGBA ,
  68. glcltColor4s_InRGBA ,
  69. glcltColor4sv_InRGBA ,
  70. glcltColor4ub_InRGBA ,
  71. glcltColor4ubv_InRGBA ,
  72. glcltColor4ui_InRGBA ,
  73. glcltColor4uiv_InRGBA ,
  74. glcltColor4us_InRGBA ,
  75. glcltColor4usv_InRGBA ,
  76. glcltEdgeFlag ,
  77. glcltEdgeFlagv ,
  78. glcltEnd ,
  79. glcltIndexd_InRGBA ,
  80. glcltIndexdv_InRGBA ,
  81. glcltIndexf_InRGBA ,
  82. glcltIndexfv_InRGBA ,
  83. glcltIndexi_InRGBA ,
  84. glcltIndexiv_InRGBA ,
  85. glcltIndexs_InRGBA ,
  86. glcltIndexsv_InRGBA ,
  87. glcltNormal3b ,
  88. glcltNormal3bv ,
  89. glcltNormal3d ,
  90. glcltNormal3dv ,
  91. glcltNormal3f ,
  92. glcltNormal3fv ,
  93. glcltNormal3i ,
  94. glcltNormal3iv ,
  95. glcltNormal3s ,
  96. glcltNormal3sv ,
  97. glcltRasterPos2d ,
  98. glcltRasterPos2dv ,
  99. glcltRasterPos2f ,
  100. glcltRasterPos2fv ,
  101. glcltRasterPos2i ,
  102. glcltRasterPos2iv ,
  103. glcltRasterPos2s ,
  104. glcltRasterPos2sv ,
  105. glcltRasterPos3d ,
  106. glcltRasterPos3dv ,
  107. glcltRasterPos3f ,
  108. glcltRasterPos3fv ,
  109. glcltRasterPos3i ,
  110. glcltRasterPos3iv ,
  111. glcltRasterPos3s ,
  112. glcltRasterPos3sv ,
  113. glcltRasterPos4d ,
  114. glcltRasterPos4dv ,
  115. glcltRasterPos4f ,
  116. glcltRasterPos4fv ,
  117. glcltRasterPos4i ,
  118. glcltRasterPos4iv ,
  119. glcltRasterPos4s ,
  120. glcltRasterPos4sv ,
  121. glcltRectd ,
  122. glcltRectdv ,
  123. glcltRectf ,
  124. glcltRectfv ,
  125. glcltRecti ,
  126. glcltRectiv ,
  127. glcltRects ,
  128. glcltRectsv ,
  129. glcltTexCoord1d ,
  130. glcltTexCoord1dv ,
  131. glcltTexCoord1f ,
  132. glcltTexCoord1fv ,
  133. glcltTexCoord1i ,
  134. glcltTexCoord1iv ,
  135. glcltTexCoord1s ,
  136. glcltTexCoord1sv ,
  137. glcltTexCoord2d ,
  138. glcltTexCoord2dv ,
  139. glcltTexCoord2f ,
  140. glcltTexCoord2fv ,
  141. glcltTexCoord2i ,
  142. glcltTexCoord2iv ,
  143. glcltTexCoord2s ,
  144. glcltTexCoord2sv ,
  145. glcltTexCoord3d ,
  146. glcltTexCoord3dv ,
  147. glcltTexCoord3f ,
  148. glcltTexCoord3fv ,
  149. glcltTexCoord3i ,
  150. glcltTexCoord3iv ,
  151. glcltTexCoord3s ,
  152. glcltTexCoord3sv ,
  153. glcltTexCoord4d ,
  154. glcltTexCoord4dv ,
  155. glcltTexCoord4f ,
  156. glcltTexCoord4fv ,
  157. glcltTexCoord4i ,
  158. glcltTexCoord4iv ,
  159. glcltTexCoord4s ,
  160. glcltTexCoord4sv ,
  161. glcltVertex2d ,
  162. glcltVertex2dv ,
  163. glcltVertex2f ,
  164. glcltVertex2fv ,
  165. glcltVertex2i ,
  166. glcltVertex2iv ,
  167. glcltVertex2s ,
  168. glcltVertex2sv ,
  169. glcltVertex3d ,
  170. glcltVertex3dv ,
  171. glcltVertex3f ,
  172. glcltVertex3fv ,
  173. glcltVertex3i ,
  174. glcltVertex3iv ,
  175. glcltVertex3s ,
  176. glcltVertex3sv ,
  177. glcltVertex4d ,
  178. glcltVertex4dv ,
  179. glcltVertex4f ,
  180. glcltVertex4fv ,
  181. glcltVertex4i ,
  182. glcltVertex4iv ,
  183. glcltVertex4s ,
  184. glcltVertex4sv ,
  185. glcltClipPlane ,
  186. glcltColorMaterial ,
  187. glcltCullFace ,
  188. glcltFogf ,
  189. glcltFogfv ,
  190. glcltFogi ,
  191. glcltFogiv ,
  192. glcltFrontFace ,
  193. glcltHint ,
  194. glcltLightf ,
  195. glcltLightfv ,
  196. glcltLighti ,
  197. glcltLightiv ,
  198. glcltLightModelf ,
  199. glcltLightModelfv ,
  200. glcltLightModeli ,
  201. glcltLightModeliv ,
  202. glcltLineStipple ,
  203. glcltLineWidth ,
  204. glcltMaterialf ,
  205. glcltMaterialfv ,
  206. glcltMateriali ,
  207. glcltMaterialiv ,
  208. glcltPointSize ,
  209. glcltPolygonMode ,
  210. glcltPolygonStipple ,
  211. glcltScissor ,
  212. glcltShadeModel ,
  213. glcltTexParameterf ,
  214. glcltTexParameterfv ,
  215. glcltTexParameteri ,
  216. glcltTexParameteriv ,
  217. glcltTexImage1D ,
  218. glcltTexImage2D ,
  219. glcltTexEnvf ,
  220. glcltTexEnvfv ,
  221. glcltTexEnvi ,
  222. glcltTexEnviv ,
  223. glcltTexGend ,
  224. glcltTexGendv ,
  225. glcltTexGenf ,
  226. glcltTexGenfv ,
  227. glcltTexGeni ,
  228. glcltTexGeniv ,
  229. glcltFeedbackBuffer ,
  230. glcltSelectBuffer ,
  231. glcltRenderMode ,
  232. glcltInitNames ,
  233. glcltLoadName ,
  234. glcltPassThrough ,
  235. glcltPopName ,
  236. glcltPushName ,
  237. glcltDrawBuffer ,
  238. glcltClear ,
  239. glcltClearAccum ,
  240. glcltClearIndex ,
  241. glcltClearColor ,
  242. glcltClearStencil ,
  243. glcltClearDepth ,
  244. glcltStencilMask ,
  245. glcltColorMask ,
  246. glcltDepthMask ,
  247. glcltIndexMask ,
  248. glcltAccum ,
  249. glcltDisable ,
  250. glcltEnable ,
  251. glcltFinish ,
  252. glcltFlush ,
  253. glcltPopAttrib ,
  254. glcltPushAttrib ,
  255. glcltMap1d ,
  256. glcltMap1f ,
  257. glcltMap2d ,
  258. glcltMap2f ,
  259. glcltMapGrid1d ,
  260. glcltMapGrid1f ,
  261. glcltMapGrid2d ,
  262. glcltMapGrid2f ,
  263. glcltEvalCoord1d ,
  264. glcltEvalCoord1dv ,
  265. glcltEvalCoord1f ,
  266. glcltEvalCoord1fv ,
  267. glcltEvalCoord2d ,
  268. glcltEvalCoord2dv ,
  269. glcltEvalCoord2f ,
  270. glcltEvalCoord2fv ,
  271. glcltEvalMesh1 ,
  272. glcltEvalPoint1 ,
  273. glcltEvalMesh2 ,
  274. glcltEvalPoint2 ,
  275. glcltAlphaFunc ,
  276. glcltBlendFunc ,
  277. glcltLogicOp ,
  278. glcltStencilFunc ,
  279. glcltStencilOp ,
  280. glcltDepthFunc ,
  281. glcltPixelZoom ,
  282. glcltPixelTransferf ,
  283. glcltPixelTransferi ,
  284. glcltPixelStoref ,
  285. glcltPixelStorei ,
  286. glcltPixelMapfv ,
  287. glcltPixelMapuiv ,
  288. glcltPixelMapusv ,
  289. glcltReadBuffer ,
  290. glcltCopyPixels ,
  291. glcltReadPixels ,
  292. glcltDrawPixels ,
  293. glcltGetBooleanv ,
  294. glcltGetClipPlane ,
  295. glcltGetDoublev ,
  296. glcltGetError ,
  297. glcltGetFloatv ,
  298. glcltGetIntegerv ,
  299. glcltGetLightfv ,
  300. glcltGetLightiv ,
  301. glcltGetMapdv ,
  302. glcltGetMapfv ,
  303. glcltGetMapiv ,
  304. glcltGetMaterialfv ,
  305. glcltGetMaterialiv ,
  306. glcltGetPixelMapfv ,
  307. glcltGetPixelMapuiv ,
  308. glcltGetPixelMapusv ,
  309. glcltGetPolygonStipple ,
  310. glcltGetString ,
  311. glcltGetTexEnvfv ,
  312. glcltGetTexEnviv ,
  313. glcltGetTexGendv ,
  314. glcltGetTexGenfv ,
  315. glcltGetTexGeniv ,
  316. glcltGetTexImage ,
  317. glcltGetTexParameterfv ,
  318. glcltGetTexParameteriv ,
  319. glcltGetTexLevelParameterfv ,
  320. glcltGetTexLevelParameteriv ,
  321. glcltIsEnabled ,
  322. glcltIsList ,
  323. glcltDepthRange ,
  324. glcltFrustum ,
  325. glcltLoadIdentity ,
  326. glcltLoadMatrixf ,
  327. glcltLoadMatrixd ,
  328. glcltMatrixMode ,
  329. glcltMultMatrixf ,
  330. glcltMultMatrixd ,
  331. glcltOrtho ,
  332. glcltPopMatrix ,
  333. glcltPushMatrix ,
  334. glcltRotated ,
  335. glcltRotatef ,
  336. glcltScaled ,
  337. glcltScalef ,
  338. glcltTranslated ,
  339. glcltTranslatef ,
  340. glcltViewport ,
  341. glcltArrayElement ,
  342. glcltBindTexture ,
  343. glcltColorPointer ,
  344. glcltDisableClientState ,
  345. glcltDrawArrays ,
  346. glcltDrawElements ,
  347. glcltEdgeFlagPointer ,
  348. glcltEnableClientState ,
  349. glcltIndexPointer ,
  350. glcltIndexub_InRGBA ,
  351. glcltIndexubv_InRGBA ,
  352. glcltInterleavedArrays ,
  353. glcltNormalPointer ,
  354. glcltPolygonOffset ,
  355. glcltTexCoordPointer ,
  356. glcltVertexPointer ,
  357. glcltAreTexturesResident ,
  358. glcltCopyTexImage1D ,
  359. glcltCopyTexImage2D ,
  360. glcltCopyTexSubImage1D ,
  361. glcltCopyTexSubImage2D ,
  362. glcltDeleteTextures ,
  363. glcltGenTextures ,
  364. glcltGetPointerv ,
  365. glcltIsTexture ,
  366. glcltPrioritizeTextures ,
  367. glcltTexSubImage1D ,
  368. glcltTexSubImage2D ,
  369. glcltPopClientAttrib ,
  370. glcltPushClientAttrib ,
  371. }
  372. };
  373. GLCLTPROCTABLE glCltCIProcTable = {
  374. /* Number of function entries in the table */
  375. sizeof(GLDISPATCHTABLE) / sizeof(PROC),
  376. /* gl Entry points */
  377. {
  378. glcltNewList ,
  379. glcltEndList ,
  380. glcltCallList ,
  381. glcltCallLists ,
  382. glcltDeleteLists ,
  383. glcltGenLists ,
  384. glcltListBase ,
  385. glcltBegin ,
  386. glcltBitmap ,
  387. glcltColor3b_InCI ,
  388. glcltColor3bv_InCI ,
  389. glcltColor3d_InCI ,
  390. glcltColor3dv_InCI ,
  391. glcltColor3f_InCI ,
  392. glcltColor3fv_InCI ,
  393. glcltColor3i_InCI ,
  394. glcltColor3iv_InCI ,
  395. glcltColor3s_InCI ,
  396. glcltColor3sv_InCI ,
  397. glcltColor3ub_InCI ,
  398. glcltColor3ubv_InCI ,
  399. glcltColor3ui_InCI ,
  400. glcltColor3uiv_InCI ,
  401. glcltColor3us_InCI ,
  402. glcltColor3usv_InCI ,
  403. glcltColor4b_InCI ,
  404. glcltColor4bv_InCI ,
  405. glcltColor4d_InCI ,
  406. glcltColor4dv_InCI ,
  407. glcltColor4f_InCI ,
  408. glcltColor4fv_InCI ,
  409. glcltColor4i_InCI ,
  410. glcltColor4iv_InCI ,
  411. glcltColor4s_InCI ,
  412. glcltColor4sv_InCI ,
  413. glcltColor4ub_InCI ,
  414. glcltColor4ubv_InCI ,
  415. glcltColor4ui_InCI ,
  416. glcltColor4uiv_InCI ,
  417. glcltColor4us_InCI ,
  418. glcltColor4usv_InCI ,
  419. glcltEdgeFlag ,
  420. glcltEdgeFlagv ,
  421. glcltEnd ,
  422. glcltIndexd_InCI ,
  423. glcltIndexdv_InCI ,
  424. glcltIndexf_InCI ,
  425. glcltIndexfv_InCI ,
  426. glcltIndexi_InCI ,
  427. glcltIndexiv_InCI ,
  428. glcltIndexs_InCI ,
  429. glcltIndexsv_InCI ,
  430. glcltNormal3b ,
  431. glcltNormal3bv ,
  432. glcltNormal3d ,
  433. glcltNormal3dv ,
  434. glcltNormal3f ,
  435. glcltNormal3fv ,
  436. glcltNormal3i ,
  437. glcltNormal3iv ,
  438. glcltNormal3s ,
  439. glcltNormal3sv ,
  440. glcltRasterPos2d ,
  441. glcltRasterPos2dv ,
  442. glcltRasterPos2f ,
  443. glcltRasterPos2fv ,
  444. glcltRasterPos2i ,
  445. glcltRasterPos2iv ,
  446. glcltRasterPos2s ,
  447. glcltRasterPos2sv ,
  448. glcltRasterPos3d ,
  449. glcltRasterPos3dv ,
  450. glcltRasterPos3f ,
  451. glcltRasterPos3fv ,
  452. glcltRasterPos3i ,
  453. glcltRasterPos3iv ,
  454. glcltRasterPos3s ,
  455. glcltRasterPos3sv ,
  456. glcltRasterPos4d ,
  457. glcltRasterPos4dv ,
  458. glcltRasterPos4f ,
  459. glcltRasterPos4fv ,
  460. glcltRasterPos4i ,
  461. glcltRasterPos4iv ,
  462. glcltRasterPos4s ,
  463. glcltRasterPos4sv ,
  464. glcltRectd ,
  465. glcltRectdv ,
  466. glcltRectf ,
  467. glcltRectfv ,
  468. glcltRecti ,
  469. glcltRectiv ,
  470. glcltRects ,
  471. glcltRectsv ,
  472. glcltTexCoord1d ,
  473. glcltTexCoord1dv ,
  474. glcltTexCoord1f ,
  475. glcltTexCoord1fv ,
  476. glcltTexCoord1i ,
  477. glcltTexCoord1iv ,
  478. glcltTexCoord1s ,
  479. glcltTexCoord1sv ,
  480. glcltTexCoord2d ,
  481. glcltTexCoord2dv ,
  482. glcltTexCoord2f ,
  483. glcltTexCoord2fv ,
  484. glcltTexCoord2i ,
  485. glcltTexCoord2iv ,
  486. glcltTexCoord2s ,
  487. glcltTexCoord2sv ,
  488. glcltTexCoord3d ,
  489. glcltTexCoord3dv ,
  490. glcltTexCoord3f ,
  491. glcltTexCoord3fv ,
  492. glcltTexCoord3i ,
  493. glcltTexCoord3iv ,
  494. glcltTexCoord3s ,
  495. glcltTexCoord3sv ,
  496. glcltTexCoord4d ,
  497. glcltTexCoord4dv ,
  498. glcltTexCoord4f ,
  499. glcltTexCoord4fv ,
  500. glcltTexCoord4i ,
  501. glcltTexCoord4iv ,
  502. glcltTexCoord4s ,
  503. glcltTexCoord4sv ,
  504. glcltVertex2d ,
  505. glcltVertex2dv ,
  506. glcltVertex2f ,
  507. glcltVertex2fv ,
  508. glcltVertex2i ,
  509. glcltVertex2iv ,
  510. glcltVertex2s ,
  511. glcltVertex2sv ,
  512. glcltVertex3d ,
  513. glcltVertex3dv ,
  514. glcltVertex3f ,
  515. glcltVertex3fv ,
  516. glcltVertex3i ,
  517. glcltVertex3iv ,
  518. glcltVertex3s ,
  519. glcltVertex3sv ,
  520. glcltVertex4d ,
  521. glcltVertex4dv ,
  522. glcltVertex4f ,
  523. glcltVertex4fv ,
  524. glcltVertex4i ,
  525. glcltVertex4iv ,
  526. glcltVertex4s ,
  527. glcltVertex4sv ,
  528. glcltClipPlane ,
  529. glcltColorMaterial ,
  530. glcltCullFace ,
  531. glcltFogf ,
  532. glcltFogfv ,
  533. glcltFogi ,
  534. glcltFogiv ,
  535. glcltFrontFace ,
  536. glcltHint ,
  537. glcltLightf ,
  538. glcltLightfv ,
  539. glcltLighti ,
  540. glcltLightiv ,
  541. glcltLightModelf ,
  542. glcltLightModelfv ,
  543. glcltLightModeli ,
  544. glcltLightModeliv ,
  545. glcltLineStipple ,
  546. glcltLineWidth ,
  547. glcltMaterialf ,
  548. glcltMaterialfv ,
  549. glcltMateriali ,
  550. glcltMaterialiv ,
  551. glcltPointSize ,
  552. glcltPolygonMode ,
  553. glcltPolygonStipple ,
  554. glcltScissor ,
  555. glcltShadeModel ,
  556. glcltTexParameterf ,
  557. glcltTexParameterfv ,
  558. glcltTexParameteri ,
  559. glcltTexParameteriv ,
  560. glcltTexImage1D ,
  561. glcltTexImage2D ,
  562. glcltTexEnvf ,
  563. glcltTexEnvfv ,
  564. glcltTexEnvi ,
  565. glcltTexEnviv ,
  566. glcltTexGend ,
  567. glcltTexGendv ,
  568. glcltTexGenf ,
  569. glcltTexGenfv ,
  570. glcltTexGeni ,
  571. glcltTexGeniv ,
  572. glcltFeedbackBuffer ,
  573. glcltSelectBuffer ,
  574. glcltRenderMode ,
  575. glcltInitNames ,
  576. glcltLoadName ,
  577. glcltPassThrough ,
  578. glcltPopName ,
  579. glcltPushName ,
  580. glcltDrawBuffer ,
  581. glcltClear ,
  582. glcltClearAccum ,
  583. glcltClearIndex ,
  584. glcltClearColor ,
  585. glcltClearStencil ,
  586. glcltClearDepth ,
  587. glcltStencilMask ,
  588. glcltColorMask ,
  589. glcltDepthMask ,
  590. glcltIndexMask ,
  591. glcltAccum ,
  592. glcltDisable ,
  593. glcltEnable ,
  594. glcltFinish ,
  595. glcltFlush ,
  596. glcltPopAttrib ,
  597. glcltPushAttrib ,
  598. glcltMap1d ,
  599. glcltMap1f ,
  600. glcltMap2d ,
  601. glcltMap2f ,
  602. glcltMapGrid1d ,
  603. glcltMapGrid1f ,
  604. glcltMapGrid2d ,
  605. glcltMapGrid2f ,
  606. glcltEvalCoord1d ,
  607. glcltEvalCoord1dv ,
  608. glcltEvalCoord1f ,
  609. glcltEvalCoord1fv ,
  610. glcltEvalCoord2d ,
  611. glcltEvalCoord2dv ,
  612. glcltEvalCoord2f ,
  613. glcltEvalCoord2fv ,
  614. glcltEvalMesh1 ,
  615. glcltEvalPoint1 ,
  616. glcltEvalMesh2 ,
  617. glcltEvalPoint2 ,
  618. glcltAlphaFunc ,
  619. glcltBlendFunc ,
  620. glcltLogicOp ,
  621. glcltStencilFunc ,
  622. glcltStencilOp ,
  623. glcltDepthFunc ,
  624. glcltPixelZoom ,
  625. glcltPixelTransferf ,
  626. glcltPixelTransferi ,
  627. glcltPixelStoref ,
  628. glcltPixelStorei ,
  629. glcltPixelMapfv ,
  630. glcltPixelMapuiv ,
  631. glcltPixelMapusv ,
  632. glcltReadBuffer ,
  633. glcltCopyPixels ,
  634. glcltReadPixels ,
  635. glcltDrawPixels ,
  636. glcltGetBooleanv ,
  637. glcltGetClipPlane ,
  638. glcltGetDoublev ,
  639. glcltGetError ,
  640. glcltGetFloatv ,
  641. glcltGetIntegerv ,
  642. glcltGetLightfv ,
  643. glcltGetLightiv ,
  644. glcltGetMapdv ,
  645. glcltGetMapfv ,
  646. glcltGetMapiv ,
  647. glcltGetMaterialfv ,
  648. glcltGetMaterialiv ,
  649. glcltGetPixelMapfv ,
  650. glcltGetPixelMapuiv ,
  651. glcltGetPixelMapusv ,
  652. glcltGetPolygonStipple ,
  653. glcltGetString ,
  654. glcltGetTexEnvfv ,
  655. glcltGetTexEnviv ,
  656. glcltGetTexGendv ,
  657. glcltGetTexGenfv ,
  658. glcltGetTexGeniv ,
  659. glcltGetTexImage ,
  660. glcltGetTexParameterfv ,
  661. glcltGetTexParameteriv ,
  662. glcltGetTexLevelParameterfv ,
  663. glcltGetTexLevelParameteriv ,
  664. glcltIsEnabled ,
  665. glcltIsList ,
  666. glcltDepthRange ,
  667. glcltFrustum ,
  668. glcltLoadIdentity ,
  669. glcltLoadMatrixf ,
  670. glcltLoadMatrixd ,
  671. glcltMatrixMode ,
  672. glcltMultMatrixf ,
  673. glcltMultMatrixd ,
  674. glcltOrtho ,
  675. glcltPopMatrix ,
  676. glcltPushMatrix ,
  677. glcltRotated ,
  678. glcltRotatef ,
  679. glcltScaled ,
  680. glcltScalef ,
  681. glcltTranslated ,
  682. glcltTranslatef ,
  683. glcltViewport ,
  684. glcltArrayElement ,
  685. glcltBindTexture ,
  686. glcltColorPointer ,
  687. glcltDisableClientState ,
  688. glcltDrawArrays ,
  689. glcltDrawElements ,
  690. glcltEdgeFlagPointer ,
  691. glcltEnableClientState ,
  692. glcltIndexPointer ,
  693. glcltIndexub_InCI ,
  694. glcltIndexubv_InCI ,
  695. glcltInterleavedArrays ,
  696. glcltNormalPointer ,
  697. glcltPolygonOffset ,
  698. glcltTexCoordPointer ,
  699. glcltVertexPointer ,
  700. glcltAreTexturesResident ,
  701. glcltCopyTexImage1D ,
  702. glcltCopyTexImage2D ,
  703. glcltCopyTexSubImage1D ,
  704. glcltCopyTexSubImage2D ,
  705. glcltDeleteTextures ,
  706. glcltGenTextures ,
  707. glcltGetPointerv ,
  708. glcltIsTexture ,
  709. glcltPrioritizeTextures ,
  710. glcltTexSubImage1D ,
  711. glcltTexSubImage2D ,
  712. glcltPopClientAttrib ,
  713. glcltPushClientAttrib ,
  714. }
  715. };
  716. GLEXTPROCTABLE glExtProcTable =
  717. {
  718. /* Number of function entries in the table */
  719. sizeof(GLEXTDISPATCHTABLE) / sizeof(PROC),
  720. /* gl EXT Entry points */
  721. {
  722. glcltDrawRangeElementsWIN,
  723. glcltColorTableEXT,
  724. glcltColorSubTableEXT,
  725. glcltGetColorTableEXT,
  726. glcltGetColorTableParameterivEXT,
  727. glcltGetColorTableParameterfvEXT,
  728. #ifdef GL_WIN_multiple_textures
  729. glcltCurrentTextureIndexWIN,
  730. glcltMultiTexCoord1dWIN,
  731. glcltMultiTexCoord1dvWIN,
  732. glcltMultiTexCoord1fWIN,
  733. glcltMultiTexCoord1fvWIN,
  734. glcltMultiTexCoord1iWIN,
  735. glcltMultiTexCoord1ivWIN,
  736. glcltMultiTexCoord1sWIN,
  737. glcltMultiTexCoord1svWIN,
  738. glcltMultiTexCoord2dWIN,
  739. glcltMultiTexCoord2dvWIN,
  740. glcltMultiTexCoord2fWIN,
  741. glcltMultiTexCoord2fvWIN,
  742. glcltMultiTexCoord2iWIN,
  743. glcltMultiTexCoord2ivWIN,
  744. glcltMultiTexCoord2sWIN,
  745. glcltMultiTexCoord2svWIN,
  746. glcltMultiTexCoord3dWIN,
  747. glcltMultiTexCoord3dvWIN,
  748. glcltMultiTexCoord3fWIN,
  749. glcltMultiTexCoord3fvWIN,
  750. glcltMultiTexCoord3iWIN,
  751. glcltMultiTexCoord3ivWIN,
  752. glcltMultiTexCoord3sWIN,
  753. glcltMultiTexCoord3svWIN,
  754. glcltMultiTexCoord4dWIN,
  755. glcltMultiTexCoord4dvWIN,
  756. glcltMultiTexCoord4fWIN,
  757. glcltMultiTexCoord4fvWIN,
  758. glcltMultiTexCoord4iWIN,
  759. glcltMultiTexCoord4ivWIN,
  760. glcltMultiTexCoord4sWIN,
  761. glcltMultiTexCoord4svWIN,
  762. glcltBindNthTextureWIN,
  763. glcltNthTexCombineFuncWIN,
  764. #endif // GL_WIN_multiple_textures
  765. }
  766. };
  767. /******************************Public*Routine******************************\
  768. * vInitTebCache
  769. *
  770. * Within the NT TEB, there is a table where OpenGL can cache OpenGL API
  771. * function pointers. In this area we can cache frequently used portions
  772. * of the dispatch table. Functions cached in this area can save a level
  773. * of indirection by avoiding deferencing the dispatch table pointer.
  774. *
  775. * History:
  776. * 06-Nov-1995 -by- Gilman Wong [gilmanw]
  777. * Wrote it.
  778. \**************************************************************************/
  779. // The following table defines the ranges of the dispatch table that should
  780. // be cached in the TEB. Each pair of indices defines the start and end of
  781. // each range.
  782. int static gaiCacheFuncs[] = {
  783. INDEX_glCallList , INDEX_glCallLists ,
  784. INDEX_glBegin , INDEX_glBegin ,
  785. INDEX_glColor3b , INDEX_glNormal3sv ,
  786. INDEX_glTexCoord1d , INDEX_glVertex4sv ,
  787. INDEX_glMaterialf , INDEX_glMaterialiv ,
  788. INDEX_glDisable , INDEX_glEnable ,
  789. INDEX_glPopAttrib , INDEX_glPushAttrib ,
  790. INDEX_glEvalCoord1d , INDEX_glEvalCoord2fv,
  791. INDEX_glEvalPoint1 , INDEX_glEvalPoint1 ,
  792. INDEX_glEvalPoint2 , INDEX_glEvalPoint2 ,
  793. INDEX_glLoadIdentity, INDEX_glMultMatrixd ,
  794. INDEX_glPopMatrix , INDEX_glTranslatef ,
  795. INDEX_glArrayElement, INDEX_glVertexPointer,
  796. INDEX_glGetPointerv, INDEX_glGetPointerv ,
  797. INDEX_glPopClientAttrib, INDEX_glPushClientAttrib,
  798. INDEX_glDrawRangeElementsWIN, INDEX_glColorSubTableEXT,
  799. #ifdef GL_WIN_multiple_textures
  800. INDEX_glCurrentTextureIndexWIN, INDEX_glCurrentTextureIndexWIN,
  801. INDEX_glBindNthTextureWIN, INDEX_glNthTexCombineFuncWIN,
  802. INDEX_glMultiTexCoord1fWIN, INDEX_glMultiTexCoord1ivWIN,
  803. INDEX_glMultiTexCoord2fWIN, INDEX_glMultiTexCoord2ivWIN,
  804. #endif // GL_WIN_multiple_textures
  805. };
  806. void vInitTebCache(PVOID glTable)
  807. {
  808. int iRange, iCache;
  809. PROC *pfnCltDispatchTableFast;
  810. pfnCltDispatchTableFast = (PROC *)GLTEB_CLTDISPATCHTABLE_FAST();
  811. // Copy each range of FPs, defined by the table gaiCacheFuncs, from the
  812. // dispatch table to the TEB FP cache.
  813. for ( iRange = 0, iCache = 0;
  814. iRange < (sizeof(gaiCacheFuncs) / sizeof(int));
  815. iRange+=2 )
  816. {
  817. PVOID pvCache; // ptr into FP cache within TEB
  818. PVOID pvDispatch; // ptr to current range within dispatch table
  819. int iNum; // number of FPs in current range to cache
  820. pvCache = (PVOID)&pfnCltDispatchTableFast[iCache];
  821. pvDispatch = (PVOID)&((PROC *)glTable)[gaiCacheFuncs[iRange]];
  822. iNum = gaiCacheFuncs[iRange+1] - gaiCacheFuncs[iRange] + 1;
  823. ASSERTOPENGL((BYTE *)pvCache >= (BYTE *)pfnCltDispatchTableFast &&
  824. (BYTE *)pvCache < (BYTE *)GLTEB_CLTPOLYARRAY() &&
  825. ((PROC *)pvCache)+iNum <= (PROC *)GLTEB_CLTPOLYARRAY(),
  826. "Fast dispatch area overflow\n");
  827. memcpy(pvCache, pvDispatch, iNum * sizeof(PROC));
  828. iCache += iNum;
  829. }
  830. ASSERTOPENGL(iCache == sizeof(GLDISPATCHTABLE_FAST) / sizeof(PROC),
  831. "fast dispatch table not initialized properly\n");
  832. }
  833. /******************************Public*Routine******************************\
  834. *
  835. * SetCltProcTable
  836. *
  837. * Sets the client-side dispatch table or update the metafiling
  838. * dispatch table if capturing
  839. *
  840. * History:
  841. * Fri Jan 05 16:37:40 1996 -by- Drew Bliss [drewb]
  842. * Created
  843. *
  844. \**************************************************************************/
  845. void SetCltProcTable(GLCLTPROCTABLE *pgcpt, GLEXTPROCTABLE *pgept,
  846. BOOL fForce)
  847. {
  848. #ifdef GL_METAFILE
  849. PLRC plrc;
  850. plrc = GLTEB_CLTCURRENTRC();
  851. if (!fForce && plrc != NULL && plrc->fCapturing)
  852. {
  853. MetaSetCltProcTable(pgcpt, pgept);
  854. }
  855. else
  856. #endif
  857. {
  858. // Copy base proc table
  859. memcpy((PVOID) CURRENT_GLTEBINFO()->glCltDispatchTable,
  860. &pgcpt->glDispatchTable,
  861. pgcpt->cEntries * sizeof(PROC));
  862. // If the given proc table doesn't have a complete set of entries,
  863. // pad it out with noops
  864. if (pgcpt->cEntries < OPENGL_VERSION_110_ENTRIES)
  865. {
  866. memcpy(((PROC *)CURRENT_GLTEBINFO()->glCltDispatchTable)+
  867. pgcpt->cEntries,
  868. ((PROC *)&glNullCltProcTable.glDispatchTable)+
  869. pgcpt->cEntries,
  870. (OPENGL_VERSION_110_ENTRIES-pgcpt->cEntries)*sizeof(PROC));
  871. }
  872. // Copy extension proc table
  873. // This is a purely internal table so it should always have the
  874. // right number of entries
  875. ASSERTOPENGL(pgept->cEntries == glNullExtProcTable.cEntries,
  876. "Bad extension proc table\n");
  877. memcpy(CURRENT_GLTEBINFO()->glCltDispatchTable+
  878. GL_EXT_PROC_TABLE_OFFSET,
  879. &pgept->glDispatchTable,
  880. pgept->cEntries * sizeof(PROC));
  881. vInitTebCache(CURRENT_GLTEBINFO()->glCltDispatchTable);
  882. }
  883. }
  884. /******************************Public*Routine******************************\
  885. *
  886. * GetCltProcTable
  887. *
  888. * Gets the client-side dispatch table or the metafile capture
  889. * exec table depending on the metafile capture state
  890. *
  891. * History:
  892. * Fri Jan 05 19:11:26 1996 -by- Drew Bliss [drewb]
  893. * Created
  894. *
  895. \**************************************************************************/
  896. void GetCltProcTable(GLCLTPROCTABLE *pgcpt, GLEXTPROCTABLE *pgept,
  897. BOOL fForce)
  898. {
  899. #ifdef GL_METAFILE
  900. PLRC plrc;
  901. plrc = GLTEB_CLTCURRENTRC();
  902. if (!fForce && plrc != NULL && plrc->fCapturing)
  903. {
  904. MetaGetCltProcTable(pgcpt, pgept);
  905. }
  906. else
  907. #endif
  908. {
  909. memcpy(&pgcpt->glDispatchTable,
  910. (PVOID) CURRENT_GLTEBINFO()->glCltDispatchTable,
  911. pgcpt->cEntries * sizeof(PROC));
  912. memcpy(&pgept->glDispatchTable,
  913. CURRENT_GLTEBINFO()->glCltDispatchTable+GL_EXT_PROC_TABLE_OFFSET,
  914. pgept->cEntries * sizeof(PROC));
  915. }
  916. }