indirect_size_get.c 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221
  1. /* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
  2. /*
  3. * (C) Copyright IBM Corporation 2004
  4. * All Rights Reserved.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the "Software"),
  8. * to deal in the Software without restriction, including without limitation
  9. * the rights to use, copy, modify, merge, publish, distribute, sub license,
  10. * and/or sell copies of the Software, and to permit persons to whom the
  11. * Software is furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice (including the next
  14. * paragraph) shall be included in all copies or substantial portions of the
  15. * Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
  20. * IBM,
  21. * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  22. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
  23. * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  24. * SOFTWARE.
  25. */
  26. #include <X11/Xfuncproto.h>
  27. #include <GL/gl.h>
  28. #include "indirect_size_get.h"
  29. #include "glxserver.h"
  30. #include "indirect_util.h"
  31. #include "indirect_size.h"
  32. #if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
  33. #define PURE __attribute__((pure))
  34. #else
  35. #define PURE
  36. #endif
  37. #if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
  38. #define FASTCALL __attribute__((fastcall))
  39. #else
  40. #define FASTCALL
  41. #endif
  42. #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL)
  43. #undef HAVE_ALIAS
  44. #endif
  45. #ifdef HAVE_ALIAS
  46. #define ALIAS2(from,to) \
  47. _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
  48. __attribute__ ((alias( # to )));
  49. #define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size )
  50. #else
  51. #define ALIAS(from,to) \
  52. _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
  53. { return __gl ## to ## _size( e ); }
  54. #endif
  55. _X_INTERNAL PURE FASTCALL GLint
  56. __glCallLists_size(GLenum e)
  57. {
  58. switch (e) {
  59. case GL_BYTE:
  60. case GL_UNSIGNED_BYTE:
  61. return 1;
  62. case GL_SHORT:
  63. case GL_UNSIGNED_SHORT:
  64. case GL_2_BYTES:
  65. case GL_HALF_FLOAT:
  66. return 2;
  67. case GL_3_BYTES:
  68. return 3;
  69. case GL_INT:
  70. case GL_UNSIGNED_INT:
  71. case GL_FLOAT:
  72. case GL_4_BYTES:
  73. return 4;
  74. default:
  75. return 0;
  76. }
  77. }
  78. _X_INTERNAL PURE FASTCALL GLint
  79. __glFogfv_size(GLenum e)
  80. {
  81. switch (e) {
  82. case GL_FOG_INDEX:
  83. case GL_FOG_DENSITY:
  84. case GL_FOG_START:
  85. case GL_FOG_END:
  86. case GL_FOG_MODE:
  87. case GL_FOG_OFFSET_VALUE_SGIX:
  88. case GL_FOG_DISTANCE_MODE_NV:
  89. return 1;
  90. case GL_FOG_COLOR:
  91. return 4;
  92. default:
  93. return 0;
  94. }
  95. }
  96. _X_INTERNAL PURE FASTCALL GLint
  97. __glLightfv_size(GLenum e)
  98. {
  99. switch (e) {
  100. case GL_SPOT_EXPONENT:
  101. case GL_SPOT_CUTOFF:
  102. case GL_CONSTANT_ATTENUATION:
  103. case GL_LINEAR_ATTENUATION:
  104. case GL_QUADRATIC_ATTENUATION:
  105. return 1;
  106. case GL_SPOT_DIRECTION:
  107. return 3;
  108. case GL_AMBIENT:
  109. case GL_DIFFUSE:
  110. case GL_SPECULAR:
  111. case GL_POSITION:
  112. return 4;
  113. default:
  114. return 0;
  115. }
  116. }
  117. _X_INTERNAL PURE FASTCALL GLint
  118. __glLightModelfv_size(GLenum e)
  119. {
  120. switch (e) {
  121. case GL_LIGHT_MODEL_LOCAL_VIEWER:
  122. case GL_LIGHT_MODEL_TWO_SIDE:
  123. case GL_LIGHT_MODEL_COLOR_CONTROL:
  124. /* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/
  125. return 1;
  126. case GL_LIGHT_MODEL_AMBIENT:
  127. return 4;
  128. default:
  129. return 0;
  130. }
  131. }
  132. _X_INTERNAL PURE FASTCALL GLint
  133. __glMaterialfv_size(GLenum e)
  134. {
  135. switch (e) {
  136. case GL_SHININESS:
  137. return 1;
  138. case GL_COLOR_INDEXES:
  139. return 3;
  140. case GL_AMBIENT:
  141. case GL_DIFFUSE:
  142. case GL_SPECULAR:
  143. case GL_EMISSION:
  144. case GL_AMBIENT_AND_DIFFUSE:
  145. return 4;
  146. default:
  147. return 0;
  148. }
  149. }
  150. _X_INTERNAL PURE FASTCALL GLint
  151. __glTexParameterfv_size(GLenum e)
  152. {
  153. switch (e) {
  154. case GL_TEXTURE_MAG_FILTER:
  155. case GL_TEXTURE_MIN_FILTER:
  156. case GL_TEXTURE_WRAP_S:
  157. case GL_TEXTURE_WRAP_T:
  158. case GL_TEXTURE_PRIORITY:
  159. case GL_TEXTURE_WRAP_R:
  160. case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
  161. /* case GL_SHADOW_AMBIENT_SGIX:*/
  162. case GL_TEXTURE_MIN_LOD:
  163. case GL_TEXTURE_MAX_LOD:
  164. case GL_TEXTURE_BASE_LEVEL:
  165. case GL_TEXTURE_MAX_LEVEL:
  166. case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
  167. case GL_TEXTURE_LOD_BIAS_S_SGIX:
  168. case GL_TEXTURE_LOD_BIAS_T_SGIX:
  169. case GL_TEXTURE_LOD_BIAS_R_SGIX:
  170. case GL_GENERATE_MIPMAP:
  171. /* case GL_GENERATE_MIPMAP_SGIS:*/
  172. case GL_TEXTURE_COMPARE_SGIX:
  173. case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
  174. case GL_TEXTURE_MAX_CLAMP_S_SGIX:
  175. case GL_TEXTURE_MAX_CLAMP_T_SGIX:
  176. case GL_TEXTURE_MAX_CLAMP_R_SGIX:
  177. case GL_TEXTURE_MAX_ANISOTROPY_EXT:
  178. case GL_TEXTURE_LOD_BIAS:
  179. /* case GL_TEXTURE_LOD_BIAS_EXT:*/
  180. case GL_TEXTURE_STORAGE_HINT_APPLE:
  181. case GL_STORAGE_PRIVATE_APPLE:
  182. case GL_STORAGE_CACHED_APPLE:
  183. case GL_STORAGE_SHARED_APPLE:
  184. case GL_DEPTH_TEXTURE_MODE:
  185. /* case GL_DEPTH_TEXTURE_MODE_ARB:*/
  186. case GL_TEXTURE_COMPARE_MODE:
  187. /* case GL_TEXTURE_COMPARE_MODE_ARB:*/
  188. case GL_TEXTURE_COMPARE_FUNC:
  189. /* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
  190. case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
  191. return 1;
  192. case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
  193. case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
  194. return 2;
  195. case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
  196. return 3;
  197. case GL_TEXTURE_BORDER_COLOR:
  198. case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
  199. case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
  200. return 4;
  201. default:
  202. return 0;
  203. }
  204. }
  205. _X_INTERNAL PURE FASTCALL GLint
  206. __glTexEnvfv_size(GLenum e)
  207. {
  208. switch (e) {
  209. case GL_ALPHA_SCALE:
  210. case GL_TEXTURE_ENV_MODE:
  211. case GL_TEXTURE_LOD_BIAS:
  212. case GL_COMBINE_RGB:
  213. case GL_COMBINE_ALPHA:
  214. case GL_RGB_SCALE:
  215. case GL_SOURCE0_RGB:
  216. case GL_SOURCE1_RGB:
  217. case GL_SOURCE2_RGB:
  218. case GL_SOURCE3_RGB_NV:
  219. case GL_SOURCE0_ALPHA:
  220. case GL_SOURCE1_ALPHA:
  221. case GL_SOURCE2_ALPHA:
  222. case GL_SOURCE3_ALPHA_NV:
  223. case GL_OPERAND0_RGB:
  224. case GL_OPERAND1_RGB:
  225. case GL_OPERAND2_RGB:
  226. case GL_OPERAND3_RGB_NV:
  227. case GL_OPERAND0_ALPHA:
  228. case GL_OPERAND1_ALPHA:
  229. case GL_OPERAND2_ALPHA:
  230. case GL_OPERAND3_ALPHA_NV:
  231. case GL_BUMP_TARGET_ATI:
  232. case GL_COORD_REPLACE_ARB:
  233. /* case GL_COORD_REPLACE_NV:*/
  234. return 1;
  235. case GL_TEXTURE_ENV_COLOR:
  236. return 4;
  237. default:
  238. return 0;
  239. }
  240. }
  241. _X_INTERNAL PURE FASTCALL GLint
  242. __glTexGendv_size(GLenum e)
  243. {
  244. switch (e) {
  245. case GL_TEXTURE_GEN_MODE:
  246. return 1;
  247. case GL_OBJECT_PLANE:
  248. case GL_EYE_PLANE:
  249. return 4;
  250. default:
  251. return 0;
  252. }
  253. }
  254. _X_INTERNAL PURE FASTCALL GLint
  255. __glMap1d_size(GLenum e)
  256. {
  257. switch (e) {
  258. case GL_MAP1_INDEX:
  259. case GL_MAP1_TEXTURE_COORD_1:
  260. return 1;
  261. case GL_MAP1_TEXTURE_COORD_2:
  262. return 2;
  263. case GL_MAP1_NORMAL:
  264. case GL_MAP1_TEXTURE_COORD_3:
  265. case GL_MAP1_VERTEX_3:
  266. return 3;
  267. case GL_MAP1_COLOR_4:
  268. case GL_MAP1_TEXTURE_COORD_4:
  269. case GL_MAP1_VERTEX_4:
  270. return 4;
  271. default:
  272. return 0;
  273. }
  274. }
  275. _X_INTERNAL PURE FASTCALL GLint
  276. __glMap2d_size(GLenum e)
  277. {
  278. switch (e) {
  279. case GL_MAP2_INDEX:
  280. case GL_MAP2_TEXTURE_COORD_1:
  281. return 1;
  282. case GL_MAP2_TEXTURE_COORD_2:
  283. return 2;
  284. case GL_MAP2_NORMAL:
  285. case GL_MAP2_TEXTURE_COORD_3:
  286. case GL_MAP2_VERTEX_3:
  287. return 3;
  288. case GL_MAP2_COLOR_4:
  289. case GL_MAP2_TEXTURE_COORD_4:
  290. case GL_MAP2_VERTEX_4:
  291. return 4;
  292. default:
  293. return 0;
  294. }
  295. }
  296. _X_INTERNAL PURE FASTCALL GLint
  297. __glGetBooleanv_size(GLenum e)
  298. {
  299. switch (e) {
  300. case GL_CURRENT_INDEX:
  301. case GL_CURRENT_RASTER_INDEX:
  302. case GL_CURRENT_RASTER_POSITION_VALID:
  303. case GL_CURRENT_RASTER_DISTANCE:
  304. case GL_POINT_SMOOTH:
  305. case GL_POINT_SIZE:
  306. case GL_SMOOTH_POINT_SIZE_GRANULARITY:
  307. case GL_LINE_SMOOTH:
  308. case GL_LINE_WIDTH:
  309. case GL_LINE_WIDTH_GRANULARITY:
  310. case GL_LINE_STIPPLE:
  311. case GL_LINE_STIPPLE_PATTERN:
  312. case GL_LINE_STIPPLE_REPEAT:
  313. case GL_LIST_MODE:
  314. case GL_MAX_LIST_NESTING:
  315. case GL_LIST_BASE:
  316. case GL_LIST_INDEX:
  317. case GL_POLYGON_SMOOTH:
  318. case GL_POLYGON_STIPPLE:
  319. case GL_EDGE_FLAG:
  320. case GL_CULL_FACE:
  321. case GL_CULL_FACE_MODE:
  322. case GL_FRONT_FACE:
  323. case GL_LIGHTING:
  324. case GL_LIGHT_MODEL_LOCAL_VIEWER:
  325. case GL_LIGHT_MODEL_TWO_SIDE:
  326. case GL_SHADE_MODEL:
  327. case GL_COLOR_MATERIAL_FACE:
  328. case GL_COLOR_MATERIAL_PARAMETER:
  329. case GL_COLOR_MATERIAL:
  330. case GL_FOG:
  331. case GL_FOG_INDEX:
  332. case GL_FOG_DENSITY:
  333. case GL_FOG_START:
  334. case GL_FOG_END:
  335. case GL_FOG_MODE:
  336. case GL_DEPTH_TEST:
  337. case GL_DEPTH_WRITEMASK:
  338. case GL_DEPTH_CLEAR_VALUE:
  339. case GL_DEPTH_FUNC:
  340. case GL_STENCIL_TEST:
  341. case GL_STENCIL_CLEAR_VALUE:
  342. case GL_STENCIL_FUNC:
  343. case GL_STENCIL_VALUE_MASK:
  344. case GL_STENCIL_FAIL:
  345. case GL_STENCIL_PASS_DEPTH_FAIL:
  346. case GL_STENCIL_PASS_DEPTH_PASS:
  347. case GL_STENCIL_REF:
  348. case GL_STENCIL_WRITEMASK:
  349. case GL_MATRIX_MODE:
  350. case GL_NORMALIZE:
  351. case GL_MODELVIEW_STACK_DEPTH:
  352. case GL_PROJECTION_STACK_DEPTH:
  353. case GL_TEXTURE_STACK_DEPTH:
  354. case GL_ATTRIB_STACK_DEPTH:
  355. case GL_CLIENT_ATTRIB_STACK_DEPTH:
  356. case GL_ALPHA_TEST:
  357. case GL_ALPHA_TEST_FUNC:
  358. case GL_ALPHA_TEST_REF:
  359. case GL_DITHER:
  360. case GL_BLEND_DST:
  361. case GL_BLEND_SRC:
  362. case GL_BLEND:
  363. case GL_LOGIC_OP_MODE:
  364. case GL_LOGIC_OP:
  365. case GL_AUX_BUFFERS:
  366. case GL_DRAW_BUFFER:
  367. case GL_READ_BUFFER:
  368. case GL_SCISSOR_TEST:
  369. case GL_INDEX_CLEAR_VALUE:
  370. case GL_INDEX_WRITEMASK:
  371. case GL_INDEX_MODE:
  372. case GL_RGBA_MODE:
  373. case GL_DOUBLEBUFFER:
  374. case GL_STEREO:
  375. case GL_RENDER_MODE:
  376. case GL_PERSPECTIVE_CORRECTION_HINT:
  377. case GL_POINT_SMOOTH_HINT:
  378. case GL_LINE_SMOOTH_HINT:
  379. case GL_POLYGON_SMOOTH_HINT:
  380. case GL_FOG_HINT:
  381. case GL_TEXTURE_GEN_S:
  382. case GL_TEXTURE_GEN_T:
  383. case GL_TEXTURE_GEN_R:
  384. case GL_TEXTURE_GEN_Q:
  385. case GL_PIXEL_MAP_I_TO_I:
  386. case GL_PIXEL_MAP_I_TO_I_SIZE:
  387. case GL_PIXEL_MAP_S_TO_S_SIZE:
  388. case GL_PIXEL_MAP_I_TO_R_SIZE:
  389. case GL_PIXEL_MAP_I_TO_G_SIZE:
  390. case GL_PIXEL_MAP_I_TO_B_SIZE:
  391. case GL_PIXEL_MAP_I_TO_A_SIZE:
  392. case GL_PIXEL_MAP_R_TO_R_SIZE:
  393. case GL_PIXEL_MAP_G_TO_G_SIZE:
  394. case GL_PIXEL_MAP_B_TO_B_SIZE:
  395. case GL_PIXEL_MAP_A_TO_A_SIZE:
  396. case GL_UNPACK_SWAP_BYTES:
  397. case GL_UNPACK_LSB_FIRST:
  398. case GL_UNPACK_ROW_LENGTH:
  399. case GL_UNPACK_SKIP_ROWS:
  400. case GL_UNPACK_SKIP_PIXELS:
  401. case GL_UNPACK_ALIGNMENT:
  402. case GL_PACK_SWAP_BYTES:
  403. case GL_PACK_LSB_FIRST:
  404. case GL_PACK_ROW_LENGTH:
  405. case GL_PACK_SKIP_ROWS:
  406. case GL_PACK_SKIP_PIXELS:
  407. case GL_PACK_ALIGNMENT:
  408. case GL_MAP_COLOR:
  409. case GL_MAP_STENCIL:
  410. case GL_INDEX_SHIFT:
  411. case GL_INDEX_OFFSET:
  412. case GL_RED_SCALE:
  413. case GL_RED_BIAS:
  414. case GL_ZOOM_X:
  415. case GL_ZOOM_Y:
  416. case GL_GREEN_SCALE:
  417. case GL_GREEN_BIAS:
  418. case GL_BLUE_SCALE:
  419. case GL_BLUE_BIAS:
  420. case GL_ALPHA_SCALE:
  421. case GL_ALPHA_BIAS:
  422. case GL_DEPTH_SCALE:
  423. case GL_DEPTH_BIAS:
  424. case GL_MAX_EVAL_ORDER:
  425. case GL_MAX_LIGHTS:
  426. case GL_MAX_CLIP_PLANES:
  427. case GL_MAX_TEXTURE_SIZE:
  428. case GL_MAX_PIXEL_MAP_TABLE:
  429. case GL_MAX_ATTRIB_STACK_DEPTH:
  430. case GL_MAX_MODELVIEW_STACK_DEPTH:
  431. case GL_MAX_NAME_STACK_DEPTH:
  432. case GL_MAX_PROJECTION_STACK_DEPTH:
  433. case GL_MAX_TEXTURE_STACK_DEPTH:
  434. case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
  435. case GL_SUBPIXEL_BITS:
  436. case GL_INDEX_BITS:
  437. case GL_RED_BITS:
  438. case GL_GREEN_BITS:
  439. case GL_BLUE_BITS:
  440. case GL_ALPHA_BITS:
  441. case GL_DEPTH_BITS:
  442. case GL_STENCIL_BITS:
  443. case GL_ACCUM_RED_BITS:
  444. case GL_ACCUM_GREEN_BITS:
  445. case GL_ACCUM_BLUE_BITS:
  446. case GL_ACCUM_ALPHA_BITS:
  447. case GL_NAME_STACK_DEPTH:
  448. case GL_AUTO_NORMAL:
  449. case GL_MAP1_COLOR_4:
  450. case GL_MAP1_INDEX:
  451. case GL_MAP1_NORMAL:
  452. case GL_MAP1_TEXTURE_COORD_1:
  453. case GL_MAP1_TEXTURE_COORD_2:
  454. case GL_MAP1_TEXTURE_COORD_3:
  455. case GL_MAP1_TEXTURE_COORD_4:
  456. case GL_MAP1_VERTEX_3:
  457. case GL_MAP1_VERTEX_4:
  458. case GL_MAP2_COLOR_4:
  459. case GL_MAP2_INDEX:
  460. case GL_MAP2_NORMAL:
  461. case GL_MAP2_TEXTURE_COORD_1:
  462. case GL_MAP2_TEXTURE_COORD_2:
  463. case GL_MAP2_TEXTURE_COORD_3:
  464. case GL_MAP2_TEXTURE_COORD_4:
  465. case GL_MAP2_VERTEX_3:
  466. case GL_MAP2_VERTEX_4:
  467. case GL_MAP1_GRID_SEGMENTS:
  468. case GL_TEXTURE_1D:
  469. case GL_TEXTURE_2D:
  470. case GL_POLYGON_OFFSET_UNITS:
  471. case GL_CLIP_PLANE0:
  472. case GL_CLIP_PLANE1:
  473. case GL_CLIP_PLANE2:
  474. case GL_CLIP_PLANE3:
  475. case GL_CLIP_PLANE4:
  476. case GL_CLIP_PLANE5:
  477. case GL_LIGHT0:
  478. case GL_LIGHT1:
  479. case GL_LIGHT2:
  480. case GL_LIGHT3:
  481. case GL_LIGHT4:
  482. case GL_LIGHT5:
  483. case GL_LIGHT6:
  484. case GL_LIGHT7:
  485. case GL_BLEND_EQUATION:
  486. /* case GL_BLEND_EQUATION_EXT:*/
  487. case GL_CONVOLUTION_1D:
  488. case GL_CONVOLUTION_2D:
  489. case GL_SEPARABLE_2D:
  490. case GL_MAX_CONVOLUTION_WIDTH:
  491. /* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/
  492. case GL_MAX_CONVOLUTION_HEIGHT:
  493. /* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/
  494. case GL_POST_CONVOLUTION_RED_SCALE:
  495. /* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/
  496. case GL_POST_CONVOLUTION_GREEN_SCALE:
  497. /* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/
  498. case GL_POST_CONVOLUTION_BLUE_SCALE:
  499. /* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/
  500. case GL_POST_CONVOLUTION_ALPHA_SCALE:
  501. /* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/
  502. case GL_POST_CONVOLUTION_RED_BIAS:
  503. /* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/
  504. case GL_POST_CONVOLUTION_GREEN_BIAS:
  505. /* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/
  506. case GL_POST_CONVOLUTION_BLUE_BIAS:
  507. /* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/
  508. case GL_POST_CONVOLUTION_ALPHA_BIAS:
  509. /* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/
  510. case GL_HISTOGRAM:
  511. case GL_MINMAX:
  512. case GL_POLYGON_OFFSET_FACTOR:
  513. case GL_RESCALE_NORMAL:
  514. /* case GL_RESCALE_NORMAL_EXT:*/
  515. case GL_TEXTURE_BINDING_1D:
  516. case GL_TEXTURE_BINDING_2D:
  517. case GL_TEXTURE_BINDING_3D:
  518. case GL_PACK_SKIP_IMAGES:
  519. case GL_PACK_IMAGE_HEIGHT:
  520. case GL_UNPACK_SKIP_IMAGES:
  521. case GL_UNPACK_IMAGE_HEIGHT:
  522. case GL_TEXTURE_3D:
  523. case GL_MAX_3D_TEXTURE_SIZE:
  524. case GL_VERTEX_ARRAY:
  525. case GL_NORMAL_ARRAY:
  526. case GL_COLOR_ARRAY:
  527. case GL_INDEX_ARRAY:
  528. case GL_TEXTURE_COORD_ARRAY:
  529. case GL_EDGE_FLAG_ARRAY:
  530. case GL_VERTEX_ARRAY_SIZE:
  531. case GL_VERTEX_ARRAY_TYPE:
  532. case GL_VERTEX_ARRAY_STRIDE:
  533. case GL_NORMAL_ARRAY_TYPE:
  534. case GL_NORMAL_ARRAY_STRIDE:
  535. case GL_COLOR_ARRAY_SIZE:
  536. case GL_COLOR_ARRAY_TYPE:
  537. case GL_COLOR_ARRAY_STRIDE:
  538. case GL_INDEX_ARRAY_TYPE:
  539. case GL_INDEX_ARRAY_STRIDE:
  540. case GL_TEXTURE_COORD_ARRAY_SIZE:
  541. case GL_TEXTURE_COORD_ARRAY_TYPE:
  542. case GL_TEXTURE_COORD_ARRAY_STRIDE:
  543. case GL_EDGE_FLAG_ARRAY_STRIDE:
  544. case GL_MULTISAMPLE:
  545. /* case GL_MULTISAMPLE_ARB:*/
  546. case GL_SAMPLE_ALPHA_TO_COVERAGE:
  547. /* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/
  548. case GL_SAMPLE_ALPHA_TO_ONE:
  549. /* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/
  550. case GL_SAMPLE_COVERAGE:
  551. /* case GL_SAMPLE_COVERAGE_ARB:*/
  552. case GL_SAMPLE_BUFFERS:
  553. /* case GL_SAMPLE_BUFFERS_ARB:*/
  554. case GL_SAMPLES:
  555. /* case GL_SAMPLES_ARB:*/
  556. case GL_SAMPLE_COVERAGE_VALUE:
  557. /* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/
  558. case GL_SAMPLE_COVERAGE_INVERT:
  559. /* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/
  560. case GL_COLOR_MATRIX_STACK_DEPTH:
  561. case GL_MAX_COLOR_MATRIX_STACK_DEPTH:
  562. case GL_POST_COLOR_MATRIX_RED_SCALE:
  563. case GL_POST_COLOR_MATRIX_GREEN_SCALE:
  564. case GL_POST_COLOR_MATRIX_BLUE_SCALE:
  565. case GL_POST_COLOR_MATRIX_ALPHA_SCALE:
  566. case GL_POST_COLOR_MATRIX_RED_BIAS:
  567. case GL_POST_COLOR_MATRIX_GREEN_BIAS:
  568. case GL_POST_COLOR_MATRIX_BLUE_BIAS:
  569. case GL_POST_COLOR_MATRIX_ALPHA_BIAS:
  570. case GL_BLEND_DST_RGB:
  571. case GL_BLEND_SRC_RGB:
  572. case GL_BLEND_DST_ALPHA:
  573. case GL_BLEND_SRC_ALPHA:
  574. case GL_COLOR_TABLE:
  575. case GL_POST_CONVOLUTION_COLOR_TABLE:
  576. case GL_POST_COLOR_MATRIX_COLOR_TABLE:
  577. case GL_MAX_ELEMENTS_VERTICES:
  578. case GL_MAX_ELEMENTS_INDICES:
  579. case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
  580. case GL_POINT_SIZE_MIN:
  581. case GL_POINT_SIZE_MAX:
  582. case GL_POINT_FADE_THRESHOLD_SIZE:
  583. case GL_OCCLUSION_TEST_HP:
  584. case GL_OCCLUSION_TEST_RESULT_HP:
  585. case GL_LIGHT_MODEL_COLOR_CONTROL:
  586. case GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB:
  587. case GL_RESET_NOTIFICATION_STRATEGY_ARB:
  588. case GL_CURRENT_FOG_COORD:
  589. case GL_FOG_COORDINATE_ARRAY_TYPE:
  590. case GL_FOG_COORDINATE_ARRAY_STRIDE:
  591. case GL_FOG_COORD_ARRAY:
  592. case GL_COLOR_SUM_ARB:
  593. case GL_SECONDARY_COLOR_ARRAY_SIZE:
  594. case GL_SECONDARY_COLOR_ARRAY_TYPE:
  595. case GL_SECONDARY_COLOR_ARRAY_STRIDE:
  596. case GL_SECONDARY_COLOR_ARRAY:
  597. case GL_ACTIVE_TEXTURE:
  598. /* case GL_ACTIVE_TEXTURE_ARB:*/
  599. case GL_CLIENT_ACTIVE_TEXTURE:
  600. /* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/
  601. case GL_MAX_TEXTURE_UNITS:
  602. /* case GL_MAX_TEXTURE_UNITS_ARB:*/
  603. case GL_MAX_RENDERBUFFER_SIZE:
  604. /* case GL_MAX_RENDERBUFFER_SIZE_EXT:*/
  605. case GL_TEXTURE_COMPRESSION_HINT:
  606. /* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/
  607. case GL_TEXTURE_RECTANGLE_ARB:
  608. /* case GL_TEXTURE_RECTANGLE_NV:*/
  609. case GL_TEXTURE_BINDING_RECTANGLE_ARB:
  610. /* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/
  611. case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB:
  612. /* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/
  613. case GL_MAX_TEXTURE_LOD_BIAS:
  614. case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
  615. case GL_MAX_SHININESS_NV:
  616. case GL_MAX_SPOT_EXPONENT_NV:
  617. case GL_TEXTURE_CUBE_MAP:
  618. /* case GL_TEXTURE_CUBE_MAP_ARB:*/
  619. case GL_TEXTURE_BINDING_CUBE_MAP:
  620. /* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/
  621. case GL_MAX_CUBE_MAP_TEXTURE_SIZE:
  622. /* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/
  623. case GL_MULTISAMPLE_FILTER_HINT_NV:
  624. case GL_FOG_DISTANCE_MODE_NV:
  625. case GL_VERTEX_PROGRAM_ARB:
  626. case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
  627. case GL_MAX_PROGRAM_MATRICES_ARB:
  628. case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
  629. case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
  630. case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
  631. case GL_PROGRAM_ERROR_POSITION_ARB:
  632. case GL_DEPTH_CLAMP:
  633. /* case GL_DEPTH_CLAMP_NV:*/
  634. case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
  635. /* case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/
  636. case GL_MAX_VERTEX_UNITS_ARB:
  637. case GL_ACTIVE_VERTEX_UNITS_ARB:
  638. case GL_WEIGHT_SUM_UNITY_ARB:
  639. case GL_VERTEX_BLEND_ARB:
  640. case GL_CURRENT_WEIGHT_ARB:
  641. case GL_WEIGHT_ARRAY_TYPE_ARB:
  642. case GL_WEIGHT_ARRAY_STRIDE_ARB:
  643. case GL_WEIGHT_ARRAY_SIZE_ARB:
  644. case GL_WEIGHT_ARRAY_ARB:
  645. case GL_PACK_INVERT_MESA:
  646. case GL_STENCIL_BACK_FUNC_ATI:
  647. case GL_STENCIL_BACK_FAIL_ATI:
  648. case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI:
  649. case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI:
  650. case GL_FRAGMENT_PROGRAM_ARB:
  651. case GL_MAX_DRAW_BUFFERS_ARB:
  652. /* case GL_MAX_DRAW_BUFFERS_ATI:*/
  653. case GL_DRAW_BUFFER0_ARB:
  654. /* case GL_DRAW_BUFFER0_ATI:*/
  655. case GL_DRAW_BUFFER1_ARB:
  656. /* case GL_DRAW_BUFFER1_ATI:*/
  657. case GL_DRAW_BUFFER2_ARB:
  658. /* case GL_DRAW_BUFFER2_ATI:*/
  659. case GL_DRAW_BUFFER3_ARB:
  660. /* case GL_DRAW_BUFFER3_ATI:*/
  661. case GL_DRAW_BUFFER4_ARB:
  662. /* case GL_DRAW_BUFFER4_ATI:*/
  663. case GL_DRAW_BUFFER5_ARB:
  664. /* case GL_DRAW_BUFFER5_ATI:*/
  665. case GL_DRAW_BUFFER6_ARB:
  666. /* case GL_DRAW_BUFFER6_ATI:*/
  667. case GL_DRAW_BUFFER7_ARB:
  668. /* case GL_DRAW_BUFFER7_ATI:*/
  669. case GL_DRAW_BUFFER8_ARB:
  670. /* case GL_DRAW_BUFFER8_ATI:*/
  671. case GL_DRAW_BUFFER9_ARB:
  672. /* case GL_DRAW_BUFFER9_ATI:*/
  673. case GL_DRAW_BUFFER10_ARB:
  674. /* case GL_DRAW_BUFFER10_ATI:*/
  675. case GL_DRAW_BUFFER11_ARB:
  676. /* case GL_DRAW_BUFFER11_ATI:*/
  677. case GL_DRAW_BUFFER12_ARB:
  678. /* case GL_DRAW_BUFFER12_ATI:*/
  679. case GL_DRAW_BUFFER13_ARB:
  680. /* case GL_DRAW_BUFFER13_ATI:*/
  681. case GL_DRAW_BUFFER14_ARB:
  682. /* case GL_DRAW_BUFFER14_ATI:*/
  683. case GL_DRAW_BUFFER15_ARB:
  684. /* case GL_DRAW_BUFFER15_ATI:*/
  685. case GL_BLEND_EQUATION_ALPHA_EXT:
  686. case GL_MATRIX_PALETTE_ARB:
  687. case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB:
  688. case GL_MAX_PALETTE_MATRICES_ARB:
  689. case GL_CURRENT_PALETTE_MATRIX_ARB:
  690. case GL_MATRIX_INDEX_ARRAY_ARB:
  691. case GL_CURRENT_MATRIX_INDEX_ARB:
  692. case GL_MATRIX_INDEX_ARRAY_SIZE_ARB:
  693. case GL_MATRIX_INDEX_ARRAY_TYPE_ARB:
  694. case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB:
  695. case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT:
  696. case GL_TEXTURE_CUBE_MAP_SEAMLESS:
  697. case GL_POINT_SPRITE_ARB:
  698. /* case GL_POINT_SPRITE_NV:*/
  699. case GL_POINT_SPRITE_R_MODE_NV:
  700. case GL_MAX_VERTEX_ATTRIBS_ARB:
  701. case GL_MAX_TEXTURE_COORDS_ARB:
  702. case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
  703. case GL_DEPTH_BOUNDS_TEST_EXT:
  704. case GL_ARRAY_BUFFER_BINDING_ARB:
  705. case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
  706. case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
  707. case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
  708. case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
  709. case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
  710. case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
  711. case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
  712. case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
  713. case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
  714. case GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB:
  715. case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
  716. case GL_STENCIL_TEST_TWO_SIDE_EXT:
  717. case GL_ACTIVE_STENCIL_FACE_EXT:
  718. case GL_SAMPLER_BINDING:
  719. case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
  720. case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
  721. case GL_FRAMEBUFFER_BINDING:
  722. /* case GL_DRAW_FRAMEBUFFER_BINDING_EXT:*/
  723. case GL_RENDERBUFFER_BINDING:
  724. /* case GL_RENDERBUFFER_BINDING_EXT:*/
  725. case GL_READ_FRAMEBUFFER_BINDING:
  726. /* case GL_READ_FRAMEBUFFER_BINDING_EXT:*/
  727. case GL_MAX_COLOR_ATTACHMENTS:
  728. /* case GL_MAX_COLOR_ATTACHMENTS_EXT:*/
  729. case GL_MAX_SAMPLES:
  730. /* case GL_MAX_SAMPLES_EXT:*/
  731. case GL_MAX_SERVER_WAIT_TIMEOUT:
  732. case GL_MAX_DEBUG_MESSAGE_LENGTH_ARB:
  733. case GL_MAX_DEBUG_LOGGED_MESSAGES_ARB:
  734. case GL_DEBUG_LOGGED_MESSAGES_ARB:
  735. case GL_RASTER_POSITION_UNCLIPPED_IBM:
  736. return 1;
  737. case GL_SMOOTH_POINT_SIZE_RANGE:
  738. case GL_LINE_WIDTH_RANGE:
  739. case GL_POLYGON_MODE:
  740. case GL_DEPTH_RANGE:
  741. case GL_MAX_VIEWPORT_DIMS:
  742. case GL_MAP1_GRID_DOMAIN:
  743. case GL_MAP2_GRID_SEGMENTS:
  744. case GL_ALIASED_POINT_SIZE_RANGE:
  745. case GL_ALIASED_LINE_WIDTH_RANGE:
  746. case GL_DEPTH_BOUNDS_EXT:
  747. return 2;
  748. case GL_CURRENT_NORMAL:
  749. case GL_POINT_DISTANCE_ATTENUATION:
  750. return 3;
  751. case GL_CURRENT_COLOR:
  752. case GL_CURRENT_TEXTURE_COORDS:
  753. case GL_CURRENT_RASTER_COLOR:
  754. case GL_CURRENT_RASTER_TEXTURE_COORDS:
  755. case GL_CURRENT_RASTER_POSITION:
  756. case GL_LIGHT_MODEL_AMBIENT:
  757. case GL_FOG_COLOR:
  758. case GL_ACCUM_CLEAR_VALUE:
  759. case GL_VIEWPORT:
  760. case GL_SCISSOR_BOX:
  761. case GL_COLOR_CLEAR_VALUE:
  762. case GL_COLOR_WRITEMASK:
  763. case GL_MAP2_GRID_DOMAIN:
  764. case GL_BLEND_COLOR:
  765. /* case GL_BLEND_COLOR_EXT:*/
  766. case GL_CURRENT_SECONDARY_COLOR:
  767. return 4;
  768. case GL_MODELVIEW_MATRIX:
  769. case GL_PROJECTION_MATRIX:
  770. case GL_TEXTURE_MATRIX:
  771. case GL_MODELVIEW0_ARB:
  772. case GL_COLOR_MATRIX:
  773. case GL_MODELVIEW1_ARB:
  774. case GL_CURRENT_MATRIX_ARB:
  775. case GL_MODELVIEW2_ARB:
  776. case GL_MODELVIEW3_ARB:
  777. case GL_MODELVIEW4_ARB:
  778. case GL_MODELVIEW5_ARB:
  779. case GL_MODELVIEW6_ARB:
  780. case GL_MODELVIEW7_ARB:
  781. case GL_MODELVIEW8_ARB:
  782. case GL_MODELVIEW9_ARB:
  783. case GL_MODELVIEW10_ARB:
  784. case GL_MODELVIEW11_ARB:
  785. case GL_MODELVIEW12_ARB:
  786. case GL_MODELVIEW13_ARB:
  787. case GL_MODELVIEW14_ARB:
  788. case GL_MODELVIEW15_ARB:
  789. case GL_MODELVIEW16_ARB:
  790. case GL_MODELVIEW17_ARB:
  791. case GL_MODELVIEW18_ARB:
  792. case GL_MODELVIEW19_ARB:
  793. case GL_MODELVIEW20_ARB:
  794. case GL_MODELVIEW21_ARB:
  795. case GL_MODELVIEW22_ARB:
  796. case GL_MODELVIEW23_ARB:
  797. case GL_MODELVIEW24_ARB:
  798. case GL_MODELVIEW25_ARB:
  799. case GL_MODELVIEW26_ARB:
  800. case GL_MODELVIEW27_ARB:
  801. case GL_MODELVIEW28_ARB:
  802. case GL_MODELVIEW29_ARB:
  803. case GL_MODELVIEW30_ARB:
  804. case GL_MODELVIEW31_ARB:
  805. case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
  806. return 16;
  807. case GL_FOG_COORDINATE_SOURCE:
  808. case GL_COMPRESSED_TEXTURE_FORMATS:
  809. case GL_RGBA_INTEGER_MODE_EXT:
  810. return __glGetBooleanv_variable_size(e);
  811. default:
  812. return 0;
  813. }
  814. }
  815. _X_INTERNAL PURE FASTCALL GLint
  816. __glGetTexParameterfv_size(GLenum e)
  817. {
  818. switch (e) {
  819. case GL_TEXTURE_MAG_FILTER:
  820. case GL_TEXTURE_MIN_FILTER:
  821. case GL_TEXTURE_WRAP_S:
  822. case GL_TEXTURE_WRAP_T:
  823. case GL_TEXTURE_PRIORITY:
  824. case GL_TEXTURE_RESIDENT:
  825. case GL_TEXTURE_WRAP_R:
  826. case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
  827. /* case GL_SHADOW_AMBIENT_SGIX:*/
  828. case GL_TEXTURE_MIN_LOD:
  829. case GL_TEXTURE_MAX_LOD:
  830. case GL_TEXTURE_BASE_LEVEL:
  831. case GL_TEXTURE_MAX_LEVEL:
  832. case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
  833. case GL_TEXTURE_LOD_BIAS_S_SGIX:
  834. case GL_TEXTURE_LOD_BIAS_T_SGIX:
  835. case GL_TEXTURE_LOD_BIAS_R_SGIX:
  836. case GL_GENERATE_MIPMAP:
  837. /* case GL_GENERATE_MIPMAP_SGIS:*/
  838. case GL_TEXTURE_COMPARE_SGIX:
  839. case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
  840. case GL_TEXTURE_MAX_CLAMP_S_SGIX:
  841. case GL_TEXTURE_MAX_CLAMP_T_SGIX:
  842. case GL_TEXTURE_MAX_CLAMP_R_SGIX:
  843. case GL_TEXTURE_MAX_ANISOTROPY_EXT:
  844. case GL_TEXTURE_LOD_BIAS:
  845. /* case GL_TEXTURE_LOD_BIAS_EXT:*/
  846. case GL_TEXTURE_RANGE_LENGTH_APPLE:
  847. case GL_TEXTURE_STORAGE_HINT_APPLE:
  848. case GL_DEPTH_TEXTURE_MODE:
  849. /* case GL_DEPTH_TEXTURE_MODE_ARB:*/
  850. case GL_TEXTURE_COMPARE_MODE:
  851. /* case GL_TEXTURE_COMPARE_MODE_ARB:*/
  852. case GL_TEXTURE_COMPARE_FUNC:
  853. /* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
  854. case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
  855. return 1;
  856. case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
  857. case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
  858. return 2;
  859. case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
  860. return 3;
  861. case GL_TEXTURE_BORDER_COLOR:
  862. case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
  863. case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
  864. return 4;
  865. default:
  866. return 0;
  867. }
  868. }
  869. _X_INTERNAL PURE FASTCALL GLint
  870. __glGetTexLevelParameterfv_size(GLenum e)
  871. {
  872. switch (e) {
  873. case GL_TEXTURE_WIDTH:
  874. case GL_TEXTURE_HEIGHT:
  875. case GL_TEXTURE_COMPONENTS:
  876. case GL_TEXTURE_BORDER:
  877. case GL_TEXTURE_RED_SIZE:
  878. /* case GL_TEXTURE_RED_SIZE_EXT:*/
  879. case GL_TEXTURE_GREEN_SIZE:
  880. /* case GL_TEXTURE_GREEN_SIZE_EXT:*/
  881. case GL_TEXTURE_BLUE_SIZE:
  882. /* case GL_TEXTURE_BLUE_SIZE_EXT:*/
  883. case GL_TEXTURE_ALPHA_SIZE:
  884. /* case GL_TEXTURE_ALPHA_SIZE_EXT:*/
  885. case GL_TEXTURE_LUMINANCE_SIZE:
  886. /* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/
  887. case GL_TEXTURE_INTENSITY_SIZE:
  888. /* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/
  889. case GL_TEXTURE_DEPTH:
  890. case GL_TEXTURE_INDEX_SIZE_EXT:
  891. case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
  892. /* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/
  893. case GL_TEXTURE_COMPRESSED:
  894. /* case GL_TEXTURE_COMPRESSED_ARB:*/
  895. case GL_TEXTURE_DEPTH_SIZE:
  896. /* case GL_TEXTURE_DEPTH_SIZE_ARB:*/
  897. case GL_TEXTURE_STENCIL_SIZE:
  898. /* case GL_TEXTURE_STENCIL_SIZE_EXT:*/
  899. return 1;
  900. default:
  901. return 0;
  902. }
  903. }
  904. _X_INTERNAL PURE FASTCALL GLint
  905. __glGetPointerv_size(GLenum e)
  906. {
  907. switch (e) {
  908. case GL_DEBUG_CALLBACK_FUNCTION_ARB:
  909. case GL_DEBUG_CALLBACK_USER_PARAM_ARB:
  910. return 1;
  911. default:
  912. return 0;
  913. }
  914. }
  915. _X_INTERNAL PURE FASTCALL GLint
  916. __glColorTableParameterfv_size(GLenum e)
  917. {
  918. switch (e) {
  919. case GL_COLOR_TABLE_SCALE:
  920. case GL_COLOR_TABLE_BIAS:
  921. return 4;
  922. default:
  923. return 0;
  924. }
  925. }
  926. _X_INTERNAL PURE FASTCALL GLint
  927. __glGetColorTableParameterfv_size(GLenum e)
  928. {
  929. switch (e) {
  930. case GL_COLOR_TABLE_FORMAT:
  931. /* case GL_COLOR_TABLE_FORMAT_EXT:*/
  932. case GL_COLOR_TABLE_WIDTH:
  933. /* case GL_COLOR_TABLE_WIDTH_EXT:*/
  934. case GL_COLOR_TABLE_RED_SIZE:
  935. /* case GL_COLOR_TABLE_RED_SIZE_EXT:*/
  936. case GL_COLOR_TABLE_GREEN_SIZE:
  937. /* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/
  938. case GL_COLOR_TABLE_BLUE_SIZE:
  939. /* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/
  940. case GL_COLOR_TABLE_ALPHA_SIZE:
  941. /* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/
  942. case GL_COLOR_TABLE_LUMINANCE_SIZE:
  943. /* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/
  944. case GL_COLOR_TABLE_INTENSITY_SIZE:
  945. /* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/
  946. return 1;
  947. case GL_COLOR_TABLE_SCALE:
  948. case GL_COLOR_TABLE_BIAS:
  949. return 4;
  950. default:
  951. return 0;
  952. }
  953. }
  954. _X_INTERNAL PURE FASTCALL GLint
  955. __glConvolutionParameterfv_size(GLenum e)
  956. {
  957. switch (e) {
  958. case GL_CONVOLUTION_BORDER_MODE:
  959. /* case GL_CONVOLUTION_BORDER_MODE_EXT:*/
  960. return 1;
  961. case GL_CONVOLUTION_FILTER_SCALE:
  962. /* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
  963. case GL_CONVOLUTION_FILTER_BIAS:
  964. /* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
  965. case GL_CONVOLUTION_BORDER_COLOR:
  966. /* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
  967. return 4;
  968. default:
  969. return 0;
  970. }
  971. }
  972. _X_INTERNAL PURE FASTCALL GLint
  973. __glGetConvolutionParameterfv_size(GLenum e)
  974. {
  975. switch (e) {
  976. case GL_CONVOLUTION_BORDER_MODE:
  977. /* case GL_CONVOLUTION_BORDER_MODE_EXT:*/
  978. case GL_CONVOLUTION_FORMAT:
  979. /* case GL_CONVOLUTION_FORMAT_EXT:*/
  980. case GL_CONVOLUTION_WIDTH:
  981. /* case GL_CONVOLUTION_WIDTH_EXT:*/
  982. case GL_CONVOLUTION_HEIGHT:
  983. /* case GL_CONVOLUTION_HEIGHT_EXT:*/
  984. case GL_MAX_CONVOLUTION_WIDTH:
  985. /* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/
  986. case GL_MAX_CONVOLUTION_HEIGHT:
  987. /* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/
  988. return 1;
  989. case GL_CONVOLUTION_FILTER_SCALE:
  990. /* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
  991. case GL_CONVOLUTION_FILTER_BIAS:
  992. /* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
  993. case GL_CONVOLUTION_BORDER_COLOR:
  994. /* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
  995. return 4;
  996. default:
  997. return 0;
  998. }
  999. }
  1000. _X_INTERNAL PURE FASTCALL GLint
  1001. __glGetHistogramParameterfv_size(GLenum e)
  1002. {
  1003. switch (e) {
  1004. case GL_HISTOGRAM_WIDTH:
  1005. case GL_HISTOGRAM_FORMAT:
  1006. case GL_HISTOGRAM_RED_SIZE:
  1007. case GL_HISTOGRAM_GREEN_SIZE:
  1008. case GL_HISTOGRAM_BLUE_SIZE:
  1009. case GL_HISTOGRAM_ALPHA_SIZE:
  1010. case GL_HISTOGRAM_LUMINANCE_SIZE:
  1011. case GL_HISTOGRAM_SINK:
  1012. return 1;
  1013. default:
  1014. return 0;
  1015. }
  1016. }
  1017. _X_INTERNAL PURE FASTCALL GLint
  1018. __glGetMinmaxParameterfv_size(GLenum e)
  1019. {
  1020. switch (e) {
  1021. case GL_MINMAX_FORMAT:
  1022. case GL_MINMAX_SINK:
  1023. return 1;
  1024. default:
  1025. return 0;
  1026. }
  1027. }
  1028. _X_INTERNAL PURE FASTCALL GLint
  1029. __glPointParameterfv_size(GLenum e)
  1030. {
  1031. switch (e) {
  1032. case GL_POINT_SIZE_MIN:
  1033. /* case GL_POINT_SIZE_MIN_ARB:*/
  1034. /* case GL_POINT_SIZE_MIN_SGIS:*/
  1035. case GL_POINT_SIZE_MAX:
  1036. /* case GL_POINT_SIZE_MAX_ARB:*/
  1037. /* case GL_POINT_SIZE_MAX_SGIS:*/
  1038. case GL_POINT_FADE_THRESHOLD_SIZE:
  1039. /* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/
  1040. /* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/
  1041. case GL_POINT_SPRITE_R_MODE_NV:
  1042. case GL_POINT_SPRITE_COORD_ORIGIN:
  1043. return 1;
  1044. case GL_POINT_DISTANCE_ATTENUATION:
  1045. /* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/
  1046. /* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
  1047. return 3;
  1048. default:
  1049. return 0;
  1050. }
  1051. }
  1052. _X_INTERNAL PURE FASTCALL GLint
  1053. __glGetQueryObjectiv_size(GLenum e)
  1054. {
  1055. switch (e) {
  1056. case GL_QUERY_RESULT_ARB:
  1057. case GL_QUERY_RESULT_AVAILABLE_ARB:
  1058. return 1;
  1059. default:
  1060. return 0;
  1061. }
  1062. }
  1063. _X_INTERNAL PURE FASTCALL GLint
  1064. __glGetQueryiv_size(GLenum e)
  1065. {
  1066. switch (e) {
  1067. case GL_QUERY_COUNTER_BITS_ARB:
  1068. case GL_CURRENT_QUERY_ARB:
  1069. case GL_ANY_SAMPLES_PASSED:
  1070. return 1;
  1071. default:
  1072. return 0;
  1073. }
  1074. }
  1075. _X_INTERNAL PURE FASTCALL GLint
  1076. __glGetProgramivARB_size(GLenum e)
  1077. {
  1078. switch (e) {
  1079. case GL_PROGRAM_LENGTH_ARB:
  1080. case GL_PROGRAM_BINDING_ARB:
  1081. case GL_PROGRAM_ALU_INSTRUCTIONS_ARB:
  1082. case GL_PROGRAM_TEX_INSTRUCTIONS_ARB:
  1083. case GL_PROGRAM_TEX_INDIRECTIONS_ARB:
  1084. case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
  1085. case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
  1086. case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
  1087. case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB:
  1088. case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB:
  1089. case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB:
  1090. case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB:
  1091. case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB:
  1092. case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB:
  1093. case GL_PROGRAM_FORMAT_ARB:
  1094. case GL_PROGRAM_INSTRUCTIONS_ARB:
  1095. case GL_MAX_PROGRAM_INSTRUCTIONS_ARB:
  1096. case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
  1097. case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB:
  1098. case GL_PROGRAM_TEMPORARIES_ARB:
  1099. case GL_MAX_PROGRAM_TEMPORARIES_ARB:
  1100. case GL_PROGRAM_NATIVE_TEMPORARIES_ARB:
  1101. case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB:
  1102. case GL_PROGRAM_PARAMETERS_ARB:
  1103. case GL_MAX_PROGRAM_PARAMETERS_ARB:
  1104. case GL_PROGRAM_NATIVE_PARAMETERS_ARB:
  1105. case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB:
  1106. case GL_PROGRAM_ATTRIBS_ARB:
  1107. case GL_MAX_PROGRAM_ATTRIBS_ARB:
  1108. case GL_PROGRAM_NATIVE_ATTRIBS_ARB:
  1109. case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB:
  1110. case GL_PROGRAM_ADDRESS_REGISTERS_ARB:
  1111. case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB:
  1112. case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
  1113. case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB:
  1114. case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB:
  1115. case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB:
  1116. case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB:
  1117. case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV:
  1118. case GL_MAX_PROGRAM_CALL_DEPTH_NV:
  1119. case GL_MAX_PROGRAM_IF_DEPTH_NV:
  1120. case GL_MAX_PROGRAM_LOOP_DEPTH_NV:
  1121. case GL_MAX_PROGRAM_LOOP_COUNT_NV:
  1122. return 1;
  1123. default:
  1124. return 0;
  1125. }
  1126. }
  1127. _X_INTERNAL PURE FASTCALL GLint
  1128. __glGetFramebufferAttachmentParameteriv_size(GLenum e)
  1129. {
  1130. switch (e) {
  1131. case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:
  1132. case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
  1133. case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
  1134. case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
  1135. case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
  1136. case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
  1137. case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
  1138. case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
  1139. case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
  1140. /* case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:*/
  1141. case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
  1142. /* case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:*/
  1143. case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
  1144. /* case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:*/
  1145. case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
  1146. /* case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:*/
  1147. case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
  1148. return 1;
  1149. default:
  1150. return 0;
  1151. }
  1152. }
  1153. ALIAS(Fogiv, Fogfv)
  1154. ALIAS(Lightiv, Lightfv)
  1155. ALIAS(LightModeliv, LightModelfv)
  1156. ALIAS(Materialiv, Materialfv)
  1157. ALIAS(TexParameteriv, TexParameterfv)
  1158. ALIAS(TexEnviv, TexEnvfv)
  1159. ALIAS(TexGenfv, TexGendv)
  1160. ALIAS(TexGeniv, TexGendv)
  1161. ALIAS(Map1f, Map1d)
  1162. ALIAS(Map2f, Map2d)
  1163. ALIAS(GetDoublev, GetBooleanv)
  1164. ALIAS(GetFloatv, GetBooleanv)
  1165. ALIAS(GetIntegerv, GetBooleanv)
  1166. ALIAS(GetLightfv, Lightfv)
  1167. ALIAS(GetLightiv, Lightfv)
  1168. ALIAS(GetMaterialfv, Materialfv)
  1169. ALIAS(GetMaterialiv, Materialfv)
  1170. ALIAS(GetTexEnvfv, TexEnvfv)
  1171. ALIAS(GetTexEnviv, TexEnvfv)
  1172. ALIAS(GetTexGendv, TexGendv)
  1173. ALIAS(GetTexGenfv, TexGendv)
  1174. ALIAS(GetTexGeniv, TexGendv)
  1175. ALIAS(GetTexParameteriv, GetTexParameterfv)
  1176. ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv)
  1177. ALIAS(ColorTableParameteriv, ColorTableParameterfv)
  1178. ALIAS(GetColorTableParameteriv, GetColorTableParameterfv)
  1179. ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
  1180. ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv)
  1181. ALIAS(GetHistogramParameteriv, GetHistogramParameterfv)
  1182. ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv)
  1183. ALIAS(PointParameteriv, PointParameterfv)
  1184. ALIAS(GetQueryObjectuiv, GetQueryObjectiv)
  1185. #undef PURE
  1186. #undef FASTCALL