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.

420 lines
15 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: dl_proc.c
  3. *
  4. * Display list compilation routines.
  5. *
  6. * Created: 12-26-1995
  7. * Author: Hock San Lee [hockl]
  8. *
  9. * Copyright (c) 1995 Microsoft Corporation
  10. \**************************************************************************/
  11. /* Client Side Display List Compilation Procedure Table */
  12. #include "precomp.h"
  13. #pragma hdrstop
  14. #include "glclt.h"
  15. #include "exttable.h"
  16. GLCLTPROCTABLE ListCompCltProcTable =
  17. {
  18. /* Number of function entries in the table */
  19. sizeof(GLDISPATCHTABLE) / sizeof(PROC),
  20. /* gl Entry points */
  21. {
  22. glcltNewList ,
  23. glcltEndList ,
  24. __gllc_CallList ,
  25. __gllc_CallLists ,
  26. glcltDeleteLists ,
  27. glcltGenLists ,
  28. __gllc_ListBase ,
  29. __gllc_Begin ,
  30. __gllc_Bitmap ,
  31. __gllc_Color3b ,
  32. __gllc_Color3bv ,
  33. __gllc_Color3d ,
  34. __gllc_Color3dv ,
  35. __gllc_Color3f ,
  36. __gllc_Color3fv ,
  37. __gllc_Color3i ,
  38. __gllc_Color3iv ,
  39. __gllc_Color3s ,
  40. __gllc_Color3sv ,
  41. __gllc_Color3ub ,
  42. __gllc_Color3ubv ,
  43. __gllc_Color3ui ,
  44. __gllc_Color3uiv ,
  45. __gllc_Color3us ,
  46. __gllc_Color3usv ,
  47. __gllc_Color4b ,
  48. __gllc_Color4bv ,
  49. __gllc_Color4d ,
  50. __gllc_Color4dv ,
  51. __gllc_Color4f ,
  52. __gllc_Color4fv ,
  53. __gllc_Color4i ,
  54. __gllc_Color4iv ,
  55. __gllc_Color4s ,
  56. __gllc_Color4sv ,
  57. __gllc_Color4ub ,
  58. __gllc_Color4ubv ,
  59. __gllc_Color4ui ,
  60. __gllc_Color4uiv ,
  61. __gllc_Color4us ,
  62. __gllc_Color4usv ,
  63. __gllc_EdgeFlag ,
  64. __gllc_EdgeFlagv ,
  65. __gllc_End ,
  66. __gllc_Indexd ,
  67. __gllc_Indexdv ,
  68. __gllc_Indexf ,
  69. __gllc_Indexfv ,
  70. __gllc_Indexi ,
  71. __gllc_Indexiv ,
  72. __gllc_Indexs ,
  73. __gllc_Indexsv ,
  74. __gllc_Normal3b ,
  75. __gllc_Normal3bv ,
  76. __gllc_Normal3d ,
  77. __gllc_Normal3dv ,
  78. __gllc_Normal3f ,
  79. __gllc_Normal3fv ,
  80. __gllc_Normal3i ,
  81. __gllc_Normal3iv ,
  82. __gllc_Normal3s ,
  83. __gllc_Normal3sv ,
  84. __gllc_RasterPos2d ,
  85. __gllc_RasterPos2dv ,
  86. __gllc_RasterPos2f ,
  87. __gllc_RasterPos2fv ,
  88. __gllc_RasterPos2i ,
  89. __gllc_RasterPos2iv ,
  90. __gllc_RasterPos2s ,
  91. __gllc_RasterPos2sv ,
  92. __gllc_RasterPos3d ,
  93. __gllc_RasterPos3dv ,
  94. __gllc_RasterPos3f ,
  95. __gllc_RasterPos3fv ,
  96. __gllc_RasterPos3i ,
  97. __gllc_RasterPos3iv ,
  98. __gllc_RasterPos3s ,
  99. __gllc_RasterPos3sv ,
  100. __gllc_RasterPos4d ,
  101. __gllc_RasterPos4dv ,
  102. __gllc_RasterPos4f ,
  103. __gllc_RasterPos4fv ,
  104. __gllc_RasterPos4i ,
  105. __gllc_RasterPos4iv ,
  106. __gllc_RasterPos4s ,
  107. __gllc_RasterPos4sv ,
  108. __gllc_Rectd ,
  109. __gllc_Rectdv ,
  110. __gllc_Rectf ,
  111. __gllc_Rectfv ,
  112. __gllc_Recti ,
  113. __gllc_Rectiv ,
  114. __gllc_Rects ,
  115. __gllc_Rectsv ,
  116. __gllc_TexCoord1d ,
  117. __gllc_TexCoord1dv ,
  118. __gllc_TexCoord1f ,
  119. __gllc_TexCoord1fv ,
  120. __gllc_TexCoord1i ,
  121. __gllc_TexCoord1iv ,
  122. __gllc_TexCoord1s ,
  123. __gllc_TexCoord1sv ,
  124. __gllc_TexCoord2d ,
  125. __gllc_TexCoord2dv ,
  126. __gllc_TexCoord2f ,
  127. __gllc_TexCoord2fv ,
  128. __gllc_TexCoord2i ,
  129. __gllc_TexCoord2iv ,
  130. __gllc_TexCoord2s ,
  131. __gllc_TexCoord2sv ,
  132. __gllc_TexCoord3d ,
  133. __gllc_TexCoord3dv ,
  134. __gllc_TexCoord3f ,
  135. __gllc_TexCoord3fv ,
  136. __gllc_TexCoord3i ,
  137. __gllc_TexCoord3iv ,
  138. __gllc_TexCoord3s ,
  139. __gllc_TexCoord3sv ,
  140. __gllc_TexCoord4d ,
  141. __gllc_TexCoord4dv ,
  142. __gllc_TexCoord4f ,
  143. __gllc_TexCoord4fv ,
  144. __gllc_TexCoord4i ,
  145. __gllc_TexCoord4iv ,
  146. __gllc_TexCoord4s ,
  147. __gllc_TexCoord4sv ,
  148. __gllc_Vertex2d ,
  149. __gllc_Vertex2dv ,
  150. __gllc_Vertex2f ,
  151. __gllc_Vertex2fv ,
  152. __gllc_Vertex2i ,
  153. __gllc_Vertex2iv ,
  154. __gllc_Vertex2s ,
  155. __gllc_Vertex2sv ,
  156. __gllc_Vertex3d ,
  157. __gllc_Vertex3dv ,
  158. __gllc_Vertex3f ,
  159. __gllc_Vertex3fv ,
  160. __gllc_Vertex3i ,
  161. __gllc_Vertex3iv ,
  162. __gllc_Vertex3s ,
  163. __gllc_Vertex3sv ,
  164. __gllc_Vertex4d ,
  165. __gllc_Vertex4dv ,
  166. __gllc_Vertex4f ,
  167. __gllc_Vertex4fv ,
  168. __gllc_Vertex4i ,
  169. __gllc_Vertex4iv ,
  170. __gllc_Vertex4s ,
  171. __gllc_Vertex4sv ,
  172. __gllc_ClipPlane ,
  173. __gllc_ColorMaterial ,
  174. __gllc_CullFace ,
  175. __gllc_Fogf ,
  176. __gllc_Fogfv ,
  177. __gllc_Fogi ,
  178. __gllc_Fogiv ,
  179. __gllc_FrontFace ,
  180. __gllc_Hint ,
  181. __gllc_Lightf ,
  182. __gllc_Lightfv ,
  183. __gllc_Lighti ,
  184. __gllc_Lightiv ,
  185. __gllc_LightModelf ,
  186. __gllc_LightModelfv ,
  187. __gllc_LightModeli ,
  188. __gllc_LightModeliv ,
  189. __gllc_LineStipple ,
  190. __gllc_LineWidth ,
  191. __gllc_Materialf ,
  192. __gllc_Materialfv ,
  193. __gllc_Materiali ,
  194. __gllc_Materialiv ,
  195. __gllc_PointSize ,
  196. __gllc_PolygonMode ,
  197. __gllc_PolygonStipple ,
  198. __gllc_Scissor ,
  199. __gllc_ShadeModel ,
  200. __gllc_TexParameterf ,
  201. __gllc_TexParameterfv ,
  202. __gllc_TexParameteri ,
  203. __gllc_TexParameteriv ,
  204. __gllc_TexImage1D ,
  205. __gllc_TexImage2D ,
  206. __gllc_TexEnvf ,
  207. __gllc_TexEnvfv ,
  208. __gllc_TexEnvi ,
  209. __gllc_TexEnviv ,
  210. __gllc_TexGend ,
  211. __gllc_TexGendv ,
  212. __gllc_TexGenf ,
  213. __gllc_TexGenfv ,
  214. __gllc_TexGeni ,
  215. __gllc_TexGeniv ,
  216. glcltFeedbackBuffer ,
  217. glcltSelectBuffer ,
  218. glcltRenderMode ,
  219. __gllc_InitNames ,
  220. __gllc_LoadName ,
  221. __gllc_PassThrough ,
  222. __gllc_PopName ,
  223. __gllc_PushName ,
  224. __gllc_DrawBuffer ,
  225. __gllc_Clear ,
  226. __gllc_ClearAccum ,
  227. __gllc_ClearIndex ,
  228. __gllc_ClearColor ,
  229. __gllc_ClearStencil ,
  230. __gllc_ClearDepth ,
  231. __gllc_StencilMask ,
  232. __gllc_ColorMask ,
  233. __gllc_DepthMask ,
  234. __gllc_IndexMask ,
  235. __gllc_Accum ,
  236. __gllc_Disable ,
  237. __gllc_Enable ,
  238. glcltFinish ,
  239. glcltFlush ,
  240. __gllc_PopAttrib ,
  241. __gllc_PushAttrib ,
  242. __gllc_Map1d ,
  243. __gllc_Map1f ,
  244. __gllc_Map2d ,
  245. __gllc_Map2f ,
  246. __gllc_MapGrid1d ,
  247. __gllc_MapGrid1f ,
  248. __gllc_MapGrid2d ,
  249. __gllc_MapGrid2f ,
  250. __gllc_EvalCoord1d ,
  251. __gllc_EvalCoord1dv ,
  252. __gllc_EvalCoord1f ,
  253. __gllc_EvalCoord1fv ,
  254. __gllc_EvalCoord2d ,
  255. __gllc_EvalCoord2dv ,
  256. __gllc_EvalCoord2f ,
  257. __gllc_EvalCoord2fv ,
  258. __gllc_EvalMesh1 ,
  259. __gllc_EvalPoint1 ,
  260. __gllc_EvalMesh2 ,
  261. __gllc_EvalPoint2 ,
  262. __gllc_AlphaFunc ,
  263. __gllc_BlendFunc ,
  264. __gllc_LogicOp ,
  265. __gllc_StencilFunc ,
  266. __gllc_StencilOp ,
  267. __gllc_DepthFunc ,
  268. __gllc_PixelZoom ,
  269. __gllc_PixelTransferf ,
  270. __gllc_PixelTransferi ,
  271. glcltPixelStoref ,
  272. glcltPixelStorei ,
  273. __gllc_PixelMapfv ,
  274. __gllc_PixelMapuiv ,
  275. __gllc_PixelMapusv ,
  276. __gllc_ReadBuffer ,
  277. __gllc_CopyPixels ,
  278. glcltReadPixels ,
  279. __gllc_DrawPixels ,
  280. glcltGetBooleanv ,
  281. glcltGetClipPlane ,
  282. glcltGetDoublev ,
  283. glcltGetError ,
  284. glcltGetFloatv ,
  285. glcltGetIntegerv ,
  286. glcltGetLightfv ,
  287. glcltGetLightiv ,
  288. glcltGetMapdv ,
  289. glcltGetMapfv ,
  290. glcltGetMapiv ,
  291. glcltGetMaterialfv ,
  292. glcltGetMaterialiv ,
  293. glcltGetPixelMapfv ,
  294. glcltGetPixelMapuiv ,
  295. glcltGetPixelMapusv ,
  296. glcltGetPolygonStipple ,
  297. glcltGetString ,
  298. glcltGetTexEnvfv ,
  299. glcltGetTexEnviv ,
  300. glcltGetTexGendv ,
  301. glcltGetTexGenfv ,
  302. glcltGetTexGeniv ,
  303. glcltGetTexImage ,
  304. glcltGetTexParameterfv ,
  305. glcltGetTexParameteriv ,
  306. glcltGetTexLevelParameterfv ,
  307. glcltGetTexLevelParameteriv ,
  308. glcltIsEnabled ,
  309. glcltIsList ,
  310. __gllc_DepthRange ,
  311. __gllc_Frustum ,
  312. __gllc_LoadIdentity ,
  313. __gllc_LoadMatrixf ,
  314. __gllc_LoadMatrixd ,
  315. __gllc_MatrixMode ,
  316. __gllc_MultMatrixf ,
  317. __gllc_MultMatrixd ,
  318. __gllc_Ortho ,
  319. __gllc_PopMatrix ,
  320. __gllc_PushMatrix ,
  321. __gllc_Rotated ,
  322. __gllc_Rotatef ,
  323. __gllc_Scaled ,
  324. __gllc_Scalef ,
  325. __gllc_Translated ,
  326. __gllc_Translatef ,
  327. __gllc_Viewport ,
  328. __gllc_ArrayElement ,
  329. __gllc_BindTexture ,
  330. glcltColorPointer ,
  331. glcltDisableClientState ,
  332. __gllc_DrawArrays ,
  333. __gllc_DrawElements ,
  334. glcltEdgeFlagPointer ,
  335. glcltEnableClientState ,
  336. glcltIndexPointer ,
  337. __gllc_Indexub ,
  338. __gllc_Indexubv ,
  339. glcltInterleavedArrays ,
  340. glcltNormalPointer ,
  341. __gllc_PolygonOffset ,
  342. glcltTexCoordPointer ,
  343. glcltVertexPointer ,
  344. glcltAreTexturesResident ,
  345. __gllc_CopyTexImage1D ,
  346. __gllc_CopyTexImage2D ,
  347. __gllc_CopyTexSubImage1D ,
  348. __gllc_CopyTexSubImage2D ,
  349. glcltDeleteTextures ,
  350. glcltGenTextures ,
  351. glcltGetPointerv ,
  352. glcltIsTexture ,
  353. __gllc_PrioritizeTextures ,
  354. __gllc_TexSubImage1D ,
  355. __gllc_TexSubImage2D ,
  356. glcltPopClientAttrib ,
  357. glcltPushClientAttrib ,
  358. }
  359. };
  360. GLEXTPROCTABLE ListCompExtProcTable =
  361. {
  362. /* Number of function entries in the table */
  363. sizeof(GLEXTDISPATCHTABLE) / sizeof(PROC),
  364. /* gl EXT Entry points */
  365. {
  366. __gllc_DrawRangeElementsWIN,
  367. __gllc_ColorTableEXT,
  368. __gllc_ColorSubTableEXT,
  369. glcltGetColorTableEXT,
  370. glcltGetColorTableParameterivEXT,
  371. glcltGetColorTableParameterfvEXT,
  372. #ifdef GL_WIN_multiple_textures
  373. __gllc_CurrentTextureIndexWIN,
  374. __gllc_MultiTexCoord1dWIN,
  375. __gllc_MultiTexCoord1dvWIN,
  376. __gllc_MultiTexCoord1fWIN,
  377. __gllc_MultiTexCoord1fvWIN,
  378. __gllc_MultiTexCoord1iWIN,
  379. __gllc_MultiTexCoord1ivWIN,
  380. __gllc_MultiTexCoord1sWIN,
  381. __gllc_MultiTexCoord1svWIN,
  382. __gllc_MultiTexCoord2dWIN,
  383. __gllc_MultiTexCoord2dvWIN,
  384. __gllc_MultiTexCoord2fWIN,
  385. __gllc_MultiTexCoord2fvWIN,
  386. __gllc_MultiTexCoord2iWIN,
  387. __gllc_MultiTexCoord2ivWIN,
  388. __gllc_MultiTexCoord2sWIN,
  389. __gllc_MultiTexCoord2svWIN,
  390. __gllc_MultiTexCoord3dWIN,
  391. __gllc_MultiTexCoord3dvWIN,
  392. __gllc_MultiTexCoord3fWIN,
  393. __gllc_MultiTexCoord3fvWIN,
  394. __gllc_MultiTexCoord3iWIN,
  395. __gllc_MultiTexCoord3ivWIN,
  396. __gllc_MultiTexCoord3sWIN,
  397. __gllc_MultiTexCoord3svWIN,
  398. __gllc_MultiTexCoord4dWIN,
  399. __gllc_MultiTexCoord4dvWIN,
  400. __gllc_MultiTexCoord4fWIN,
  401. __gllc_MultiTexCoord4fvWIN,
  402. __gllc_MultiTexCoord4iWIN,
  403. __gllc_MultiTexCoord4ivWIN,
  404. __gllc_MultiTexCoord4sWIN,
  405. __gllc_MultiTexCoord4svWIN,
  406. __gllc_BindNthTextureWIN,
  407. __gllc_NthTexCombineFuncWIN,
  408. #endif // GL_WIN_multiple_textures
  409. }
  410. };