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.

388 lines
19 KiB

  1. #include <nt.h>
  2. #include <ntrtl.h>
  3. #include <nturtl.h>
  4. #include <stddef.h>
  5. #include <stdio.h>
  6. #include <windows.h>
  7. #include <ddraw.h>
  8. #include <glp.h>
  9. #include "types.h"
  10. #include "render.h"
  11. #include "context.h"
  12. include(BASE_INC_PATH`\genxx.h')
  13. STRUC_ELEMENT ElementList[] = {
  14. START_LIST
  15. genCom("DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED")
  16. genStr("// Size of core context = %d bytes\n", sizeof(__GLcontext))
  17. genStr("// Size of core attrib record = %d bytes\n", sizeof(__GLattribute))
  18. genSpc()
  19. genTxt("#include \"asm.h\"\n")
  20. genCom("Context structure offsets")
  21. #if 0
  22. // Add as needed
  23. genAlt(__GC_TRANSFORM_MODELVIEW, __GLcontext, transform.modelView)
  24. genAlt(__GC_TRANSFORM_CLIPX0, __GLcontext, transform.clipX0)
  25. genAlt(__GC_TRANSFORM_CLIPX1, __GLcontext, transform.clipX1)
  26. genAlt(__GC_TRANSFORM_CLIPY0, __GLcontext, transform.clipY0)
  27. genAlt(__GC_TRANSFORM_CLIPY1, __GLcontext, transform.clipY1)
  28. genAlt(__GC_TRANSFORM_MINX, __GLcontext, transform.minx)
  29. genAlt(__GC_TRANSFORM_MINY, __GLcontext, transform.miny)
  30. genAlt(__GC_TRANSFORM_MAXX, __GLcontext, transform.maxx)
  31. genAlt(__GC_TRANSFORM_MAXY, __GLcontext, transform.maxy)
  32. genAlt(__GC_TRANSFORM_FMINX, __GLcontext, transform.fminx)
  33. genAlt(__GC_TRANSFORM_FMINY, __GLcontext, transform.fminy)
  34. genAlt(__GC_TRANSFORM_FMAXX, __GLcontext, transform.fmaxx)
  35. genAlt(__GC_TRANSFORM_FMAXY, __GLcontext, transform.fmaxy)
  36. genAlt(__GC_TRANSFORM_MATRIX2D, __GLcontext, transform.matrix2D)
  37. genSpc()
  38. genAlt(__GC_CURRENT_EDGETAG, __GLcontext, state.current.edgeTag)
  39. genAlt(__GC_CURRENT_USERCOLOR_R, __GLcontext, state.current.userColor.r)
  40. genAlt(__GC_CURRENT_USERCOLOR_G, __GLcontext, state.current.userColor.g)
  41. genAlt(__GC_CURRENT_USERCOLOR_B, __GLcontext, state.current.userColor.b)
  42. genAlt(__GC_CURRENT_USERCOLOR_A, __GLcontext, state.current.userColor.a)
  43. genAlt(__GC_CURRENT_USERCOLORINDEX, __GLcontext, state.current.userColorIndex)
  44. genAlt(__GC_CURRENT_COLOR_R, __GLcontext, state.current.color.r)
  45. genAlt(__GC_CURRENT_COLOR_G, __GLcontext, state.current.color.g)
  46. genAlt(__GC_CURRENT_COLOR_B, __GLcontext, state.current.color.b)
  47. genAlt(__GC_CURRENT_COLOR_A, __GLcontext, state.current.color.a)
  48. genAlt(__GC_CURRENT_NORMAL_X, __GLcontext, state.current.normal.x)
  49. genAlt(__GC_CURRENT_NORMAL_Y, __GLcontext, state.current.normal.y)
  50. genAlt(__GC_CURRENT_NORMAL_Z, __GLcontext, state.current.normal.z)
  51. genAlt(__GC_CURRENT_TEXTURE_X, __GLcontext, state.current.texture.x)
  52. genAlt(__GC_CURRENT_TEXTURE_Y, __GLcontext, state.current.texture.y)
  53. genAlt(__GC_CURRENT_TEXTURE_Z, __GLcontext, state.current.texture.z)
  54. genAlt(__GC_CURRENT_TEXTURE_W, __GLcontext, state.current.texture.w)
  55. genAlt(__GC_FOG_COLOR, __GLcontext, state.fog.color)
  56. genAlt(__GC_FRONTBUFFER_REDSCALE, __GLcontext, frontBuffer.redScale)
  57. genAlt(__GC_FRONTBUFFER_GREENSCALE, __GLcontext, frontBuffer.greenScale)
  58. genAlt(__GC_FRONTBUFFER_BLUESCALE, __GLcontext, frontBuffer.blueScale)
  59. genAlt(__GC_FRONTBUFFER_ALPHASCALE, __GLcontext, frontBuffer.alphaScale)
  60. genSpc()
  61. genAlt(__GC_VERTEX_V0, __GLcontext, vertex.v0)
  62. genAlt(__GC_VERTEX_V1, __GLcontext, vertex.v1)
  63. genAlt(__GC_VERTEX_VBUF0, __GLcontext, vertex.vbuf[0])
  64. genAlt(__GC_VERTEX_VBUF1, __GLcontext, vertex.vbuf[1])
  65. genAlt(__GC_VERTEX_PROVOKING, __GLcontext, vertex.provoking)
  66. genAlt(__GC_VERTEX_NEEDS, __GLcontext, vertex.needs)
  67. genAlt(__GC_VERTEX_FRONTFACE_NEEDS, __GLcontext, vertex.faceNeeds[__GL_FRONTFACE])
  68. genSpc()
  69. genAlt(__GC_LINE_NOTRESETSTIPPLE, __GLcontext, line.notResetStipple)
  70. genAlt(__GC_LINE_ALIASEDWIDTH, __GLcontext, state.line.aliasedWidth)
  71. genSpc()
  72. #endif
  73. #if 1
  74. genAlt(__GC_VIEWPORT_XCENTER, __GLcontext, state.viewport.xCenter)
  75. genAlt(__GC_VIEWPORT_YCENTER, __GLcontext, state.viewport.yCenter)
  76. genAlt(__GC_VIEWPORT_ZCENTER, __GLcontext, state.viewport.zCenter)
  77. genAlt(__GC_VIEWPORT_XSCALE, __GLcontext, state.viewport.xScale)
  78. genAlt(__GC_VIEWPORT_YSCALE, __GLcontext, state.viewport.yScale)
  79. genAlt(__GC_VIEWPORT_ZSCALE, __GLcontext, state.viewport.zScale)
  80. #endif
  81. #if 0
  82. genAlt(__GC_VIEWPORT_HEIGHT, __GLcontext, state.viewport.height)
  83. genAlt(__GC_VIEWPORT_WIDTH, __GLcontext, state.viewport.width)
  84. genSpc()
  85. genAlt(__GC_PROCS_VERTEX, __GLcontext, procs.vertex)
  86. genAlt(__GC_PROCS_VALIDATEVERTEX2, __GLcontext, procs.validateVertex2)
  87. genAlt(__GC_PROCS_VALIDATEVERTEX3, __GLcontext, procs.validateVertex3)
  88. genAlt(__GC_PROCS_VALIDATEVERTEX4, __GLcontext, procs.validateVertex4)
  89. genAlt(__GC_PROCS_V, __GLcontext, procs.v)
  90. genAlt(__GC_PROCS_FILLTRIANGLE, __GLcontext, procs.fillTriangle)
  91. genAlt(__GC_PROCS_RENDERTRIANGLE, __GLcontext, procs.renderTriangle)
  92. genAlt(__GC_PROCS_MATVALIDATE, __GLcontext, procs.matValidate)
  93. genAlt(__GC_PROCS_LINE_DEPTHTESTPIXEL, __GLcontext, procs.line.depthTestPixel)
  94. genAlt(__GC_PROCS_LINE_DEPTHTESTSPIXEL, __GLcontext, procs.line.depthTestSPixel)
  95. genAlt(__GC_PROCS_LINE_DEPTHTESTPIXELSF, __GLcontext, procs.line.depthTestPixelSF)
  96. genAlt(__GC_PROCS_LINE_DEPTHTESTSPIXELSF, __GLcontext, procs.line.depthTestSPixelSF)
  97. genAlt(__GC_PROCS_CLIPCHECK2, __GLcontext, procs.clipCheck2)
  98. genAlt(__GC_PROCS_CLIPCHECK3, __GLcontext, procs.clipCheck3)
  99. genAlt(__GC_PROCS_CLIPCHECK4, __GLcontext, procs.clipCheck4)
  100. genAlt(__GC_PROCS_RENDERLINE, __GLcontext, procs.renderLine)
  101. genAlt(__GC_PROCS_CLIPLINE, __GLcontext, procs.clipLine)
  102. genAlt(__GC_PROCS_RENDERPOINT, __GLcontext, procs.renderPoint)
  103. genAlt(__GC_PROCS_CALCCOLOR, __GLcontext, procs.calcColor)
  104. genAlt(__GC_PROCS_CALCTEXTURE, __GLcontext, procs.calcTexture)
  105. genAlt(__GC_PROCS_FOGVERTEX, __GLcontext, procs.fogVertex)
  106. genAlt(__GC_PROCS_NORMALIZE, __GLcontext, procs.normalize)
  107. genAlt(__GC_PROCS_COMPUTEINVERSETRANSPOSE, __GLcontext, procs.computeInverseTranspose)
  108. genSpc()
  109. genAlt(__GC_ENABLES_GENERAL, __GLcontext, state.enables.general)
  110. genSpc()
  111. genAlt(__GC_STATE_LIGHT_FRONT, __GLcontext, state.light.front)
  112. genAlt(__GC_STATE_LIGHT_BACK, __GLcontext, state.light.back)
  113. genAlt(__GC_LIGHT_FRONT, __GLcontext, light.front)
  114. genAlt(__GC_LIGHT_BACK, __GLcontext, light.back)
  115. genAlt(__GC_LIGHT_SOURCES, __GLcontext, light.sources)
  116. genSpc()
  117. genAlt(__GC_LINE_OPTIONS_XSTART, __GLcontext, line.options.xStart)
  118. genAlt(__GC_LINE_OPTIONS_YSTART, __GLcontext, line.options.yStart)
  119. genAlt(__GC_LINE_OPTIONS_XLITTLE, __GLcontext, line.options.xLittle)
  120. genAlt(__GC_LINE_OPTIONS_YLITTLE, __GLcontext, line.options.yLittle)
  121. genAlt(__GC_LINE_OPTIONS_XBIG, __GLcontext, line.options.xBig)
  122. genAlt(__GC_LINE_OPTIONS_YBIG, __GLcontext, line.options.yBig)
  123. genAlt(__GC_LINE_OPTIONS_FRACTION, __GLcontext, line.options.fraction)
  124. genAlt(__GC_LINE_OPTIONS_DFRACTION, __GLcontext, line.options.dfraction)
  125. genAlt(__GC_LINE_OPTIONS_AXIS, __GLcontext, line.options.axis)
  126. genAlt(__GC_LINE_OPTIONS_VERT0, __GLcontext, line.options.v0)
  127. genAlt(__GC_LINE_OPTIONS_VERT1, __GLcontext, line.options.v1)
  128. genAlt(__GC_LINE_OPTIONS_WIDTH, __GLcontext, line.options.width)
  129. genAlt(__GC_LINE_OPTIONS_LENGTH, __GLcontext, line.options.length)
  130. genAlt(__GC_LINE_OPTIONS_NUMPIXELS, __GLcontext, line.options.numPixels)
  131. genAlt(__GC_LINE_OPTIONS_OFFSET, __GLcontext, line.options.offset)
  132. genSpc()
  133. genAlt(__GC_CONSTANTS_VIEWPORTXADJUST, __GLcontext, constants.viewportXAdjust)
  134. genAlt(__GC_CONSTANTS_VIEWPORTYADJUST, __GLcontext, constants.viewportYAdjust)
  135. genAlt(__GC_CONSTANTS_FVIEWPORTXADJUST, __GLcontext, constants.fviewportXAdjust)
  136. genAlt(__GC_CONSTANTS_FVIEWPORTYADJUST, __GLcontext, constants.fviewportYAdjust)
  137. genAlt(__GC_CONSTANTS_VIEWPORTEPSILON, __GLcontext, constants.viewportEpsilon)
  138. genAlt(__GC_CONSTANTS_YINVERTED, __GLcontext, constants.yInverted)
  139. genSpc()
  140. genAlt(__GC_POLYGON_CULLFACE, __GLcontext, polygon.cullFace)
  141. genAlt(__GC_POLYGON_FACE, __GLcontext, polygon.face[0])
  142. genAlt(__GC_POLYGON_SHADER_AREA, __GLcontext, polygon.shader.area)
  143. genAlt(__GC_POLYGON_SHADER_DXAC, __GLcontext, polygon.shader.dxAC)
  144. genAlt(__GC_POLYGON_SHADER_DYAC, __GLcontext, polygon.shader.dyAC)
  145. genAlt(__GC_POLYGON_SHADER_DXBC, __GLcontext, polygon.shader.dxBC)
  146. genAlt(__GC_POLYGON_SHADER_DYBC, __GLcontext, polygon.shader.dyBC)
  147. genAlt(__GC_POLYGON_SHADER_DRDX, __GLcontext, polygon.shader.drdx)
  148. genAlt(__GC_POLYGON_SHADER_DRDY, __GLcontext, polygon.shader.drdy)
  149. genAlt(__GC_POLYGON_SHADER_DGDX, __GLcontext, polygon.shader.dgdx)
  150. genAlt(__GC_POLYGON_SHADER_DGDY, __GLcontext, polygon.shader.dgdy)
  151. genAlt(__GC_POLYGON_SHADER_DBDX, __GLcontext, polygon.shader.dbdx)
  152. genAlt(__GC_POLYGON_SHADER_DBDY, __GLcontext, polygon.shader.dbdy)
  153. genAlt(__GC_POLYGON_SHADER_DZDX, __GLcontext, polygon.shader.dzdx)
  154. genAlt(__GC_POLYGON_SHADER_DZDXF, __GLcontext, polygon.shader.dzdxf)
  155. genAlt(__GC_POLYGON_SHADER_DZDYF, __GLcontext, polygon.shader.dzdyf)
  156. genAlt(__GC_POLYGON_SHADER_FRAG_COLOR_R, __GLcontext, polygon.shader.frag.color.r)
  157. genAlt(__GC_POLYGON_SHADER_FRAG_COLOR_G, __GLcontext, polygon.shader.frag.color.g)
  158. genAlt(__GC_POLYGON_SHADER_FRAG_COLOR_B, __GLcontext, polygon.shader.frag.color.b)
  159. genAlt(__GC_POLYGON_SHADER_FRAG_Z, __GLcontext, polygon.shader.frag.z)
  160. genAlt(__GC_POLYGON_SHADER_LENGTH, __GLcontext, polygon.shader.length)
  161. genAlt(__GC_POLYGON_SHADER_RBIG, __GLcontext, polygon.shader.rBig)
  162. genAlt(__GC_POLYGON_SHADER_GBIG, __GLcontext, polygon.shader.gBig)
  163. genAlt(__GC_POLYGON_SHADER_BBIG, __GLcontext, polygon.shader.bBig)
  164. genAlt(__GC_POLYGON_SHADER_RLITTLE, __GLcontext, polygon.shader.rLittle)
  165. genAlt(__GC_POLYGON_SHADER_GLITTLE, __GLcontext, polygon.shader.gLittle)
  166. genAlt(__GC_POLYGON_SHADER_BLITTLE, __GLcontext, polygon.shader.bLittle)
  167. genAlt(__GC_POLYGON_SHADER_IXLEFT, __GLcontext, polygon.shader.ixLeft)
  168. genAlt(__GC_POLYGON_SHADER_IXLEFTFRAC, __GLcontext, polygon.shader.ixLeftFrac)
  169. genAlt(__GC_POLYGON_SHADER_DXLEFTFRAC, __GLcontext, polygon.shader.dxLeftFrac)
  170. genAlt(__GC_POLYGON_SHADER_IXRIGHT, __GLcontext, polygon.shader.ixRight)
  171. genAlt(__GC_POLYGON_SHADER_IXRIGHTFRAC, __GLcontext, polygon.shader.ixRightFrac)
  172. genAlt(__GC_POLYGON_SHADER_DXRIGHTFRAC, __GLcontext, polygon.shader.dxRightFrac)
  173. genAlt(__GC_POLYGON_SHADER_DXRIGHTBIG, __GLcontext, polygon.shader.dxRightBig)
  174. genAlt(__GC_POLYGON_SHADER_DXRIGHTLITTLE, __GLcontext, polygon.shader.dxRightLittle)
  175. genAlt(__GC_POLYGON_SHADER_DXLEFTBIG, __GLcontext, polygon.shader.dxLeftBig)
  176. genAlt(__GC_POLYGON_SHADER_DXLEFTLITTLE, __GLcontext, polygon.shader.dxLeftLittle)
  177. genAlt(__GC_POLYGON_SHADER_DZDX, __GLcontext, polygon.shader.dzdx)
  178. genAlt(__GC_POLYGON_SHADER_ZBUF, __GLcontext, polygon.shader.zbuf)
  179. genAlt(__GC_POLYGON_SHADER_ZBUFBIG, __GLcontext, polygon.shader.zbufBig)
  180. genAlt(__GC_POLYGON_SHADER_ZBUFLITTLE, __GLcontext, polygon.shader.zbufLittle)
  181. genAlt(__GC_POLYGON_SHADER_ZBIG, __GLcontext, polygon.shader.zBig)
  182. genAlt(__GC_POLYGON_SHADER_ZLITTLE, __GLcontext, polygon.shader.zLittle)
  183. genAlt(__GC_POLYGON_SHADER_SBUF, __GLcontext, polygon.shader.sbuf)
  184. genAlt(__GC_POLYGON_SHADER_MODEFLAGS, __GLcontext, polygon.shader.modeFlags)
  185. genAlt(__GC_POLYGON_SHADER_COLORS, __GLcontext, polygon.shader.colors)
  186. genAlt(__GC_POLYGON_SHADER_STIPPLEPAT, __GLcontext, polygon.shader.stipplePat)
  187. genAlt(__GC_POLYGON_SHADER_DONE, __GLcontext, polygon.shader.done)
  188. genSpc()
  189. genAlt(__GC_DEPTHBUFFER_BUF_BASE, __GLcontext, depthBuffer.buf.base)
  190. genAlt(__GC_DEPTHBUFFER_BUF_OUTERWIDTH, __GLcontext, depthBuffer.buf.outerWidth)
  191. genSpc()
  192. genAlt(__GC_STENCIL_MASK, __GLcontext, state.stencil.mask)
  193. genAlt(__GC_STENCIL_TESTFUNCTABLE, __GLcontext, stencilBuffer.testFuncTable)
  194. genAlt(__GC_STENCIL_FAILOPTABLE, __GLcontext, stencilBuffer.failOpTable)
  195. genSpc()
  196. genAlt(__GC_PROCS_SPAN_DEPTHTESTPIXEL, __GLcontext, procs.span.depthTestPixel)
  197. genCom("Mode flags")
  198. genNam(__GL_SHADE_DEPTH_TEST)
  199. genNam(__GL_SHADE_SMOOTH)
  200. genNam(__GL_SHADE_RGB)
  201. genNam(__GL_SHADE_DITHER)
  202. genNam(__GL_SHADE_BLEND)
  203. genNam(__GL_SHADE_TWOSIDED)
  204. genCom("Enables")
  205. genNam(__GL_LINE_STIPPLE_ENABLE)
  206. genSpc()
  207. genCom("Transform structure offsets")
  208. genAlt(__TR_MATRIX, _GLtransform, matrix)
  209. genAlt(__TR_MATRIX_MATRIXTYPE, _GLtransform, matrix.matrixType)
  210. genAlt(__TR_UPDATEINVERSE, _GLtransform, updateInverse)
  211. genAlt(__TR_MATRIX_XF2, _GLtransform, matrix.xf2)
  212. genAlt(__TR_MATRIX_XF3, _GLtransform, matrix.xf3)
  213. genAlt(__TR_MATRIX_XF4, _GLtransform, matrix.xf4)
  214. genAlt(__TR_INVERSETRANSPOSE, _GLtransform, inverseTranspose)
  215. genAlt(__TR_INVERSETRANSPOSE_XF3, _GLtransform, inverseTranspose.xf3)
  216. genAlt(__TR_INVERSETRANSPOSE_XF4, _GLtransform, inverseTranspose.xf4)
  217. genAlt(__TR_MVP, _GLtransform, mvp)
  218. genAlt(__TR_MVP_MATRIX, _GLtransform, mvp.matrix[0][0])
  219. genAlt(__TR_MVP_XF2, _GLtransform, mvp.xf2)
  220. genAlt(__TR_MVP_XF3, _GLtransform, mvp.xf3)
  221. genAlt(__TR_MVP_XF4, _GLtransform, mvp.xf4)
  222. genSpc()
  223. genCom("Matrix structure offsets")
  224. genAlt(__MATRIX_M00, _GLmatrix, matrix[0][0])
  225. genAlt(__MATRIX_M01, _GLmatrix, matrix[0][1])
  226. genAlt(__MATRIX_M02, _GLmatrix, matrix[0][2])
  227. genAlt(__MATRIX_M03, _GLmatrix, matrix[0][3])
  228. genAlt(__MATRIX_M10, _GLmatrix, matrix[1][0])
  229. genAlt(__MATRIX_M11, _GLmatrix, matrix[1][1])
  230. genAlt(__MATRIX_M12, _GLmatrix, matrix[1][2])
  231. genAlt(__MATRIX_M13, _GLmatrix, matrix[1][3])
  232. genAlt(__MATRIX_M20, _GLmatrix, matrix[2][0])
  233. genAlt(__MATRIX_M21, _GLmatrix, matrix[2][1])
  234. genAlt(__MATRIX_M22, _GLmatrix, matrix[2][2])
  235. genAlt(__MATRIX_M23, _GLmatrix, matrix[2][3])
  236. genAlt(__MATRIX_M30, _GLmatrix, matrix[3][0])
  237. genAlt(__MATRIX_M31, _GLmatrix, matrix[3][1])
  238. genAlt(__MATRIX_M32, _GLmatrix, matrix[3][2])
  239. genAlt(__MATRIX_M33, _GLmatrix, matrix[3][3])
  240. genSpc()
  241. genCom("Consts structure offsets")
  242. genAlt(__GC_CONSTS_ALMOSTHALF, __GLcontext, constants.viewportAlmostHalf)
  243. genAlt(__GC_CONSTS_HALF, __GLcontext, constants.half)
  244. genAlt(_GC_CONSTS_ONE, __GLcontext, constants.one)
  245. genSpc()
  246. genCom("Vertex structure offsets")
  247. genAlt(__VX_HAS, __GLvertex, has)
  248. genAlt(__VX_VALIDATE, __GLvertex, validate)
  249. genAlt(__VX_CLIPCODE, __GLvertex, clipCode)
  250. genAlt(__VX_BOUNDARYEDGE, __GLvertex, boundaryEdge)
  251. genAlt(__VX_OBJ_X, __GLvertex, obj.x)
  252. genAlt(__VX_OBJ_Y, __GLvertex, obj.y)
  253. genAlt(__VX_OBJ_Z, __GLvertex, obj.z)
  254. genAlt(__VX_OBJ_W, __GLvertex, obj.w)
  255. genAlt(__VX_NORMAL_X, __GLvertex, normal.x)
  256. genAlt(__VX_NORMAL_Y, __GLvertex, normal.y)
  257. genAlt(__VX_NORMAL_Z, __GLvertex, normal.z)
  258. genAlt(__VX_NORMAL_W, __GLvertex, normal.w)
  259. genAlt(__VX_CLIP_X, __GLvertex, clip.x)
  260. genAlt(__VX_CLIP_Y, __GLvertex, clip.y)
  261. genAlt(__VX_CLIP_Z, __GLvertex, clip.z)
  262. genAlt(__VX_CLIP_W, __GLvertex, clip.w)
  263. genAlt(__VX_WINDOW_X, __GLvertex, window.x)
  264. genAlt(__VX_WINDOW_Y, __GLvertex, window.y)
  265. genAlt(__VX_WINDOW_Z, __GLvertex, window.z)
  266. genAlt(__VX_WINDOW_W, __GLvertex, window.w)
  267. genAlt(__VX_EYE_X, __GLvertex, eye.x)
  268. genAlt(__VX_EYE_Y, __GLvertex, eye.y)
  269. genAlt(__VX_EYE_Z, __GLvertex, eye.z)
  270. genAlt(__VX_EYE_W, __GLvertex, eye.w)
  271. genAlt(__VX_TEXTURE_X, __GLvertex, texture.x)
  272. genAlt(__VX_TEXTURE_Y, __GLvertex, texture.y)
  273. genAlt(__VX_TEXTURE_Z, __GLvertex, texture.z)
  274. genAlt(__VX_TEXTURE_W, __GLvertex, texture.w)
  275. genAlt(__VX_FOG, __GLvertex, fog)
  276. genAlt(__VX_COLOR, __GLvertex, color)
  277. genAlt(__VX_COLORS, __GLvertexx, colors[0]))
  278. genSpc()
  279. genCom("Color structure offsets")
  280. genAlt(__COLOR_R, __GLcolor, r)
  281. genAlt(__COLOR_G, __GLcolor, g)
  282. genAlt(__COLOR_B, __GLcolor, b)
  283. genAlt(__COLOR_A, __GLcolor, a)
  284. genVal(__COLOR_SIZE, sizeof(__GLcolor))
  285. genCom("Light machines offsets")
  286. genAlt(__LSM_FRONT, __GLlightSourceMachine, front)
  287. genAlt(__LSM_HHAT_X, __GLlightSourceMachine, hHat.x)
  288. genAlt(__LSM_HHAT_Y, __GLlightSourceMachine, hHat.y)
  289. genAlt(__LSM_HHAT_Z, __GLlightSourceMachine, hHat.z)
  290. genAlt(__LSM_UNITVPPLI_X, __GLlightSourceMachine, unitVPpli.x)
  291. genAlt(__LSM_UNITVPPLI_Y, __GLlightSourceMachine, unitVPpli.y)
  292. genAlt(__LSM_UNITVPPLI_Z, __GLlightSourceMachine, unitVPpli.z)
  293. genAlt(__LSM_NEXT, __GLlightSourceMachine, next)
  294. genAlt(__LSPMM_AMBIENT_R, __GLlightSourcePerMaterialMachine, ambient.r)
  295. genAlt(__LSPMM_AMBIENT_G, __GLlightSourcePerMaterialMachine, ambient.g)
  296. genAlt(__LSPMM_AMBIENT_B, __GLlightSourcePerMaterialMachine, ambient.b)
  297. genAlt(__LSPMM_SPECULAR_R, __GLlightSourcePerMaterialMachine, specular.r)
  298. genAlt(__LSPMM_SPECULAR_G, __GLlightSourcePerMaterialMachine, specular.g)
  299. genAlt(__LSPMM_SPECULAR_B, __GLlightSourcePerMaterialMachine, specular.b)
  300. genAlt(__LSPMM_DIFFUSE_R, __GLlightSourcePerMaterialMachine, diffuse.r)
  301. genAlt(__LSPMM_DIFFUSE_G, __GLlightSourcePerMaterialMachine, diffuse.g)
  302. genAlt(__LSPMM_DIFFUSE_B, __GLlightSourcePerMaterialMachine, diffuse.b)
  303. genVal(__LSPMM_SIZE, sizeof(__GLlightSourcePerMaterialMachine))
  304. genCom("Material machine offsets")
  305. genAlt(__MSM_SCENECOLOR_R, __GLmaterialMachine, sceneColor.r)
  306. genAlt(__MSM_SCENECOLOR_G, __GLmaterialMachine, sceneColor.g)
  307. genAlt(__MSM_SCENECOLOR_B, __GLmaterialMachine, sceneColor.b)
  308. genAlt(__MSM_THRESHOLD, __GLmaterialMachine, threshold)
  309. genAlt(__MSM_SCALE, __GLmaterialMachine, scale)
  310. genAlt(__MSM_SPECTABLE, __GLmaterialMachine, specTable)
  311. genAlt(__MSM_ALPHA, __GLmaterialMachine, alpha)
  312. #endif
  313. #if 1
  314. genCom("POLYDATA offsets")
  315. genAlt(__POLYDATA_CLIP_W, POLYDATA, clip.w)
  316. genAlt(__POLYDATA_CLIP_X, POLYDATA, clip.x)
  317. genAlt(__POLYDATA_CLIP_Y, POLYDATA, clip.y)
  318. genAlt(__POLYDATA_CLIP_Z, POLYDATA, clip.z)
  319. genAlt(__POLYDATA_WINDOW_W, POLYDATA, window.w)
  320. genAlt(__POLYDATA_WINDOW_X, POLYDATA, window.x)
  321. genAlt(__POLYDATA_WINDOW_Y, POLYDATA, window.y)
  322. genAlt(__POLYDATA_WINDOW_Z, POLYDATA, window.z)
  323. genVal(__SIZEOF_POLYDATA, sizeof(POLYDATA))
  324. genVal(__SIZEOF_GLVERTEX, sizeof(__GLvertex))
  325. genVal(__SIZEOF_POLYARRAY, sizeof(POLYARRAY))
  326. genSpc()
  327. genCom("Coordinate offsets")
  328. genAlt(__GLCOORD_X, __GLcoord, x)
  329. genAlt(__GLCOORD_Y, __GLcoord, y)
  330. genAlt(__GLCOORD_Z, __GLcoord, z)
  331. genAlt(__GLCOORD_W, __GLcoord, w)
  332. genSpc()
  333. genCom("Constants")
  334. genNam(__GL_CLIP_LEFT)
  335. genNam(__GL_CLIP_RIGHT)
  336. genNam(__GL_CLIP_BOTTOM)
  337. genNam(__GL_CLIP_TOP)
  338. genNam(__GL_CLIP_NEAR)
  339. genNam(__GL_CLIP_FAR)
  340. #endif
  341. #if 0
  342. genNam(__GL_SIZEOF_VERTEX)
  343. genNam(__GL_TRUE)
  344. genNam(__GL_HAS_EYE)
  345. genNam(__GL_HAS_NORMAL)
  346. genNam(__GL_HAS_LIGHTING)
  347. genNam(__GL_HAS_FOG)
  348. genNam(__GL_HAS_CLIP)
  349. genNam(__GL_HAS_TEXTURE)
  350. genNam(__GL_HAS_FRONT_COLOR)
  351. genNam(__GL_HAS_BACK_COLOR)
  352. genNam(__GL_FRONTFACE)
  353. genNam(__GL_BACKFACE)
  354. genNam(__GL_MT_GENERAL)
  355. genNam(__GL_NORMALIZE_ENABLE)
  356. genNam(__GL_SPEC_LOOKUP_TABLE_SIZE)
  357. genSpc()
  358. genCom("Other constants")
  359. genSpc()
  360. #endif
  361. END_LIST
  362. };