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.

11765 lines
438 KiB

  1. /*
  2. ** Copyright 1995-2095, 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. /* GENERATED FILE: DO NOT EDIT */
  18. #include "glslib.h"
  19. #include <string.h>
  20. // DrewB - Removed size externs
  21. // DrewB - All inactive extension functions have had their capture
  22. // flags index removed since they all need to be reset to
  23. // account for the added 1.1 functions
  24. void __gls_capture_glsBeginGLS(GLint inVersionMajor, GLint inVersionMinor) {
  25. GLbitfield captureFlags;
  26. __GLScontext *const ctx = __GLS_CONTEXT;
  27. __GLSwriter *writer;
  28. ++ctx->captureEntryCount;
  29. if (ctx->captureEntryFunc) ctx->captureEntryFunc(16);
  30. captureFlags = ctx->captureFlags[16];
  31. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  32. extern void __gls_exec_glsBeginGLS(GLint, GLint);
  33. __gls_exec_glsBeginGLS(inVersionMajor, inVersionMinor);
  34. }
  35. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  36. writer = ctx->writer;
  37. if (!writer->beginCommand(writer, 16, 8)) goto end;
  38. writer->putGLint(writer, inVersionMajor);
  39. writer->putGLint(writer, inVersionMinor);
  40. writer->endCommand(writer);
  41. end:
  42. if (ctx->captureExitFunc) ctx->captureExitFunc(16);
  43. --ctx->captureEntryCount;
  44. }
  45. void __gls_capture_glsBlock(GLSenum inBlockType) {
  46. GLbitfield captureFlags;
  47. __GLScontext *const ctx = __GLS_CONTEXT;
  48. __GLSwriter *writer;
  49. ++ctx->captureEntryCount;
  50. if (ctx->captureEntryFunc) ctx->captureEntryFunc(17);
  51. captureFlags = ctx->captureFlags[17];
  52. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  53. extern void __gls_exec_glsBlock(GLSenum);
  54. __gls_exec_glsBlock(inBlockType);
  55. }
  56. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  57. writer = ctx->writer;
  58. if (!writer->beginCommand(writer, 17, 4)) goto end;
  59. writer->putGLSenum(writer, inBlockType);
  60. writer->endCommand(writer);
  61. end:
  62. if (ctx->captureExitFunc) ctx->captureExitFunc(17);
  63. --ctx->captureEntryCount;
  64. }
  65. GLSenum __gls_capture_glsCallStream(const GLubyte *inName) {
  66. GLbitfield captureFlags;
  67. __GLScontext *const ctx = __GLS_CONTEXT;
  68. __GLSwriter *writer;
  69. GLSenum _outVal = 0;
  70. GLint inName_count;
  71. if (!glsIsUTF8String(inName)) {
  72. glsError(18, GLS_INVALID_STRING);
  73. return _outVal;
  74. }
  75. ++ctx->captureEntryCount;
  76. if (ctx->captureEntryFunc) ctx->captureEntryFunc(18);
  77. captureFlags = ctx->captureFlags[18];
  78. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  79. extern GLSenum __gls_exec_glsCallStream(const GLubyte *);
  80. _outVal = __gls_exec_glsCallStream(inName);
  81. }
  82. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  83. writer = ctx->writer;
  84. inName_count = (GLint)strlen((const char *)inName) + 1;
  85. if (!writer->beginCommand(writer, 18, 0 + inName_count)) goto end;
  86. writer->putGLcharv(writer, inName_count, inName);
  87. writer->endCommand(writer);
  88. end:
  89. if (ctx->captureExitFunc) ctx->captureExitFunc(18);
  90. --ctx->captureEntryCount;
  91. return _outVal;
  92. }
  93. void __gls_capture_glsEndGLS(void) {
  94. GLbitfield captureFlags;
  95. __GLScontext *const ctx = __GLS_CONTEXT;
  96. __GLSwriter *writer;
  97. ++ctx->captureEntryCount;
  98. if (ctx->captureEntryFunc) ctx->captureEntryFunc(19);
  99. captureFlags = ctx->captureFlags[19];
  100. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  101. extern void __gls_exec_glsEndGLS(void);
  102. __gls_exec_glsEndGLS();
  103. }
  104. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  105. writer = ctx->writer;
  106. if (!writer->beginCommand(writer, 19, 0)) goto end;
  107. writer->endCommand(writer);
  108. end:
  109. if (ctx->captureExitFunc) ctx->captureExitFunc(19);
  110. --ctx->captureEntryCount;
  111. }
  112. void __gls_capture_glsError(GLSopcode inOpcode, GLSenum inError) {
  113. GLbitfield captureFlags;
  114. __GLScontext *const ctx = __GLS_CONTEXT;
  115. __GLSwriter *writer;
  116. ++ctx->captureEntryCount;
  117. if (ctx->captureEntryFunc) ctx->captureEntryFunc(20);
  118. captureFlags = ctx->captureFlags[20];
  119. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  120. extern void __gls_exec_glsError(GLSopcode, GLSenum);
  121. __gls_exec_glsError(inOpcode, inError);
  122. }
  123. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  124. writer = ctx->writer;
  125. if (!writer->beginCommand(writer, 20, 8)) goto end;
  126. writer->putGLSopcode(writer, inOpcode);
  127. writer->putGLSenum(writer, inError);
  128. writer->endCommand(writer);
  129. end:
  130. if (ctx->captureExitFunc) ctx->captureExitFunc(20);
  131. --ctx->captureEntryCount;
  132. }
  133. void __gls_capture_glsGLRC(GLuint inGLRC) {
  134. GLbitfield captureFlags;
  135. __GLScontext *const ctx = __GLS_CONTEXT;
  136. __GLSwriter *writer;
  137. ++ctx->captureEntryCount;
  138. if (ctx->captureEntryFunc) ctx->captureEntryFunc(21);
  139. captureFlags = ctx->captureFlags[21];
  140. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  141. extern void __gls_exec_glsGLRC(GLuint);
  142. __gls_exec_glsGLRC(inGLRC);
  143. }
  144. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  145. writer = ctx->writer;
  146. if (!writer->beginCommand(writer, 21, 4)) goto end;
  147. writer->putGLuint(writer, inGLRC);
  148. writer->endCommand(writer);
  149. end:
  150. if (ctx->captureExitFunc) ctx->captureExitFunc(21);
  151. --ctx->captureEntryCount;
  152. }
  153. void __gls_capture_glsGLRCLayer(GLuint inGLRC, GLuint inLayer, GLuint inReadLayer) {
  154. GLbitfield captureFlags;
  155. __GLScontext *const ctx = __GLS_CONTEXT;
  156. __GLSwriter *writer;
  157. ++ctx->captureEntryCount;
  158. if (ctx->captureEntryFunc) ctx->captureEntryFunc(22);
  159. captureFlags = ctx->captureFlags[22];
  160. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  161. extern void __gls_exec_glsGLRCLayer(GLuint, GLuint, GLuint);
  162. __gls_exec_glsGLRCLayer(inGLRC, inLayer, inReadLayer);
  163. }
  164. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  165. writer = ctx->writer;
  166. if (!writer->beginCommand(writer, 22, 12)) goto end;
  167. writer->putGLuint(writer, inGLRC);
  168. writer->putGLuint(writer, inLayer);
  169. writer->putGLuint(writer, inReadLayer);
  170. writer->endCommand(writer);
  171. end:
  172. if (ctx->captureExitFunc) ctx->captureExitFunc(22);
  173. --ctx->captureEntryCount;
  174. }
  175. void __gls_capture_glsHeaderGLRCi(GLuint inGLRC, GLSenum inAttrib, GLint inVal) {
  176. GLbitfield captureFlags;
  177. __GLScontext *const ctx = __GLS_CONTEXT;
  178. __GLSwriter *writer;
  179. ++ctx->captureEntryCount;
  180. if (ctx->captureEntryFunc) ctx->captureEntryFunc(23);
  181. captureFlags = ctx->captureFlags[23];
  182. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  183. extern void __gls_exec_glsHeaderGLRCi(GLuint, GLSenum, GLint);
  184. __gls_exec_glsHeaderGLRCi(inGLRC, inAttrib, inVal);
  185. }
  186. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  187. writer = ctx->writer;
  188. if (!writer->beginCommand(writer, 23, 12)) goto end;
  189. writer->putGLuint(writer, inGLRC);
  190. writer->putGLSenum(writer, inAttrib);
  191. writer->putGLint(writer, inVal);
  192. writer->endCommand(writer);
  193. end:
  194. if (ctx->captureExitFunc) ctx->captureExitFunc(23);
  195. --ctx->captureEntryCount;
  196. }
  197. void __gls_capture_glsHeaderLayerf(GLuint inLayer, GLSenum inAttrib, GLfloat inVal) {
  198. GLbitfield captureFlags;
  199. __GLScontext *const ctx = __GLS_CONTEXT;
  200. __GLSwriter *writer;
  201. ++ctx->captureEntryCount;
  202. if (ctx->captureEntryFunc) ctx->captureEntryFunc(24);
  203. captureFlags = ctx->captureFlags[24];
  204. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  205. extern void __gls_exec_glsHeaderLayerf(GLuint, GLSenum, GLfloat);
  206. __gls_exec_glsHeaderLayerf(inLayer, inAttrib, inVal);
  207. }
  208. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  209. writer = ctx->writer;
  210. if (!writer->beginCommand(writer, 24, 12)) goto end;
  211. writer->putGLuint(writer, inLayer);
  212. writer->putGLSenum(writer, inAttrib);
  213. writer->putGLfloat(writer, inVal);
  214. writer->endCommand(writer);
  215. end:
  216. if (ctx->captureExitFunc) ctx->captureExitFunc(24);
  217. --ctx->captureEntryCount;
  218. }
  219. void __gls_capture_glsHeaderLayeri(GLuint inLayer, GLSenum inAttrib, GLint inVal) {
  220. GLbitfield captureFlags;
  221. __GLScontext *const ctx = __GLS_CONTEXT;
  222. __GLSwriter *writer;
  223. ++ctx->captureEntryCount;
  224. if (ctx->captureEntryFunc) ctx->captureEntryFunc(25);
  225. captureFlags = ctx->captureFlags[25];
  226. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  227. extern void __gls_exec_glsHeaderLayeri(GLuint, GLSenum, GLint);
  228. __gls_exec_glsHeaderLayeri(inLayer, inAttrib, inVal);
  229. }
  230. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  231. writer = ctx->writer;
  232. if (!writer->beginCommand(writer, 25, 12)) goto end;
  233. writer->putGLuint(writer, inLayer);
  234. writer->putGLSenum(writer, inAttrib);
  235. writer->putGLintOrGLSenum(writer, inAttrib, inVal);
  236. writer->endCommand(writer);
  237. end:
  238. if (ctx->captureExitFunc) ctx->captureExitFunc(25);
  239. --ctx->captureEntryCount;
  240. }
  241. void __gls_capture_glsHeaderf(GLSenum inAttrib, GLfloat inVal) {
  242. GLbitfield captureFlags;
  243. __GLScontext *const ctx = __GLS_CONTEXT;
  244. __GLSwriter *writer;
  245. ++ctx->captureEntryCount;
  246. if (ctx->captureEntryFunc) ctx->captureEntryFunc(26);
  247. captureFlags = ctx->captureFlags[26];
  248. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  249. extern void __gls_exec_glsHeaderf(GLSenum, GLfloat);
  250. __gls_exec_glsHeaderf(inAttrib, inVal);
  251. }
  252. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  253. writer = ctx->writer;
  254. if (!writer->beginCommand(writer, 26, 8)) goto end;
  255. writer->putGLSenum(writer, inAttrib);
  256. writer->putGLfloat(writer, inVal);
  257. writer->endCommand(writer);
  258. end:
  259. if (ctx->captureExitFunc) ctx->captureExitFunc(26);
  260. --ctx->captureEntryCount;
  261. }
  262. void __gls_capture_glsHeaderfv(GLSenum inAttrib, const GLfloat *inVec) {
  263. GLbitfield captureFlags;
  264. __GLScontext *const ctx = __GLS_CONTEXT;
  265. __GLSwriter *writer;
  266. GLint inVec_count;
  267. ++ctx->captureEntryCount;
  268. if (ctx->captureEntryFunc) ctx->captureEntryFunc(27);
  269. captureFlags = ctx->captureFlags[27];
  270. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  271. extern void __gls_exec_glsHeaderfv(GLSenum, const GLfloat *);
  272. __gls_exec_glsHeaderfv(inAttrib, inVec);
  273. }
  274. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  275. writer = ctx->writer;
  276. inVec_count = __gls_glsHeaderfv_inVec_size(inAttrib);
  277. if (!writer->beginCommand(writer, 27, 4 + inVec_count * 4)) goto end;
  278. writer->putGLSenum(writer, inAttrib);
  279. writer->putGLfloatv(writer, inVec_count, inVec);
  280. writer->endCommand(writer);
  281. end:
  282. if (ctx->captureExitFunc) ctx->captureExitFunc(27);
  283. --ctx->captureEntryCount;
  284. }
  285. void __gls_capture_glsHeaderi(GLSenum inAttrib, GLint inVal) {
  286. GLbitfield captureFlags;
  287. __GLScontext *const ctx = __GLS_CONTEXT;
  288. __GLSwriter *writer;
  289. ++ctx->captureEntryCount;
  290. if (ctx->captureEntryFunc) ctx->captureEntryFunc(28);
  291. captureFlags = ctx->captureFlags[28];
  292. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  293. extern void __gls_exec_glsHeaderi(GLSenum, GLint);
  294. __gls_exec_glsHeaderi(inAttrib, inVal);
  295. }
  296. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  297. writer = ctx->writer;
  298. if (!writer->beginCommand(writer, 28, 8)) goto end;
  299. writer->putGLSenum(writer, inAttrib);
  300. writer->putGLint(writer, inVal);
  301. writer->endCommand(writer);
  302. end:
  303. if (ctx->captureExitFunc) ctx->captureExitFunc(28);
  304. --ctx->captureEntryCount;
  305. }
  306. void __gls_capture_glsHeaderiv(GLSenum inAttrib, const GLint *inVec) {
  307. GLbitfield captureFlags;
  308. __GLScontext *const ctx = __GLS_CONTEXT;
  309. __GLSwriter *writer;
  310. GLint inVec_count;
  311. ++ctx->captureEntryCount;
  312. if (ctx->captureEntryFunc) ctx->captureEntryFunc(29);
  313. captureFlags = ctx->captureFlags[29];
  314. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  315. extern void __gls_exec_glsHeaderiv(GLSenum, const GLint *);
  316. __gls_exec_glsHeaderiv(inAttrib, inVec);
  317. }
  318. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  319. writer = ctx->writer;
  320. inVec_count = __gls_glsHeaderiv_inVec_size(inAttrib);
  321. if (!writer->beginCommand(writer, 29, 4 + inVec_count * 4)) goto end;
  322. writer->putGLSenum(writer, inAttrib);
  323. writer->putGLintv(writer, inVec_count, inVec);
  324. writer->endCommand(writer);
  325. end:
  326. if (ctx->captureExitFunc) ctx->captureExitFunc(29);
  327. --ctx->captureEntryCount;
  328. }
  329. void __gls_capture_glsHeaderubz(GLSenum inAttrib, const GLubyte *inString) {
  330. GLbitfield captureFlags;
  331. __GLScontext *const ctx = __GLS_CONTEXT;
  332. __GLSwriter *writer;
  333. GLint inString_count;
  334. if (!glsIsUTF8String(inString)) {
  335. glsError(30, GLS_INVALID_STRING);
  336. return;
  337. }
  338. ++ctx->captureEntryCount;
  339. if (ctx->captureEntryFunc) ctx->captureEntryFunc(30);
  340. captureFlags = ctx->captureFlags[30];
  341. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  342. extern void __gls_exec_glsHeaderubz(GLSenum, const GLubyte *);
  343. __gls_exec_glsHeaderubz(inAttrib, inString);
  344. }
  345. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  346. writer = ctx->writer;
  347. inString_count = (GLint)strlen((const char *)inString) + 1;
  348. if (!writer->beginCommand(writer, 30, 4 + inString_count)) goto end;
  349. writer->putGLSenum(writer, inAttrib);
  350. writer->putGLcharv(writer, inString_count, inString);
  351. writer->endCommand(writer);
  352. end:
  353. if (ctx->captureExitFunc) ctx->captureExitFunc(30);
  354. --ctx->captureEntryCount;
  355. }
  356. void __gls_capture_glsRequireExtension(const GLubyte *inExtension) {
  357. GLbitfield captureFlags;
  358. __GLScontext *const ctx = __GLS_CONTEXT;
  359. __GLSwriter *writer;
  360. GLint inExtension_count;
  361. if (!glsIsUTF8String(inExtension)) {
  362. glsError(31, GLS_INVALID_STRING);
  363. return;
  364. }
  365. ++ctx->captureEntryCount;
  366. if (ctx->captureEntryFunc) ctx->captureEntryFunc(31);
  367. captureFlags = ctx->captureFlags[31];
  368. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  369. extern void __gls_exec_glsRequireExtension(const GLubyte *);
  370. __gls_exec_glsRequireExtension(inExtension);
  371. }
  372. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  373. writer = ctx->writer;
  374. inExtension_count = (GLint)strlen((const char *)inExtension) + 1;
  375. if (!writer->beginCommand(writer, 31, 0 + inExtension_count)) goto end;
  376. writer->putGLcharv(writer, inExtension_count, inExtension);
  377. writer->endCommand(writer);
  378. end:
  379. if (ctx->captureExitFunc) ctx->captureExitFunc(31);
  380. --ctx->captureEntryCount;
  381. }
  382. void __gls_capture_glsUnsupportedCommand(void) {
  383. GLbitfield captureFlags;
  384. __GLScontext *const ctx = __GLS_CONTEXT;
  385. __GLSwriter *writer;
  386. ++ctx->captureEntryCount;
  387. if (ctx->captureEntryFunc) ctx->captureEntryFunc(32);
  388. captureFlags = ctx->captureFlags[32];
  389. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  390. extern void __gls_exec_glsUnsupportedCommand(void);
  391. __gls_exec_glsUnsupportedCommand();
  392. }
  393. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  394. writer = ctx->writer;
  395. if (!writer->beginCommand(writer, 32, 0)) goto end;
  396. writer->endCommand(writer);
  397. end:
  398. if (ctx->captureExitFunc) ctx->captureExitFunc(32);
  399. --ctx->captureEntryCount;
  400. }
  401. void __gls_capture_glsAppRef(GLulong inAddress, GLuint inCount) {
  402. GLbitfield captureFlags;
  403. __GLScontext *const ctx = __GLS_CONTEXT;
  404. __GLSwriter *writer;
  405. ++ctx->captureEntryCount;
  406. if (ctx->captureEntryFunc) ctx->captureEntryFunc(33);
  407. captureFlags = ctx->captureFlags[33];
  408. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  409. extern void __gls_exec_glsAppRef(GLulong, GLuint);
  410. __gls_exec_glsAppRef(inAddress, inCount);
  411. }
  412. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  413. writer = ctx->writer;
  414. if (!writer->padWordCount(writer, 1)) goto end;
  415. if (!writer->beginCommand(writer, 33, 12)) goto end;
  416. writer->putGLulonghex(writer, inAddress);
  417. writer->putGLuint(writer, inCount);
  418. writer->endCommand(writer);
  419. end:
  420. if (ctx->captureExitFunc) ctx->captureExitFunc(33);
  421. --ctx->captureEntryCount;
  422. }
  423. void __gls_capture_glsBeginObj(const GLubyte *inTag) {
  424. GLbitfield captureFlags;
  425. __GLScontext *const ctx = __GLS_CONTEXT;
  426. __GLSwriter *writer;
  427. GLint inTag_count;
  428. if (!glsIsUTF8String(inTag)) {
  429. glsError(34, GLS_INVALID_STRING);
  430. return;
  431. }
  432. ++ctx->captureEntryCount;
  433. if (ctx->captureEntryFunc) ctx->captureEntryFunc(34);
  434. captureFlags = ctx->captureFlags[34];
  435. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  436. extern void __gls_exec_glsBeginObj(const GLubyte *);
  437. __gls_exec_glsBeginObj(inTag);
  438. }
  439. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  440. writer = ctx->writer;
  441. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  442. if (!writer->beginCommand(writer, 34, 0 + inTag_count)) goto end;
  443. writer->putGLcharv(writer, inTag_count, inTag);
  444. writer->endCommand(writer);
  445. end:
  446. if (ctx->captureExitFunc) ctx->captureExitFunc(34);
  447. --ctx->captureEntryCount;
  448. }
  449. void __gls_capture_glsCharubz(const GLubyte *inTag, const GLubyte *inString) {
  450. GLbitfield captureFlags;
  451. __GLScontext *const ctx = __GLS_CONTEXT;
  452. __GLSwriter *writer;
  453. GLint inTag_count;
  454. GLint inString_count;
  455. if (!glsIsUTF8String(inTag)) {
  456. glsError(35, GLS_INVALID_STRING);
  457. return;
  458. }
  459. if (!glsIsUTF8String(inString)) {
  460. glsError(35, GLS_INVALID_STRING);
  461. return;
  462. }
  463. ++ctx->captureEntryCount;
  464. if (ctx->captureEntryFunc) ctx->captureEntryFunc(35);
  465. captureFlags = ctx->captureFlags[35];
  466. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  467. extern void __gls_exec_glsCharubz(const GLubyte *, const GLubyte *);
  468. __gls_exec_glsCharubz(inTag, inString);
  469. }
  470. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  471. writer = ctx->writer;
  472. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  473. inString_count = (GLint)strlen((const char *)inString) + 1;
  474. if (!writer->beginCommand(writer, 35, 0 + inTag_count + inString_count)) goto end;
  475. writer->putGLcharv(writer, inTag_count, inTag);
  476. writer->putGLcharv(writer, inString_count, inString);
  477. writer->endCommand(writer);
  478. end:
  479. if (ctx->captureExitFunc) ctx->captureExitFunc(35);
  480. --ctx->captureEntryCount;
  481. }
  482. void __gls_capture_glsComment(const GLubyte *inComment) {
  483. GLbitfield captureFlags;
  484. __GLScontext *const ctx = __GLS_CONTEXT;
  485. __GLSwriter *writer;
  486. GLint inComment_count;
  487. if (!glsIsUTF8String(inComment)) {
  488. glsError(36, GLS_INVALID_STRING);
  489. return;
  490. }
  491. ++ctx->captureEntryCount;
  492. if (ctx->captureEntryFunc) ctx->captureEntryFunc(36);
  493. captureFlags = ctx->captureFlags[36];
  494. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  495. extern void __gls_exec_glsComment(const GLubyte *);
  496. __gls_exec_glsComment(inComment);
  497. }
  498. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  499. writer = ctx->writer;
  500. inComment_count = (GLint)strlen((const char *)inComment) + 1;
  501. if (!writer->beginCommand(writer, 36, 0 + inComment_count)) goto end;
  502. writer->putGLcharv(writer, inComment_count, inComment);
  503. writer->endCommand(writer);
  504. end:
  505. if (ctx->captureExitFunc) ctx->captureExitFunc(36);
  506. --ctx->captureEntryCount;
  507. }
  508. void __gls_capture_glsDisplayMapfv(GLuint inLayer, GLSenum inMap, GLuint inCount, const GLfloat *inVec) {
  509. GLbitfield captureFlags;
  510. __GLScontext *const ctx = __GLS_CONTEXT;
  511. __GLSwriter *writer;
  512. ++ctx->captureEntryCount;
  513. if (ctx->captureEntryFunc) ctx->captureEntryFunc(37);
  514. captureFlags = ctx->captureFlags[37];
  515. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  516. extern void __gls_exec_glsDisplayMapfv(GLuint, GLSenum, GLuint, const GLfloat *);
  517. __gls_exec_glsDisplayMapfv(inLayer, inMap, inCount, inVec);
  518. }
  519. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  520. writer = ctx->writer;
  521. if (!writer->beginCommand(writer, 37, 12 + __GLS_MAX(inCount, 0) * 4)) goto end;
  522. if (writer->type == GLS_TEXT) {
  523. writer->putGLuint(writer, inLayer);
  524. writer->putGLSenum(writer, inMap);
  525. writer->putGLuint(writer, inCount);
  526. writer->putGLfloatv(writer, __GLS_MAX(inCount, 0), inVec);
  527. } else {
  528. writer->putGLuint(writer, inCount);
  529. writer->putGLuint(writer, inLayer);
  530. writer->putGLSenum(writer, inMap);
  531. writer->putGLfloatv(writer, __GLS_MAX(inCount, 0), inVec);
  532. }
  533. writer->endCommand(writer);
  534. end:
  535. if (ctx->captureExitFunc) ctx->captureExitFunc(37);
  536. --ctx->captureEntryCount;
  537. }
  538. void __gls_capture_glsEndObj(void) {
  539. GLbitfield captureFlags;
  540. __GLScontext *const ctx = __GLS_CONTEXT;
  541. __GLSwriter *writer;
  542. ++ctx->captureEntryCount;
  543. if (ctx->captureEntryFunc) ctx->captureEntryFunc(38);
  544. captureFlags = ctx->captureFlags[38];
  545. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  546. extern void __gls_exec_glsEndObj(void);
  547. __gls_exec_glsEndObj();
  548. }
  549. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  550. writer = ctx->writer;
  551. if (!writer->beginCommand(writer, 38, 0)) goto end;
  552. writer->endCommand(writer);
  553. end:
  554. if (ctx->captureExitFunc) ctx->captureExitFunc(38);
  555. --ctx->captureEntryCount;
  556. }
  557. void __gls_capture_glsNumb(const GLubyte *inTag, GLbyte inVal) {
  558. GLbitfield captureFlags;
  559. __GLScontext *const ctx = __GLS_CONTEXT;
  560. __GLSwriter *writer;
  561. GLint inTag_count;
  562. if (!glsIsUTF8String(inTag)) {
  563. glsError(39, GLS_INVALID_STRING);
  564. return;
  565. }
  566. ++ctx->captureEntryCount;
  567. if (ctx->captureEntryFunc) ctx->captureEntryFunc(39);
  568. captureFlags = ctx->captureFlags[39];
  569. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  570. extern void __gls_exec_glsNumb(const GLubyte *, GLbyte);
  571. __gls_exec_glsNumb(inTag, inVal);
  572. }
  573. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  574. writer = ctx->writer;
  575. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  576. if (!writer->beginCommand(writer, 39, 1 + inTag_count)) goto end;
  577. if (writer->type == GLS_TEXT) {
  578. writer->putGLcharv(writer, inTag_count, inTag);
  579. writer->putGLbyte(writer, inVal);
  580. } else {
  581. writer->putGLbyte(writer, inVal);
  582. writer->putGLcharv(writer, inTag_count, inTag);
  583. }
  584. writer->endCommand(writer);
  585. end:
  586. if (ctx->captureExitFunc) ctx->captureExitFunc(39);
  587. --ctx->captureEntryCount;
  588. }
  589. void __gls_capture_glsNumbv(const GLubyte *inTag, GLuint inCount, const GLbyte *inVec) {
  590. GLbitfield captureFlags;
  591. __GLScontext *const ctx = __GLS_CONTEXT;
  592. __GLSwriter *writer;
  593. GLint inTag_count;
  594. if (!glsIsUTF8String(inTag)) {
  595. glsError(40, GLS_INVALID_STRING);
  596. return;
  597. }
  598. ++ctx->captureEntryCount;
  599. if (ctx->captureEntryFunc) ctx->captureEntryFunc(40);
  600. captureFlags = ctx->captureFlags[40];
  601. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  602. extern void __gls_exec_glsNumbv(const GLubyte *, GLuint, const GLbyte *);
  603. __gls_exec_glsNumbv(inTag, inCount, inVec);
  604. }
  605. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  606. writer = ctx->writer;
  607. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  608. if (!writer->beginCommand(writer, 40, 4 + __GLS_MAX(inCount, 0) * 1 + inTag_count)) goto end;
  609. if (writer->type == GLS_TEXT) {
  610. writer->putGLcharv(writer, inTag_count, inTag);
  611. writer->putGLuint(writer, inCount);
  612. writer->putGLbytev(writer, __GLS_MAX(inCount, 0), inVec);
  613. } else {
  614. writer->putGLuint(writer, inCount);
  615. writer->putGLbytev(writer, __GLS_MAX(inCount, 0), inVec);
  616. writer->putGLcharv(writer, inTag_count, inTag);
  617. }
  618. writer->endCommand(writer);
  619. end:
  620. if (ctx->captureExitFunc) ctx->captureExitFunc(40);
  621. --ctx->captureEntryCount;
  622. }
  623. void __gls_capture_glsNumd(const GLubyte *inTag, GLdouble inVal) {
  624. GLbitfield captureFlags;
  625. __GLScontext *const ctx = __GLS_CONTEXT;
  626. __GLSwriter *writer;
  627. GLint inTag_count;
  628. if (!glsIsUTF8String(inTag)) {
  629. glsError(41, GLS_INVALID_STRING);
  630. return;
  631. }
  632. ++ctx->captureEntryCount;
  633. if (ctx->captureEntryFunc) ctx->captureEntryFunc(41);
  634. captureFlags = ctx->captureFlags[41];
  635. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  636. extern void __gls_exec_glsNumd(const GLubyte *, GLdouble);
  637. __gls_exec_glsNumd(inTag, inVal);
  638. }
  639. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  640. writer = ctx->writer;
  641. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  642. if (!writer->padWordCount(writer, 1)) goto end;
  643. if (!writer->beginCommand(writer, 41, 8 + inTag_count)) goto end;
  644. if (writer->type == GLS_TEXT) {
  645. writer->putGLcharv(writer, inTag_count, inTag);
  646. writer->putGLdouble(writer, inVal);
  647. } else {
  648. writer->putGLdouble(writer, inVal);
  649. writer->putGLcharv(writer, inTag_count, inTag);
  650. }
  651. writer->endCommand(writer);
  652. end:
  653. if (ctx->captureExitFunc) ctx->captureExitFunc(41);
  654. --ctx->captureEntryCount;
  655. }
  656. void __gls_capture_glsNumdv(const GLubyte *inTag, GLuint inCount, const GLdouble *inVec) {
  657. GLbitfield captureFlags;
  658. __GLScontext *const ctx = __GLS_CONTEXT;
  659. __GLSwriter *writer;
  660. GLint inTag_count;
  661. if (!glsIsUTF8String(inTag)) {
  662. glsError(42, GLS_INVALID_STRING);
  663. return;
  664. }
  665. ++ctx->captureEntryCount;
  666. if (ctx->captureEntryFunc) ctx->captureEntryFunc(42);
  667. captureFlags = ctx->captureFlags[42];
  668. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  669. extern void __gls_exec_glsNumdv(const GLubyte *, GLuint, const GLdouble *);
  670. __gls_exec_glsNumdv(inTag, inCount, inVec);
  671. }
  672. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  673. writer = ctx->writer;
  674. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  675. if (!writer->padWordCount(writer, 0)) goto end;
  676. if (!writer->beginCommand(writer, 42, 4 + __GLS_MAX(inCount, 0) * 8 + inTag_count)) goto end;
  677. if (writer->type == GLS_TEXT) {
  678. writer->putGLcharv(writer, inTag_count, inTag);
  679. writer->putGLuint(writer, inCount);
  680. writer->putGLdoublev(writer, __GLS_MAX(inCount, 0), inVec);
  681. } else {
  682. writer->putGLuint(writer, inCount);
  683. writer->putGLdoublev(writer, __GLS_MAX(inCount, 0), inVec);
  684. writer->putGLcharv(writer, inTag_count, inTag);
  685. }
  686. writer->endCommand(writer);
  687. end:
  688. if (ctx->captureExitFunc) ctx->captureExitFunc(42);
  689. --ctx->captureEntryCount;
  690. }
  691. void __gls_capture_glsNumf(const GLubyte *inTag, GLfloat inVal) {
  692. GLbitfield captureFlags;
  693. __GLScontext *const ctx = __GLS_CONTEXT;
  694. __GLSwriter *writer;
  695. GLint inTag_count;
  696. if (!glsIsUTF8String(inTag)) {
  697. glsError(43, GLS_INVALID_STRING);
  698. return;
  699. }
  700. ++ctx->captureEntryCount;
  701. if (ctx->captureEntryFunc) ctx->captureEntryFunc(43);
  702. captureFlags = ctx->captureFlags[43];
  703. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  704. extern void __gls_exec_glsNumf(const GLubyte *, GLfloat);
  705. __gls_exec_glsNumf(inTag, inVal);
  706. }
  707. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  708. writer = ctx->writer;
  709. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  710. if (!writer->beginCommand(writer, 43, 4 + inTag_count)) goto end;
  711. if (writer->type == GLS_TEXT) {
  712. writer->putGLcharv(writer, inTag_count, inTag);
  713. writer->putGLfloat(writer, inVal);
  714. } else {
  715. writer->putGLfloat(writer, inVal);
  716. writer->putGLcharv(writer, inTag_count, inTag);
  717. }
  718. writer->endCommand(writer);
  719. end:
  720. if (ctx->captureExitFunc) ctx->captureExitFunc(43);
  721. --ctx->captureEntryCount;
  722. }
  723. void __gls_capture_glsNumfv(const GLubyte *inTag, GLuint inCount, const GLfloat *inVec) {
  724. GLbitfield captureFlags;
  725. __GLScontext *const ctx = __GLS_CONTEXT;
  726. __GLSwriter *writer;
  727. GLint inTag_count;
  728. if (!glsIsUTF8String(inTag)) {
  729. glsError(44, GLS_INVALID_STRING);
  730. return;
  731. }
  732. ++ctx->captureEntryCount;
  733. if (ctx->captureEntryFunc) ctx->captureEntryFunc(44);
  734. captureFlags = ctx->captureFlags[44];
  735. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  736. extern void __gls_exec_glsNumfv(const GLubyte *, GLuint, const GLfloat *);
  737. __gls_exec_glsNumfv(inTag, inCount, inVec);
  738. }
  739. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  740. writer = ctx->writer;
  741. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  742. if (!writer->beginCommand(writer, 44, 4 + __GLS_MAX(inCount, 0) * 4 + inTag_count)) goto end;
  743. if (writer->type == GLS_TEXT) {
  744. writer->putGLcharv(writer, inTag_count, inTag);
  745. writer->putGLuint(writer, inCount);
  746. writer->putGLfloatv(writer, __GLS_MAX(inCount, 0), inVec);
  747. } else {
  748. writer->putGLuint(writer, inCount);
  749. writer->putGLfloatv(writer, __GLS_MAX(inCount, 0), inVec);
  750. writer->putGLcharv(writer, inTag_count, inTag);
  751. }
  752. writer->endCommand(writer);
  753. end:
  754. if (ctx->captureExitFunc) ctx->captureExitFunc(44);
  755. --ctx->captureEntryCount;
  756. }
  757. void __gls_capture_glsNumi(const GLubyte *inTag, GLint inVal) {
  758. GLbitfield captureFlags;
  759. __GLScontext *const ctx = __GLS_CONTEXT;
  760. __GLSwriter *writer;
  761. GLint inTag_count;
  762. if (!glsIsUTF8String(inTag)) {
  763. glsError(45, GLS_INVALID_STRING);
  764. return;
  765. }
  766. ++ctx->captureEntryCount;
  767. if (ctx->captureEntryFunc) ctx->captureEntryFunc(45);
  768. captureFlags = ctx->captureFlags[45];
  769. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  770. extern void __gls_exec_glsNumi(const GLubyte *, GLint);
  771. __gls_exec_glsNumi(inTag, inVal);
  772. }
  773. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  774. writer = ctx->writer;
  775. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  776. if (!writer->beginCommand(writer, 45, 4 + inTag_count)) goto end;
  777. if (writer->type == GLS_TEXT) {
  778. writer->putGLcharv(writer, inTag_count, inTag);
  779. writer->putGLint(writer, inVal);
  780. } else {
  781. writer->putGLint(writer, inVal);
  782. writer->putGLcharv(writer, inTag_count, inTag);
  783. }
  784. writer->endCommand(writer);
  785. end:
  786. if (ctx->captureExitFunc) ctx->captureExitFunc(45);
  787. --ctx->captureEntryCount;
  788. }
  789. void __gls_capture_glsNumiv(const GLubyte *inTag, GLuint inCount, const GLint *inVec) {
  790. GLbitfield captureFlags;
  791. __GLScontext *const ctx = __GLS_CONTEXT;
  792. __GLSwriter *writer;
  793. GLint inTag_count;
  794. if (!glsIsUTF8String(inTag)) {
  795. glsError(46, GLS_INVALID_STRING);
  796. return;
  797. }
  798. ++ctx->captureEntryCount;
  799. if (ctx->captureEntryFunc) ctx->captureEntryFunc(46);
  800. captureFlags = ctx->captureFlags[46];
  801. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  802. extern void __gls_exec_glsNumiv(const GLubyte *, GLuint, const GLint *);
  803. __gls_exec_glsNumiv(inTag, inCount, inVec);
  804. }
  805. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  806. writer = ctx->writer;
  807. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  808. if (!writer->beginCommand(writer, 46, 4 + __GLS_MAX(inCount, 0) * 4 + inTag_count)) goto end;
  809. if (writer->type == GLS_TEXT) {
  810. writer->putGLcharv(writer, inTag_count, inTag);
  811. writer->putGLuint(writer, inCount);
  812. writer->putGLintv(writer, __GLS_MAX(inCount, 0), inVec);
  813. } else {
  814. writer->putGLuint(writer, inCount);
  815. writer->putGLintv(writer, __GLS_MAX(inCount, 0), inVec);
  816. writer->putGLcharv(writer, inTag_count, inTag);
  817. }
  818. writer->endCommand(writer);
  819. end:
  820. if (ctx->captureExitFunc) ctx->captureExitFunc(46);
  821. --ctx->captureEntryCount;
  822. }
  823. void __gls_capture_glsNuml(const GLubyte *inTag, GLlong inVal) {
  824. GLbitfield captureFlags;
  825. __GLScontext *const ctx = __GLS_CONTEXT;
  826. __GLSwriter *writer;
  827. GLint inTag_count;
  828. if (!glsIsUTF8String(inTag)) {
  829. glsError(47, GLS_INVALID_STRING);
  830. return;
  831. }
  832. ++ctx->captureEntryCount;
  833. if (ctx->captureEntryFunc) ctx->captureEntryFunc(47);
  834. captureFlags = ctx->captureFlags[47];
  835. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  836. extern void __gls_exec_glsNuml(const GLubyte *, GLlong);
  837. __gls_exec_glsNuml(inTag, inVal);
  838. }
  839. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  840. writer = ctx->writer;
  841. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  842. if (!writer->padWordCount(writer, 1)) goto end;
  843. if (!writer->beginCommand(writer, 47, 8 + inTag_count)) goto end;
  844. if (writer->type == GLS_TEXT) {
  845. writer->putGLcharv(writer, inTag_count, inTag);
  846. writer->putGLlong(writer, inVal);
  847. } else {
  848. writer->putGLlong(writer, inVal);
  849. writer->putGLcharv(writer, inTag_count, inTag);
  850. }
  851. writer->endCommand(writer);
  852. end:
  853. if (ctx->captureExitFunc) ctx->captureExitFunc(47);
  854. --ctx->captureEntryCount;
  855. }
  856. void __gls_capture_glsNumlv(const GLubyte *inTag, GLuint inCount, const GLlong *inVec) {
  857. GLbitfield captureFlags;
  858. __GLScontext *const ctx = __GLS_CONTEXT;
  859. __GLSwriter *writer;
  860. GLint inTag_count;
  861. if (!glsIsUTF8String(inTag)) {
  862. glsError(48, GLS_INVALID_STRING);
  863. return;
  864. }
  865. ++ctx->captureEntryCount;
  866. if (ctx->captureEntryFunc) ctx->captureEntryFunc(48);
  867. captureFlags = ctx->captureFlags[48];
  868. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  869. extern void __gls_exec_glsNumlv(const GLubyte *, GLuint, const GLlong *);
  870. __gls_exec_glsNumlv(inTag, inCount, inVec);
  871. }
  872. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  873. writer = ctx->writer;
  874. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  875. if (!writer->padWordCount(writer, 0)) goto end;
  876. if (!writer->beginCommand(writer, 48, 4 + __GLS_MAX(inCount, 0) * 8 + inTag_count)) goto end;
  877. if (writer->type == GLS_TEXT) {
  878. writer->putGLcharv(writer, inTag_count, inTag);
  879. writer->putGLuint(writer, inCount);
  880. writer->putGLlongv(writer, __GLS_MAX(inCount, 0), inVec);
  881. } else {
  882. writer->putGLuint(writer, inCount);
  883. writer->putGLlongv(writer, __GLS_MAX(inCount, 0), inVec);
  884. writer->putGLcharv(writer, inTag_count, inTag);
  885. }
  886. writer->endCommand(writer);
  887. end:
  888. if (ctx->captureExitFunc) ctx->captureExitFunc(48);
  889. --ctx->captureEntryCount;
  890. }
  891. void __gls_capture_glsNums(const GLubyte *inTag, GLshort inVal) {
  892. GLbitfield captureFlags;
  893. __GLScontext *const ctx = __GLS_CONTEXT;
  894. __GLSwriter *writer;
  895. GLint inTag_count;
  896. if (!glsIsUTF8String(inTag)) {
  897. glsError(49, GLS_INVALID_STRING);
  898. return;
  899. }
  900. ++ctx->captureEntryCount;
  901. if (ctx->captureEntryFunc) ctx->captureEntryFunc(49);
  902. captureFlags = ctx->captureFlags[49];
  903. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  904. extern void __gls_exec_glsNums(const GLubyte *, GLshort);
  905. __gls_exec_glsNums(inTag, inVal);
  906. }
  907. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  908. writer = ctx->writer;
  909. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  910. if (!writer->beginCommand(writer, 49, 2 + inTag_count)) goto end;
  911. if (writer->type == GLS_TEXT) {
  912. writer->putGLcharv(writer, inTag_count, inTag);
  913. writer->putGLshort(writer, inVal);
  914. } else {
  915. writer->putGLshort(writer, inVal);
  916. writer->putGLcharv(writer, inTag_count, inTag);
  917. }
  918. writer->endCommand(writer);
  919. end:
  920. if (ctx->captureExitFunc) ctx->captureExitFunc(49);
  921. --ctx->captureEntryCount;
  922. }
  923. void __gls_capture_glsNumsv(const GLubyte *inTag, GLuint inCount, const GLshort *inVec) {
  924. GLbitfield captureFlags;
  925. __GLScontext *const ctx = __GLS_CONTEXT;
  926. __GLSwriter *writer;
  927. GLint inTag_count;
  928. if (!glsIsUTF8String(inTag)) {
  929. glsError(50, GLS_INVALID_STRING);
  930. return;
  931. }
  932. ++ctx->captureEntryCount;
  933. if (ctx->captureEntryFunc) ctx->captureEntryFunc(50);
  934. captureFlags = ctx->captureFlags[50];
  935. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  936. extern void __gls_exec_glsNumsv(const GLubyte *, GLuint, const GLshort *);
  937. __gls_exec_glsNumsv(inTag, inCount, inVec);
  938. }
  939. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  940. writer = ctx->writer;
  941. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  942. if (!writer->beginCommand(writer, 50, 4 + __GLS_MAX(inCount, 0) * 2 + inTag_count)) goto end;
  943. if (writer->type == GLS_TEXT) {
  944. writer->putGLcharv(writer, inTag_count, inTag);
  945. writer->putGLuint(writer, inCount);
  946. writer->putGLshortv(writer, __GLS_MAX(inCount, 0), inVec);
  947. } else {
  948. writer->putGLuint(writer, inCount);
  949. writer->putGLshortv(writer, __GLS_MAX(inCount, 0), inVec);
  950. writer->putGLcharv(writer, inTag_count, inTag);
  951. }
  952. writer->endCommand(writer);
  953. end:
  954. if (ctx->captureExitFunc) ctx->captureExitFunc(50);
  955. --ctx->captureEntryCount;
  956. }
  957. void __gls_capture_glsNumub(const GLubyte *inTag, GLubyte inVal) {
  958. GLbitfield captureFlags;
  959. __GLScontext *const ctx = __GLS_CONTEXT;
  960. __GLSwriter *writer;
  961. GLint inTag_count;
  962. if (!glsIsUTF8String(inTag)) {
  963. glsError(51, GLS_INVALID_STRING);
  964. return;
  965. }
  966. ++ctx->captureEntryCount;
  967. if (ctx->captureEntryFunc) ctx->captureEntryFunc(51);
  968. captureFlags = ctx->captureFlags[51];
  969. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  970. extern void __gls_exec_glsNumub(const GLubyte *, GLubyte);
  971. __gls_exec_glsNumub(inTag, inVal);
  972. }
  973. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  974. writer = ctx->writer;
  975. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  976. if (!writer->beginCommand(writer, 51, 1 + inTag_count)) goto end;
  977. if (writer->type == GLS_TEXT) {
  978. writer->putGLcharv(writer, inTag_count, inTag);
  979. writer->putGLubyte(writer, inVal);
  980. } else {
  981. writer->putGLubyte(writer, inVal);
  982. writer->putGLcharv(writer, inTag_count, inTag);
  983. }
  984. writer->endCommand(writer);
  985. end:
  986. if (ctx->captureExitFunc) ctx->captureExitFunc(51);
  987. --ctx->captureEntryCount;
  988. }
  989. void __gls_capture_glsNumubv(const GLubyte *inTag, GLuint inCount, const GLubyte *inVec) {
  990. GLbitfield captureFlags;
  991. __GLScontext *const ctx = __GLS_CONTEXT;
  992. __GLSwriter *writer;
  993. GLint inTag_count;
  994. if (!glsIsUTF8String(inTag)) {
  995. glsError(52, GLS_INVALID_STRING);
  996. return;
  997. }
  998. ++ctx->captureEntryCount;
  999. if (ctx->captureEntryFunc) ctx->captureEntryFunc(52);
  1000. captureFlags = ctx->captureFlags[52];
  1001. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1002. extern void __gls_exec_glsNumubv(const GLubyte *, GLuint, const GLubyte *);
  1003. __gls_exec_glsNumubv(inTag, inCount, inVec);
  1004. }
  1005. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1006. writer = ctx->writer;
  1007. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  1008. if (!writer->beginCommand(writer, 52, 4 + __GLS_MAX(inCount, 0) * 1 + inTag_count)) goto end;
  1009. if (writer->type == GLS_TEXT) {
  1010. writer->putGLcharv(writer, inTag_count, inTag);
  1011. writer->putGLuint(writer, inCount);
  1012. writer->putGLubytev(writer, __GLS_MAX(inCount, 0), inVec);
  1013. } else {
  1014. writer->putGLuint(writer, inCount);
  1015. writer->putGLubytev(writer, __GLS_MAX(inCount, 0), inVec);
  1016. writer->putGLcharv(writer, inTag_count, inTag);
  1017. }
  1018. writer->endCommand(writer);
  1019. end:
  1020. if (ctx->captureExitFunc) ctx->captureExitFunc(52);
  1021. --ctx->captureEntryCount;
  1022. }
  1023. void __gls_capture_glsNumui(const GLubyte *inTag, GLuint inVal) {
  1024. GLbitfield captureFlags;
  1025. __GLScontext *const ctx = __GLS_CONTEXT;
  1026. __GLSwriter *writer;
  1027. GLint inTag_count;
  1028. if (!glsIsUTF8String(inTag)) {
  1029. glsError(53, GLS_INVALID_STRING);
  1030. return;
  1031. }
  1032. ++ctx->captureEntryCount;
  1033. if (ctx->captureEntryFunc) ctx->captureEntryFunc(53);
  1034. captureFlags = ctx->captureFlags[53];
  1035. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1036. extern void __gls_exec_glsNumui(const GLubyte *, GLuint);
  1037. __gls_exec_glsNumui(inTag, inVal);
  1038. }
  1039. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1040. writer = ctx->writer;
  1041. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  1042. if (!writer->beginCommand(writer, 53, 4 + inTag_count)) goto end;
  1043. if (writer->type == GLS_TEXT) {
  1044. writer->putGLcharv(writer, inTag_count, inTag);
  1045. writer->putGLuint(writer, inVal);
  1046. } else {
  1047. writer->putGLuint(writer, inVal);
  1048. writer->putGLcharv(writer, inTag_count, inTag);
  1049. }
  1050. writer->endCommand(writer);
  1051. end:
  1052. if (ctx->captureExitFunc) ctx->captureExitFunc(53);
  1053. --ctx->captureEntryCount;
  1054. }
  1055. void __gls_capture_glsNumuiv(const GLubyte *inTag, GLuint inCount, const GLuint *inVec) {
  1056. GLbitfield captureFlags;
  1057. __GLScontext *const ctx = __GLS_CONTEXT;
  1058. __GLSwriter *writer;
  1059. GLint inTag_count;
  1060. if (!glsIsUTF8String(inTag)) {
  1061. glsError(54, GLS_INVALID_STRING);
  1062. return;
  1063. }
  1064. ++ctx->captureEntryCount;
  1065. if (ctx->captureEntryFunc) ctx->captureEntryFunc(54);
  1066. captureFlags = ctx->captureFlags[54];
  1067. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1068. extern void __gls_exec_glsNumuiv(const GLubyte *, GLuint, const GLuint *);
  1069. __gls_exec_glsNumuiv(inTag, inCount, inVec);
  1070. }
  1071. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1072. writer = ctx->writer;
  1073. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  1074. if (!writer->beginCommand(writer, 54, 4 + __GLS_MAX(inCount, 0) * 4 + inTag_count)) goto end;
  1075. if (writer->type == GLS_TEXT) {
  1076. writer->putGLcharv(writer, inTag_count, inTag);
  1077. writer->putGLuint(writer, inCount);
  1078. writer->putGLuintv(writer, __GLS_MAX(inCount, 0), inVec);
  1079. } else {
  1080. writer->putGLuint(writer, inCount);
  1081. writer->putGLuintv(writer, __GLS_MAX(inCount, 0), inVec);
  1082. writer->putGLcharv(writer, inTag_count, inTag);
  1083. }
  1084. writer->endCommand(writer);
  1085. end:
  1086. if (ctx->captureExitFunc) ctx->captureExitFunc(54);
  1087. --ctx->captureEntryCount;
  1088. }
  1089. void __gls_capture_glsNumul(const GLubyte *inTag, GLulong inVal) {
  1090. GLbitfield captureFlags;
  1091. __GLScontext *const ctx = __GLS_CONTEXT;
  1092. __GLSwriter *writer;
  1093. GLint inTag_count;
  1094. if (!glsIsUTF8String(inTag)) {
  1095. glsError(55, GLS_INVALID_STRING);
  1096. return;
  1097. }
  1098. ++ctx->captureEntryCount;
  1099. if (ctx->captureEntryFunc) ctx->captureEntryFunc(55);
  1100. captureFlags = ctx->captureFlags[55];
  1101. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1102. extern void __gls_exec_glsNumul(const GLubyte *, GLulong);
  1103. __gls_exec_glsNumul(inTag, inVal);
  1104. }
  1105. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1106. writer = ctx->writer;
  1107. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  1108. if (!writer->padWordCount(writer, 1)) goto end;
  1109. if (!writer->beginCommand(writer, 55, 8 + inTag_count)) goto end;
  1110. if (writer->type == GLS_TEXT) {
  1111. writer->putGLcharv(writer, inTag_count, inTag);
  1112. writer->putGLulong(writer, inVal);
  1113. } else {
  1114. writer->putGLulong(writer, inVal);
  1115. writer->putGLcharv(writer, inTag_count, inTag);
  1116. }
  1117. writer->endCommand(writer);
  1118. end:
  1119. if (ctx->captureExitFunc) ctx->captureExitFunc(55);
  1120. --ctx->captureEntryCount;
  1121. }
  1122. void __gls_capture_glsNumulv(const GLubyte *inTag, GLuint inCount, const GLulong *inVec) {
  1123. GLbitfield captureFlags;
  1124. __GLScontext *const ctx = __GLS_CONTEXT;
  1125. __GLSwriter *writer;
  1126. GLint inTag_count;
  1127. if (!glsIsUTF8String(inTag)) {
  1128. glsError(56, GLS_INVALID_STRING);
  1129. return;
  1130. }
  1131. ++ctx->captureEntryCount;
  1132. if (ctx->captureEntryFunc) ctx->captureEntryFunc(56);
  1133. captureFlags = ctx->captureFlags[56];
  1134. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1135. extern void __gls_exec_glsNumulv(const GLubyte *, GLuint, const GLulong *);
  1136. __gls_exec_glsNumulv(inTag, inCount, inVec);
  1137. }
  1138. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1139. writer = ctx->writer;
  1140. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  1141. if (!writer->padWordCount(writer, 0)) goto end;
  1142. if (!writer->beginCommand(writer, 56, 4 + __GLS_MAX(inCount, 0) * 8 + inTag_count)) goto end;
  1143. if (writer->type == GLS_TEXT) {
  1144. writer->putGLcharv(writer, inTag_count, inTag);
  1145. writer->putGLuint(writer, inCount);
  1146. writer->putGLulongv(writer, __GLS_MAX(inCount, 0), inVec);
  1147. } else {
  1148. writer->putGLuint(writer, inCount);
  1149. writer->putGLulongv(writer, __GLS_MAX(inCount, 0), inVec);
  1150. writer->putGLcharv(writer, inTag_count, inTag);
  1151. }
  1152. writer->endCommand(writer);
  1153. end:
  1154. if (ctx->captureExitFunc) ctx->captureExitFunc(56);
  1155. --ctx->captureEntryCount;
  1156. }
  1157. void __gls_capture_glsNumus(const GLubyte *inTag, GLushort inVal) {
  1158. GLbitfield captureFlags;
  1159. __GLScontext *const ctx = __GLS_CONTEXT;
  1160. __GLSwriter *writer;
  1161. GLint inTag_count;
  1162. if (!glsIsUTF8String(inTag)) {
  1163. glsError(57, GLS_INVALID_STRING);
  1164. return;
  1165. }
  1166. ++ctx->captureEntryCount;
  1167. if (ctx->captureEntryFunc) ctx->captureEntryFunc(57);
  1168. captureFlags = ctx->captureFlags[57];
  1169. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1170. extern void __gls_exec_glsNumus(const GLubyte *, GLushort);
  1171. __gls_exec_glsNumus(inTag, inVal);
  1172. }
  1173. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1174. writer = ctx->writer;
  1175. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  1176. if (!writer->beginCommand(writer, 57, 2 + inTag_count)) goto end;
  1177. if (writer->type == GLS_TEXT) {
  1178. writer->putGLcharv(writer, inTag_count, inTag);
  1179. writer->putGLushort(writer, inVal);
  1180. } else {
  1181. writer->putGLushort(writer, inVal);
  1182. writer->putGLcharv(writer, inTag_count, inTag);
  1183. }
  1184. writer->endCommand(writer);
  1185. end:
  1186. if (ctx->captureExitFunc) ctx->captureExitFunc(57);
  1187. --ctx->captureEntryCount;
  1188. }
  1189. void __gls_capture_glsNumusv(const GLubyte *inTag, GLuint inCount, const GLushort *inVec) {
  1190. GLbitfield captureFlags;
  1191. __GLScontext *const ctx = __GLS_CONTEXT;
  1192. __GLSwriter *writer;
  1193. GLint inTag_count;
  1194. if (!glsIsUTF8String(inTag)) {
  1195. glsError(58, GLS_INVALID_STRING);
  1196. return;
  1197. }
  1198. ++ctx->captureEntryCount;
  1199. if (ctx->captureEntryFunc) ctx->captureEntryFunc(58);
  1200. captureFlags = ctx->captureFlags[58];
  1201. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1202. extern void __gls_exec_glsNumusv(const GLubyte *, GLuint, const GLushort *);
  1203. __gls_exec_glsNumusv(inTag, inCount, inVec);
  1204. }
  1205. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1206. writer = ctx->writer;
  1207. inTag_count = (GLint)strlen((const char *)inTag) + 1;
  1208. if (!writer->beginCommand(writer, 58, 4 + __GLS_MAX(inCount, 0) * 2 + inTag_count)) goto end;
  1209. if (writer->type == GLS_TEXT) {
  1210. writer->putGLcharv(writer, inTag_count, inTag);
  1211. writer->putGLuint(writer, inCount);
  1212. writer->putGLushortv(writer, __GLS_MAX(inCount, 0), inVec);
  1213. } else {
  1214. writer->putGLuint(writer, inCount);
  1215. writer->putGLushortv(writer, __GLS_MAX(inCount, 0), inVec);
  1216. writer->putGLcharv(writer, inTag_count, inTag);
  1217. }
  1218. writer->endCommand(writer);
  1219. end:
  1220. if (ctx->captureExitFunc) ctx->captureExitFunc(58);
  1221. --ctx->captureEntryCount;
  1222. }
  1223. void __gls_capture_glsPad(void) {
  1224. GLbitfield captureFlags;
  1225. __GLScontext *const ctx = __GLS_CONTEXT;
  1226. __GLSwriter *writer;
  1227. ++ctx->captureEntryCount;
  1228. if (ctx->captureEntryFunc) ctx->captureEntryFunc(59);
  1229. captureFlags = ctx->captureFlags[59];
  1230. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1231. extern void __gls_exec_glsPad(void);
  1232. __gls_exec_glsPad();
  1233. }
  1234. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1235. writer = ctx->writer;
  1236. if (!writer->beginCommand(writer, 59, 0)) goto end;
  1237. writer->endCommand(writer);
  1238. end:
  1239. if (ctx->captureExitFunc) ctx->captureExitFunc(59);
  1240. --ctx->captureEntryCount;
  1241. }
  1242. void __gls_capture_glsSwapBuffers(GLuint inLayer) {
  1243. GLbitfield captureFlags;
  1244. __GLScontext *const ctx = __GLS_CONTEXT;
  1245. __GLSwriter *writer;
  1246. ++ctx->captureEntryCount;
  1247. if (ctx->captureEntryFunc) ctx->captureEntryFunc(60);
  1248. captureFlags = ctx->captureFlags[60];
  1249. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1250. extern void __gls_exec_glsSwapBuffers(GLuint);
  1251. __gls_exec_glsSwapBuffers(inLayer);
  1252. }
  1253. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1254. writer = ctx->writer;
  1255. if (!writer->beginCommand(writer, 60, 4)) goto end;
  1256. writer->putGLuint(writer, inLayer);
  1257. writer->endCommand(writer);
  1258. end:
  1259. if (ctx->captureExitFunc) ctx->captureExitFunc(60);
  1260. --ctx->captureEntryCount;
  1261. }
  1262. void __gls_capture_glNewList(GLuint list, GLenum mode) {
  1263. GLbitfield captureFlags;
  1264. __GLScontext *const ctx = __GLS_CONTEXT;
  1265. __GLSwriter *writer;
  1266. ++ctx->captureEntryCount;
  1267. if (ctx->captureEntryFunc) ctx->captureEntryFunc(64);
  1268. captureFlags = ctx->captureFlags[64];
  1269. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1270. __GLS_BEGIN_CAPTURE_EXEC(ctx, 64);
  1271. glNewList(list, mode);
  1272. __GLS_END_CAPTURE_EXEC(ctx, 64);
  1273. }
  1274. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1275. writer = ctx->writer;
  1276. if (!writer->beginCommand(writer, 64, 8)) goto end;
  1277. writer->putGLuint(writer, list);
  1278. writer->putGLenum(writer, mode);
  1279. writer->endCommand(writer);
  1280. end:
  1281. if (ctx->captureExitFunc) ctx->captureExitFunc(64);
  1282. --ctx->captureEntryCount;
  1283. }
  1284. void __gls_capture_glEndList(void) {
  1285. GLbitfield captureFlags;
  1286. __GLScontext *const ctx = __GLS_CONTEXT;
  1287. __GLSwriter *writer;
  1288. ++ctx->captureEntryCount;
  1289. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65);
  1290. captureFlags = ctx->captureFlags[65];
  1291. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1292. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65);
  1293. glEndList();
  1294. __GLS_END_CAPTURE_EXEC(ctx, 65);
  1295. }
  1296. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1297. writer = ctx->writer;
  1298. if (!writer->beginCommand(writer, 65, 0)) goto end;
  1299. writer->endCommand(writer);
  1300. end:
  1301. if (ctx->captureExitFunc) ctx->captureExitFunc(65);
  1302. --ctx->captureEntryCount;
  1303. }
  1304. void __gls_capture_glCallList(GLuint list) {
  1305. GLbitfield captureFlags;
  1306. __GLScontext *const ctx = __GLS_CONTEXT;
  1307. __GLSwriter *writer;
  1308. ++ctx->captureEntryCount;
  1309. if (ctx->captureEntryFunc) ctx->captureEntryFunc(66);
  1310. captureFlags = ctx->captureFlags[66];
  1311. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1312. __GLS_BEGIN_CAPTURE_EXEC(ctx, 66);
  1313. glCallList(list);
  1314. __GLS_END_CAPTURE_EXEC(ctx, 66);
  1315. }
  1316. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1317. writer = ctx->writer;
  1318. if (!writer->beginCommand(writer, 66, 4)) goto end;
  1319. writer->putGLuint(writer, list);
  1320. writer->endCommand(writer);
  1321. end:
  1322. if (ctx->captureExitFunc) ctx->captureExitFunc(66);
  1323. --ctx->captureEntryCount;
  1324. }
  1325. void __gls_capture_glCallLists(GLsizei n, GLenum type, const GLvoid *lists) {
  1326. GLbitfield captureFlags;
  1327. __GLScontext *const ctx = __GLS_CONTEXT;
  1328. __GLSwriter *writer;
  1329. GLint lists_count;
  1330. ++ctx->captureEntryCount;
  1331. if (ctx->captureEntryFunc) ctx->captureEntryFunc(67);
  1332. captureFlags = ctx->captureFlags[67];
  1333. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1334. __GLS_BEGIN_CAPTURE_EXEC(ctx, 67);
  1335. glCallLists(n, type, lists);
  1336. __GLS_END_CAPTURE_EXEC(ctx, 67);
  1337. }
  1338. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1339. writer = ctx->writer;
  1340. lists_count = __gls_glCallLists_lists_size(n, type);
  1341. if (!writer->beginCommand(writer, 67, 8 + lists_count * 1)) goto end;
  1342. writer->putGLint(writer, n);
  1343. writer->putGLenum(writer, type);
  1344. __glsWriter_putListv(writer, type, n, lists);
  1345. writer->endCommand(writer);
  1346. end:
  1347. if (ctx->captureExitFunc) ctx->captureExitFunc(67);
  1348. --ctx->captureEntryCount;
  1349. }
  1350. void __gls_capture_glDeleteLists(GLuint list, GLsizei range) {
  1351. GLbitfield captureFlags;
  1352. __GLScontext *const ctx = __GLS_CONTEXT;
  1353. __GLSwriter *writer;
  1354. ++ctx->captureEntryCount;
  1355. if (ctx->captureEntryFunc) ctx->captureEntryFunc(68);
  1356. captureFlags = ctx->captureFlags[68];
  1357. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1358. __GLS_BEGIN_CAPTURE_EXEC(ctx, 68);
  1359. glDeleteLists(list, range);
  1360. __GLS_END_CAPTURE_EXEC(ctx, 68);
  1361. }
  1362. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1363. writer = ctx->writer;
  1364. if (!writer->beginCommand(writer, 68, 8)) goto end;
  1365. writer->putGLuint(writer, list);
  1366. writer->putGLint(writer, range);
  1367. writer->endCommand(writer);
  1368. end:
  1369. if (ctx->captureExitFunc) ctx->captureExitFunc(68);
  1370. --ctx->captureEntryCount;
  1371. }
  1372. GLuint __gls_capture_glGenLists(GLsizei range) {
  1373. GLbitfield captureFlags;
  1374. __GLScontext *const ctx = __GLS_CONTEXT;
  1375. __GLSwriter *writer;
  1376. GLuint _outVal = 0;
  1377. ++ctx->captureEntryCount;
  1378. if (ctx->captureEntryFunc) ctx->captureEntryFunc(69);
  1379. captureFlags = ctx->captureFlags[69];
  1380. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1381. __GLS_BEGIN_CAPTURE_EXEC(ctx, 69);
  1382. _outVal = glGenLists(range);
  1383. __GLS_END_CAPTURE_EXEC(ctx, 69);
  1384. }
  1385. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1386. writer = ctx->writer;
  1387. if (!writer->beginCommand(writer, 69, 4)) goto end;
  1388. writer->putGLint(writer, range);
  1389. writer->endCommand(writer);
  1390. end:
  1391. if (ctx->captureExitFunc) ctx->captureExitFunc(69);
  1392. --ctx->captureEntryCount;
  1393. return _outVal;
  1394. }
  1395. void __gls_capture_glListBase(GLuint base) {
  1396. GLbitfield captureFlags;
  1397. __GLScontext *const ctx = __GLS_CONTEXT;
  1398. __GLSwriter *writer;
  1399. ++ctx->captureEntryCount;
  1400. if (ctx->captureEntryFunc) ctx->captureEntryFunc(70);
  1401. captureFlags = ctx->captureFlags[70];
  1402. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1403. __GLS_BEGIN_CAPTURE_EXEC(ctx, 70);
  1404. glListBase(base);
  1405. __GLS_END_CAPTURE_EXEC(ctx, 70);
  1406. }
  1407. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1408. writer = ctx->writer;
  1409. if (!writer->beginCommand(writer, 70, 4)) goto end;
  1410. writer->putGLuint(writer, base);
  1411. writer->endCommand(writer);
  1412. end:
  1413. if (ctx->captureExitFunc) ctx->captureExitFunc(70);
  1414. --ctx->captureEntryCount;
  1415. }
  1416. void __gls_capture_glBegin(GLenum mode) {
  1417. GLbitfield captureFlags;
  1418. __GLScontext *const ctx = __GLS_CONTEXT;
  1419. __GLSwriter *writer;
  1420. ++ctx->captureEntryCount;
  1421. if (ctx->captureEntryFunc) ctx->captureEntryFunc(71);
  1422. captureFlags = ctx->captureFlags[71];
  1423. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1424. __GLS_BEGIN_CAPTURE_EXEC(ctx, 71);
  1425. glBegin(mode);
  1426. __GLS_END_CAPTURE_EXEC(ctx, 71);
  1427. }
  1428. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1429. writer = ctx->writer;
  1430. if (writer->contextStream && mode <= GL_POLYGON) {
  1431. if (!writer->beginCommand(writer, 1 + mode, 0)) goto end;
  1432. writer->endCommand(writer);
  1433. goto end;
  1434. }
  1435. if (!writer->beginCommand(writer, 71, 4)) goto end;
  1436. writer->putGLenum(writer, mode);
  1437. writer->endCommand(writer);
  1438. end:
  1439. if (ctx->captureExitFunc) ctx->captureExitFunc(71);
  1440. --ctx->captureEntryCount;
  1441. }
  1442. void __gls_capture_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) {
  1443. GLbitfield captureFlags;
  1444. __GLScontext *const ctx = __GLS_CONTEXT;
  1445. __GLSwriter *writer;
  1446. GLint bitmap_count;
  1447. ++ctx->captureEntryCount;
  1448. if (ctx->captureEntryFunc) ctx->captureEntryFunc(72);
  1449. captureFlags = ctx->captureFlags[72];
  1450. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1451. __GLS_BEGIN_CAPTURE_EXEC(ctx, 72);
  1452. glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
  1453. __GLS_END_CAPTURE_EXEC(ctx, 72);
  1454. }
  1455. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1456. writer = ctx->writer;
  1457. bitmap_count = __gls_glBitmap_bitmap_size(width, height);
  1458. if (!writer->beginCommand(writer, 72, 28 + bitmap_count * 1)) goto end;
  1459. writer->putGLSimageFlags(writer, GLS_NONE);
  1460. writer->nextList(writer);
  1461. writer->putGLint(writer, width);
  1462. writer->putGLint(writer, height);
  1463. writer->putGLfloat(writer, xorig);
  1464. writer->putGLfloat(writer, yorig);
  1465. writer->putGLfloat(writer, xmove);
  1466. writer->putGLfloat(writer, ymove);
  1467. __glsWriter_putPixelv(writer, GL_COLOR_INDEX, GL_BITMAP, width, height, bitmap_count ? bitmap : GLS_NONE);
  1468. writer->endCommand(writer);
  1469. end:
  1470. if (ctx->captureExitFunc) ctx->captureExitFunc(72);
  1471. --ctx->captureEntryCount;
  1472. }
  1473. void __gls_capture_glColor3b(GLbyte red, GLbyte green, GLbyte blue) {
  1474. GLbitfield captureFlags;
  1475. __GLScontext *const ctx = __GLS_CONTEXT;
  1476. __GLSwriter *writer;
  1477. ++ctx->captureEntryCount;
  1478. if (ctx->captureEntryFunc) ctx->captureEntryFunc(73);
  1479. captureFlags = ctx->captureFlags[73];
  1480. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1481. __GLS_BEGIN_CAPTURE_EXEC(ctx, 73);
  1482. glColor3b(red, green, blue);
  1483. __GLS_END_CAPTURE_EXEC(ctx, 73);
  1484. }
  1485. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1486. writer = ctx->writer;
  1487. if (!writer->beginCommand(writer, 73, 3)) goto end;
  1488. writer->putGLbyte(writer, red);
  1489. writer->putGLbyte(writer, green);
  1490. writer->putGLbyte(writer, blue);
  1491. writer->endCommand(writer);
  1492. end:
  1493. if (ctx->captureExitFunc) ctx->captureExitFunc(73);
  1494. --ctx->captureEntryCount;
  1495. }
  1496. void __gls_capture_glColor3bv(const GLbyte *v) {
  1497. GLbitfield captureFlags;
  1498. __GLScontext *const ctx = __GLS_CONTEXT;
  1499. __GLSwriter *writer;
  1500. ++ctx->captureEntryCount;
  1501. if (ctx->captureEntryFunc) ctx->captureEntryFunc(74);
  1502. captureFlags = ctx->captureFlags[74];
  1503. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1504. __GLS_BEGIN_CAPTURE_EXEC(ctx, 74);
  1505. glColor3bv(v);
  1506. __GLS_END_CAPTURE_EXEC(ctx, 74);
  1507. }
  1508. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1509. writer = ctx->writer;
  1510. if (!writer->beginCommand(writer, 74, 3)) goto end;
  1511. writer->putGLbytev(writer, 3, v);
  1512. writer->endCommand(writer);
  1513. end:
  1514. if (ctx->captureExitFunc) ctx->captureExitFunc(74);
  1515. --ctx->captureEntryCount;
  1516. }
  1517. void __gls_capture_glColor3d(GLdouble red, GLdouble green, GLdouble blue) {
  1518. GLbitfield captureFlags;
  1519. __GLScontext *const ctx = __GLS_CONTEXT;
  1520. __GLSwriter *writer;
  1521. ++ctx->captureEntryCount;
  1522. if (ctx->captureEntryFunc) ctx->captureEntryFunc(75);
  1523. captureFlags = ctx->captureFlags[75];
  1524. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1525. __GLS_BEGIN_CAPTURE_EXEC(ctx, 75);
  1526. glColor3d(red, green, blue);
  1527. __GLS_END_CAPTURE_EXEC(ctx, 75);
  1528. }
  1529. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1530. writer = ctx->writer;
  1531. if (!writer->padWordCount(writer, 1)) goto end;
  1532. if (!writer->beginCommand(writer, 75, 24)) goto end;
  1533. writer->putGLdouble(writer, red);
  1534. writer->putGLdouble(writer, green);
  1535. writer->putGLdouble(writer, blue);
  1536. writer->endCommand(writer);
  1537. end:
  1538. if (ctx->captureExitFunc) ctx->captureExitFunc(75);
  1539. --ctx->captureEntryCount;
  1540. }
  1541. void __gls_capture_glColor3dv(const GLdouble *v) {
  1542. GLbitfield captureFlags;
  1543. __GLScontext *const ctx = __GLS_CONTEXT;
  1544. __GLSwriter *writer;
  1545. ++ctx->captureEntryCount;
  1546. if (ctx->captureEntryFunc) ctx->captureEntryFunc(76);
  1547. captureFlags = ctx->captureFlags[76];
  1548. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1549. __GLS_BEGIN_CAPTURE_EXEC(ctx, 76);
  1550. glColor3dv(v);
  1551. __GLS_END_CAPTURE_EXEC(ctx, 76);
  1552. }
  1553. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1554. writer = ctx->writer;
  1555. if (!writer->padWordCount(writer, 1)) goto end;
  1556. if (!writer->beginCommand(writer, 76, 24)) goto end;
  1557. writer->putGLdoublev(writer, 3, v);
  1558. writer->endCommand(writer);
  1559. end:
  1560. if (ctx->captureExitFunc) ctx->captureExitFunc(76);
  1561. --ctx->captureEntryCount;
  1562. }
  1563. void __gls_capture_glColor3f(GLfloat red, GLfloat green, GLfloat blue) {
  1564. GLbitfield captureFlags;
  1565. __GLScontext *const ctx = __GLS_CONTEXT;
  1566. __GLSwriter *writer;
  1567. ++ctx->captureEntryCount;
  1568. if (ctx->captureEntryFunc) ctx->captureEntryFunc(77);
  1569. captureFlags = ctx->captureFlags[77];
  1570. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1571. __GLS_BEGIN_CAPTURE_EXEC(ctx, 77);
  1572. glColor3f(red, green, blue);
  1573. __GLS_END_CAPTURE_EXEC(ctx, 77);
  1574. }
  1575. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1576. writer = ctx->writer;
  1577. if (!writer->beginCommand(writer, 77, 12)) goto end;
  1578. writer->putGLfloat(writer, red);
  1579. writer->putGLfloat(writer, green);
  1580. writer->putGLfloat(writer, blue);
  1581. writer->endCommand(writer);
  1582. end:
  1583. if (ctx->captureExitFunc) ctx->captureExitFunc(77);
  1584. --ctx->captureEntryCount;
  1585. }
  1586. void __gls_capture_glColor3fv(const GLfloat *v) {
  1587. GLbitfield captureFlags;
  1588. __GLScontext *const ctx = __GLS_CONTEXT;
  1589. __GLSwriter *writer;
  1590. ++ctx->captureEntryCount;
  1591. if (ctx->captureEntryFunc) ctx->captureEntryFunc(78);
  1592. captureFlags = ctx->captureFlags[78];
  1593. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1594. __GLS_BEGIN_CAPTURE_EXEC(ctx, 78);
  1595. glColor3fv(v);
  1596. __GLS_END_CAPTURE_EXEC(ctx, 78);
  1597. }
  1598. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1599. writer = ctx->writer;
  1600. if (!writer->beginCommand(writer, 78, 12)) goto end;
  1601. writer->putGLfloatv(writer, 3, v);
  1602. writer->endCommand(writer);
  1603. end:
  1604. if (ctx->captureExitFunc) ctx->captureExitFunc(78);
  1605. --ctx->captureEntryCount;
  1606. }
  1607. void __gls_capture_glColor3i(GLint red, GLint green, GLint blue) {
  1608. GLbitfield captureFlags;
  1609. __GLScontext *const ctx = __GLS_CONTEXT;
  1610. __GLSwriter *writer;
  1611. ++ctx->captureEntryCount;
  1612. if (ctx->captureEntryFunc) ctx->captureEntryFunc(79);
  1613. captureFlags = ctx->captureFlags[79];
  1614. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1615. __GLS_BEGIN_CAPTURE_EXEC(ctx, 79);
  1616. glColor3i(red, green, blue);
  1617. __GLS_END_CAPTURE_EXEC(ctx, 79);
  1618. }
  1619. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1620. writer = ctx->writer;
  1621. if (!writer->beginCommand(writer, 79, 12)) goto end;
  1622. writer->putGLint(writer, red);
  1623. writer->putGLint(writer, green);
  1624. writer->putGLint(writer, blue);
  1625. writer->endCommand(writer);
  1626. end:
  1627. if (ctx->captureExitFunc) ctx->captureExitFunc(79);
  1628. --ctx->captureEntryCount;
  1629. }
  1630. void __gls_capture_glColor3iv(const GLint *v) {
  1631. GLbitfield captureFlags;
  1632. __GLScontext *const ctx = __GLS_CONTEXT;
  1633. __GLSwriter *writer;
  1634. ++ctx->captureEntryCount;
  1635. if (ctx->captureEntryFunc) ctx->captureEntryFunc(80);
  1636. captureFlags = ctx->captureFlags[80];
  1637. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1638. __GLS_BEGIN_CAPTURE_EXEC(ctx, 80);
  1639. glColor3iv(v);
  1640. __GLS_END_CAPTURE_EXEC(ctx, 80);
  1641. }
  1642. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1643. writer = ctx->writer;
  1644. if (!writer->beginCommand(writer, 80, 12)) goto end;
  1645. writer->putGLintv(writer, 3, v);
  1646. writer->endCommand(writer);
  1647. end:
  1648. if (ctx->captureExitFunc) ctx->captureExitFunc(80);
  1649. --ctx->captureEntryCount;
  1650. }
  1651. void __gls_capture_glColor3s(GLshort red, GLshort green, GLshort blue) {
  1652. GLbitfield captureFlags;
  1653. __GLScontext *const ctx = __GLS_CONTEXT;
  1654. __GLSwriter *writer;
  1655. ++ctx->captureEntryCount;
  1656. if (ctx->captureEntryFunc) ctx->captureEntryFunc(81);
  1657. captureFlags = ctx->captureFlags[81];
  1658. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1659. __GLS_BEGIN_CAPTURE_EXEC(ctx, 81);
  1660. glColor3s(red, green, blue);
  1661. __GLS_END_CAPTURE_EXEC(ctx, 81);
  1662. }
  1663. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1664. writer = ctx->writer;
  1665. if (!writer->beginCommand(writer, 81, 6)) goto end;
  1666. writer->putGLshort(writer, red);
  1667. writer->putGLshort(writer, green);
  1668. writer->putGLshort(writer, blue);
  1669. writer->endCommand(writer);
  1670. end:
  1671. if (ctx->captureExitFunc) ctx->captureExitFunc(81);
  1672. --ctx->captureEntryCount;
  1673. }
  1674. void __gls_capture_glColor3sv(const GLshort *v) {
  1675. GLbitfield captureFlags;
  1676. __GLScontext *const ctx = __GLS_CONTEXT;
  1677. __GLSwriter *writer;
  1678. ++ctx->captureEntryCount;
  1679. if (ctx->captureEntryFunc) ctx->captureEntryFunc(82);
  1680. captureFlags = ctx->captureFlags[82];
  1681. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1682. __GLS_BEGIN_CAPTURE_EXEC(ctx, 82);
  1683. glColor3sv(v);
  1684. __GLS_END_CAPTURE_EXEC(ctx, 82);
  1685. }
  1686. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1687. writer = ctx->writer;
  1688. if (!writer->beginCommand(writer, 82, 6)) goto end;
  1689. writer->putGLshortv(writer, 3, v);
  1690. writer->endCommand(writer);
  1691. end:
  1692. if (ctx->captureExitFunc) ctx->captureExitFunc(82);
  1693. --ctx->captureEntryCount;
  1694. }
  1695. void __gls_capture_glColor3ub(GLubyte red, GLubyte green, GLubyte blue) {
  1696. GLbitfield captureFlags;
  1697. __GLScontext *const ctx = __GLS_CONTEXT;
  1698. __GLSwriter *writer;
  1699. ++ctx->captureEntryCount;
  1700. if (ctx->captureEntryFunc) ctx->captureEntryFunc(83);
  1701. captureFlags = ctx->captureFlags[83];
  1702. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1703. __GLS_BEGIN_CAPTURE_EXEC(ctx, 83);
  1704. glColor3ub(red, green, blue);
  1705. __GLS_END_CAPTURE_EXEC(ctx, 83);
  1706. }
  1707. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1708. writer = ctx->writer;
  1709. if (!writer->beginCommand(writer, 83, 3)) goto end;
  1710. writer->putGLubyte(writer, red);
  1711. writer->putGLubyte(writer, green);
  1712. writer->putGLubyte(writer, blue);
  1713. writer->endCommand(writer);
  1714. end:
  1715. if (ctx->captureExitFunc) ctx->captureExitFunc(83);
  1716. --ctx->captureEntryCount;
  1717. }
  1718. void __gls_capture_glColor3ubv(const GLubyte *v) {
  1719. GLbitfield captureFlags;
  1720. __GLScontext *const ctx = __GLS_CONTEXT;
  1721. __GLSwriter *writer;
  1722. ++ctx->captureEntryCount;
  1723. if (ctx->captureEntryFunc) ctx->captureEntryFunc(84);
  1724. captureFlags = ctx->captureFlags[84];
  1725. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1726. __GLS_BEGIN_CAPTURE_EXEC(ctx, 84);
  1727. glColor3ubv(v);
  1728. __GLS_END_CAPTURE_EXEC(ctx, 84);
  1729. }
  1730. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1731. writer = ctx->writer;
  1732. if (!writer->beginCommand(writer, 84, 3)) goto end;
  1733. writer->putGLubytev(writer, 3, v);
  1734. writer->endCommand(writer);
  1735. end:
  1736. if (ctx->captureExitFunc) ctx->captureExitFunc(84);
  1737. --ctx->captureEntryCount;
  1738. }
  1739. void __gls_capture_glColor3ui(GLuint red, GLuint green, GLuint blue) {
  1740. GLbitfield captureFlags;
  1741. __GLScontext *const ctx = __GLS_CONTEXT;
  1742. __GLSwriter *writer;
  1743. ++ctx->captureEntryCount;
  1744. if (ctx->captureEntryFunc) ctx->captureEntryFunc(85);
  1745. captureFlags = ctx->captureFlags[85];
  1746. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1747. __GLS_BEGIN_CAPTURE_EXEC(ctx, 85);
  1748. glColor3ui(red, green, blue);
  1749. __GLS_END_CAPTURE_EXEC(ctx, 85);
  1750. }
  1751. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1752. writer = ctx->writer;
  1753. if (!writer->beginCommand(writer, 85, 12)) goto end;
  1754. writer->putGLuint(writer, red);
  1755. writer->putGLuint(writer, green);
  1756. writer->putGLuint(writer, blue);
  1757. writer->endCommand(writer);
  1758. end:
  1759. if (ctx->captureExitFunc) ctx->captureExitFunc(85);
  1760. --ctx->captureEntryCount;
  1761. }
  1762. void __gls_capture_glColor3uiv(const GLuint *v) {
  1763. GLbitfield captureFlags;
  1764. __GLScontext *const ctx = __GLS_CONTEXT;
  1765. __GLSwriter *writer;
  1766. ++ctx->captureEntryCount;
  1767. if (ctx->captureEntryFunc) ctx->captureEntryFunc(86);
  1768. captureFlags = ctx->captureFlags[86];
  1769. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1770. __GLS_BEGIN_CAPTURE_EXEC(ctx, 86);
  1771. glColor3uiv(v);
  1772. __GLS_END_CAPTURE_EXEC(ctx, 86);
  1773. }
  1774. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1775. writer = ctx->writer;
  1776. if (!writer->beginCommand(writer, 86, 12)) goto end;
  1777. writer->putGLuintv(writer, 3, v);
  1778. writer->endCommand(writer);
  1779. end:
  1780. if (ctx->captureExitFunc) ctx->captureExitFunc(86);
  1781. --ctx->captureEntryCount;
  1782. }
  1783. void __gls_capture_glColor3us(GLushort red, GLushort green, GLushort blue) {
  1784. GLbitfield captureFlags;
  1785. __GLScontext *const ctx = __GLS_CONTEXT;
  1786. __GLSwriter *writer;
  1787. ++ctx->captureEntryCount;
  1788. if (ctx->captureEntryFunc) ctx->captureEntryFunc(87);
  1789. captureFlags = ctx->captureFlags[87];
  1790. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1791. __GLS_BEGIN_CAPTURE_EXEC(ctx, 87);
  1792. glColor3us(red, green, blue);
  1793. __GLS_END_CAPTURE_EXEC(ctx, 87);
  1794. }
  1795. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1796. writer = ctx->writer;
  1797. if (!writer->beginCommand(writer, 87, 6)) goto end;
  1798. writer->putGLushort(writer, red);
  1799. writer->putGLushort(writer, green);
  1800. writer->putGLushort(writer, blue);
  1801. writer->endCommand(writer);
  1802. end:
  1803. if (ctx->captureExitFunc) ctx->captureExitFunc(87);
  1804. --ctx->captureEntryCount;
  1805. }
  1806. void __gls_capture_glColor3usv(const GLushort *v) {
  1807. GLbitfield captureFlags;
  1808. __GLScontext *const ctx = __GLS_CONTEXT;
  1809. __GLSwriter *writer;
  1810. ++ctx->captureEntryCount;
  1811. if (ctx->captureEntryFunc) ctx->captureEntryFunc(88);
  1812. captureFlags = ctx->captureFlags[88];
  1813. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1814. __GLS_BEGIN_CAPTURE_EXEC(ctx, 88);
  1815. glColor3usv(v);
  1816. __GLS_END_CAPTURE_EXEC(ctx, 88);
  1817. }
  1818. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1819. writer = ctx->writer;
  1820. if (!writer->beginCommand(writer, 88, 6)) goto end;
  1821. writer->putGLushortv(writer, 3, v);
  1822. writer->endCommand(writer);
  1823. end:
  1824. if (ctx->captureExitFunc) ctx->captureExitFunc(88);
  1825. --ctx->captureEntryCount;
  1826. }
  1827. void __gls_capture_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) {
  1828. GLbitfield captureFlags;
  1829. __GLScontext *const ctx = __GLS_CONTEXT;
  1830. __GLSwriter *writer;
  1831. ++ctx->captureEntryCount;
  1832. if (ctx->captureEntryFunc) ctx->captureEntryFunc(89);
  1833. captureFlags = ctx->captureFlags[89];
  1834. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1835. __GLS_BEGIN_CAPTURE_EXEC(ctx, 89);
  1836. glColor4b(red, green, blue, alpha);
  1837. __GLS_END_CAPTURE_EXEC(ctx, 89);
  1838. }
  1839. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1840. writer = ctx->writer;
  1841. if (!writer->beginCommand(writer, 89, 4)) goto end;
  1842. writer->putGLbyte(writer, red);
  1843. writer->putGLbyte(writer, green);
  1844. writer->putGLbyte(writer, blue);
  1845. writer->putGLbyte(writer, alpha);
  1846. writer->endCommand(writer);
  1847. end:
  1848. if (ctx->captureExitFunc) ctx->captureExitFunc(89);
  1849. --ctx->captureEntryCount;
  1850. }
  1851. void __gls_capture_glColor4bv(const GLbyte *v) {
  1852. GLbitfield captureFlags;
  1853. __GLScontext *const ctx = __GLS_CONTEXT;
  1854. __GLSwriter *writer;
  1855. ++ctx->captureEntryCount;
  1856. if (ctx->captureEntryFunc) ctx->captureEntryFunc(90);
  1857. captureFlags = ctx->captureFlags[90];
  1858. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1859. __GLS_BEGIN_CAPTURE_EXEC(ctx, 90);
  1860. glColor4bv(v);
  1861. __GLS_END_CAPTURE_EXEC(ctx, 90);
  1862. }
  1863. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1864. writer = ctx->writer;
  1865. if (!writer->beginCommand(writer, 90, 4)) goto end;
  1866. writer->putGLbytev(writer, 4, v);
  1867. writer->endCommand(writer);
  1868. end:
  1869. if (ctx->captureExitFunc) ctx->captureExitFunc(90);
  1870. --ctx->captureEntryCount;
  1871. }
  1872. void __gls_capture_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) {
  1873. GLbitfield captureFlags;
  1874. __GLScontext *const ctx = __GLS_CONTEXT;
  1875. __GLSwriter *writer;
  1876. ++ctx->captureEntryCount;
  1877. if (ctx->captureEntryFunc) ctx->captureEntryFunc(91);
  1878. captureFlags = ctx->captureFlags[91];
  1879. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1880. __GLS_BEGIN_CAPTURE_EXEC(ctx, 91);
  1881. glColor4d(red, green, blue, alpha);
  1882. __GLS_END_CAPTURE_EXEC(ctx, 91);
  1883. }
  1884. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1885. writer = ctx->writer;
  1886. if (!writer->padWordCount(writer, 1)) goto end;
  1887. if (!writer->beginCommand(writer, 91, 32)) goto end;
  1888. writer->putGLdouble(writer, red);
  1889. writer->putGLdouble(writer, green);
  1890. writer->putGLdouble(writer, blue);
  1891. writer->putGLdouble(writer, alpha);
  1892. writer->endCommand(writer);
  1893. end:
  1894. if (ctx->captureExitFunc) ctx->captureExitFunc(91);
  1895. --ctx->captureEntryCount;
  1896. }
  1897. void __gls_capture_glColor4dv(const GLdouble *v) {
  1898. GLbitfield captureFlags;
  1899. __GLScontext *const ctx = __GLS_CONTEXT;
  1900. __GLSwriter *writer;
  1901. ++ctx->captureEntryCount;
  1902. if (ctx->captureEntryFunc) ctx->captureEntryFunc(92);
  1903. captureFlags = ctx->captureFlags[92];
  1904. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1905. __GLS_BEGIN_CAPTURE_EXEC(ctx, 92);
  1906. glColor4dv(v);
  1907. __GLS_END_CAPTURE_EXEC(ctx, 92);
  1908. }
  1909. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1910. writer = ctx->writer;
  1911. if (!writer->padWordCount(writer, 1)) goto end;
  1912. if (!writer->beginCommand(writer, 92, 32)) goto end;
  1913. writer->putGLdoublev(writer, 4, v);
  1914. writer->endCommand(writer);
  1915. end:
  1916. if (ctx->captureExitFunc) ctx->captureExitFunc(92);
  1917. --ctx->captureEntryCount;
  1918. }
  1919. void __gls_capture_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
  1920. GLbitfield captureFlags;
  1921. __GLScontext *const ctx = __GLS_CONTEXT;
  1922. __GLSwriter *writer;
  1923. ++ctx->captureEntryCount;
  1924. if (ctx->captureEntryFunc) ctx->captureEntryFunc(93);
  1925. captureFlags = ctx->captureFlags[93];
  1926. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1927. __GLS_BEGIN_CAPTURE_EXEC(ctx, 93);
  1928. glColor4f(red, green, blue, alpha);
  1929. __GLS_END_CAPTURE_EXEC(ctx, 93);
  1930. }
  1931. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1932. writer = ctx->writer;
  1933. if (!writer->beginCommand(writer, 93, 16)) goto end;
  1934. writer->putGLfloat(writer, red);
  1935. writer->putGLfloat(writer, green);
  1936. writer->putGLfloat(writer, blue);
  1937. writer->putGLfloat(writer, alpha);
  1938. writer->endCommand(writer);
  1939. end:
  1940. if (ctx->captureExitFunc) ctx->captureExitFunc(93);
  1941. --ctx->captureEntryCount;
  1942. }
  1943. void __gls_capture_glColor4fv(const GLfloat *v) {
  1944. GLbitfield captureFlags;
  1945. __GLScontext *const ctx = __GLS_CONTEXT;
  1946. __GLSwriter *writer;
  1947. ++ctx->captureEntryCount;
  1948. if (ctx->captureEntryFunc) ctx->captureEntryFunc(94);
  1949. captureFlags = ctx->captureFlags[94];
  1950. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1951. __GLS_BEGIN_CAPTURE_EXEC(ctx, 94);
  1952. glColor4fv(v);
  1953. __GLS_END_CAPTURE_EXEC(ctx, 94);
  1954. }
  1955. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1956. writer = ctx->writer;
  1957. if (!writer->beginCommand(writer, 94, 16)) goto end;
  1958. writer->putGLfloatv(writer, 4, v);
  1959. writer->endCommand(writer);
  1960. end:
  1961. if (ctx->captureExitFunc) ctx->captureExitFunc(94);
  1962. --ctx->captureEntryCount;
  1963. }
  1964. void __gls_capture_glColor4i(GLint red, GLint green, GLint blue, GLint alpha) {
  1965. GLbitfield captureFlags;
  1966. __GLScontext *const ctx = __GLS_CONTEXT;
  1967. __GLSwriter *writer;
  1968. ++ctx->captureEntryCount;
  1969. if (ctx->captureEntryFunc) ctx->captureEntryFunc(95);
  1970. captureFlags = ctx->captureFlags[95];
  1971. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1972. __GLS_BEGIN_CAPTURE_EXEC(ctx, 95);
  1973. glColor4i(red, green, blue, alpha);
  1974. __GLS_END_CAPTURE_EXEC(ctx, 95);
  1975. }
  1976. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  1977. writer = ctx->writer;
  1978. if (!writer->beginCommand(writer, 95, 16)) goto end;
  1979. writer->putGLint(writer, red);
  1980. writer->putGLint(writer, green);
  1981. writer->putGLint(writer, blue);
  1982. writer->putGLint(writer, alpha);
  1983. writer->endCommand(writer);
  1984. end:
  1985. if (ctx->captureExitFunc) ctx->captureExitFunc(95);
  1986. --ctx->captureEntryCount;
  1987. }
  1988. void __gls_capture_glColor4iv(const GLint *v) {
  1989. GLbitfield captureFlags;
  1990. __GLScontext *const ctx = __GLS_CONTEXT;
  1991. __GLSwriter *writer;
  1992. ++ctx->captureEntryCount;
  1993. if (ctx->captureEntryFunc) ctx->captureEntryFunc(96);
  1994. captureFlags = ctx->captureFlags[96];
  1995. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  1996. __GLS_BEGIN_CAPTURE_EXEC(ctx, 96);
  1997. glColor4iv(v);
  1998. __GLS_END_CAPTURE_EXEC(ctx, 96);
  1999. }
  2000. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2001. writer = ctx->writer;
  2002. if (!writer->beginCommand(writer, 96, 16)) goto end;
  2003. writer->putGLintv(writer, 4, v);
  2004. writer->endCommand(writer);
  2005. end:
  2006. if (ctx->captureExitFunc) ctx->captureExitFunc(96);
  2007. --ctx->captureEntryCount;
  2008. }
  2009. void __gls_capture_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) {
  2010. GLbitfield captureFlags;
  2011. __GLScontext *const ctx = __GLS_CONTEXT;
  2012. __GLSwriter *writer;
  2013. ++ctx->captureEntryCount;
  2014. if (ctx->captureEntryFunc) ctx->captureEntryFunc(97);
  2015. captureFlags = ctx->captureFlags[97];
  2016. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2017. __GLS_BEGIN_CAPTURE_EXEC(ctx, 97);
  2018. glColor4s(red, green, blue, alpha);
  2019. __GLS_END_CAPTURE_EXEC(ctx, 97);
  2020. }
  2021. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2022. writer = ctx->writer;
  2023. if (!writer->beginCommand(writer, 97, 8)) goto end;
  2024. writer->putGLshort(writer, red);
  2025. writer->putGLshort(writer, green);
  2026. writer->putGLshort(writer, blue);
  2027. writer->putGLshort(writer, alpha);
  2028. writer->endCommand(writer);
  2029. end:
  2030. if (ctx->captureExitFunc) ctx->captureExitFunc(97);
  2031. --ctx->captureEntryCount;
  2032. }
  2033. void __gls_capture_glColor4sv(const GLshort *v) {
  2034. GLbitfield captureFlags;
  2035. __GLScontext *const ctx = __GLS_CONTEXT;
  2036. __GLSwriter *writer;
  2037. ++ctx->captureEntryCount;
  2038. if (ctx->captureEntryFunc) ctx->captureEntryFunc(98);
  2039. captureFlags = ctx->captureFlags[98];
  2040. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2041. __GLS_BEGIN_CAPTURE_EXEC(ctx, 98);
  2042. glColor4sv(v);
  2043. __GLS_END_CAPTURE_EXEC(ctx, 98);
  2044. }
  2045. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2046. writer = ctx->writer;
  2047. if (!writer->beginCommand(writer, 98, 8)) goto end;
  2048. writer->putGLshortv(writer, 4, v);
  2049. writer->endCommand(writer);
  2050. end:
  2051. if (ctx->captureExitFunc) ctx->captureExitFunc(98);
  2052. --ctx->captureEntryCount;
  2053. }
  2054. void __gls_capture_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) {
  2055. GLbitfield captureFlags;
  2056. __GLScontext *const ctx = __GLS_CONTEXT;
  2057. __GLSwriter *writer;
  2058. ++ctx->captureEntryCount;
  2059. if (ctx->captureEntryFunc) ctx->captureEntryFunc(99);
  2060. captureFlags = ctx->captureFlags[99];
  2061. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2062. __GLS_BEGIN_CAPTURE_EXEC(ctx, 99);
  2063. glColor4ub(red, green, blue, alpha);
  2064. __GLS_END_CAPTURE_EXEC(ctx, 99);
  2065. }
  2066. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2067. writer = ctx->writer;
  2068. if (!writer->beginCommand(writer, 99, 4)) goto end;
  2069. writer->putGLubyte(writer, red);
  2070. writer->putGLubyte(writer, green);
  2071. writer->putGLubyte(writer, blue);
  2072. writer->putGLubyte(writer, alpha);
  2073. writer->endCommand(writer);
  2074. end:
  2075. if (ctx->captureExitFunc) ctx->captureExitFunc(99);
  2076. --ctx->captureEntryCount;
  2077. }
  2078. void __gls_capture_glColor4ubv(const GLubyte *v) {
  2079. GLbitfield captureFlags;
  2080. __GLScontext *const ctx = __GLS_CONTEXT;
  2081. __GLSwriter *writer;
  2082. ++ctx->captureEntryCount;
  2083. if (ctx->captureEntryFunc) ctx->captureEntryFunc(100);
  2084. captureFlags = ctx->captureFlags[100];
  2085. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2086. __GLS_BEGIN_CAPTURE_EXEC(ctx, 100);
  2087. glColor4ubv(v);
  2088. __GLS_END_CAPTURE_EXEC(ctx, 100);
  2089. }
  2090. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2091. writer = ctx->writer;
  2092. if (!writer->beginCommand(writer, 100, 4)) goto end;
  2093. writer->putGLubytev(writer, 4, v);
  2094. writer->endCommand(writer);
  2095. end:
  2096. if (ctx->captureExitFunc) ctx->captureExitFunc(100);
  2097. --ctx->captureEntryCount;
  2098. }
  2099. void __gls_capture_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) {
  2100. GLbitfield captureFlags;
  2101. __GLScontext *const ctx = __GLS_CONTEXT;
  2102. __GLSwriter *writer;
  2103. ++ctx->captureEntryCount;
  2104. if (ctx->captureEntryFunc) ctx->captureEntryFunc(101);
  2105. captureFlags = ctx->captureFlags[101];
  2106. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2107. __GLS_BEGIN_CAPTURE_EXEC(ctx, 101);
  2108. glColor4ui(red, green, blue, alpha);
  2109. __GLS_END_CAPTURE_EXEC(ctx, 101);
  2110. }
  2111. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2112. writer = ctx->writer;
  2113. if (!writer->beginCommand(writer, 101, 16)) goto end;
  2114. writer->putGLuint(writer, red);
  2115. writer->putGLuint(writer, green);
  2116. writer->putGLuint(writer, blue);
  2117. writer->putGLuint(writer, alpha);
  2118. writer->endCommand(writer);
  2119. end:
  2120. if (ctx->captureExitFunc) ctx->captureExitFunc(101);
  2121. --ctx->captureEntryCount;
  2122. }
  2123. void __gls_capture_glColor4uiv(const GLuint *v) {
  2124. GLbitfield captureFlags;
  2125. __GLScontext *const ctx = __GLS_CONTEXT;
  2126. __GLSwriter *writer;
  2127. ++ctx->captureEntryCount;
  2128. if (ctx->captureEntryFunc) ctx->captureEntryFunc(102);
  2129. captureFlags = ctx->captureFlags[102];
  2130. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2131. __GLS_BEGIN_CAPTURE_EXEC(ctx, 102);
  2132. glColor4uiv(v);
  2133. __GLS_END_CAPTURE_EXEC(ctx, 102);
  2134. }
  2135. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2136. writer = ctx->writer;
  2137. if (!writer->beginCommand(writer, 102, 16)) goto end;
  2138. writer->putGLuintv(writer, 4, v);
  2139. writer->endCommand(writer);
  2140. end:
  2141. if (ctx->captureExitFunc) ctx->captureExitFunc(102);
  2142. --ctx->captureEntryCount;
  2143. }
  2144. void __gls_capture_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) {
  2145. GLbitfield captureFlags;
  2146. __GLScontext *const ctx = __GLS_CONTEXT;
  2147. __GLSwriter *writer;
  2148. ++ctx->captureEntryCount;
  2149. if (ctx->captureEntryFunc) ctx->captureEntryFunc(103);
  2150. captureFlags = ctx->captureFlags[103];
  2151. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2152. __GLS_BEGIN_CAPTURE_EXEC(ctx, 103);
  2153. glColor4us(red, green, blue, alpha);
  2154. __GLS_END_CAPTURE_EXEC(ctx, 103);
  2155. }
  2156. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2157. writer = ctx->writer;
  2158. if (!writer->beginCommand(writer, 103, 8)) goto end;
  2159. writer->putGLushort(writer, red);
  2160. writer->putGLushort(writer, green);
  2161. writer->putGLushort(writer, blue);
  2162. writer->putGLushort(writer, alpha);
  2163. writer->endCommand(writer);
  2164. end:
  2165. if (ctx->captureExitFunc) ctx->captureExitFunc(103);
  2166. --ctx->captureEntryCount;
  2167. }
  2168. void __gls_capture_glColor4usv(const GLushort *v) {
  2169. GLbitfield captureFlags;
  2170. __GLScontext *const ctx = __GLS_CONTEXT;
  2171. __GLSwriter *writer;
  2172. ++ctx->captureEntryCount;
  2173. if (ctx->captureEntryFunc) ctx->captureEntryFunc(104);
  2174. captureFlags = ctx->captureFlags[104];
  2175. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2176. __GLS_BEGIN_CAPTURE_EXEC(ctx, 104);
  2177. glColor4usv(v);
  2178. __GLS_END_CAPTURE_EXEC(ctx, 104);
  2179. }
  2180. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2181. writer = ctx->writer;
  2182. if (!writer->beginCommand(writer, 104, 8)) goto end;
  2183. writer->putGLushortv(writer, 4, v);
  2184. writer->endCommand(writer);
  2185. end:
  2186. if (ctx->captureExitFunc) ctx->captureExitFunc(104);
  2187. --ctx->captureEntryCount;
  2188. }
  2189. void __gls_capture_glEdgeFlag(GLboolean flag) {
  2190. GLbitfield captureFlags;
  2191. __GLScontext *const ctx = __GLS_CONTEXT;
  2192. __GLSwriter *writer;
  2193. ++ctx->captureEntryCount;
  2194. if (ctx->captureEntryFunc) ctx->captureEntryFunc(105);
  2195. captureFlags = ctx->captureFlags[105];
  2196. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2197. __GLS_BEGIN_CAPTURE_EXEC(ctx, 105);
  2198. glEdgeFlag(flag);
  2199. __GLS_END_CAPTURE_EXEC(ctx, 105);
  2200. }
  2201. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2202. writer = ctx->writer;
  2203. if (!writer->beginCommand(writer, 105, 1)) goto end;
  2204. writer->putGLboolean(writer, flag);
  2205. writer->endCommand(writer);
  2206. end:
  2207. if (ctx->captureExitFunc) ctx->captureExitFunc(105);
  2208. --ctx->captureEntryCount;
  2209. }
  2210. void __gls_capture_glEdgeFlagv(const GLboolean *flag) {
  2211. GLbitfield captureFlags;
  2212. __GLScontext *const ctx = __GLS_CONTEXT;
  2213. __GLSwriter *writer;
  2214. ++ctx->captureEntryCount;
  2215. if (ctx->captureEntryFunc) ctx->captureEntryFunc(106);
  2216. captureFlags = ctx->captureFlags[106];
  2217. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2218. __GLS_BEGIN_CAPTURE_EXEC(ctx, 106);
  2219. glEdgeFlagv(flag);
  2220. __GLS_END_CAPTURE_EXEC(ctx, 106);
  2221. }
  2222. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2223. writer = ctx->writer;
  2224. if (!writer->beginCommand(writer, 106, 1)) goto end;
  2225. writer->putGLbooleanv(writer, 1, flag);
  2226. writer->endCommand(writer);
  2227. end:
  2228. if (ctx->captureExitFunc) ctx->captureExitFunc(106);
  2229. --ctx->captureEntryCount;
  2230. }
  2231. void __gls_capture_glEnd(void) {
  2232. GLbitfield captureFlags;
  2233. __GLScontext *const ctx = __GLS_CONTEXT;
  2234. __GLSwriter *writer;
  2235. ++ctx->captureEntryCount;
  2236. if (ctx->captureEntryFunc) ctx->captureEntryFunc(107);
  2237. captureFlags = ctx->captureFlags[107];
  2238. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2239. __GLS_BEGIN_CAPTURE_EXEC(ctx, 107);
  2240. glEnd();
  2241. __GLS_END_CAPTURE_EXEC(ctx, 107);
  2242. }
  2243. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2244. writer = ctx->writer;
  2245. if (!writer->beginCommand(writer, 107, 0)) goto end;
  2246. writer->endCommand(writer);
  2247. end:
  2248. if (ctx->captureExitFunc) ctx->captureExitFunc(107);
  2249. --ctx->captureEntryCount;
  2250. }
  2251. void __gls_capture_glIndexd(GLdouble c) {
  2252. GLbitfield captureFlags;
  2253. __GLScontext *const ctx = __GLS_CONTEXT;
  2254. __GLSwriter *writer;
  2255. ++ctx->captureEntryCount;
  2256. if (ctx->captureEntryFunc) ctx->captureEntryFunc(108);
  2257. captureFlags = ctx->captureFlags[108];
  2258. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2259. __GLS_BEGIN_CAPTURE_EXEC(ctx, 108);
  2260. glIndexd(c);
  2261. __GLS_END_CAPTURE_EXEC(ctx, 108);
  2262. }
  2263. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2264. writer = ctx->writer;
  2265. if (!writer->padWordCount(writer, 1)) goto end;
  2266. if (!writer->beginCommand(writer, 108, 8)) goto end;
  2267. writer->putGLdouble(writer, c);
  2268. writer->endCommand(writer);
  2269. end:
  2270. if (ctx->captureExitFunc) ctx->captureExitFunc(108);
  2271. --ctx->captureEntryCount;
  2272. }
  2273. void __gls_capture_glIndexdv(const GLdouble *c) {
  2274. GLbitfield captureFlags;
  2275. __GLScontext *const ctx = __GLS_CONTEXT;
  2276. __GLSwriter *writer;
  2277. ++ctx->captureEntryCount;
  2278. if (ctx->captureEntryFunc) ctx->captureEntryFunc(109);
  2279. captureFlags = ctx->captureFlags[109];
  2280. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2281. __GLS_BEGIN_CAPTURE_EXEC(ctx, 109);
  2282. glIndexdv(c);
  2283. __GLS_END_CAPTURE_EXEC(ctx, 109);
  2284. }
  2285. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2286. writer = ctx->writer;
  2287. if (!writer->padWordCount(writer, 1)) goto end;
  2288. if (!writer->beginCommand(writer, 109, 8)) goto end;
  2289. writer->putGLdoublev(writer, 1, c);
  2290. writer->endCommand(writer);
  2291. end:
  2292. if (ctx->captureExitFunc) ctx->captureExitFunc(109);
  2293. --ctx->captureEntryCount;
  2294. }
  2295. void __gls_capture_glIndexf(GLfloat c) {
  2296. GLbitfield captureFlags;
  2297. __GLScontext *const ctx = __GLS_CONTEXT;
  2298. __GLSwriter *writer;
  2299. ++ctx->captureEntryCount;
  2300. if (ctx->captureEntryFunc) ctx->captureEntryFunc(110);
  2301. captureFlags = ctx->captureFlags[110];
  2302. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2303. __GLS_BEGIN_CAPTURE_EXEC(ctx, 110);
  2304. glIndexf(c);
  2305. __GLS_END_CAPTURE_EXEC(ctx, 110);
  2306. }
  2307. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2308. writer = ctx->writer;
  2309. if (!writer->beginCommand(writer, 110, 4)) goto end;
  2310. writer->putGLfloat(writer, c);
  2311. writer->endCommand(writer);
  2312. end:
  2313. if (ctx->captureExitFunc) ctx->captureExitFunc(110);
  2314. --ctx->captureEntryCount;
  2315. }
  2316. void __gls_capture_glIndexfv(const GLfloat *c) {
  2317. GLbitfield captureFlags;
  2318. __GLScontext *const ctx = __GLS_CONTEXT;
  2319. __GLSwriter *writer;
  2320. ++ctx->captureEntryCount;
  2321. if (ctx->captureEntryFunc) ctx->captureEntryFunc(111);
  2322. captureFlags = ctx->captureFlags[111];
  2323. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2324. __GLS_BEGIN_CAPTURE_EXEC(ctx, 111);
  2325. glIndexfv(c);
  2326. __GLS_END_CAPTURE_EXEC(ctx, 111);
  2327. }
  2328. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2329. writer = ctx->writer;
  2330. if (!writer->beginCommand(writer, 111, 4)) goto end;
  2331. writer->putGLfloatv(writer, 1, c);
  2332. writer->endCommand(writer);
  2333. end:
  2334. if (ctx->captureExitFunc) ctx->captureExitFunc(111);
  2335. --ctx->captureEntryCount;
  2336. }
  2337. void __gls_capture_glIndexub(GLubyte c) {
  2338. GLbitfield captureFlags;
  2339. __GLScontext *const ctx = __GLS_CONTEXT;
  2340. __GLSwriter *writer;
  2341. ++ctx->captureEntryCount;
  2342. if (ctx->captureEntryFunc) ctx->captureEntryFunc(379);
  2343. captureFlags = ctx->captureFlags[379];
  2344. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2345. __GLS_BEGIN_CAPTURE_EXEC(ctx, 379);
  2346. glIndexub(c);
  2347. __GLS_END_CAPTURE_EXEC(ctx, 379);
  2348. }
  2349. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2350. writer = ctx->writer;
  2351. if (!writer->beginCommand(writer, 379, 1)) goto end;
  2352. writer->putGLubyte(writer, c);
  2353. writer->endCommand(writer);
  2354. end:
  2355. if (ctx->captureExitFunc) ctx->captureExitFunc(379);
  2356. --ctx->captureEntryCount;
  2357. }
  2358. void __gls_capture_glIndexubv(const GLubyte *c) {
  2359. GLbitfield captureFlags;
  2360. __GLScontext *const ctx = __GLS_CONTEXT;
  2361. __GLSwriter *writer;
  2362. ++ctx->captureEntryCount;
  2363. if (ctx->captureEntryFunc) ctx->captureEntryFunc(380);
  2364. captureFlags = ctx->captureFlags[380];
  2365. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2366. __GLS_BEGIN_CAPTURE_EXEC(ctx, 380);
  2367. glIndexubv(c);
  2368. __GLS_END_CAPTURE_EXEC(ctx, 380);
  2369. }
  2370. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2371. writer = ctx->writer;
  2372. if (!writer->beginCommand(writer, 380, 1)) goto end;
  2373. writer->putGLubytev(writer, 1, c);
  2374. writer->endCommand(writer);
  2375. end:
  2376. if (ctx->captureExitFunc) ctx->captureExitFunc(380);
  2377. --ctx->captureEntryCount;
  2378. }
  2379. void __gls_capture_glIndexi(GLint c) {
  2380. GLbitfield captureFlags;
  2381. __GLScontext *const ctx = __GLS_CONTEXT;
  2382. __GLSwriter *writer;
  2383. ++ctx->captureEntryCount;
  2384. if (ctx->captureEntryFunc) ctx->captureEntryFunc(112);
  2385. captureFlags = ctx->captureFlags[112];
  2386. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2387. __GLS_BEGIN_CAPTURE_EXEC(ctx, 112);
  2388. glIndexi(c);
  2389. __GLS_END_CAPTURE_EXEC(ctx, 112);
  2390. }
  2391. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2392. writer = ctx->writer;
  2393. if (!writer->beginCommand(writer, 112, 4)) goto end;
  2394. writer->putGLint(writer, c);
  2395. writer->endCommand(writer);
  2396. end:
  2397. if (ctx->captureExitFunc) ctx->captureExitFunc(112);
  2398. --ctx->captureEntryCount;
  2399. }
  2400. void __gls_capture_glIndexiv(const GLint *c) {
  2401. GLbitfield captureFlags;
  2402. __GLScontext *const ctx = __GLS_CONTEXT;
  2403. __GLSwriter *writer;
  2404. ++ctx->captureEntryCount;
  2405. if (ctx->captureEntryFunc) ctx->captureEntryFunc(113);
  2406. captureFlags = ctx->captureFlags[113];
  2407. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2408. __GLS_BEGIN_CAPTURE_EXEC(ctx, 113);
  2409. glIndexiv(c);
  2410. __GLS_END_CAPTURE_EXEC(ctx, 113);
  2411. }
  2412. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2413. writer = ctx->writer;
  2414. if (!writer->beginCommand(writer, 113, 4)) goto end;
  2415. writer->putGLintv(writer, 1, c);
  2416. writer->endCommand(writer);
  2417. end:
  2418. if (ctx->captureExitFunc) ctx->captureExitFunc(113);
  2419. --ctx->captureEntryCount;
  2420. }
  2421. void __gls_capture_glIndexs(GLshort c) {
  2422. GLbitfield captureFlags;
  2423. __GLScontext *const ctx = __GLS_CONTEXT;
  2424. __GLSwriter *writer;
  2425. ++ctx->captureEntryCount;
  2426. if (ctx->captureEntryFunc) ctx->captureEntryFunc(114);
  2427. captureFlags = ctx->captureFlags[114];
  2428. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2429. __GLS_BEGIN_CAPTURE_EXEC(ctx, 114);
  2430. glIndexs(c);
  2431. __GLS_END_CAPTURE_EXEC(ctx, 114);
  2432. }
  2433. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2434. writer = ctx->writer;
  2435. if (!writer->beginCommand(writer, 114, 2)) goto end;
  2436. writer->putGLshort(writer, c);
  2437. writer->endCommand(writer);
  2438. end:
  2439. if (ctx->captureExitFunc) ctx->captureExitFunc(114);
  2440. --ctx->captureEntryCount;
  2441. }
  2442. void __gls_capture_glIndexsv(const GLshort *c) {
  2443. GLbitfield captureFlags;
  2444. __GLScontext *const ctx = __GLS_CONTEXT;
  2445. __GLSwriter *writer;
  2446. ++ctx->captureEntryCount;
  2447. if (ctx->captureEntryFunc) ctx->captureEntryFunc(115);
  2448. captureFlags = ctx->captureFlags[115];
  2449. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2450. __GLS_BEGIN_CAPTURE_EXEC(ctx, 115);
  2451. glIndexsv(c);
  2452. __GLS_END_CAPTURE_EXEC(ctx, 115);
  2453. }
  2454. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2455. writer = ctx->writer;
  2456. if (!writer->beginCommand(writer, 115, 2)) goto end;
  2457. writer->putGLshortv(writer, 1, c);
  2458. writer->endCommand(writer);
  2459. end:
  2460. if (ctx->captureExitFunc) ctx->captureExitFunc(115);
  2461. --ctx->captureEntryCount;
  2462. }
  2463. void __gls_capture_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz) {
  2464. GLbitfield captureFlags;
  2465. __GLScontext *const ctx = __GLS_CONTEXT;
  2466. __GLSwriter *writer;
  2467. ++ctx->captureEntryCount;
  2468. if (ctx->captureEntryFunc) ctx->captureEntryFunc(116);
  2469. captureFlags = ctx->captureFlags[116];
  2470. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2471. __GLS_BEGIN_CAPTURE_EXEC(ctx, 116);
  2472. glNormal3b(nx, ny, nz);
  2473. __GLS_END_CAPTURE_EXEC(ctx, 116);
  2474. }
  2475. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2476. writer = ctx->writer;
  2477. if (!writer->beginCommand(writer, 116, 3)) goto end;
  2478. writer->putGLbyte(writer, nx);
  2479. writer->putGLbyte(writer, ny);
  2480. writer->putGLbyte(writer, nz);
  2481. writer->endCommand(writer);
  2482. end:
  2483. if (ctx->captureExitFunc) ctx->captureExitFunc(116);
  2484. --ctx->captureEntryCount;
  2485. }
  2486. void __gls_capture_glNormal3bv(const GLbyte *v) {
  2487. GLbitfield captureFlags;
  2488. __GLScontext *const ctx = __GLS_CONTEXT;
  2489. __GLSwriter *writer;
  2490. ++ctx->captureEntryCount;
  2491. if (ctx->captureEntryFunc) ctx->captureEntryFunc(117);
  2492. captureFlags = ctx->captureFlags[117];
  2493. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2494. __GLS_BEGIN_CAPTURE_EXEC(ctx, 117);
  2495. glNormal3bv(v);
  2496. __GLS_END_CAPTURE_EXEC(ctx, 117);
  2497. }
  2498. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2499. writer = ctx->writer;
  2500. if (!writer->beginCommand(writer, 117, 3)) goto end;
  2501. writer->putGLbytev(writer, 3, v);
  2502. writer->endCommand(writer);
  2503. end:
  2504. if (ctx->captureExitFunc) ctx->captureExitFunc(117);
  2505. --ctx->captureEntryCount;
  2506. }
  2507. void __gls_capture_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz) {
  2508. GLbitfield captureFlags;
  2509. __GLScontext *const ctx = __GLS_CONTEXT;
  2510. __GLSwriter *writer;
  2511. ++ctx->captureEntryCount;
  2512. if (ctx->captureEntryFunc) ctx->captureEntryFunc(118);
  2513. captureFlags = ctx->captureFlags[118];
  2514. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2515. __GLS_BEGIN_CAPTURE_EXEC(ctx, 118);
  2516. glNormal3d(nx, ny, nz);
  2517. __GLS_END_CAPTURE_EXEC(ctx, 118);
  2518. }
  2519. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2520. writer = ctx->writer;
  2521. if (!writer->padWordCount(writer, 1)) goto end;
  2522. if (!writer->beginCommand(writer, 118, 24)) goto end;
  2523. writer->putGLdouble(writer, nx);
  2524. writer->putGLdouble(writer, ny);
  2525. writer->putGLdouble(writer, nz);
  2526. writer->endCommand(writer);
  2527. end:
  2528. if (ctx->captureExitFunc) ctx->captureExitFunc(118);
  2529. --ctx->captureEntryCount;
  2530. }
  2531. void __gls_capture_glNormal3dv(const GLdouble *v) {
  2532. GLbitfield captureFlags;
  2533. __GLScontext *const ctx = __GLS_CONTEXT;
  2534. __GLSwriter *writer;
  2535. ++ctx->captureEntryCount;
  2536. if (ctx->captureEntryFunc) ctx->captureEntryFunc(119);
  2537. captureFlags = ctx->captureFlags[119];
  2538. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2539. __GLS_BEGIN_CAPTURE_EXEC(ctx, 119);
  2540. glNormal3dv(v);
  2541. __GLS_END_CAPTURE_EXEC(ctx, 119);
  2542. }
  2543. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2544. writer = ctx->writer;
  2545. if (!writer->padWordCount(writer, 1)) goto end;
  2546. if (!writer->beginCommand(writer, 119, 24)) goto end;
  2547. writer->putGLdoublev(writer, 3, v);
  2548. writer->endCommand(writer);
  2549. end:
  2550. if (ctx->captureExitFunc) ctx->captureExitFunc(119);
  2551. --ctx->captureEntryCount;
  2552. }
  2553. void __gls_capture_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) {
  2554. GLbitfield captureFlags;
  2555. __GLScontext *const ctx = __GLS_CONTEXT;
  2556. __GLSwriter *writer;
  2557. ++ctx->captureEntryCount;
  2558. if (ctx->captureEntryFunc) ctx->captureEntryFunc(120);
  2559. captureFlags = ctx->captureFlags[120];
  2560. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2561. __GLS_BEGIN_CAPTURE_EXEC(ctx, 120);
  2562. glNormal3f(nx, ny, nz);
  2563. __GLS_END_CAPTURE_EXEC(ctx, 120);
  2564. }
  2565. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2566. writer = ctx->writer;
  2567. if (!writer->beginCommand(writer, 120, 12)) goto end;
  2568. writer->putGLfloat(writer, nx);
  2569. writer->putGLfloat(writer, ny);
  2570. writer->putGLfloat(writer, nz);
  2571. writer->endCommand(writer);
  2572. end:
  2573. if (ctx->captureExitFunc) ctx->captureExitFunc(120);
  2574. --ctx->captureEntryCount;
  2575. }
  2576. void __gls_capture_glNormal3fv(const GLfloat *v) {
  2577. GLbitfield captureFlags;
  2578. __GLScontext *const ctx = __GLS_CONTEXT;
  2579. __GLSwriter *writer;
  2580. ++ctx->captureEntryCount;
  2581. if (ctx->captureEntryFunc) ctx->captureEntryFunc(121);
  2582. captureFlags = ctx->captureFlags[121];
  2583. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2584. __GLS_BEGIN_CAPTURE_EXEC(ctx, 121);
  2585. glNormal3fv(v);
  2586. __GLS_END_CAPTURE_EXEC(ctx, 121);
  2587. }
  2588. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2589. writer = ctx->writer;
  2590. if (!writer->beginCommand(writer, 121, 12)) goto end;
  2591. writer->putGLfloatv(writer, 3, v);
  2592. writer->endCommand(writer);
  2593. end:
  2594. if (ctx->captureExitFunc) ctx->captureExitFunc(121);
  2595. --ctx->captureEntryCount;
  2596. }
  2597. void __gls_capture_glNormal3i(GLint nx, GLint ny, GLint nz) {
  2598. GLbitfield captureFlags;
  2599. __GLScontext *const ctx = __GLS_CONTEXT;
  2600. __GLSwriter *writer;
  2601. ++ctx->captureEntryCount;
  2602. if (ctx->captureEntryFunc) ctx->captureEntryFunc(122);
  2603. captureFlags = ctx->captureFlags[122];
  2604. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2605. __GLS_BEGIN_CAPTURE_EXEC(ctx, 122);
  2606. glNormal3i(nx, ny, nz);
  2607. __GLS_END_CAPTURE_EXEC(ctx, 122);
  2608. }
  2609. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2610. writer = ctx->writer;
  2611. if (!writer->beginCommand(writer, 122, 12)) goto end;
  2612. writer->putGLint(writer, nx);
  2613. writer->putGLint(writer, ny);
  2614. writer->putGLint(writer, nz);
  2615. writer->endCommand(writer);
  2616. end:
  2617. if (ctx->captureExitFunc) ctx->captureExitFunc(122);
  2618. --ctx->captureEntryCount;
  2619. }
  2620. void __gls_capture_glNormal3iv(const GLint *v) {
  2621. GLbitfield captureFlags;
  2622. __GLScontext *const ctx = __GLS_CONTEXT;
  2623. __GLSwriter *writer;
  2624. ++ctx->captureEntryCount;
  2625. if (ctx->captureEntryFunc) ctx->captureEntryFunc(123);
  2626. captureFlags = ctx->captureFlags[123];
  2627. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2628. __GLS_BEGIN_CAPTURE_EXEC(ctx, 123);
  2629. glNormal3iv(v);
  2630. __GLS_END_CAPTURE_EXEC(ctx, 123);
  2631. }
  2632. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2633. writer = ctx->writer;
  2634. if (!writer->beginCommand(writer, 123, 12)) goto end;
  2635. writer->putGLintv(writer, 3, v);
  2636. writer->endCommand(writer);
  2637. end:
  2638. if (ctx->captureExitFunc) ctx->captureExitFunc(123);
  2639. --ctx->captureEntryCount;
  2640. }
  2641. void __gls_capture_glNormal3s(GLshort nx, GLshort ny, GLshort nz) {
  2642. GLbitfield captureFlags;
  2643. __GLScontext *const ctx = __GLS_CONTEXT;
  2644. __GLSwriter *writer;
  2645. ++ctx->captureEntryCount;
  2646. if (ctx->captureEntryFunc) ctx->captureEntryFunc(124);
  2647. captureFlags = ctx->captureFlags[124];
  2648. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2649. __GLS_BEGIN_CAPTURE_EXEC(ctx, 124);
  2650. glNormal3s(nx, ny, nz);
  2651. __GLS_END_CAPTURE_EXEC(ctx, 124);
  2652. }
  2653. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2654. writer = ctx->writer;
  2655. if (!writer->beginCommand(writer, 124, 6)) goto end;
  2656. writer->putGLshort(writer, nx);
  2657. writer->putGLshort(writer, ny);
  2658. writer->putGLshort(writer, nz);
  2659. writer->endCommand(writer);
  2660. end:
  2661. if (ctx->captureExitFunc) ctx->captureExitFunc(124);
  2662. --ctx->captureEntryCount;
  2663. }
  2664. void __gls_capture_glNormal3sv(const GLshort *v) {
  2665. GLbitfield captureFlags;
  2666. __GLScontext *const ctx = __GLS_CONTEXT;
  2667. __GLSwriter *writer;
  2668. ++ctx->captureEntryCount;
  2669. if (ctx->captureEntryFunc) ctx->captureEntryFunc(125);
  2670. captureFlags = ctx->captureFlags[125];
  2671. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2672. __GLS_BEGIN_CAPTURE_EXEC(ctx, 125);
  2673. glNormal3sv(v);
  2674. __GLS_END_CAPTURE_EXEC(ctx, 125);
  2675. }
  2676. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2677. writer = ctx->writer;
  2678. if (!writer->beginCommand(writer, 125, 6)) goto end;
  2679. writer->putGLshortv(writer, 3, v);
  2680. writer->endCommand(writer);
  2681. end:
  2682. if (ctx->captureExitFunc) ctx->captureExitFunc(125);
  2683. --ctx->captureEntryCount;
  2684. }
  2685. void __gls_capture_glRasterPos2d(GLdouble x, GLdouble y) {
  2686. GLbitfield captureFlags;
  2687. __GLScontext *const ctx = __GLS_CONTEXT;
  2688. __GLSwriter *writer;
  2689. ++ctx->captureEntryCount;
  2690. if (ctx->captureEntryFunc) ctx->captureEntryFunc(126);
  2691. captureFlags = ctx->captureFlags[126];
  2692. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2693. __GLS_BEGIN_CAPTURE_EXEC(ctx, 126);
  2694. glRasterPos2d(x, y);
  2695. __GLS_END_CAPTURE_EXEC(ctx, 126);
  2696. }
  2697. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2698. writer = ctx->writer;
  2699. if (!writer->padWordCount(writer, 1)) goto end;
  2700. if (!writer->beginCommand(writer, 126, 16)) goto end;
  2701. writer->putGLdouble(writer, x);
  2702. writer->putGLdouble(writer, y);
  2703. writer->endCommand(writer);
  2704. end:
  2705. if (ctx->captureExitFunc) ctx->captureExitFunc(126);
  2706. --ctx->captureEntryCount;
  2707. }
  2708. void __gls_capture_glRasterPos2dv(const GLdouble *v) {
  2709. GLbitfield captureFlags;
  2710. __GLScontext *const ctx = __GLS_CONTEXT;
  2711. __GLSwriter *writer;
  2712. ++ctx->captureEntryCount;
  2713. if (ctx->captureEntryFunc) ctx->captureEntryFunc(127);
  2714. captureFlags = ctx->captureFlags[127];
  2715. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2716. __GLS_BEGIN_CAPTURE_EXEC(ctx, 127);
  2717. glRasterPos2dv(v);
  2718. __GLS_END_CAPTURE_EXEC(ctx, 127);
  2719. }
  2720. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2721. writer = ctx->writer;
  2722. if (!writer->padWordCount(writer, 1)) goto end;
  2723. if (!writer->beginCommand(writer, 127, 16)) goto end;
  2724. writer->putGLdoublev(writer, 2, v);
  2725. writer->endCommand(writer);
  2726. end:
  2727. if (ctx->captureExitFunc) ctx->captureExitFunc(127);
  2728. --ctx->captureEntryCount;
  2729. }
  2730. void __gls_capture_glRasterPos2f(GLfloat x, GLfloat y) {
  2731. GLbitfield captureFlags;
  2732. __GLScontext *const ctx = __GLS_CONTEXT;
  2733. __GLSwriter *writer;
  2734. ++ctx->captureEntryCount;
  2735. if (ctx->captureEntryFunc) ctx->captureEntryFunc(128);
  2736. captureFlags = ctx->captureFlags[128];
  2737. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2738. __GLS_BEGIN_CAPTURE_EXEC(ctx, 128);
  2739. glRasterPos2f(x, y);
  2740. __GLS_END_CAPTURE_EXEC(ctx, 128);
  2741. }
  2742. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2743. writer = ctx->writer;
  2744. if (!writer->beginCommand(writer, 128, 8)) goto end;
  2745. writer->putGLfloat(writer, x);
  2746. writer->putGLfloat(writer, y);
  2747. writer->endCommand(writer);
  2748. end:
  2749. if (ctx->captureExitFunc) ctx->captureExitFunc(128);
  2750. --ctx->captureEntryCount;
  2751. }
  2752. void __gls_capture_glRasterPos2fv(const GLfloat *v) {
  2753. GLbitfield captureFlags;
  2754. __GLScontext *const ctx = __GLS_CONTEXT;
  2755. __GLSwriter *writer;
  2756. ++ctx->captureEntryCount;
  2757. if (ctx->captureEntryFunc) ctx->captureEntryFunc(129);
  2758. captureFlags = ctx->captureFlags[129];
  2759. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2760. __GLS_BEGIN_CAPTURE_EXEC(ctx, 129);
  2761. glRasterPos2fv(v);
  2762. __GLS_END_CAPTURE_EXEC(ctx, 129);
  2763. }
  2764. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2765. writer = ctx->writer;
  2766. if (!writer->beginCommand(writer, 129, 8)) goto end;
  2767. writer->putGLfloatv(writer, 2, v);
  2768. writer->endCommand(writer);
  2769. end:
  2770. if (ctx->captureExitFunc) ctx->captureExitFunc(129);
  2771. --ctx->captureEntryCount;
  2772. }
  2773. void __gls_capture_glRasterPos2i(GLint x, GLint y) {
  2774. GLbitfield captureFlags;
  2775. __GLScontext *const ctx = __GLS_CONTEXT;
  2776. __GLSwriter *writer;
  2777. ++ctx->captureEntryCount;
  2778. if (ctx->captureEntryFunc) ctx->captureEntryFunc(130);
  2779. captureFlags = ctx->captureFlags[130];
  2780. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2781. __GLS_BEGIN_CAPTURE_EXEC(ctx, 130);
  2782. glRasterPos2i(x, y);
  2783. __GLS_END_CAPTURE_EXEC(ctx, 130);
  2784. }
  2785. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2786. writer = ctx->writer;
  2787. if (!writer->beginCommand(writer, 130, 8)) goto end;
  2788. writer->putGLint(writer, x);
  2789. writer->putGLint(writer, y);
  2790. writer->endCommand(writer);
  2791. end:
  2792. if (ctx->captureExitFunc) ctx->captureExitFunc(130);
  2793. --ctx->captureEntryCount;
  2794. }
  2795. void __gls_capture_glRasterPos2iv(const GLint *v) {
  2796. GLbitfield captureFlags;
  2797. __GLScontext *const ctx = __GLS_CONTEXT;
  2798. __GLSwriter *writer;
  2799. ++ctx->captureEntryCount;
  2800. if (ctx->captureEntryFunc) ctx->captureEntryFunc(131);
  2801. captureFlags = ctx->captureFlags[131];
  2802. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2803. __GLS_BEGIN_CAPTURE_EXEC(ctx, 131);
  2804. glRasterPos2iv(v);
  2805. __GLS_END_CAPTURE_EXEC(ctx, 131);
  2806. }
  2807. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2808. writer = ctx->writer;
  2809. if (!writer->beginCommand(writer, 131, 8)) goto end;
  2810. writer->putGLintv(writer, 2, v);
  2811. writer->endCommand(writer);
  2812. end:
  2813. if (ctx->captureExitFunc) ctx->captureExitFunc(131);
  2814. --ctx->captureEntryCount;
  2815. }
  2816. void __gls_capture_glRasterPos2s(GLshort x, GLshort y) {
  2817. GLbitfield captureFlags;
  2818. __GLScontext *const ctx = __GLS_CONTEXT;
  2819. __GLSwriter *writer;
  2820. ++ctx->captureEntryCount;
  2821. if (ctx->captureEntryFunc) ctx->captureEntryFunc(132);
  2822. captureFlags = ctx->captureFlags[132];
  2823. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2824. __GLS_BEGIN_CAPTURE_EXEC(ctx, 132);
  2825. glRasterPos2s(x, y);
  2826. __GLS_END_CAPTURE_EXEC(ctx, 132);
  2827. }
  2828. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2829. writer = ctx->writer;
  2830. if (!writer->beginCommand(writer, 132, 4)) goto end;
  2831. writer->putGLshort(writer, x);
  2832. writer->putGLshort(writer, y);
  2833. writer->endCommand(writer);
  2834. end:
  2835. if (ctx->captureExitFunc) ctx->captureExitFunc(132);
  2836. --ctx->captureEntryCount;
  2837. }
  2838. void __gls_capture_glRasterPos2sv(const GLshort *v) {
  2839. GLbitfield captureFlags;
  2840. __GLScontext *const ctx = __GLS_CONTEXT;
  2841. __GLSwriter *writer;
  2842. ++ctx->captureEntryCount;
  2843. if (ctx->captureEntryFunc) ctx->captureEntryFunc(133);
  2844. captureFlags = ctx->captureFlags[133];
  2845. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2846. __GLS_BEGIN_CAPTURE_EXEC(ctx, 133);
  2847. glRasterPos2sv(v);
  2848. __GLS_END_CAPTURE_EXEC(ctx, 133);
  2849. }
  2850. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2851. writer = ctx->writer;
  2852. if (!writer->beginCommand(writer, 133, 4)) goto end;
  2853. writer->putGLshortv(writer, 2, v);
  2854. writer->endCommand(writer);
  2855. end:
  2856. if (ctx->captureExitFunc) ctx->captureExitFunc(133);
  2857. --ctx->captureEntryCount;
  2858. }
  2859. void __gls_capture_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z) {
  2860. GLbitfield captureFlags;
  2861. __GLScontext *const ctx = __GLS_CONTEXT;
  2862. __GLSwriter *writer;
  2863. ++ctx->captureEntryCount;
  2864. if (ctx->captureEntryFunc) ctx->captureEntryFunc(134);
  2865. captureFlags = ctx->captureFlags[134];
  2866. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2867. __GLS_BEGIN_CAPTURE_EXEC(ctx, 134);
  2868. glRasterPos3d(x, y, z);
  2869. __GLS_END_CAPTURE_EXEC(ctx, 134);
  2870. }
  2871. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2872. writer = ctx->writer;
  2873. if (!writer->padWordCount(writer, 1)) goto end;
  2874. if (!writer->beginCommand(writer, 134, 24)) goto end;
  2875. writer->putGLdouble(writer, x);
  2876. writer->putGLdouble(writer, y);
  2877. writer->putGLdouble(writer, z);
  2878. writer->endCommand(writer);
  2879. end:
  2880. if (ctx->captureExitFunc) ctx->captureExitFunc(134);
  2881. --ctx->captureEntryCount;
  2882. }
  2883. void __gls_capture_glRasterPos3dv(const GLdouble *v) {
  2884. GLbitfield captureFlags;
  2885. __GLScontext *const ctx = __GLS_CONTEXT;
  2886. __GLSwriter *writer;
  2887. ++ctx->captureEntryCount;
  2888. if (ctx->captureEntryFunc) ctx->captureEntryFunc(135);
  2889. captureFlags = ctx->captureFlags[135];
  2890. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2891. __GLS_BEGIN_CAPTURE_EXEC(ctx, 135);
  2892. glRasterPos3dv(v);
  2893. __GLS_END_CAPTURE_EXEC(ctx, 135);
  2894. }
  2895. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2896. writer = ctx->writer;
  2897. if (!writer->padWordCount(writer, 1)) goto end;
  2898. if (!writer->beginCommand(writer, 135, 24)) goto end;
  2899. writer->putGLdoublev(writer, 3, v);
  2900. writer->endCommand(writer);
  2901. end:
  2902. if (ctx->captureExitFunc) ctx->captureExitFunc(135);
  2903. --ctx->captureEntryCount;
  2904. }
  2905. void __gls_capture_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z) {
  2906. GLbitfield captureFlags;
  2907. __GLScontext *const ctx = __GLS_CONTEXT;
  2908. __GLSwriter *writer;
  2909. ++ctx->captureEntryCount;
  2910. if (ctx->captureEntryFunc) ctx->captureEntryFunc(136);
  2911. captureFlags = ctx->captureFlags[136];
  2912. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2913. __GLS_BEGIN_CAPTURE_EXEC(ctx, 136);
  2914. glRasterPos3f(x, y, z);
  2915. __GLS_END_CAPTURE_EXEC(ctx, 136);
  2916. }
  2917. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2918. writer = ctx->writer;
  2919. if (!writer->beginCommand(writer, 136, 12)) goto end;
  2920. writer->putGLfloat(writer, x);
  2921. writer->putGLfloat(writer, y);
  2922. writer->putGLfloat(writer, z);
  2923. writer->endCommand(writer);
  2924. end:
  2925. if (ctx->captureExitFunc) ctx->captureExitFunc(136);
  2926. --ctx->captureEntryCount;
  2927. }
  2928. void __gls_capture_glRasterPos3fv(const GLfloat *v) {
  2929. GLbitfield captureFlags;
  2930. __GLScontext *const ctx = __GLS_CONTEXT;
  2931. __GLSwriter *writer;
  2932. ++ctx->captureEntryCount;
  2933. if (ctx->captureEntryFunc) ctx->captureEntryFunc(137);
  2934. captureFlags = ctx->captureFlags[137];
  2935. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2936. __GLS_BEGIN_CAPTURE_EXEC(ctx, 137);
  2937. glRasterPos3fv(v);
  2938. __GLS_END_CAPTURE_EXEC(ctx, 137);
  2939. }
  2940. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2941. writer = ctx->writer;
  2942. if (!writer->beginCommand(writer, 137, 12)) goto end;
  2943. writer->putGLfloatv(writer, 3, v);
  2944. writer->endCommand(writer);
  2945. end:
  2946. if (ctx->captureExitFunc) ctx->captureExitFunc(137);
  2947. --ctx->captureEntryCount;
  2948. }
  2949. void __gls_capture_glRasterPos3i(GLint x, GLint y, GLint z) {
  2950. GLbitfield captureFlags;
  2951. __GLScontext *const ctx = __GLS_CONTEXT;
  2952. __GLSwriter *writer;
  2953. ++ctx->captureEntryCount;
  2954. if (ctx->captureEntryFunc) ctx->captureEntryFunc(138);
  2955. captureFlags = ctx->captureFlags[138];
  2956. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2957. __GLS_BEGIN_CAPTURE_EXEC(ctx, 138);
  2958. glRasterPos3i(x, y, z);
  2959. __GLS_END_CAPTURE_EXEC(ctx, 138);
  2960. }
  2961. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2962. writer = ctx->writer;
  2963. if (!writer->beginCommand(writer, 138, 12)) goto end;
  2964. writer->putGLint(writer, x);
  2965. writer->putGLint(writer, y);
  2966. writer->putGLint(writer, z);
  2967. writer->endCommand(writer);
  2968. end:
  2969. if (ctx->captureExitFunc) ctx->captureExitFunc(138);
  2970. --ctx->captureEntryCount;
  2971. }
  2972. void __gls_capture_glRasterPos3iv(const GLint *v) {
  2973. GLbitfield captureFlags;
  2974. __GLScontext *const ctx = __GLS_CONTEXT;
  2975. __GLSwriter *writer;
  2976. ++ctx->captureEntryCount;
  2977. if (ctx->captureEntryFunc) ctx->captureEntryFunc(139);
  2978. captureFlags = ctx->captureFlags[139];
  2979. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  2980. __GLS_BEGIN_CAPTURE_EXEC(ctx, 139);
  2981. glRasterPos3iv(v);
  2982. __GLS_END_CAPTURE_EXEC(ctx, 139);
  2983. }
  2984. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  2985. writer = ctx->writer;
  2986. if (!writer->beginCommand(writer, 139, 12)) goto end;
  2987. writer->putGLintv(writer, 3, v);
  2988. writer->endCommand(writer);
  2989. end:
  2990. if (ctx->captureExitFunc) ctx->captureExitFunc(139);
  2991. --ctx->captureEntryCount;
  2992. }
  2993. void __gls_capture_glRasterPos3s(GLshort x, GLshort y, GLshort z) {
  2994. GLbitfield captureFlags;
  2995. __GLScontext *const ctx = __GLS_CONTEXT;
  2996. __GLSwriter *writer;
  2997. ++ctx->captureEntryCount;
  2998. if (ctx->captureEntryFunc) ctx->captureEntryFunc(140);
  2999. captureFlags = ctx->captureFlags[140];
  3000. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3001. __GLS_BEGIN_CAPTURE_EXEC(ctx, 140);
  3002. glRasterPos3s(x, y, z);
  3003. __GLS_END_CAPTURE_EXEC(ctx, 140);
  3004. }
  3005. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3006. writer = ctx->writer;
  3007. if (!writer->beginCommand(writer, 140, 6)) goto end;
  3008. writer->putGLshort(writer, x);
  3009. writer->putGLshort(writer, y);
  3010. writer->putGLshort(writer, z);
  3011. writer->endCommand(writer);
  3012. end:
  3013. if (ctx->captureExitFunc) ctx->captureExitFunc(140);
  3014. --ctx->captureEntryCount;
  3015. }
  3016. void __gls_capture_glRasterPos3sv(const GLshort *v) {
  3017. GLbitfield captureFlags;
  3018. __GLScontext *const ctx = __GLS_CONTEXT;
  3019. __GLSwriter *writer;
  3020. ++ctx->captureEntryCount;
  3021. if (ctx->captureEntryFunc) ctx->captureEntryFunc(141);
  3022. captureFlags = ctx->captureFlags[141];
  3023. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3024. __GLS_BEGIN_CAPTURE_EXEC(ctx, 141);
  3025. glRasterPos3sv(v);
  3026. __GLS_END_CAPTURE_EXEC(ctx, 141);
  3027. }
  3028. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3029. writer = ctx->writer;
  3030. if (!writer->beginCommand(writer, 141, 6)) goto end;
  3031. writer->putGLshortv(writer, 3, v);
  3032. writer->endCommand(writer);
  3033. end:
  3034. if (ctx->captureExitFunc) ctx->captureExitFunc(141);
  3035. --ctx->captureEntryCount;
  3036. }
  3037. void __gls_capture_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) {
  3038. GLbitfield captureFlags;
  3039. __GLScontext *const ctx = __GLS_CONTEXT;
  3040. __GLSwriter *writer;
  3041. ++ctx->captureEntryCount;
  3042. if (ctx->captureEntryFunc) ctx->captureEntryFunc(142);
  3043. captureFlags = ctx->captureFlags[142];
  3044. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3045. __GLS_BEGIN_CAPTURE_EXEC(ctx, 142);
  3046. glRasterPos4d(x, y, z, w);
  3047. __GLS_END_CAPTURE_EXEC(ctx, 142);
  3048. }
  3049. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3050. writer = ctx->writer;
  3051. if (!writer->padWordCount(writer, 1)) goto end;
  3052. if (!writer->beginCommand(writer, 142, 32)) goto end;
  3053. writer->putGLdouble(writer, x);
  3054. writer->putGLdouble(writer, y);
  3055. writer->putGLdouble(writer, z);
  3056. writer->putGLdouble(writer, w);
  3057. writer->endCommand(writer);
  3058. end:
  3059. if (ctx->captureExitFunc) ctx->captureExitFunc(142);
  3060. --ctx->captureEntryCount;
  3061. }
  3062. void __gls_capture_glRasterPos4dv(const GLdouble *v) {
  3063. GLbitfield captureFlags;
  3064. __GLScontext *const ctx = __GLS_CONTEXT;
  3065. __GLSwriter *writer;
  3066. ++ctx->captureEntryCount;
  3067. if (ctx->captureEntryFunc) ctx->captureEntryFunc(143);
  3068. captureFlags = ctx->captureFlags[143];
  3069. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3070. __GLS_BEGIN_CAPTURE_EXEC(ctx, 143);
  3071. glRasterPos4dv(v);
  3072. __GLS_END_CAPTURE_EXEC(ctx, 143);
  3073. }
  3074. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3075. writer = ctx->writer;
  3076. if (!writer->padWordCount(writer, 1)) goto end;
  3077. if (!writer->beginCommand(writer, 143, 32)) goto end;
  3078. writer->putGLdoublev(writer, 4, v);
  3079. writer->endCommand(writer);
  3080. end:
  3081. if (ctx->captureExitFunc) ctx->captureExitFunc(143);
  3082. --ctx->captureEntryCount;
  3083. }
  3084. void __gls_capture_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
  3085. GLbitfield captureFlags;
  3086. __GLScontext *const ctx = __GLS_CONTEXT;
  3087. __GLSwriter *writer;
  3088. ++ctx->captureEntryCount;
  3089. if (ctx->captureEntryFunc) ctx->captureEntryFunc(144);
  3090. captureFlags = ctx->captureFlags[144];
  3091. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3092. __GLS_BEGIN_CAPTURE_EXEC(ctx, 144);
  3093. glRasterPos4f(x, y, z, w);
  3094. __GLS_END_CAPTURE_EXEC(ctx, 144);
  3095. }
  3096. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3097. writer = ctx->writer;
  3098. if (!writer->beginCommand(writer, 144, 16)) goto end;
  3099. writer->putGLfloat(writer, x);
  3100. writer->putGLfloat(writer, y);
  3101. writer->putGLfloat(writer, z);
  3102. writer->putGLfloat(writer, w);
  3103. writer->endCommand(writer);
  3104. end:
  3105. if (ctx->captureExitFunc) ctx->captureExitFunc(144);
  3106. --ctx->captureEntryCount;
  3107. }
  3108. void __gls_capture_glRasterPos4fv(const GLfloat *v) {
  3109. GLbitfield captureFlags;
  3110. __GLScontext *const ctx = __GLS_CONTEXT;
  3111. __GLSwriter *writer;
  3112. ++ctx->captureEntryCount;
  3113. if (ctx->captureEntryFunc) ctx->captureEntryFunc(145);
  3114. captureFlags = ctx->captureFlags[145];
  3115. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3116. __GLS_BEGIN_CAPTURE_EXEC(ctx, 145);
  3117. glRasterPos4fv(v);
  3118. __GLS_END_CAPTURE_EXEC(ctx, 145);
  3119. }
  3120. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3121. writer = ctx->writer;
  3122. if (!writer->beginCommand(writer, 145, 16)) goto end;
  3123. writer->putGLfloatv(writer, 4, v);
  3124. writer->endCommand(writer);
  3125. end:
  3126. if (ctx->captureExitFunc) ctx->captureExitFunc(145);
  3127. --ctx->captureEntryCount;
  3128. }
  3129. void __gls_capture_glRasterPos4i(GLint x, GLint y, GLint z, GLint w) {
  3130. GLbitfield captureFlags;
  3131. __GLScontext *const ctx = __GLS_CONTEXT;
  3132. __GLSwriter *writer;
  3133. ++ctx->captureEntryCount;
  3134. if (ctx->captureEntryFunc) ctx->captureEntryFunc(146);
  3135. captureFlags = ctx->captureFlags[146];
  3136. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3137. __GLS_BEGIN_CAPTURE_EXEC(ctx, 146);
  3138. glRasterPos4i(x, y, z, w);
  3139. __GLS_END_CAPTURE_EXEC(ctx, 146);
  3140. }
  3141. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3142. writer = ctx->writer;
  3143. if (!writer->beginCommand(writer, 146, 16)) goto end;
  3144. writer->putGLint(writer, x);
  3145. writer->putGLint(writer, y);
  3146. writer->putGLint(writer, z);
  3147. writer->putGLint(writer, w);
  3148. writer->endCommand(writer);
  3149. end:
  3150. if (ctx->captureExitFunc) ctx->captureExitFunc(146);
  3151. --ctx->captureEntryCount;
  3152. }
  3153. void __gls_capture_glRasterPos4iv(const GLint *v) {
  3154. GLbitfield captureFlags;
  3155. __GLScontext *const ctx = __GLS_CONTEXT;
  3156. __GLSwriter *writer;
  3157. ++ctx->captureEntryCount;
  3158. if (ctx->captureEntryFunc) ctx->captureEntryFunc(147);
  3159. captureFlags = ctx->captureFlags[147];
  3160. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3161. __GLS_BEGIN_CAPTURE_EXEC(ctx, 147);
  3162. glRasterPos4iv(v);
  3163. __GLS_END_CAPTURE_EXEC(ctx, 147);
  3164. }
  3165. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3166. writer = ctx->writer;
  3167. if (!writer->beginCommand(writer, 147, 16)) goto end;
  3168. writer->putGLintv(writer, 4, v);
  3169. writer->endCommand(writer);
  3170. end:
  3171. if (ctx->captureExitFunc) ctx->captureExitFunc(147);
  3172. --ctx->captureEntryCount;
  3173. }
  3174. void __gls_capture_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) {
  3175. GLbitfield captureFlags;
  3176. __GLScontext *const ctx = __GLS_CONTEXT;
  3177. __GLSwriter *writer;
  3178. ++ctx->captureEntryCount;
  3179. if (ctx->captureEntryFunc) ctx->captureEntryFunc(148);
  3180. captureFlags = ctx->captureFlags[148];
  3181. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3182. __GLS_BEGIN_CAPTURE_EXEC(ctx, 148);
  3183. glRasterPos4s(x, y, z, w);
  3184. __GLS_END_CAPTURE_EXEC(ctx, 148);
  3185. }
  3186. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3187. writer = ctx->writer;
  3188. if (!writer->beginCommand(writer, 148, 8)) goto end;
  3189. writer->putGLshort(writer, x);
  3190. writer->putGLshort(writer, y);
  3191. writer->putGLshort(writer, z);
  3192. writer->putGLshort(writer, w);
  3193. writer->endCommand(writer);
  3194. end:
  3195. if (ctx->captureExitFunc) ctx->captureExitFunc(148);
  3196. --ctx->captureEntryCount;
  3197. }
  3198. void __gls_capture_glRasterPos4sv(const GLshort *v) {
  3199. GLbitfield captureFlags;
  3200. __GLScontext *const ctx = __GLS_CONTEXT;
  3201. __GLSwriter *writer;
  3202. ++ctx->captureEntryCount;
  3203. if (ctx->captureEntryFunc) ctx->captureEntryFunc(149);
  3204. captureFlags = ctx->captureFlags[149];
  3205. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3206. __GLS_BEGIN_CAPTURE_EXEC(ctx, 149);
  3207. glRasterPos4sv(v);
  3208. __GLS_END_CAPTURE_EXEC(ctx, 149);
  3209. }
  3210. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3211. writer = ctx->writer;
  3212. if (!writer->beginCommand(writer, 149, 8)) goto end;
  3213. writer->putGLshortv(writer, 4, v);
  3214. writer->endCommand(writer);
  3215. end:
  3216. if (ctx->captureExitFunc) ctx->captureExitFunc(149);
  3217. --ctx->captureEntryCount;
  3218. }
  3219. void __gls_capture_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) {
  3220. GLbitfield captureFlags;
  3221. __GLScontext *const ctx = __GLS_CONTEXT;
  3222. __GLSwriter *writer;
  3223. ++ctx->captureEntryCount;
  3224. if (ctx->captureEntryFunc) ctx->captureEntryFunc(150);
  3225. captureFlags = ctx->captureFlags[150];
  3226. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3227. __GLS_BEGIN_CAPTURE_EXEC(ctx, 150);
  3228. glRectd(x1, y1, x2, y2);
  3229. __GLS_END_CAPTURE_EXEC(ctx, 150);
  3230. }
  3231. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3232. writer = ctx->writer;
  3233. if (!writer->padWordCount(writer, 1)) goto end;
  3234. if (!writer->beginCommand(writer, 150, 32)) goto end;
  3235. writer->putGLdouble(writer, x1);
  3236. writer->putGLdouble(writer, y1);
  3237. writer->putGLdouble(writer, x2);
  3238. writer->putGLdouble(writer, y2);
  3239. writer->endCommand(writer);
  3240. end:
  3241. if (ctx->captureExitFunc) ctx->captureExitFunc(150);
  3242. --ctx->captureEntryCount;
  3243. }
  3244. void __gls_capture_glRectdv(const GLdouble *v1, const GLdouble *v2) {
  3245. GLbitfield captureFlags;
  3246. __GLScontext *const ctx = __GLS_CONTEXT;
  3247. __GLSwriter *writer;
  3248. ++ctx->captureEntryCount;
  3249. if (ctx->captureEntryFunc) ctx->captureEntryFunc(151);
  3250. captureFlags = ctx->captureFlags[151];
  3251. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3252. __GLS_BEGIN_CAPTURE_EXEC(ctx, 151);
  3253. glRectdv(v1, v2);
  3254. __GLS_END_CAPTURE_EXEC(ctx, 151);
  3255. }
  3256. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3257. writer = ctx->writer;
  3258. if (!writer->padWordCount(writer, 1)) goto end;
  3259. if (!writer->beginCommand(writer, 151, 32)) goto end;
  3260. writer->putGLdoublev(writer, 2, v1);
  3261. writer->putGLdoublev(writer, 2, v2);
  3262. writer->endCommand(writer);
  3263. end:
  3264. if (ctx->captureExitFunc) ctx->captureExitFunc(151);
  3265. --ctx->captureEntryCount;
  3266. }
  3267. void __gls_capture_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) {
  3268. GLbitfield captureFlags;
  3269. __GLScontext *const ctx = __GLS_CONTEXT;
  3270. __GLSwriter *writer;
  3271. ++ctx->captureEntryCount;
  3272. if (ctx->captureEntryFunc) ctx->captureEntryFunc(152);
  3273. captureFlags = ctx->captureFlags[152];
  3274. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3275. __GLS_BEGIN_CAPTURE_EXEC(ctx, 152);
  3276. glRectf(x1, y1, x2, y2);
  3277. __GLS_END_CAPTURE_EXEC(ctx, 152);
  3278. }
  3279. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3280. writer = ctx->writer;
  3281. if (!writer->beginCommand(writer, 152, 16)) goto end;
  3282. writer->putGLfloat(writer, x1);
  3283. writer->putGLfloat(writer, y1);
  3284. writer->putGLfloat(writer, x2);
  3285. writer->putGLfloat(writer, y2);
  3286. writer->endCommand(writer);
  3287. end:
  3288. if (ctx->captureExitFunc) ctx->captureExitFunc(152);
  3289. --ctx->captureEntryCount;
  3290. }
  3291. void __gls_capture_glRectfv(const GLfloat *v1, const GLfloat *v2) {
  3292. GLbitfield captureFlags;
  3293. __GLScontext *const ctx = __GLS_CONTEXT;
  3294. __GLSwriter *writer;
  3295. ++ctx->captureEntryCount;
  3296. if (ctx->captureEntryFunc) ctx->captureEntryFunc(153);
  3297. captureFlags = ctx->captureFlags[153];
  3298. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3299. __GLS_BEGIN_CAPTURE_EXEC(ctx, 153);
  3300. glRectfv(v1, v2);
  3301. __GLS_END_CAPTURE_EXEC(ctx, 153);
  3302. }
  3303. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3304. writer = ctx->writer;
  3305. if (!writer->beginCommand(writer, 153, 16)) goto end;
  3306. writer->putGLfloatv(writer, 2, v1);
  3307. writer->putGLfloatv(writer, 2, v2);
  3308. writer->endCommand(writer);
  3309. end:
  3310. if (ctx->captureExitFunc) ctx->captureExitFunc(153);
  3311. --ctx->captureEntryCount;
  3312. }
  3313. void __gls_capture_glRecti(GLint x1, GLint y1, GLint x2, GLint y2) {
  3314. GLbitfield captureFlags;
  3315. __GLScontext *const ctx = __GLS_CONTEXT;
  3316. __GLSwriter *writer;
  3317. ++ctx->captureEntryCount;
  3318. if (ctx->captureEntryFunc) ctx->captureEntryFunc(154);
  3319. captureFlags = ctx->captureFlags[154];
  3320. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3321. __GLS_BEGIN_CAPTURE_EXEC(ctx, 154);
  3322. glRecti(x1, y1, x2, y2);
  3323. __GLS_END_CAPTURE_EXEC(ctx, 154);
  3324. }
  3325. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3326. writer = ctx->writer;
  3327. if (!writer->beginCommand(writer, 154, 16)) goto end;
  3328. writer->putGLint(writer, x1);
  3329. writer->putGLint(writer, y1);
  3330. writer->putGLint(writer, x2);
  3331. writer->putGLint(writer, y2);
  3332. writer->endCommand(writer);
  3333. end:
  3334. if (ctx->captureExitFunc) ctx->captureExitFunc(154);
  3335. --ctx->captureEntryCount;
  3336. }
  3337. void __gls_capture_glRectiv(const GLint *v1, const GLint *v2) {
  3338. GLbitfield captureFlags;
  3339. __GLScontext *const ctx = __GLS_CONTEXT;
  3340. __GLSwriter *writer;
  3341. ++ctx->captureEntryCount;
  3342. if (ctx->captureEntryFunc) ctx->captureEntryFunc(155);
  3343. captureFlags = ctx->captureFlags[155];
  3344. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3345. __GLS_BEGIN_CAPTURE_EXEC(ctx, 155);
  3346. glRectiv(v1, v2);
  3347. __GLS_END_CAPTURE_EXEC(ctx, 155);
  3348. }
  3349. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3350. writer = ctx->writer;
  3351. if (!writer->beginCommand(writer, 155, 16)) goto end;
  3352. writer->putGLintv(writer, 2, v1);
  3353. writer->putGLintv(writer, 2, v2);
  3354. writer->endCommand(writer);
  3355. end:
  3356. if (ctx->captureExitFunc) ctx->captureExitFunc(155);
  3357. --ctx->captureEntryCount;
  3358. }
  3359. void __gls_capture_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) {
  3360. GLbitfield captureFlags;
  3361. __GLScontext *const ctx = __GLS_CONTEXT;
  3362. __GLSwriter *writer;
  3363. ++ctx->captureEntryCount;
  3364. if (ctx->captureEntryFunc) ctx->captureEntryFunc(156);
  3365. captureFlags = ctx->captureFlags[156];
  3366. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3367. __GLS_BEGIN_CAPTURE_EXEC(ctx, 156);
  3368. glRects(x1, y1, x2, y2);
  3369. __GLS_END_CAPTURE_EXEC(ctx, 156);
  3370. }
  3371. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3372. writer = ctx->writer;
  3373. if (!writer->beginCommand(writer, 156, 8)) goto end;
  3374. writer->putGLshort(writer, x1);
  3375. writer->putGLshort(writer, y1);
  3376. writer->putGLshort(writer, x2);
  3377. writer->putGLshort(writer, y2);
  3378. writer->endCommand(writer);
  3379. end:
  3380. if (ctx->captureExitFunc) ctx->captureExitFunc(156);
  3381. --ctx->captureEntryCount;
  3382. }
  3383. void __gls_capture_glRectsv(const GLshort *v1, const GLshort *v2) {
  3384. GLbitfield captureFlags;
  3385. __GLScontext *const ctx = __GLS_CONTEXT;
  3386. __GLSwriter *writer;
  3387. ++ctx->captureEntryCount;
  3388. if (ctx->captureEntryFunc) ctx->captureEntryFunc(157);
  3389. captureFlags = ctx->captureFlags[157];
  3390. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3391. __GLS_BEGIN_CAPTURE_EXEC(ctx, 157);
  3392. glRectsv(v1, v2);
  3393. __GLS_END_CAPTURE_EXEC(ctx, 157);
  3394. }
  3395. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3396. writer = ctx->writer;
  3397. if (!writer->beginCommand(writer, 157, 8)) goto end;
  3398. writer->putGLshortv(writer, 2, v1);
  3399. writer->putGLshortv(writer, 2, v2);
  3400. writer->endCommand(writer);
  3401. end:
  3402. if (ctx->captureExitFunc) ctx->captureExitFunc(157);
  3403. --ctx->captureEntryCount;
  3404. }
  3405. void __gls_capture_glTexCoord1d(GLdouble s) {
  3406. GLbitfield captureFlags;
  3407. __GLScontext *const ctx = __GLS_CONTEXT;
  3408. __GLSwriter *writer;
  3409. ++ctx->captureEntryCount;
  3410. if (ctx->captureEntryFunc) ctx->captureEntryFunc(158);
  3411. captureFlags = ctx->captureFlags[158];
  3412. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3413. __GLS_BEGIN_CAPTURE_EXEC(ctx, 158);
  3414. glTexCoord1d(s);
  3415. __GLS_END_CAPTURE_EXEC(ctx, 158);
  3416. }
  3417. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3418. writer = ctx->writer;
  3419. if (!writer->padWordCount(writer, 1)) goto end;
  3420. if (!writer->beginCommand(writer, 158, 8)) goto end;
  3421. writer->putGLdouble(writer, s);
  3422. writer->endCommand(writer);
  3423. end:
  3424. if (ctx->captureExitFunc) ctx->captureExitFunc(158);
  3425. --ctx->captureEntryCount;
  3426. }
  3427. void __gls_capture_glTexCoord1dv(const GLdouble *v) {
  3428. GLbitfield captureFlags;
  3429. __GLScontext *const ctx = __GLS_CONTEXT;
  3430. __GLSwriter *writer;
  3431. ++ctx->captureEntryCount;
  3432. if (ctx->captureEntryFunc) ctx->captureEntryFunc(159);
  3433. captureFlags = ctx->captureFlags[159];
  3434. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3435. __GLS_BEGIN_CAPTURE_EXEC(ctx, 159);
  3436. glTexCoord1dv(v);
  3437. __GLS_END_CAPTURE_EXEC(ctx, 159);
  3438. }
  3439. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3440. writer = ctx->writer;
  3441. if (!writer->padWordCount(writer, 1)) goto end;
  3442. if (!writer->beginCommand(writer, 159, 8)) goto end;
  3443. writer->putGLdoublev(writer, 1, v);
  3444. writer->endCommand(writer);
  3445. end:
  3446. if (ctx->captureExitFunc) ctx->captureExitFunc(159);
  3447. --ctx->captureEntryCount;
  3448. }
  3449. void __gls_capture_glTexCoord1f(GLfloat s) {
  3450. GLbitfield captureFlags;
  3451. __GLScontext *const ctx = __GLS_CONTEXT;
  3452. __GLSwriter *writer;
  3453. ++ctx->captureEntryCount;
  3454. if (ctx->captureEntryFunc) ctx->captureEntryFunc(160);
  3455. captureFlags = ctx->captureFlags[160];
  3456. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3457. __GLS_BEGIN_CAPTURE_EXEC(ctx, 160);
  3458. glTexCoord1f(s);
  3459. __GLS_END_CAPTURE_EXEC(ctx, 160);
  3460. }
  3461. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3462. writer = ctx->writer;
  3463. if (!writer->beginCommand(writer, 160, 4)) goto end;
  3464. writer->putGLfloat(writer, s);
  3465. writer->endCommand(writer);
  3466. end:
  3467. if (ctx->captureExitFunc) ctx->captureExitFunc(160);
  3468. --ctx->captureEntryCount;
  3469. }
  3470. void __gls_capture_glTexCoord1fv(const GLfloat *v) {
  3471. GLbitfield captureFlags;
  3472. __GLScontext *const ctx = __GLS_CONTEXT;
  3473. __GLSwriter *writer;
  3474. ++ctx->captureEntryCount;
  3475. if (ctx->captureEntryFunc) ctx->captureEntryFunc(161);
  3476. captureFlags = ctx->captureFlags[161];
  3477. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3478. __GLS_BEGIN_CAPTURE_EXEC(ctx, 161);
  3479. glTexCoord1fv(v);
  3480. __GLS_END_CAPTURE_EXEC(ctx, 161);
  3481. }
  3482. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3483. writer = ctx->writer;
  3484. if (!writer->beginCommand(writer, 161, 4)) goto end;
  3485. writer->putGLfloatv(writer, 1, v);
  3486. writer->endCommand(writer);
  3487. end:
  3488. if (ctx->captureExitFunc) ctx->captureExitFunc(161);
  3489. --ctx->captureEntryCount;
  3490. }
  3491. void __gls_capture_glTexCoord1i(GLint s) {
  3492. GLbitfield captureFlags;
  3493. __GLScontext *const ctx = __GLS_CONTEXT;
  3494. __GLSwriter *writer;
  3495. ++ctx->captureEntryCount;
  3496. if (ctx->captureEntryFunc) ctx->captureEntryFunc(162);
  3497. captureFlags = ctx->captureFlags[162];
  3498. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3499. __GLS_BEGIN_CAPTURE_EXEC(ctx, 162);
  3500. glTexCoord1i(s);
  3501. __GLS_END_CAPTURE_EXEC(ctx, 162);
  3502. }
  3503. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3504. writer = ctx->writer;
  3505. if (!writer->beginCommand(writer, 162, 4)) goto end;
  3506. writer->putGLint(writer, s);
  3507. writer->endCommand(writer);
  3508. end:
  3509. if (ctx->captureExitFunc) ctx->captureExitFunc(162);
  3510. --ctx->captureEntryCount;
  3511. }
  3512. void __gls_capture_glTexCoord1iv(const GLint *v) {
  3513. GLbitfield captureFlags;
  3514. __GLScontext *const ctx = __GLS_CONTEXT;
  3515. __GLSwriter *writer;
  3516. ++ctx->captureEntryCount;
  3517. if (ctx->captureEntryFunc) ctx->captureEntryFunc(163);
  3518. captureFlags = ctx->captureFlags[163];
  3519. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3520. __GLS_BEGIN_CAPTURE_EXEC(ctx, 163);
  3521. glTexCoord1iv(v);
  3522. __GLS_END_CAPTURE_EXEC(ctx, 163);
  3523. }
  3524. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3525. writer = ctx->writer;
  3526. if (!writer->beginCommand(writer, 163, 4)) goto end;
  3527. writer->putGLintv(writer, 1, v);
  3528. writer->endCommand(writer);
  3529. end:
  3530. if (ctx->captureExitFunc) ctx->captureExitFunc(163);
  3531. --ctx->captureEntryCount;
  3532. }
  3533. void __gls_capture_glTexCoord1s(GLshort s) {
  3534. GLbitfield captureFlags;
  3535. __GLScontext *const ctx = __GLS_CONTEXT;
  3536. __GLSwriter *writer;
  3537. ++ctx->captureEntryCount;
  3538. if (ctx->captureEntryFunc) ctx->captureEntryFunc(164);
  3539. captureFlags = ctx->captureFlags[164];
  3540. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3541. __GLS_BEGIN_CAPTURE_EXEC(ctx, 164);
  3542. glTexCoord1s(s);
  3543. __GLS_END_CAPTURE_EXEC(ctx, 164);
  3544. }
  3545. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3546. writer = ctx->writer;
  3547. if (!writer->beginCommand(writer, 164, 2)) goto end;
  3548. writer->putGLshort(writer, s);
  3549. writer->endCommand(writer);
  3550. end:
  3551. if (ctx->captureExitFunc) ctx->captureExitFunc(164);
  3552. --ctx->captureEntryCount;
  3553. }
  3554. void __gls_capture_glTexCoord1sv(const GLshort *v) {
  3555. GLbitfield captureFlags;
  3556. __GLScontext *const ctx = __GLS_CONTEXT;
  3557. __GLSwriter *writer;
  3558. ++ctx->captureEntryCount;
  3559. if (ctx->captureEntryFunc) ctx->captureEntryFunc(165);
  3560. captureFlags = ctx->captureFlags[165];
  3561. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3562. __GLS_BEGIN_CAPTURE_EXEC(ctx, 165);
  3563. glTexCoord1sv(v);
  3564. __GLS_END_CAPTURE_EXEC(ctx, 165);
  3565. }
  3566. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3567. writer = ctx->writer;
  3568. if (!writer->beginCommand(writer, 165, 2)) goto end;
  3569. writer->putGLshortv(writer, 1, v);
  3570. writer->endCommand(writer);
  3571. end:
  3572. if (ctx->captureExitFunc) ctx->captureExitFunc(165);
  3573. --ctx->captureEntryCount;
  3574. }
  3575. void __gls_capture_glTexCoord2d(GLdouble s, GLdouble t) {
  3576. GLbitfield captureFlags;
  3577. __GLScontext *const ctx = __GLS_CONTEXT;
  3578. __GLSwriter *writer;
  3579. ++ctx->captureEntryCount;
  3580. if (ctx->captureEntryFunc) ctx->captureEntryFunc(166);
  3581. captureFlags = ctx->captureFlags[166];
  3582. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3583. __GLS_BEGIN_CAPTURE_EXEC(ctx, 166);
  3584. glTexCoord2d(s, t);
  3585. __GLS_END_CAPTURE_EXEC(ctx, 166);
  3586. }
  3587. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3588. writer = ctx->writer;
  3589. if (!writer->padWordCount(writer, 1)) goto end;
  3590. if (!writer->beginCommand(writer, 166, 16)) goto end;
  3591. writer->putGLdouble(writer, s);
  3592. writer->putGLdouble(writer, t);
  3593. writer->endCommand(writer);
  3594. end:
  3595. if (ctx->captureExitFunc) ctx->captureExitFunc(166);
  3596. --ctx->captureEntryCount;
  3597. }
  3598. void __gls_capture_glTexCoord2dv(const GLdouble *v) {
  3599. GLbitfield captureFlags;
  3600. __GLScontext *const ctx = __GLS_CONTEXT;
  3601. __GLSwriter *writer;
  3602. ++ctx->captureEntryCount;
  3603. if (ctx->captureEntryFunc) ctx->captureEntryFunc(167);
  3604. captureFlags = ctx->captureFlags[167];
  3605. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3606. __GLS_BEGIN_CAPTURE_EXEC(ctx, 167);
  3607. glTexCoord2dv(v);
  3608. __GLS_END_CAPTURE_EXEC(ctx, 167);
  3609. }
  3610. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3611. writer = ctx->writer;
  3612. if (!writer->padWordCount(writer, 1)) goto end;
  3613. if (!writer->beginCommand(writer, 167, 16)) goto end;
  3614. writer->putGLdoublev(writer, 2, v);
  3615. writer->endCommand(writer);
  3616. end:
  3617. if (ctx->captureExitFunc) ctx->captureExitFunc(167);
  3618. --ctx->captureEntryCount;
  3619. }
  3620. void __gls_capture_glTexCoord2f(GLfloat s, GLfloat t) {
  3621. GLbitfield captureFlags;
  3622. __GLScontext *const ctx = __GLS_CONTEXT;
  3623. __GLSwriter *writer;
  3624. ++ctx->captureEntryCount;
  3625. if (ctx->captureEntryFunc) ctx->captureEntryFunc(168);
  3626. captureFlags = ctx->captureFlags[168];
  3627. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3628. __GLS_BEGIN_CAPTURE_EXEC(ctx, 168);
  3629. glTexCoord2f(s, t);
  3630. __GLS_END_CAPTURE_EXEC(ctx, 168);
  3631. }
  3632. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3633. writer = ctx->writer;
  3634. if (!writer->beginCommand(writer, 168, 8)) goto end;
  3635. writer->putGLfloat(writer, s);
  3636. writer->putGLfloat(writer, t);
  3637. writer->endCommand(writer);
  3638. end:
  3639. if (ctx->captureExitFunc) ctx->captureExitFunc(168);
  3640. --ctx->captureEntryCount;
  3641. }
  3642. void __gls_capture_glTexCoord2fv(const GLfloat *v) {
  3643. GLbitfield captureFlags;
  3644. __GLScontext *const ctx = __GLS_CONTEXT;
  3645. __GLSwriter *writer;
  3646. ++ctx->captureEntryCount;
  3647. if (ctx->captureEntryFunc) ctx->captureEntryFunc(169);
  3648. captureFlags = ctx->captureFlags[169];
  3649. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3650. __GLS_BEGIN_CAPTURE_EXEC(ctx, 169);
  3651. glTexCoord2fv(v);
  3652. __GLS_END_CAPTURE_EXEC(ctx, 169);
  3653. }
  3654. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3655. writer = ctx->writer;
  3656. if (!writer->beginCommand(writer, 169, 8)) goto end;
  3657. writer->putGLfloatv(writer, 2, v);
  3658. writer->endCommand(writer);
  3659. end:
  3660. if (ctx->captureExitFunc) ctx->captureExitFunc(169);
  3661. --ctx->captureEntryCount;
  3662. }
  3663. void __gls_capture_glTexCoord2i(GLint s, GLint t) {
  3664. GLbitfield captureFlags;
  3665. __GLScontext *const ctx = __GLS_CONTEXT;
  3666. __GLSwriter *writer;
  3667. ++ctx->captureEntryCount;
  3668. if (ctx->captureEntryFunc) ctx->captureEntryFunc(170);
  3669. captureFlags = ctx->captureFlags[170];
  3670. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3671. __GLS_BEGIN_CAPTURE_EXEC(ctx, 170);
  3672. glTexCoord2i(s, t);
  3673. __GLS_END_CAPTURE_EXEC(ctx, 170);
  3674. }
  3675. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3676. writer = ctx->writer;
  3677. if (!writer->beginCommand(writer, 170, 8)) goto end;
  3678. writer->putGLint(writer, s);
  3679. writer->putGLint(writer, t);
  3680. writer->endCommand(writer);
  3681. end:
  3682. if (ctx->captureExitFunc) ctx->captureExitFunc(170);
  3683. --ctx->captureEntryCount;
  3684. }
  3685. void __gls_capture_glTexCoord2iv(const GLint *v) {
  3686. GLbitfield captureFlags;
  3687. __GLScontext *const ctx = __GLS_CONTEXT;
  3688. __GLSwriter *writer;
  3689. ++ctx->captureEntryCount;
  3690. if (ctx->captureEntryFunc) ctx->captureEntryFunc(171);
  3691. captureFlags = ctx->captureFlags[171];
  3692. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3693. __GLS_BEGIN_CAPTURE_EXEC(ctx, 171);
  3694. glTexCoord2iv(v);
  3695. __GLS_END_CAPTURE_EXEC(ctx, 171);
  3696. }
  3697. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3698. writer = ctx->writer;
  3699. if (!writer->beginCommand(writer, 171, 8)) goto end;
  3700. writer->putGLintv(writer, 2, v);
  3701. writer->endCommand(writer);
  3702. end:
  3703. if (ctx->captureExitFunc) ctx->captureExitFunc(171);
  3704. --ctx->captureEntryCount;
  3705. }
  3706. void __gls_capture_glTexCoord2s(GLshort s, GLshort t) {
  3707. GLbitfield captureFlags;
  3708. __GLScontext *const ctx = __GLS_CONTEXT;
  3709. __GLSwriter *writer;
  3710. ++ctx->captureEntryCount;
  3711. if (ctx->captureEntryFunc) ctx->captureEntryFunc(172);
  3712. captureFlags = ctx->captureFlags[172];
  3713. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3714. __GLS_BEGIN_CAPTURE_EXEC(ctx, 172);
  3715. glTexCoord2s(s, t);
  3716. __GLS_END_CAPTURE_EXEC(ctx, 172);
  3717. }
  3718. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3719. writer = ctx->writer;
  3720. if (!writer->beginCommand(writer, 172, 4)) goto end;
  3721. writer->putGLshort(writer, s);
  3722. writer->putGLshort(writer, t);
  3723. writer->endCommand(writer);
  3724. end:
  3725. if (ctx->captureExitFunc) ctx->captureExitFunc(172);
  3726. --ctx->captureEntryCount;
  3727. }
  3728. void __gls_capture_glTexCoord2sv(const GLshort *v) {
  3729. GLbitfield captureFlags;
  3730. __GLScontext *const ctx = __GLS_CONTEXT;
  3731. __GLSwriter *writer;
  3732. ++ctx->captureEntryCount;
  3733. if (ctx->captureEntryFunc) ctx->captureEntryFunc(173);
  3734. captureFlags = ctx->captureFlags[173];
  3735. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3736. __GLS_BEGIN_CAPTURE_EXEC(ctx, 173);
  3737. glTexCoord2sv(v);
  3738. __GLS_END_CAPTURE_EXEC(ctx, 173);
  3739. }
  3740. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3741. writer = ctx->writer;
  3742. if (!writer->beginCommand(writer, 173, 4)) goto end;
  3743. writer->putGLshortv(writer, 2, v);
  3744. writer->endCommand(writer);
  3745. end:
  3746. if (ctx->captureExitFunc) ctx->captureExitFunc(173);
  3747. --ctx->captureEntryCount;
  3748. }
  3749. void __gls_capture_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r) {
  3750. GLbitfield captureFlags;
  3751. __GLScontext *const ctx = __GLS_CONTEXT;
  3752. __GLSwriter *writer;
  3753. ++ctx->captureEntryCount;
  3754. if (ctx->captureEntryFunc) ctx->captureEntryFunc(174);
  3755. captureFlags = ctx->captureFlags[174];
  3756. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3757. __GLS_BEGIN_CAPTURE_EXEC(ctx, 174);
  3758. glTexCoord3d(s, t, r);
  3759. __GLS_END_CAPTURE_EXEC(ctx, 174);
  3760. }
  3761. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3762. writer = ctx->writer;
  3763. if (!writer->padWordCount(writer, 1)) goto end;
  3764. if (!writer->beginCommand(writer, 174, 24)) goto end;
  3765. writer->putGLdouble(writer, s);
  3766. writer->putGLdouble(writer, t);
  3767. writer->putGLdouble(writer, r);
  3768. writer->endCommand(writer);
  3769. end:
  3770. if (ctx->captureExitFunc) ctx->captureExitFunc(174);
  3771. --ctx->captureEntryCount;
  3772. }
  3773. void __gls_capture_glTexCoord3dv(const GLdouble *v) {
  3774. GLbitfield captureFlags;
  3775. __GLScontext *const ctx = __GLS_CONTEXT;
  3776. __GLSwriter *writer;
  3777. ++ctx->captureEntryCount;
  3778. if (ctx->captureEntryFunc) ctx->captureEntryFunc(175);
  3779. captureFlags = ctx->captureFlags[175];
  3780. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3781. __GLS_BEGIN_CAPTURE_EXEC(ctx, 175);
  3782. glTexCoord3dv(v);
  3783. __GLS_END_CAPTURE_EXEC(ctx, 175);
  3784. }
  3785. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3786. writer = ctx->writer;
  3787. if (!writer->padWordCount(writer, 1)) goto end;
  3788. if (!writer->beginCommand(writer, 175, 24)) goto end;
  3789. writer->putGLdoublev(writer, 3, v);
  3790. writer->endCommand(writer);
  3791. end:
  3792. if (ctx->captureExitFunc) ctx->captureExitFunc(175);
  3793. --ctx->captureEntryCount;
  3794. }
  3795. void __gls_capture_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r) {
  3796. GLbitfield captureFlags;
  3797. __GLScontext *const ctx = __GLS_CONTEXT;
  3798. __GLSwriter *writer;
  3799. ++ctx->captureEntryCount;
  3800. if (ctx->captureEntryFunc) ctx->captureEntryFunc(176);
  3801. captureFlags = ctx->captureFlags[176];
  3802. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3803. __GLS_BEGIN_CAPTURE_EXEC(ctx, 176);
  3804. glTexCoord3f(s, t, r);
  3805. __GLS_END_CAPTURE_EXEC(ctx, 176);
  3806. }
  3807. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3808. writer = ctx->writer;
  3809. if (!writer->beginCommand(writer, 176, 12)) goto end;
  3810. writer->putGLfloat(writer, s);
  3811. writer->putGLfloat(writer, t);
  3812. writer->putGLfloat(writer, r);
  3813. writer->endCommand(writer);
  3814. end:
  3815. if (ctx->captureExitFunc) ctx->captureExitFunc(176);
  3816. --ctx->captureEntryCount;
  3817. }
  3818. void __gls_capture_glTexCoord3fv(const GLfloat *v) {
  3819. GLbitfield captureFlags;
  3820. __GLScontext *const ctx = __GLS_CONTEXT;
  3821. __GLSwriter *writer;
  3822. ++ctx->captureEntryCount;
  3823. if (ctx->captureEntryFunc) ctx->captureEntryFunc(177);
  3824. captureFlags = ctx->captureFlags[177];
  3825. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3826. __GLS_BEGIN_CAPTURE_EXEC(ctx, 177);
  3827. glTexCoord3fv(v);
  3828. __GLS_END_CAPTURE_EXEC(ctx, 177);
  3829. }
  3830. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3831. writer = ctx->writer;
  3832. if (!writer->beginCommand(writer, 177, 12)) goto end;
  3833. writer->putGLfloatv(writer, 3, v);
  3834. writer->endCommand(writer);
  3835. end:
  3836. if (ctx->captureExitFunc) ctx->captureExitFunc(177);
  3837. --ctx->captureEntryCount;
  3838. }
  3839. void __gls_capture_glTexCoord3i(GLint s, GLint t, GLint r) {
  3840. GLbitfield captureFlags;
  3841. __GLScontext *const ctx = __GLS_CONTEXT;
  3842. __GLSwriter *writer;
  3843. ++ctx->captureEntryCount;
  3844. if (ctx->captureEntryFunc) ctx->captureEntryFunc(178);
  3845. captureFlags = ctx->captureFlags[178];
  3846. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3847. __GLS_BEGIN_CAPTURE_EXEC(ctx, 178);
  3848. glTexCoord3i(s, t, r);
  3849. __GLS_END_CAPTURE_EXEC(ctx, 178);
  3850. }
  3851. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3852. writer = ctx->writer;
  3853. if (!writer->beginCommand(writer, 178, 12)) goto end;
  3854. writer->putGLint(writer, s);
  3855. writer->putGLint(writer, t);
  3856. writer->putGLint(writer, r);
  3857. writer->endCommand(writer);
  3858. end:
  3859. if (ctx->captureExitFunc) ctx->captureExitFunc(178);
  3860. --ctx->captureEntryCount;
  3861. }
  3862. void __gls_capture_glTexCoord3iv(const GLint *v) {
  3863. GLbitfield captureFlags;
  3864. __GLScontext *const ctx = __GLS_CONTEXT;
  3865. __GLSwriter *writer;
  3866. ++ctx->captureEntryCount;
  3867. if (ctx->captureEntryFunc) ctx->captureEntryFunc(179);
  3868. captureFlags = ctx->captureFlags[179];
  3869. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3870. __GLS_BEGIN_CAPTURE_EXEC(ctx, 179);
  3871. glTexCoord3iv(v);
  3872. __GLS_END_CAPTURE_EXEC(ctx, 179);
  3873. }
  3874. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3875. writer = ctx->writer;
  3876. if (!writer->beginCommand(writer, 179, 12)) goto end;
  3877. writer->putGLintv(writer, 3, v);
  3878. writer->endCommand(writer);
  3879. end:
  3880. if (ctx->captureExitFunc) ctx->captureExitFunc(179);
  3881. --ctx->captureEntryCount;
  3882. }
  3883. void __gls_capture_glTexCoord3s(GLshort s, GLshort t, GLshort r) {
  3884. GLbitfield captureFlags;
  3885. __GLScontext *const ctx = __GLS_CONTEXT;
  3886. __GLSwriter *writer;
  3887. ++ctx->captureEntryCount;
  3888. if (ctx->captureEntryFunc) ctx->captureEntryFunc(180);
  3889. captureFlags = ctx->captureFlags[180];
  3890. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3891. __GLS_BEGIN_CAPTURE_EXEC(ctx, 180);
  3892. glTexCoord3s(s, t, r);
  3893. __GLS_END_CAPTURE_EXEC(ctx, 180);
  3894. }
  3895. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3896. writer = ctx->writer;
  3897. if (!writer->beginCommand(writer, 180, 6)) goto end;
  3898. writer->putGLshort(writer, s);
  3899. writer->putGLshort(writer, t);
  3900. writer->putGLshort(writer, r);
  3901. writer->endCommand(writer);
  3902. end:
  3903. if (ctx->captureExitFunc) ctx->captureExitFunc(180);
  3904. --ctx->captureEntryCount;
  3905. }
  3906. void __gls_capture_glTexCoord3sv(const GLshort *v) {
  3907. GLbitfield captureFlags;
  3908. __GLScontext *const ctx = __GLS_CONTEXT;
  3909. __GLSwriter *writer;
  3910. ++ctx->captureEntryCount;
  3911. if (ctx->captureEntryFunc) ctx->captureEntryFunc(181);
  3912. captureFlags = ctx->captureFlags[181];
  3913. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3914. __GLS_BEGIN_CAPTURE_EXEC(ctx, 181);
  3915. glTexCoord3sv(v);
  3916. __GLS_END_CAPTURE_EXEC(ctx, 181);
  3917. }
  3918. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3919. writer = ctx->writer;
  3920. if (!writer->beginCommand(writer, 181, 6)) goto end;
  3921. writer->putGLshortv(writer, 3, v);
  3922. writer->endCommand(writer);
  3923. end:
  3924. if (ctx->captureExitFunc) ctx->captureExitFunc(181);
  3925. --ctx->captureEntryCount;
  3926. }
  3927. void __gls_capture_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) {
  3928. GLbitfield captureFlags;
  3929. __GLScontext *const ctx = __GLS_CONTEXT;
  3930. __GLSwriter *writer;
  3931. ++ctx->captureEntryCount;
  3932. if (ctx->captureEntryFunc) ctx->captureEntryFunc(182);
  3933. captureFlags = ctx->captureFlags[182];
  3934. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3935. __GLS_BEGIN_CAPTURE_EXEC(ctx, 182);
  3936. glTexCoord4d(s, t, r, q);
  3937. __GLS_END_CAPTURE_EXEC(ctx, 182);
  3938. }
  3939. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3940. writer = ctx->writer;
  3941. if (!writer->padWordCount(writer, 1)) goto end;
  3942. if (!writer->beginCommand(writer, 182, 32)) goto end;
  3943. writer->putGLdouble(writer, s);
  3944. writer->putGLdouble(writer, t);
  3945. writer->putGLdouble(writer, r);
  3946. writer->putGLdouble(writer, q);
  3947. writer->endCommand(writer);
  3948. end:
  3949. if (ctx->captureExitFunc) ctx->captureExitFunc(182);
  3950. --ctx->captureEntryCount;
  3951. }
  3952. void __gls_capture_glTexCoord4dv(const GLdouble *v) {
  3953. GLbitfield captureFlags;
  3954. __GLScontext *const ctx = __GLS_CONTEXT;
  3955. __GLSwriter *writer;
  3956. ++ctx->captureEntryCount;
  3957. if (ctx->captureEntryFunc) ctx->captureEntryFunc(183);
  3958. captureFlags = ctx->captureFlags[183];
  3959. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3960. __GLS_BEGIN_CAPTURE_EXEC(ctx, 183);
  3961. glTexCoord4dv(v);
  3962. __GLS_END_CAPTURE_EXEC(ctx, 183);
  3963. }
  3964. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3965. writer = ctx->writer;
  3966. if (!writer->padWordCount(writer, 1)) goto end;
  3967. if (!writer->beginCommand(writer, 183, 32)) goto end;
  3968. writer->putGLdoublev(writer, 4, v);
  3969. writer->endCommand(writer);
  3970. end:
  3971. if (ctx->captureExitFunc) ctx->captureExitFunc(183);
  3972. --ctx->captureEntryCount;
  3973. }
  3974. void __gls_capture_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
  3975. GLbitfield captureFlags;
  3976. __GLScontext *const ctx = __GLS_CONTEXT;
  3977. __GLSwriter *writer;
  3978. ++ctx->captureEntryCount;
  3979. if (ctx->captureEntryFunc) ctx->captureEntryFunc(184);
  3980. captureFlags = ctx->captureFlags[184];
  3981. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  3982. __GLS_BEGIN_CAPTURE_EXEC(ctx, 184);
  3983. glTexCoord4f(s, t, r, q);
  3984. __GLS_END_CAPTURE_EXEC(ctx, 184);
  3985. }
  3986. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  3987. writer = ctx->writer;
  3988. if (!writer->beginCommand(writer, 184, 16)) goto end;
  3989. writer->putGLfloat(writer, s);
  3990. writer->putGLfloat(writer, t);
  3991. writer->putGLfloat(writer, r);
  3992. writer->putGLfloat(writer, q);
  3993. writer->endCommand(writer);
  3994. end:
  3995. if (ctx->captureExitFunc) ctx->captureExitFunc(184);
  3996. --ctx->captureEntryCount;
  3997. }
  3998. void __gls_capture_glTexCoord4fv(const GLfloat *v) {
  3999. GLbitfield captureFlags;
  4000. __GLScontext *const ctx = __GLS_CONTEXT;
  4001. __GLSwriter *writer;
  4002. ++ctx->captureEntryCount;
  4003. if (ctx->captureEntryFunc) ctx->captureEntryFunc(185);
  4004. captureFlags = ctx->captureFlags[185];
  4005. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4006. __GLS_BEGIN_CAPTURE_EXEC(ctx, 185);
  4007. glTexCoord4fv(v);
  4008. __GLS_END_CAPTURE_EXEC(ctx, 185);
  4009. }
  4010. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4011. writer = ctx->writer;
  4012. if (!writer->beginCommand(writer, 185, 16)) goto end;
  4013. writer->putGLfloatv(writer, 4, v);
  4014. writer->endCommand(writer);
  4015. end:
  4016. if (ctx->captureExitFunc) ctx->captureExitFunc(185);
  4017. --ctx->captureEntryCount;
  4018. }
  4019. void __gls_capture_glTexCoord4i(GLint s, GLint t, GLint r, GLint q) {
  4020. GLbitfield captureFlags;
  4021. __GLScontext *const ctx = __GLS_CONTEXT;
  4022. __GLSwriter *writer;
  4023. ++ctx->captureEntryCount;
  4024. if (ctx->captureEntryFunc) ctx->captureEntryFunc(186);
  4025. captureFlags = ctx->captureFlags[186];
  4026. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4027. __GLS_BEGIN_CAPTURE_EXEC(ctx, 186);
  4028. glTexCoord4i(s, t, r, q);
  4029. __GLS_END_CAPTURE_EXEC(ctx, 186);
  4030. }
  4031. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4032. writer = ctx->writer;
  4033. if (!writer->beginCommand(writer, 186, 16)) goto end;
  4034. writer->putGLint(writer, s);
  4035. writer->putGLint(writer, t);
  4036. writer->putGLint(writer, r);
  4037. writer->putGLint(writer, q);
  4038. writer->endCommand(writer);
  4039. end:
  4040. if (ctx->captureExitFunc) ctx->captureExitFunc(186);
  4041. --ctx->captureEntryCount;
  4042. }
  4043. void __gls_capture_glTexCoord4iv(const GLint *v) {
  4044. GLbitfield captureFlags;
  4045. __GLScontext *const ctx = __GLS_CONTEXT;
  4046. __GLSwriter *writer;
  4047. ++ctx->captureEntryCount;
  4048. if (ctx->captureEntryFunc) ctx->captureEntryFunc(187);
  4049. captureFlags = ctx->captureFlags[187];
  4050. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4051. __GLS_BEGIN_CAPTURE_EXEC(ctx, 187);
  4052. glTexCoord4iv(v);
  4053. __GLS_END_CAPTURE_EXEC(ctx, 187);
  4054. }
  4055. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4056. writer = ctx->writer;
  4057. if (!writer->beginCommand(writer, 187, 16)) goto end;
  4058. writer->putGLintv(writer, 4, v);
  4059. writer->endCommand(writer);
  4060. end:
  4061. if (ctx->captureExitFunc) ctx->captureExitFunc(187);
  4062. --ctx->captureEntryCount;
  4063. }
  4064. void __gls_capture_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) {
  4065. GLbitfield captureFlags;
  4066. __GLScontext *const ctx = __GLS_CONTEXT;
  4067. __GLSwriter *writer;
  4068. ++ctx->captureEntryCount;
  4069. if (ctx->captureEntryFunc) ctx->captureEntryFunc(188);
  4070. captureFlags = ctx->captureFlags[188];
  4071. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4072. __GLS_BEGIN_CAPTURE_EXEC(ctx, 188);
  4073. glTexCoord4s(s, t, r, q);
  4074. __GLS_END_CAPTURE_EXEC(ctx, 188);
  4075. }
  4076. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4077. writer = ctx->writer;
  4078. if (!writer->beginCommand(writer, 188, 8)) goto end;
  4079. writer->putGLshort(writer, s);
  4080. writer->putGLshort(writer, t);
  4081. writer->putGLshort(writer, r);
  4082. writer->putGLshort(writer, q);
  4083. writer->endCommand(writer);
  4084. end:
  4085. if (ctx->captureExitFunc) ctx->captureExitFunc(188);
  4086. --ctx->captureEntryCount;
  4087. }
  4088. void __gls_capture_glTexCoord4sv(const GLshort *v) {
  4089. GLbitfield captureFlags;
  4090. __GLScontext *const ctx = __GLS_CONTEXT;
  4091. __GLSwriter *writer;
  4092. ++ctx->captureEntryCount;
  4093. if (ctx->captureEntryFunc) ctx->captureEntryFunc(189);
  4094. captureFlags = ctx->captureFlags[189];
  4095. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4096. __GLS_BEGIN_CAPTURE_EXEC(ctx, 189);
  4097. glTexCoord4sv(v);
  4098. __GLS_END_CAPTURE_EXEC(ctx, 189);
  4099. }
  4100. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4101. writer = ctx->writer;
  4102. if (!writer->beginCommand(writer, 189, 8)) goto end;
  4103. writer->putGLshortv(writer, 4, v);
  4104. writer->endCommand(writer);
  4105. end:
  4106. if (ctx->captureExitFunc) ctx->captureExitFunc(189);
  4107. --ctx->captureEntryCount;
  4108. }
  4109. void __gls_capture_glVertex2d(GLdouble x, GLdouble y) {
  4110. GLbitfield captureFlags;
  4111. __GLScontext *const ctx = __GLS_CONTEXT;
  4112. __GLSwriter *writer;
  4113. ++ctx->captureEntryCount;
  4114. if (ctx->captureEntryFunc) ctx->captureEntryFunc(190);
  4115. captureFlags = ctx->captureFlags[190];
  4116. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4117. __GLS_BEGIN_CAPTURE_EXEC(ctx, 190);
  4118. glVertex2d(x, y);
  4119. __GLS_END_CAPTURE_EXEC(ctx, 190);
  4120. }
  4121. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4122. writer = ctx->writer;
  4123. if (!writer->padWordCount(writer, 1)) goto end;
  4124. if (!writer->beginCommand(writer, 190, 16)) goto end;
  4125. writer->putGLdouble(writer, x);
  4126. writer->putGLdouble(writer, y);
  4127. writer->endCommand(writer);
  4128. end:
  4129. if (ctx->captureExitFunc) ctx->captureExitFunc(190);
  4130. --ctx->captureEntryCount;
  4131. }
  4132. void __gls_capture_glVertex2dv(const GLdouble *v) {
  4133. GLbitfield captureFlags;
  4134. __GLScontext *const ctx = __GLS_CONTEXT;
  4135. __GLSwriter *writer;
  4136. ++ctx->captureEntryCount;
  4137. if (ctx->captureEntryFunc) ctx->captureEntryFunc(191);
  4138. captureFlags = ctx->captureFlags[191];
  4139. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4140. __GLS_BEGIN_CAPTURE_EXEC(ctx, 191);
  4141. glVertex2dv(v);
  4142. __GLS_END_CAPTURE_EXEC(ctx, 191);
  4143. }
  4144. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4145. writer = ctx->writer;
  4146. if (!writer->padWordCount(writer, 1)) goto end;
  4147. if (!writer->beginCommand(writer, 191, 16)) goto end;
  4148. writer->putGLdoublev(writer, 2, v);
  4149. writer->endCommand(writer);
  4150. end:
  4151. if (ctx->captureExitFunc) ctx->captureExitFunc(191);
  4152. --ctx->captureEntryCount;
  4153. }
  4154. void __gls_capture_glVertex2f(GLfloat x, GLfloat y) {
  4155. GLbitfield captureFlags;
  4156. __GLScontext *const ctx = __GLS_CONTEXT;
  4157. __GLSwriter *writer;
  4158. ++ctx->captureEntryCount;
  4159. if (ctx->captureEntryFunc) ctx->captureEntryFunc(192);
  4160. captureFlags = ctx->captureFlags[192];
  4161. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4162. __GLS_BEGIN_CAPTURE_EXEC(ctx, 192);
  4163. glVertex2f(x, y);
  4164. __GLS_END_CAPTURE_EXEC(ctx, 192);
  4165. }
  4166. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4167. writer = ctx->writer;
  4168. if (!writer->beginCommand(writer, 192, 8)) goto end;
  4169. writer->putGLfloat(writer, x);
  4170. writer->putGLfloat(writer, y);
  4171. writer->endCommand(writer);
  4172. end:
  4173. if (ctx->captureExitFunc) ctx->captureExitFunc(192);
  4174. --ctx->captureEntryCount;
  4175. }
  4176. void __gls_capture_glVertex2fv(const GLfloat *v) {
  4177. GLbitfield captureFlags;
  4178. __GLScontext *const ctx = __GLS_CONTEXT;
  4179. __GLSwriter *writer;
  4180. ++ctx->captureEntryCount;
  4181. if (ctx->captureEntryFunc) ctx->captureEntryFunc(193);
  4182. captureFlags = ctx->captureFlags[193];
  4183. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4184. __GLS_BEGIN_CAPTURE_EXEC(ctx, 193);
  4185. glVertex2fv(v);
  4186. __GLS_END_CAPTURE_EXEC(ctx, 193);
  4187. }
  4188. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4189. writer = ctx->writer;
  4190. if (!writer->beginCommand(writer, 193, 8)) goto end;
  4191. writer->putGLfloatv(writer, 2, v);
  4192. writer->endCommand(writer);
  4193. end:
  4194. if (ctx->captureExitFunc) ctx->captureExitFunc(193);
  4195. --ctx->captureEntryCount;
  4196. }
  4197. void __gls_capture_glVertex2i(GLint x, GLint y) {
  4198. GLbitfield captureFlags;
  4199. __GLScontext *const ctx = __GLS_CONTEXT;
  4200. __GLSwriter *writer;
  4201. ++ctx->captureEntryCount;
  4202. if (ctx->captureEntryFunc) ctx->captureEntryFunc(194);
  4203. captureFlags = ctx->captureFlags[194];
  4204. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4205. __GLS_BEGIN_CAPTURE_EXEC(ctx, 194);
  4206. glVertex2i(x, y);
  4207. __GLS_END_CAPTURE_EXEC(ctx, 194);
  4208. }
  4209. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4210. writer = ctx->writer;
  4211. if (!writer->beginCommand(writer, 194, 8)) goto end;
  4212. writer->putGLint(writer, x);
  4213. writer->putGLint(writer, y);
  4214. writer->endCommand(writer);
  4215. end:
  4216. if (ctx->captureExitFunc) ctx->captureExitFunc(194);
  4217. --ctx->captureEntryCount;
  4218. }
  4219. void __gls_capture_glVertex2iv(const GLint *v) {
  4220. GLbitfield captureFlags;
  4221. __GLScontext *const ctx = __GLS_CONTEXT;
  4222. __GLSwriter *writer;
  4223. ++ctx->captureEntryCount;
  4224. if (ctx->captureEntryFunc) ctx->captureEntryFunc(195);
  4225. captureFlags = ctx->captureFlags[195];
  4226. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4227. __GLS_BEGIN_CAPTURE_EXEC(ctx, 195);
  4228. glVertex2iv(v);
  4229. __GLS_END_CAPTURE_EXEC(ctx, 195);
  4230. }
  4231. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4232. writer = ctx->writer;
  4233. if (!writer->beginCommand(writer, 195, 8)) goto end;
  4234. writer->putGLintv(writer, 2, v);
  4235. writer->endCommand(writer);
  4236. end:
  4237. if (ctx->captureExitFunc) ctx->captureExitFunc(195);
  4238. --ctx->captureEntryCount;
  4239. }
  4240. void __gls_capture_glVertex2s(GLshort x, GLshort y) {
  4241. GLbitfield captureFlags;
  4242. __GLScontext *const ctx = __GLS_CONTEXT;
  4243. __GLSwriter *writer;
  4244. ++ctx->captureEntryCount;
  4245. if (ctx->captureEntryFunc) ctx->captureEntryFunc(196);
  4246. captureFlags = ctx->captureFlags[196];
  4247. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4248. __GLS_BEGIN_CAPTURE_EXEC(ctx, 196);
  4249. glVertex2s(x, y);
  4250. __GLS_END_CAPTURE_EXEC(ctx, 196);
  4251. }
  4252. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4253. writer = ctx->writer;
  4254. if (!writer->beginCommand(writer, 196, 4)) goto end;
  4255. writer->putGLshort(writer, x);
  4256. writer->putGLshort(writer, y);
  4257. writer->endCommand(writer);
  4258. end:
  4259. if (ctx->captureExitFunc) ctx->captureExitFunc(196);
  4260. --ctx->captureEntryCount;
  4261. }
  4262. void __gls_capture_glVertex2sv(const GLshort *v) {
  4263. GLbitfield captureFlags;
  4264. __GLScontext *const ctx = __GLS_CONTEXT;
  4265. __GLSwriter *writer;
  4266. ++ctx->captureEntryCount;
  4267. if (ctx->captureEntryFunc) ctx->captureEntryFunc(197);
  4268. captureFlags = ctx->captureFlags[197];
  4269. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4270. __GLS_BEGIN_CAPTURE_EXEC(ctx, 197);
  4271. glVertex2sv(v);
  4272. __GLS_END_CAPTURE_EXEC(ctx, 197);
  4273. }
  4274. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4275. writer = ctx->writer;
  4276. if (!writer->beginCommand(writer, 197, 4)) goto end;
  4277. writer->putGLshortv(writer, 2, v);
  4278. writer->endCommand(writer);
  4279. end:
  4280. if (ctx->captureExitFunc) ctx->captureExitFunc(197);
  4281. --ctx->captureEntryCount;
  4282. }
  4283. void __gls_capture_glVertex3d(GLdouble x, GLdouble y, GLdouble z) {
  4284. GLbitfield captureFlags;
  4285. __GLScontext *const ctx = __GLS_CONTEXT;
  4286. __GLSwriter *writer;
  4287. ++ctx->captureEntryCount;
  4288. if (ctx->captureEntryFunc) ctx->captureEntryFunc(198);
  4289. captureFlags = ctx->captureFlags[198];
  4290. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4291. __GLS_BEGIN_CAPTURE_EXEC(ctx, 198);
  4292. glVertex3d(x, y, z);
  4293. __GLS_END_CAPTURE_EXEC(ctx, 198);
  4294. }
  4295. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4296. writer = ctx->writer;
  4297. if (!writer->padWordCount(writer, 1)) goto end;
  4298. if (!writer->beginCommand(writer, 198, 24)) goto end;
  4299. writer->putGLdouble(writer, x);
  4300. writer->putGLdouble(writer, y);
  4301. writer->putGLdouble(writer, z);
  4302. writer->endCommand(writer);
  4303. end:
  4304. if (ctx->captureExitFunc) ctx->captureExitFunc(198);
  4305. --ctx->captureEntryCount;
  4306. }
  4307. void __gls_capture_glVertex3dv(const GLdouble *v) {
  4308. GLbitfield captureFlags;
  4309. __GLScontext *const ctx = __GLS_CONTEXT;
  4310. __GLSwriter *writer;
  4311. ++ctx->captureEntryCount;
  4312. if (ctx->captureEntryFunc) ctx->captureEntryFunc(199);
  4313. captureFlags = ctx->captureFlags[199];
  4314. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4315. __GLS_BEGIN_CAPTURE_EXEC(ctx, 199);
  4316. glVertex3dv(v);
  4317. __GLS_END_CAPTURE_EXEC(ctx, 199);
  4318. }
  4319. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4320. writer = ctx->writer;
  4321. if (!writer->padWordCount(writer, 1)) goto end;
  4322. if (!writer->beginCommand(writer, 199, 24)) goto end;
  4323. writer->putGLdoublev(writer, 3, v);
  4324. writer->endCommand(writer);
  4325. end:
  4326. if (ctx->captureExitFunc) ctx->captureExitFunc(199);
  4327. --ctx->captureEntryCount;
  4328. }
  4329. void __gls_capture_glVertex3f(GLfloat x, GLfloat y, GLfloat z) {
  4330. GLbitfield captureFlags;
  4331. __GLScontext *const ctx = __GLS_CONTEXT;
  4332. __GLSwriter *writer;
  4333. ++ctx->captureEntryCount;
  4334. if (ctx->captureEntryFunc) ctx->captureEntryFunc(200);
  4335. captureFlags = ctx->captureFlags[200];
  4336. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4337. __GLS_BEGIN_CAPTURE_EXEC(ctx, 200);
  4338. glVertex3f(x, y, z);
  4339. __GLS_END_CAPTURE_EXEC(ctx, 200);
  4340. }
  4341. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4342. writer = ctx->writer;
  4343. if (!writer->beginCommand(writer, 200, 12)) goto end;
  4344. writer->putGLfloat(writer, x);
  4345. writer->putGLfloat(writer, y);
  4346. writer->putGLfloat(writer, z);
  4347. writer->endCommand(writer);
  4348. end:
  4349. if (ctx->captureExitFunc) ctx->captureExitFunc(200);
  4350. --ctx->captureEntryCount;
  4351. }
  4352. void __gls_capture_glVertex3fv(const GLfloat *v) {
  4353. GLbitfield captureFlags;
  4354. __GLScontext *const ctx = __GLS_CONTEXT;
  4355. __GLSwriter *writer;
  4356. ++ctx->captureEntryCount;
  4357. if (ctx->captureEntryFunc) ctx->captureEntryFunc(201);
  4358. captureFlags = ctx->captureFlags[201];
  4359. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4360. __GLS_BEGIN_CAPTURE_EXEC(ctx, 201);
  4361. glVertex3fv(v);
  4362. __GLS_END_CAPTURE_EXEC(ctx, 201);
  4363. }
  4364. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4365. writer = ctx->writer;
  4366. if (!writer->beginCommand(writer, 201, 12)) goto end;
  4367. writer->putGLfloatv(writer, 3, v);
  4368. writer->endCommand(writer);
  4369. end:
  4370. if (ctx->captureExitFunc) ctx->captureExitFunc(201);
  4371. --ctx->captureEntryCount;
  4372. }
  4373. void __gls_capture_glVertex3i(GLint x, GLint y, GLint z) {
  4374. GLbitfield captureFlags;
  4375. __GLScontext *const ctx = __GLS_CONTEXT;
  4376. __GLSwriter *writer;
  4377. ++ctx->captureEntryCount;
  4378. if (ctx->captureEntryFunc) ctx->captureEntryFunc(202);
  4379. captureFlags = ctx->captureFlags[202];
  4380. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4381. __GLS_BEGIN_CAPTURE_EXEC(ctx, 202);
  4382. glVertex3i(x, y, z);
  4383. __GLS_END_CAPTURE_EXEC(ctx, 202);
  4384. }
  4385. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4386. writer = ctx->writer;
  4387. if (!writer->beginCommand(writer, 202, 12)) goto end;
  4388. writer->putGLint(writer, x);
  4389. writer->putGLint(writer, y);
  4390. writer->putGLint(writer, z);
  4391. writer->endCommand(writer);
  4392. end:
  4393. if (ctx->captureExitFunc) ctx->captureExitFunc(202);
  4394. --ctx->captureEntryCount;
  4395. }
  4396. void __gls_capture_glVertex3iv(const GLint *v) {
  4397. GLbitfield captureFlags;
  4398. __GLScontext *const ctx = __GLS_CONTEXT;
  4399. __GLSwriter *writer;
  4400. ++ctx->captureEntryCount;
  4401. if (ctx->captureEntryFunc) ctx->captureEntryFunc(203);
  4402. captureFlags = ctx->captureFlags[203];
  4403. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4404. __GLS_BEGIN_CAPTURE_EXEC(ctx, 203);
  4405. glVertex3iv(v);
  4406. __GLS_END_CAPTURE_EXEC(ctx, 203);
  4407. }
  4408. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4409. writer = ctx->writer;
  4410. if (!writer->beginCommand(writer, 203, 12)) goto end;
  4411. writer->putGLintv(writer, 3, v);
  4412. writer->endCommand(writer);
  4413. end:
  4414. if (ctx->captureExitFunc) ctx->captureExitFunc(203);
  4415. --ctx->captureEntryCount;
  4416. }
  4417. void __gls_capture_glVertex3s(GLshort x, GLshort y, GLshort z) {
  4418. GLbitfield captureFlags;
  4419. __GLScontext *const ctx = __GLS_CONTEXT;
  4420. __GLSwriter *writer;
  4421. ++ctx->captureEntryCount;
  4422. if (ctx->captureEntryFunc) ctx->captureEntryFunc(204);
  4423. captureFlags = ctx->captureFlags[204];
  4424. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4425. __GLS_BEGIN_CAPTURE_EXEC(ctx, 204);
  4426. glVertex3s(x, y, z);
  4427. __GLS_END_CAPTURE_EXEC(ctx, 204);
  4428. }
  4429. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4430. writer = ctx->writer;
  4431. if (!writer->beginCommand(writer, 204, 6)) goto end;
  4432. writer->putGLshort(writer, x);
  4433. writer->putGLshort(writer, y);
  4434. writer->putGLshort(writer, z);
  4435. writer->endCommand(writer);
  4436. end:
  4437. if (ctx->captureExitFunc) ctx->captureExitFunc(204);
  4438. --ctx->captureEntryCount;
  4439. }
  4440. void __gls_capture_glVertex3sv(const GLshort *v) {
  4441. GLbitfield captureFlags;
  4442. __GLScontext *const ctx = __GLS_CONTEXT;
  4443. __GLSwriter *writer;
  4444. ++ctx->captureEntryCount;
  4445. if (ctx->captureEntryFunc) ctx->captureEntryFunc(205);
  4446. captureFlags = ctx->captureFlags[205];
  4447. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4448. __GLS_BEGIN_CAPTURE_EXEC(ctx, 205);
  4449. glVertex3sv(v);
  4450. __GLS_END_CAPTURE_EXEC(ctx, 205);
  4451. }
  4452. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4453. writer = ctx->writer;
  4454. if (!writer->beginCommand(writer, 205, 6)) goto end;
  4455. writer->putGLshortv(writer, 3, v);
  4456. writer->endCommand(writer);
  4457. end:
  4458. if (ctx->captureExitFunc) ctx->captureExitFunc(205);
  4459. --ctx->captureEntryCount;
  4460. }
  4461. void __gls_capture_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) {
  4462. GLbitfield captureFlags;
  4463. __GLScontext *const ctx = __GLS_CONTEXT;
  4464. __GLSwriter *writer;
  4465. ++ctx->captureEntryCount;
  4466. if (ctx->captureEntryFunc) ctx->captureEntryFunc(206);
  4467. captureFlags = ctx->captureFlags[206];
  4468. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4469. __GLS_BEGIN_CAPTURE_EXEC(ctx, 206);
  4470. glVertex4d(x, y, z, w);
  4471. __GLS_END_CAPTURE_EXEC(ctx, 206);
  4472. }
  4473. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4474. writer = ctx->writer;
  4475. if (!writer->padWordCount(writer, 1)) goto end;
  4476. if (!writer->beginCommand(writer, 206, 32)) goto end;
  4477. writer->putGLdouble(writer, x);
  4478. writer->putGLdouble(writer, y);
  4479. writer->putGLdouble(writer, z);
  4480. writer->putGLdouble(writer, w);
  4481. writer->endCommand(writer);
  4482. end:
  4483. if (ctx->captureExitFunc) ctx->captureExitFunc(206);
  4484. --ctx->captureEntryCount;
  4485. }
  4486. void __gls_capture_glVertex4dv(const GLdouble *v) {
  4487. GLbitfield captureFlags;
  4488. __GLScontext *const ctx = __GLS_CONTEXT;
  4489. __GLSwriter *writer;
  4490. ++ctx->captureEntryCount;
  4491. if (ctx->captureEntryFunc) ctx->captureEntryFunc(207);
  4492. captureFlags = ctx->captureFlags[207];
  4493. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4494. __GLS_BEGIN_CAPTURE_EXEC(ctx, 207);
  4495. glVertex4dv(v);
  4496. __GLS_END_CAPTURE_EXEC(ctx, 207);
  4497. }
  4498. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4499. writer = ctx->writer;
  4500. if (!writer->padWordCount(writer, 1)) goto end;
  4501. if (!writer->beginCommand(writer, 207, 32)) goto end;
  4502. writer->putGLdoublev(writer, 4, v);
  4503. writer->endCommand(writer);
  4504. end:
  4505. if (ctx->captureExitFunc) ctx->captureExitFunc(207);
  4506. --ctx->captureEntryCount;
  4507. }
  4508. void __gls_capture_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
  4509. GLbitfield captureFlags;
  4510. __GLScontext *const ctx = __GLS_CONTEXT;
  4511. __GLSwriter *writer;
  4512. ++ctx->captureEntryCount;
  4513. if (ctx->captureEntryFunc) ctx->captureEntryFunc(208);
  4514. captureFlags = ctx->captureFlags[208];
  4515. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4516. __GLS_BEGIN_CAPTURE_EXEC(ctx, 208);
  4517. glVertex4f(x, y, z, w);
  4518. __GLS_END_CAPTURE_EXEC(ctx, 208);
  4519. }
  4520. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4521. writer = ctx->writer;
  4522. if (!writer->beginCommand(writer, 208, 16)) goto end;
  4523. writer->putGLfloat(writer, x);
  4524. writer->putGLfloat(writer, y);
  4525. writer->putGLfloat(writer, z);
  4526. writer->putGLfloat(writer, w);
  4527. writer->endCommand(writer);
  4528. end:
  4529. if (ctx->captureExitFunc) ctx->captureExitFunc(208);
  4530. --ctx->captureEntryCount;
  4531. }
  4532. void __gls_capture_glVertex4fv(const GLfloat *v) {
  4533. GLbitfield captureFlags;
  4534. __GLScontext *const ctx = __GLS_CONTEXT;
  4535. __GLSwriter *writer;
  4536. ++ctx->captureEntryCount;
  4537. if (ctx->captureEntryFunc) ctx->captureEntryFunc(209);
  4538. captureFlags = ctx->captureFlags[209];
  4539. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4540. __GLS_BEGIN_CAPTURE_EXEC(ctx, 209);
  4541. glVertex4fv(v);
  4542. __GLS_END_CAPTURE_EXEC(ctx, 209);
  4543. }
  4544. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4545. writer = ctx->writer;
  4546. if (!writer->beginCommand(writer, 209, 16)) goto end;
  4547. writer->putGLfloatv(writer, 4, v);
  4548. writer->endCommand(writer);
  4549. end:
  4550. if (ctx->captureExitFunc) ctx->captureExitFunc(209);
  4551. --ctx->captureEntryCount;
  4552. }
  4553. void __gls_capture_glVertex4i(GLint x, GLint y, GLint z, GLint w) {
  4554. GLbitfield captureFlags;
  4555. __GLScontext *const ctx = __GLS_CONTEXT;
  4556. __GLSwriter *writer;
  4557. ++ctx->captureEntryCount;
  4558. if (ctx->captureEntryFunc) ctx->captureEntryFunc(210);
  4559. captureFlags = ctx->captureFlags[210];
  4560. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4561. __GLS_BEGIN_CAPTURE_EXEC(ctx, 210);
  4562. glVertex4i(x, y, z, w);
  4563. __GLS_END_CAPTURE_EXEC(ctx, 210);
  4564. }
  4565. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4566. writer = ctx->writer;
  4567. if (!writer->beginCommand(writer, 210, 16)) goto end;
  4568. writer->putGLint(writer, x);
  4569. writer->putGLint(writer, y);
  4570. writer->putGLint(writer, z);
  4571. writer->putGLint(writer, w);
  4572. writer->endCommand(writer);
  4573. end:
  4574. if (ctx->captureExitFunc) ctx->captureExitFunc(210);
  4575. --ctx->captureEntryCount;
  4576. }
  4577. void __gls_capture_glVertex4iv(const GLint *v) {
  4578. GLbitfield captureFlags;
  4579. __GLScontext *const ctx = __GLS_CONTEXT;
  4580. __GLSwriter *writer;
  4581. ++ctx->captureEntryCount;
  4582. if (ctx->captureEntryFunc) ctx->captureEntryFunc(211);
  4583. captureFlags = ctx->captureFlags[211];
  4584. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4585. __GLS_BEGIN_CAPTURE_EXEC(ctx, 211);
  4586. glVertex4iv(v);
  4587. __GLS_END_CAPTURE_EXEC(ctx, 211);
  4588. }
  4589. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4590. writer = ctx->writer;
  4591. if (!writer->beginCommand(writer, 211, 16)) goto end;
  4592. writer->putGLintv(writer, 4, v);
  4593. writer->endCommand(writer);
  4594. end:
  4595. if (ctx->captureExitFunc) ctx->captureExitFunc(211);
  4596. --ctx->captureEntryCount;
  4597. }
  4598. void __gls_capture_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w) {
  4599. GLbitfield captureFlags;
  4600. __GLScontext *const ctx = __GLS_CONTEXT;
  4601. __GLSwriter *writer;
  4602. ++ctx->captureEntryCount;
  4603. if (ctx->captureEntryFunc) ctx->captureEntryFunc(212);
  4604. captureFlags = ctx->captureFlags[212];
  4605. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4606. __GLS_BEGIN_CAPTURE_EXEC(ctx, 212);
  4607. glVertex4s(x, y, z, w);
  4608. __GLS_END_CAPTURE_EXEC(ctx, 212);
  4609. }
  4610. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4611. writer = ctx->writer;
  4612. if (!writer->beginCommand(writer, 212, 8)) goto end;
  4613. writer->putGLshort(writer, x);
  4614. writer->putGLshort(writer, y);
  4615. writer->putGLshort(writer, z);
  4616. writer->putGLshort(writer, w);
  4617. writer->endCommand(writer);
  4618. end:
  4619. if (ctx->captureExitFunc) ctx->captureExitFunc(212);
  4620. --ctx->captureEntryCount;
  4621. }
  4622. void __gls_capture_glVertex4sv(const GLshort *v) {
  4623. GLbitfield captureFlags;
  4624. __GLScontext *const ctx = __GLS_CONTEXT;
  4625. __GLSwriter *writer;
  4626. ++ctx->captureEntryCount;
  4627. if (ctx->captureEntryFunc) ctx->captureEntryFunc(213);
  4628. captureFlags = ctx->captureFlags[213];
  4629. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4630. __GLS_BEGIN_CAPTURE_EXEC(ctx, 213);
  4631. glVertex4sv(v);
  4632. __GLS_END_CAPTURE_EXEC(ctx, 213);
  4633. }
  4634. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4635. writer = ctx->writer;
  4636. if (!writer->beginCommand(writer, 213, 8)) goto end;
  4637. writer->putGLshortv(writer, 4, v);
  4638. writer->endCommand(writer);
  4639. end:
  4640. if (ctx->captureExitFunc) ctx->captureExitFunc(213);
  4641. --ctx->captureEntryCount;
  4642. }
  4643. void __gls_capture_glClipPlane(GLenum plane, const GLdouble *equation) {
  4644. GLbitfield captureFlags;
  4645. __GLScontext *const ctx = __GLS_CONTEXT;
  4646. __GLSwriter *writer;
  4647. ++ctx->captureEntryCount;
  4648. if (ctx->captureEntryFunc) ctx->captureEntryFunc(214);
  4649. captureFlags = ctx->captureFlags[214];
  4650. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4651. __GLS_BEGIN_CAPTURE_EXEC(ctx, 214);
  4652. glClipPlane(plane, equation);
  4653. __GLS_END_CAPTURE_EXEC(ctx, 214);
  4654. }
  4655. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4656. writer = ctx->writer;
  4657. if (!writer->padWordCount(writer, 1)) goto end;
  4658. if (!writer->beginCommand(writer, 214, 36)) goto end;
  4659. if (writer->type == GLS_TEXT) {
  4660. writer->putGLenum(writer, plane);
  4661. writer->putGLdoublev(writer, 4, equation);
  4662. } else {
  4663. writer->putGLdoublev(writer, 4, equation);
  4664. writer->putGLenum(writer, plane);
  4665. }
  4666. writer->endCommand(writer);
  4667. end:
  4668. if (ctx->captureExitFunc) ctx->captureExitFunc(214);
  4669. --ctx->captureEntryCount;
  4670. }
  4671. void __gls_capture_glColorMaterial(GLenum face, GLenum mode) {
  4672. GLbitfield captureFlags;
  4673. __GLScontext *const ctx = __GLS_CONTEXT;
  4674. __GLSwriter *writer;
  4675. ++ctx->captureEntryCount;
  4676. if (ctx->captureEntryFunc) ctx->captureEntryFunc(215);
  4677. captureFlags = ctx->captureFlags[215];
  4678. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4679. __GLS_BEGIN_CAPTURE_EXEC(ctx, 215);
  4680. glColorMaterial(face, mode);
  4681. __GLS_END_CAPTURE_EXEC(ctx, 215);
  4682. }
  4683. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4684. writer = ctx->writer;
  4685. if (!writer->beginCommand(writer, 215, 8)) goto end;
  4686. writer->putGLenum(writer, face);
  4687. writer->putGLenum(writer, mode);
  4688. writer->endCommand(writer);
  4689. end:
  4690. if (ctx->captureExitFunc) ctx->captureExitFunc(215);
  4691. --ctx->captureEntryCount;
  4692. }
  4693. void __gls_capture_glCullFace(GLenum mode) {
  4694. GLbitfield captureFlags;
  4695. __GLScontext *const ctx = __GLS_CONTEXT;
  4696. __GLSwriter *writer;
  4697. ++ctx->captureEntryCount;
  4698. if (ctx->captureEntryFunc) ctx->captureEntryFunc(216);
  4699. captureFlags = ctx->captureFlags[216];
  4700. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4701. __GLS_BEGIN_CAPTURE_EXEC(ctx, 216);
  4702. glCullFace(mode);
  4703. __GLS_END_CAPTURE_EXEC(ctx, 216);
  4704. }
  4705. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4706. writer = ctx->writer;
  4707. if (!writer->beginCommand(writer, 216, 4)) goto end;
  4708. writer->putGLenum(writer, mode);
  4709. writer->endCommand(writer);
  4710. end:
  4711. if (ctx->captureExitFunc) ctx->captureExitFunc(216);
  4712. --ctx->captureEntryCount;
  4713. }
  4714. void __gls_capture_glFogf(GLenum pname, GLfloat param) {
  4715. GLbitfield captureFlags;
  4716. __GLScontext *const ctx = __GLS_CONTEXT;
  4717. __GLSwriter *writer;
  4718. ++ctx->captureEntryCount;
  4719. if (ctx->captureEntryFunc) ctx->captureEntryFunc(217);
  4720. captureFlags = ctx->captureFlags[217];
  4721. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4722. __GLS_BEGIN_CAPTURE_EXEC(ctx, 217);
  4723. glFogf(pname, param);
  4724. __GLS_END_CAPTURE_EXEC(ctx, 217);
  4725. }
  4726. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4727. writer = ctx->writer;
  4728. if (!writer->beginCommand(writer, 217, 8)) goto end;
  4729. writer->putGLenum(writer, pname);
  4730. writer->putGLfloatOrGLenum(writer, pname, param);
  4731. writer->endCommand(writer);
  4732. end:
  4733. if (ctx->captureExitFunc) ctx->captureExitFunc(217);
  4734. --ctx->captureEntryCount;
  4735. }
  4736. void __gls_capture_glFogfv(GLenum pname, const GLfloat *params) {
  4737. GLbitfield captureFlags;
  4738. __GLScontext *const ctx = __GLS_CONTEXT;
  4739. __GLSwriter *writer;
  4740. GLint params_count;
  4741. ++ctx->captureEntryCount;
  4742. if (ctx->captureEntryFunc) ctx->captureEntryFunc(218);
  4743. captureFlags = ctx->captureFlags[218];
  4744. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4745. __GLS_BEGIN_CAPTURE_EXEC(ctx, 218);
  4746. glFogfv(pname, params);
  4747. __GLS_END_CAPTURE_EXEC(ctx, 218);
  4748. }
  4749. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4750. writer = ctx->writer;
  4751. params_count = __gls_glFogfv_params_size(pname);
  4752. if (!writer->beginCommand(writer, 218, 4 + params_count * 4)) goto end;
  4753. writer->putGLenum(writer, pname);
  4754. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  4755. writer->endCommand(writer);
  4756. end:
  4757. if (ctx->captureExitFunc) ctx->captureExitFunc(218);
  4758. --ctx->captureEntryCount;
  4759. }
  4760. void __gls_capture_glFogi(GLenum pname, GLint param) {
  4761. GLbitfield captureFlags;
  4762. __GLScontext *const ctx = __GLS_CONTEXT;
  4763. __GLSwriter *writer;
  4764. ++ctx->captureEntryCount;
  4765. if (ctx->captureEntryFunc) ctx->captureEntryFunc(219);
  4766. captureFlags = ctx->captureFlags[219];
  4767. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4768. __GLS_BEGIN_CAPTURE_EXEC(ctx, 219);
  4769. glFogi(pname, param);
  4770. __GLS_END_CAPTURE_EXEC(ctx, 219);
  4771. }
  4772. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4773. writer = ctx->writer;
  4774. if (!writer->beginCommand(writer, 219, 8)) goto end;
  4775. writer->putGLenum(writer, pname);
  4776. writer->putGLintOrGLenum(writer, pname, param);
  4777. writer->endCommand(writer);
  4778. end:
  4779. if (ctx->captureExitFunc) ctx->captureExitFunc(219);
  4780. --ctx->captureEntryCount;
  4781. }
  4782. void __gls_capture_glFogiv(GLenum pname, const GLint *params) {
  4783. GLbitfield captureFlags;
  4784. __GLScontext *const ctx = __GLS_CONTEXT;
  4785. __GLSwriter *writer;
  4786. GLint params_count;
  4787. ++ctx->captureEntryCount;
  4788. if (ctx->captureEntryFunc) ctx->captureEntryFunc(220);
  4789. captureFlags = ctx->captureFlags[220];
  4790. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4791. __GLS_BEGIN_CAPTURE_EXEC(ctx, 220);
  4792. glFogiv(pname, params);
  4793. __GLS_END_CAPTURE_EXEC(ctx, 220);
  4794. }
  4795. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4796. writer = ctx->writer;
  4797. params_count = __gls_glFogiv_params_size(pname);
  4798. if (!writer->beginCommand(writer, 220, 4 + params_count * 4)) goto end;
  4799. writer->putGLenum(writer, pname);
  4800. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  4801. writer->endCommand(writer);
  4802. end:
  4803. if (ctx->captureExitFunc) ctx->captureExitFunc(220);
  4804. --ctx->captureEntryCount;
  4805. }
  4806. void __gls_capture_glFrontFace(GLenum mode) {
  4807. GLbitfield captureFlags;
  4808. __GLScontext *const ctx = __GLS_CONTEXT;
  4809. __GLSwriter *writer;
  4810. ++ctx->captureEntryCount;
  4811. if (ctx->captureEntryFunc) ctx->captureEntryFunc(221);
  4812. captureFlags = ctx->captureFlags[221];
  4813. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4814. __GLS_BEGIN_CAPTURE_EXEC(ctx, 221);
  4815. glFrontFace(mode);
  4816. __GLS_END_CAPTURE_EXEC(ctx, 221);
  4817. }
  4818. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4819. writer = ctx->writer;
  4820. if (!writer->beginCommand(writer, 221, 4)) goto end;
  4821. writer->putGLenum(writer, mode);
  4822. writer->endCommand(writer);
  4823. end:
  4824. if (ctx->captureExitFunc) ctx->captureExitFunc(221);
  4825. --ctx->captureEntryCount;
  4826. }
  4827. void __gls_capture_glHint(GLenum target, GLenum mode) {
  4828. GLbitfield captureFlags;
  4829. __GLScontext *const ctx = __GLS_CONTEXT;
  4830. __GLSwriter *writer;
  4831. ++ctx->captureEntryCount;
  4832. if (ctx->captureEntryFunc) ctx->captureEntryFunc(222);
  4833. captureFlags = ctx->captureFlags[222];
  4834. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4835. __GLS_BEGIN_CAPTURE_EXEC(ctx, 222);
  4836. glHint(target, mode);
  4837. __GLS_END_CAPTURE_EXEC(ctx, 222);
  4838. }
  4839. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4840. writer = ctx->writer;
  4841. if (!writer->beginCommand(writer, 222, 8)) goto end;
  4842. writer->putGLenum(writer, target);
  4843. writer->putGLenum(writer, mode);
  4844. writer->endCommand(writer);
  4845. end:
  4846. if (ctx->captureExitFunc) ctx->captureExitFunc(222);
  4847. --ctx->captureEntryCount;
  4848. }
  4849. void __gls_capture_glLightf(GLenum light, GLenum pname, GLfloat param) {
  4850. GLbitfield captureFlags;
  4851. __GLScontext *const ctx = __GLS_CONTEXT;
  4852. __GLSwriter *writer;
  4853. ++ctx->captureEntryCount;
  4854. if (ctx->captureEntryFunc) ctx->captureEntryFunc(223);
  4855. captureFlags = ctx->captureFlags[223];
  4856. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4857. __GLS_BEGIN_CAPTURE_EXEC(ctx, 223);
  4858. glLightf(light, pname, param);
  4859. __GLS_END_CAPTURE_EXEC(ctx, 223);
  4860. }
  4861. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4862. writer = ctx->writer;
  4863. if (!writer->beginCommand(writer, 223, 12)) goto end;
  4864. writer->putGLenum(writer, light);
  4865. writer->putGLenum(writer, pname);
  4866. writer->putGLfloat(writer, param);
  4867. writer->endCommand(writer);
  4868. end:
  4869. if (ctx->captureExitFunc) ctx->captureExitFunc(223);
  4870. --ctx->captureEntryCount;
  4871. }
  4872. void __gls_capture_glLightfv(GLenum light, GLenum pname, const GLfloat *params) {
  4873. GLbitfield captureFlags;
  4874. __GLScontext *const ctx = __GLS_CONTEXT;
  4875. __GLSwriter *writer;
  4876. GLint params_count;
  4877. ++ctx->captureEntryCount;
  4878. if (ctx->captureEntryFunc) ctx->captureEntryFunc(224);
  4879. captureFlags = ctx->captureFlags[224];
  4880. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4881. __GLS_BEGIN_CAPTURE_EXEC(ctx, 224);
  4882. glLightfv(light, pname, params);
  4883. __GLS_END_CAPTURE_EXEC(ctx, 224);
  4884. }
  4885. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4886. writer = ctx->writer;
  4887. params_count = __gls_glLightfv_params_size(pname);
  4888. if (!writer->beginCommand(writer, 224, 8 + params_count * 4)) goto end;
  4889. if (writer->type == GLS_TEXT) {
  4890. writer->putGLenum(writer, light);
  4891. writer->putGLenum(writer, pname);
  4892. writer->putGLfloatv(writer, params_count, params);
  4893. } else {
  4894. writer->putGLenum(writer, pname);
  4895. writer->putGLenum(writer, light);
  4896. writer->putGLfloatv(writer, params_count, params);
  4897. }
  4898. writer->endCommand(writer);
  4899. end:
  4900. if (ctx->captureExitFunc) ctx->captureExitFunc(224);
  4901. --ctx->captureEntryCount;
  4902. }
  4903. void __gls_capture_glLighti(GLenum light, GLenum pname, GLint param) {
  4904. GLbitfield captureFlags;
  4905. __GLScontext *const ctx = __GLS_CONTEXT;
  4906. __GLSwriter *writer;
  4907. ++ctx->captureEntryCount;
  4908. if (ctx->captureEntryFunc) ctx->captureEntryFunc(225);
  4909. captureFlags = ctx->captureFlags[225];
  4910. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4911. __GLS_BEGIN_CAPTURE_EXEC(ctx, 225);
  4912. glLighti(light, pname, param);
  4913. __GLS_END_CAPTURE_EXEC(ctx, 225);
  4914. }
  4915. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4916. writer = ctx->writer;
  4917. if (!writer->beginCommand(writer, 225, 12)) goto end;
  4918. writer->putGLenum(writer, light);
  4919. writer->putGLenum(writer, pname);
  4920. writer->putGLint(writer, param);
  4921. writer->endCommand(writer);
  4922. end:
  4923. if (ctx->captureExitFunc) ctx->captureExitFunc(225);
  4924. --ctx->captureEntryCount;
  4925. }
  4926. void __gls_capture_glLightiv(GLenum light, GLenum pname, const GLint *params) {
  4927. GLbitfield captureFlags;
  4928. __GLScontext *const ctx = __GLS_CONTEXT;
  4929. __GLSwriter *writer;
  4930. GLint params_count;
  4931. ++ctx->captureEntryCount;
  4932. if (ctx->captureEntryFunc) ctx->captureEntryFunc(226);
  4933. captureFlags = ctx->captureFlags[226];
  4934. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4935. __GLS_BEGIN_CAPTURE_EXEC(ctx, 226);
  4936. glLightiv(light, pname, params);
  4937. __GLS_END_CAPTURE_EXEC(ctx, 226);
  4938. }
  4939. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4940. writer = ctx->writer;
  4941. params_count = __gls_glLightiv_params_size(pname);
  4942. if (!writer->beginCommand(writer, 226, 8 + params_count * 4)) goto end;
  4943. if (writer->type == GLS_TEXT) {
  4944. writer->putGLenum(writer, light);
  4945. writer->putGLenum(writer, pname);
  4946. writer->putGLintv(writer, params_count, params);
  4947. } else {
  4948. writer->putGLenum(writer, pname);
  4949. writer->putGLenum(writer, light);
  4950. writer->putGLintv(writer, params_count, params);
  4951. }
  4952. writer->endCommand(writer);
  4953. end:
  4954. if (ctx->captureExitFunc) ctx->captureExitFunc(226);
  4955. --ctx->captureEntryCount;
  4956. }
  4957. void __gls_capture_glLightModelf(GLenum pname, GLfloat param) {
  4958. GLbitfield captureFlags;
  4959. __GLScontext *const ctx = __GLS_CONTEXT;
  4960. __GLSwriter *writer;
  4961. ++ctx->captureEntryCount;
  4962. if (ctx->captureEntryFunc) ctx->captureEntryFunc(227);
  4963. captureFlags = ctx->captureFlags[227];
  4964. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4965. __GLS_BEGIN_CAPTURE_EXEC(ctx, 227);
  4966. glLightModelf(pname, param);
  4967. __GLS_END_CAPTURE_EXEC(ctx, 227);
  4968. }
  4969. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4970. writer = ctx->writer;
  4971. if (!writer->beginCommand(writer, 227, 8)) goto end;
  4972. writer->putGLenum(writer, pname);
  4973. writer->putGLfloatOrGLenum(writer, pname, param);
  4974. writer->endCommand(writer);
  4975. end:
  4976. if (ctx->captureExitFunc) ctx->captureExitFunc(227);
  4977. --ctx->captureEntryCount;
  4978. }
  4979. void __gls_capture_glLightModelfv(GLenum pname, const GLfloat *params) {
  4980. GLbitfield captureFlags;
  4981. __GLScontext *const ctx = __GLS_CONTEXT;
  4982. __GLSwriter *writer;
  4983. GLint params_count;
  4984. ++ctx->captureEntryCount;
  4985. if (ctx->captureEntryFunc) ctx->captureEntryFunc(228);
  4986. captureFlags = ctx->captureFlags[228];
  4987. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  4988. __GLS_BEGIN_CAPTURE_EXEC(ctx, 228);
  4989. glLightModelfv(pname, params);
  4990. __GLS_END_CAPTURE_EXEC(ctx, 228);
  4991. }
  4992. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  4993. writer = ctx->writer;
  4994. params_count = __gls_glLightModelfv_params_size(pname);
  4995. if (!writer->beginCommand(writer, 228, 4 + params_count * 4)) goto end;
  4996. writer->putGLenum(writer, pname);
  4997. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  4998. writer->endCommand(writer);
  4999. end:
  5000. if (ctx->captureExitFunc) ctx->captureExitFunc(228);
  5001. --ctx->captureEntryCount;
  5002. }
  5003. void __gls_capture_glLightModeli(GLenum pname, GLint param) {
  5004. GLbitfield captureFlags;
  5005. __GLScontext *const ctx = __GLS_CONTEXT;
  5006. __GLSwriter *writer;
  5007. ++ctx->captureEntryCount;
  5008. if (ctx->captureEntryFunc) ctx->captureEntryFunc(229);
  5009. captureFlags = ctx->captureFlags[229];
  5010. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5011. __GLS_BEGIN_CAPTURE_EXEC(ctx, 229);
  5012. glLightModeli(pname, param);
  5013. __GLS_END_CAPTURE_EXEC(ctx, 229);
  5014. }
  5015. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5016. writer = ctx->writer;
  5017. if (!writer->beginCommand(writer, 229, 8)) goto end;
  5018. writer->putGLenum(writer, pname);
  5019. writer->putGLintOrGLenum(writer, pname, param);
  5020. writer->endCommand(writer);
  5021. end:
  5022. if (ctx->captureExitFunc) ctx->captureExitFunc(229);
  5023. --ctx->captureEntryCount;
  5024. }
  5025. void __gls_capture_glLightModeliv(GLenum pname, const GLint *params) {
  5026. GLbitfield captureFlags;
  5027. __GLScontext *const ctx = __GLS_CONTEXT;
  5028. __GLSwriter *writer;
  5029. GLint params_count;
  5030. ++ctx->captureEntryCount;
  5031. if (ctx->captureEntryFunc) ctx->captureEntryFunc(230);
  5032. captureFlags = ctx->captureFlags[230];
  5033. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5034. __GLS_BEGIN_CAPTURE_EXEC(ctx, 230);
  5035. glLightModeliv(pname, params);
  5036. __GLS_END_CAPTURE_EXEC(ctx, 230);
  5037. }
  5038. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5039. writer = ctx->writer;
  5040. params_count = __gls_glLightModeliv_params_size(pname);
  5041. if (!writer->beginCommand(writer, 230, 4 + params_count * 4)) goto end;
  5042. writer->putGLenum(writer, pname);
  5043. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  5044. writer->endCommand(writer);
  5045. end:
  5046. if (ctx->captureExitFunc) ctx->captureExitFunc(230);
  5047. --ctx->captureEntryCount;
  5048. }
  5049. void __gls_capture_glLineStipple(GLint factor, GLushort pattern) {
  5050. GLbitfield captureFlags;
  5051. __GLScontext *const ctx = __GLS_CONTEXT;
  5052. __GLSwriter *writer;
  5053. ++ctx->captureEntryCount;
  5054. if (ctx->captureEntryFunc) ctx->captureEntryFunc(231);
  5055. captureFlags = ctx->captureFlags[231];
  5056. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5057. __GLS_BEGIN_CAPTURE_EXEC(ctx, 231);
  5058. glLineStipple(factor, pattern);
  5059. __GLS_END_CAPTURE_EXEC(ctx, 231);
  5060. }
  5061. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5062. writer = ctx->writer;
  5063. if (!writer->beginCommand(writer, 231, 8)) goto end;
  5064. writer->putGLint(writer, factor);
  5065. writer->putGLushorthex(writer, pattern);
  5066. writer->endCommand(writer);
  5067. end:
  5068. if (ctx->captureExitFunc) ctx->captureExitFunc(231);
  5069. --ctx->captureEntryCount;
  5070. }
  5071. void __gls_capture_glLineWidth(GLfloat width) {
  5072. GLbitfield captureFlags;
  5073. __GLScontext *const ctx = __GLS_CONTEXT;
  5074. __GLSwriter *writer;
  5075. ++ctx->captureEntryCount;
  5076. if (ctx->captureEntryFunc) ctx->captureEntryFunc(232);
  5077. captureFlags = ctx->captureFlags[232];
  5078. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5079. __GLS_BEGIN_CAPTURE_EXEC(ctx, 232);
  5080. glLineWidth(width);
  5081. __GLS_END_CAPTURE_EXEC(ctx, 232);
  5082. }
  5083. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5084. writer = ctx->writer;
  5085. if (!writer->beginCommand(writer, 232, 4)) goto end;
  5086. writer->putGLfloat(writer, width);
  5087. writer->endCommand(writer);
  5088. end:
  5089. if (ctx->captureExitFunc) ctx->captureExitFunc(232);
  5090. --ctx->captureEntryCount;
  5091. }
  5092. void __gls_capture_glMaterialf(GLenum face, GLenum pname, GLfloat param) {
  5093. GLbitfield captureFlags;
  5094. __GLScontext *const ctx = __GLS_CONTEXT;
  5095. __GLSwriter *writer;
  5096. ++ctx->captureEntryCount;
  5097. if (ctx->captureEntryFunc) ctx->captureEntryFunc(233);
  5098. captureFlags = ctx->captureFlags[233];
  5099. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5100. __GLS_BEGIN_CAPTURE_EXEC(ctx, 233);
  5101. glMaterialf(face, pname, param);
  5102. __GLS_END_CAPTURE_EXEC(ctx, 233);
  5103. }
  5104. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5105. writer = ctx->writer;
  5106. if (!writer->beginCommand(writer, 233, 12)) goto end;
  5107. writer->putGLenum(writer, face);
  5108. writer->putGLenum(writer, pname);
  5109. writer->putGLfloat(writer, param);
  5110. writer->endCommand(writer);
  5111. end:
  5112. if (ctx->captureExitFunc) ctx->captureExitFunc(233);
  5113. --ctx->captureEntryCount;
  5114. }
  5115. void __gls_capture_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
  5116. GLbitfield captureFlags;
  5117. __GLScontext *const ctx = __GLS_CONTEXT;
  5118. __GLSwriter *writer;
  5119. GLint params_count;
  5120. ++ctx->captureEntryCount;
  5121. if (ctx->captureEntryFunc) ctx->captureEntryFunc(234);
  5122. captureFlags = ctx->captureFlags[234];
  5123. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5124. __GLS_BEGIN_CAPTURE_EXEC(ctx, 234);
  5125. glMaterialfv(face, pname, params);
  5126. __GLS_END_CAPTURE_EXEC(ctx, 234);
  5127. }
  5128. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5129. writer = ctx->writer;
  5130. params_count = __gls_glMaterialfv_params_size(pname);
  5131. if (!writer->beginCommand(writer, 234, 8 + params_count * 4)) goto end;
  5132. if (writer->type == GLS_TEXT) {
  5133. writer->putGLenum(writer, face);
  5134. writer->putGLenum(writer, pname);
  5135. writer->putGLfloatv(writer, params_count, params);
  5136. } else {
  5137. writer->putGLenum(writer, pname);
  5138. writer->putGLenum(writer, face);
  5139. writer->putGLfloatv(writer, params_count, params);
  5140. }
  5141. writer->endCommand(writer);
  5142. end:
  5143. if (ctx->captureExitFunc) ctx->captureExitFunc(234);
  5144. --ctx->captureEntryCount;
  5145. }
  5146. void __gls_capture_glMateriali(GLenum face, GLenum pname, GLint param) {
  5147. GLbitfield captureFlags;
  5148. __GLScontext *const ctx = __GLS_CONTEXT;
  5149. __GLSwriter *writer;
  5150. ++ctx->captureEntryCount;
  5151. if (ctx->captureEntryFunc) ctx->captureEntryFunc(235);
  5152. captureFlags = ctx->captureFlags[235];
  5153. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5154. __GLS_BEGIN_CAPTURE_EXEC(ctx, 235);
  5155. glMateriali(face, pname, param);
  5156. __GLS_END_CAPTURE_EXEC(ctx, 235);
  5157. }
  5158. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5159. writer = ctx->writer;
  5160. if (!writer->beginCommand(writer, 235, 12)) goto end;
  5161. writer->putGLenum(writer, face);
  5162. writer->putGLenum(writer, pname);
  5163. writer->putGLint(writer, param);
  5164. writer->endCommand(writer);
  5165. end:
  5166. if (ctx->captureExitFunc) ctx->captureExitFunc(235);
  5167. --ctx->captureEntryCount;
  5168. }
  5169. void __gls_capture_glMaterialiv(GLenum face, GLenum pname, const GLint *params) {
  5170. GLbitfield captureFlags;
  5171. __GLScontext *const ctx = __GLS_CONTEXT;
  5172. __GLSwriter *writer;
  5173. GLint params_count;
  5174. ++ctx->captureEntryCount;
  5175. if (ctx->captureEntryFunc) ctx->captureEntryFunc(236);
  5176. captureFlags = ctx->captureFlags[236];
  5177. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5178. __GLS_BEGIN_CAPTURE_EXEC(ctx, 236);
  5179. glMaterialiv(face, pname, params);
  5180. __GLS_END_CAPTURE_EXEC(ctx, 236);
  5181. }
  5182. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5183. writer = ctx->writer;
  5184. params_count = __gls_glMaterialiv_params_size(pname);
  5185. if (!writer->beginCommand(writer, 236, 8 + params_count * 4)) goto end;
  5186. if (writer->type == GLS_TEXT) {
  5187. writer->putGLenum(writer, face);
  5188. writer->putGLenum(writer, pname);
  5189. writer->putGLintv(writer, params_count, params);
  5190. } else {
  5191. writer->putGLenum(writer, pname);
  5192. writer->putGLenum(writer, face);
  5193. writer->putGLintv(writer, params_count, params);
  5194. }
  5195. writer->endCommand(writer);
  5196. end:
  5197. if (ctx->captureExitFunc) ctx->captureExitFunc(236);
  5198. --ctx->captureEntryCount;
  5199. }
  5200. void __gls_capture_glPointSize(GLfloat size) {
  5201. GLbitfield captureFlags;
  5202. __GLScontext *const ctx = __GLS_CONTEXT;
  5203. __GLSwriter *writer;
  5204. ++ctx->captureEntryCount;
  5205. if (ctx->captureEntryFunc) ctx->captureEntryFunc(237);
  5206. captureFlags = ctx->captureFlags[237];
  5207. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5208. __GLS_BEGIN_CAPTURE_EXEC(ctx, 237);
  5209. glPointSize(size);
  5210. __GLS_END_CAPTURE_EXEC(ctx, 237);
  5211. }
  5212. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5213. writer = ctx->writer;
  5214. if (!writer->beginCommand(writer, 237, 4)) goto end;
  5215. writer->putGLfloat(writer, size);
  5216. writer->endCommand(writer);
  5217. end:
  5218. if (ctx->captureExitFunc) ctx->captureExitFunc(237);
  5219. --ctx->captureEntryCount;
  5220. }
  5221. void __gls_capture_glPolygonMode(GLenum face, GLenum mode) {
  5222. GLbitfield captureFlags;
  5223. __GLScontext *const ctx = __GLS_CONTEXT;
  5224. __GLSwriter *writer;
  5225. ++ctx->captureEntryCount;
  5226. if (ctx->captureEntryFunc) ctx->captureEntryFunc(238);
  5227. captureFlags = ctx->captureFlags[238];
  5228. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5229. __GLS_BEGIN_CAPTURE_EXEC(ctx, 238);
  5230. glPolygonMode(face, mode);
  5231. __GLS_END_CAPTURE_EXEC(ctx, 238);
  5232. }
  5233. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5234. writer = ctx->writer;
  5235. if (!writer->beginCommand(writer, 238, 8)) goto end;
  5236. writer->putGLenum(writer, face);
  5237. writer->putGLenum(writer, mode);
  5238. writer->endCommand(writer);
  5239. end:
  5240. if (ctx->captureExitFunc) ctx->captureExitFunc(238);
  5241. --ctx->captureEntryCount;
  5242. }
  5243. void __gls_capture_glPolygonStipple(const GLubyte *mask) {
  5244. GLbitfield captureFlags;
  5245. __GLScontext *const ctx = __GLS_CONTEXT;
  5246. __GLSwriter *writer;
  5247. GLint mask_count;
  5248. ++ctx->captureEntryCount;
  5249. if (ctx->captureEntryFunc) ctx->captureEntryFunc(239);
  5250. captureFlags = ctx->captureFlags[239];
  5251. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5252. __GLS_BEGIN_CAPTURE_EXEC(ctx, 239);
  5253. glPolygonStipple(mask);
  5254. __GLS_END_CAPTURE_EXEC(ctx, 239);
  5255. }
  5256. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5257. writer = ctx->writer;
  5258. mask_count = __gls_glPolygonStipple_mask_size();
  5259. if (!writer->beginCommand(writer, 239, 4 + mask_count * 1)) goto end;
  5260. writer->putGLSimageFlags(writer, GLS_NONE);
  5261. writer->nextList(writer);
  5262. __glsWriter_putPixelv(writer, GL_COLOR_INDEX, GL_BITMAP, 32, 32, mask_count ? mask : GLS_NONE);
  5263. writer->endCommand(writer);
  5264. end:
  5265. if (ctx->captureExitFunc) ctx->captureExitFunc(239);
  5266. --ctx->captureEntryCount;
  5267. }
  5268. void __gls_capture_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
  5269. GLbitfield captureFlags;
  5270. __GLScontext *const ctx = __GLS_CONTEXT;
  5271. __GLSwriter *writer;
  5272. ++ctx->captureEntryCount;
  5273. if (ctx->captureEntryFunc) ctx->captureEntryFunc(240);
  5274. captureFlags = ctx->captureFlags[240];
  5275. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5276. __GLS_BEGIN_CAPTURE_EXEC(ctx, 240);
  5277. glScissor(x, y, width, height);
  5278. __GLS_END_CAPTURE_EXEC(ctx, 240);
  5279. }
  5280. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5281. writer = ctx->writer;
  5282. if (!writer->beginCommand(writer, 240, 16)) goto end;
  5283. writer->putGLint(writer, x);
  5284. writer->putGLint(writer, y);
  5285. writer->putGLint(writer, width);
  5286. writer->putGLint(writer, height);
  5287. writer->endCommand(writer);
  5288. end:
  5289. if (ctx->captureExitFunc) ctx->captureExitFunc(240);
  5290. --ctx->captureEntryCount;
  5291. }
  5292. void __gls_capture_glShadeModel(GLenum mode) {
  5293. GLbitfield captureFlags;
  5294. __GLScontext *const ctx = __GLS_CONTEXT;
  5295. __GLSwriter *writer;
  5296. ++ctx->captureEntryCount;
  5297. if (ctx->captureEntryFunc) ctx->captureEntryFunc(241);
  5298. captureFlags = ctx->captureFlags[241];
  5299. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5300. __GLS_BEGIN_CAPTURE_EXEC(ctx, 241);
  5301. glShadeModel(mode);
  5302. __GLS_END_CAPTURE_EXEC(ctx, 241);
  5303. }
  5304. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5305. writer = ctx->writer;
  5306. if (!writer->beginCommand(writer, 241, 4)) goto end;
  5307. writer->putGLenum(writer, mode);
  5308. writer->endCommand(writer);
  5309. end:
  5310. if (ctx->captureExitFunc) ctx->captureExitFunc(241);
  5311. --ctx->captureEntryCount;
  5312. }
  5313. void __gls_capture_glTexParameterf(GLenum target, GLenum pname, GLfloat param) {
  5314. GLbitfield captureFlags;
  5315. __GLScontext *const ctx = __GLS_CONTEXT;
  5316. __GLSwriter *writer;
  5317. ++ctx->captureEntryCount;
  5318. if (ctx->captureEntryFunc) ctx->captureEntryFunc(242);
  5319. captureFlags = ctx->captureFlags[242];
  5320. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5321. __GLS_BEGIN_CAPTURE_EXEC(ctx, 242);
  5322. glTexParameterf(target, pname, param);
  5323. __GLS_END_CAPTURE_EXEC(ctx, 242);
  5324. }
  5325. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5326. writer = ctx->writer;
  5327. if (!writer->beginCommand(writer, 242, 12)) goto end;
  5328. writer->putGLenum(writer, target);
  5329. writer->putGLenum(writer, pname);
  5330. writer->putGLfloatOrGLenum(writer, pname, param);
  5331. writer->endCommand(writer);
  5332. end:
  5333. if (ctx->captureExitFunc) ctx->captureExitFunc(242);
  5334. --ctx->captureEntryCount;
  5335. }
  5336. void __gls_capture_glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) {
  5337. GLbitfield captureFlags;
  5338. __GLScontext *const ctx = __GLS_CONTEXT;
  5339. __GLSwriter *writer;
  5340. GLint params_count;
  5341. ++ctx->captureEntryCount;
  5342. if (ctx->captureEntryFunc) ctx->captureEntryFunc(243);
  5343. captureFlags = ctx->captureFlags[243];
  5344. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5345. __GLS_BEGIN_CAPTURE_EXEC(ctx, 243);
  5346. glTexParameterfv(target, pname, params);
  5347. __GLS_END_CAPTURE_EXEC(ctx, 243);
  5348. }
  5349. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5350. writer = ctx->writer;
  5351. params_count = __gls_glTexParameterfv_params_size(pname);
  5352. if (!writer->beginCommand(writer, 243, 8 + params_count * 4)) goto end;
  5353. if (writer->type == GLS_TEXT) {
  5354. writer->putGLenum(writer, target);
  5355. writer->putGLenum(writer, pname);
  5356. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  5357. } else {
  5358. writer->putGLenum(writer, pname);
  5359. writer->putGLenum(writer, target);
  5360. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  5361. }
  5362. writer->endCommand(writer);
  5363. end:
  5364. if (ctx->captureExitFunc) ctx->captureExitFunc(243);
  5365. --ctx->captureEntryCount;
  5366. }
  5367. void __gls_capture_glTexParameteri(GLenum target, GLenum pname, GLint param) {
  5368. GLbitfield captureFlags;
  5369. __GLScontext *const ctx = __GLS_CONTEXT;
  5370. __GLSwriter *writer;
  5371. ++ctx->captureEntryCount;
  5372. if (ctx->captureEntryFunc) ctx->captureEntryFunc(244);
  5373. captureFlags = ctx->captureFlags[244];
  5374. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5375. __GLS_BEGIN_CAPTURE_EXEC(ctx, 244);
  5376. glTexParameteri(target, pname, param);
  5377. __GLS_END_CAPTURE_EXEC(ctx, 244);
  5378. }
  5379. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5380. writer = ctx->writer;
  5381. if (!writer->beginCommand(writer, 244, 12)) goto end;
  5382. writer->putGLenum(writer, target);
  5383. writer->putGLenum(writer, pname);
  5384. writer->putGLintOrGLenum(writer, pname, param);
  5385. writer->endCommand(writer);
  5386. end:
  5387. if (ctx->captureExitFunc) ctx->captureExitFunc(244);
  5388. --ctx->captureEntryCount;
  5389. }
  5390. void __gls_capture_glTexParameteriv(GLenum target, GLenum pname, const GLint *params) {
  5391. GLbitfield captureFlags;
  5392. __GLScontext *const ctx = __GLS_CONTEXT;
  5393. __GLSwriter *writer;
  5394. GLint params_count;
  5395. ++ctx->captureEntryCount;
  5396. if (ctx->captureEntryFunc) ctx->captureEntryFunc(245);
  5397. captureFlags = ctx->captureFlags[245];
  5398. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5399. __GLS_BEGIN_CAPTURE_EXEC(ctx, 245);
  5400. glTexParameteriv(target, pname, params);
  5401. __GLS_END_CAPTURE_EXEC(ctx, 245);
  5402. }
  5403. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5404. writer = ctx->writer;
  5405. params_count = __gls_glTexParameteriv_params_size(pname);
  5406. if (!writer->beginCommand(writer, 245, 8 + params_count * 4)) goto end;
  5407. if (writer->type == GLS_TEXT) {
  5408. writer->putGLenum(writer, target);
  5409. writer->putGLenum(writer, pname);
  5410. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  5411. } else {
  5412. writer->putGLenum(writer, pname);
  5413. writer->putGLenum(writer, target);
  5414. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  5415. }
  5416. writer->endCommand(writer);
  5417. end:
  5418. if (ctx->captureExitFunc) ctx->captureExitFunc(245);
  5419. --ctx->captureEntryCount;
  5420. }
  5421. void __gls_capture_glTexImage1D(GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) {
  5422. GLbitfield captureFlags;
  5423. __GLScontext *const ctx = __GLS_CONTEXT;
  5424. __GLSwriter *writer;
  5425. GLint pixels_count;
  5426. ++ctx->captureEntryCount;
  5427. if (ctx->captureEntryFunc) ctx->captureEntryFunc(246);
  5428. captureFlags = ctx->captureFlags[246];
  5429. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5430. __GLS_BEGIN_CAPTURE_EXEC(ctx, 246);
  5431. glTexImage1D(target, level, components, width, border, format, type, pixels);
  5432. __GLS_END_CAPTURE_EXEC(ctx, 246);
  5433. }
  5434. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5435. writer = ctx->writer;
  5436. pixels_count = pixels ? __gls_glTexImage1D_pixels_size(format, type, width) : 0;
  5437. if (!writer->beginCommand(writer, 246, 32 + pixels_count * 1)) goto end;
  5438. writer->putGLSimageFlags(writer, pixels ? GLS_NONE : GLS_IMAGE_NULL_BIT);
  5439. writer->nextList(writer);
  5440. if (writer->type == GLS_TEXT) {
  5441. writer->putGLenum(writer, target);
  5442. writer->putGLint(writer, level);
  5443. writer->putGLtextureComponentCount(writer, components);
  5444. writer->putGLint(writer, width);
  5445. writer->putGLint(writer, border);
  5446. writer->putGLenum(writer, format);
  5447. writer->putGLenum(writer, type);
  5448. __glsWriter_putPixelv(writer, format, type, width, 1, pixels_count ? pixels : GLS_NONE);
  5449. } else {
  5450. writer->putGLint(writer, width);
  5451. writer->putGLenum(writer, format);
  5452. writer->putGLenum(writer, type);
  5453. writer->putGLenum(writer, target);
  5454. writer->putGLint(writer, level);
  5455. writer->putGLtextureComponentCount(writer, components);
  5456. writer->putGLint(writer, border);
  5457. __glsWriter_putPixelv(writer, format, type, width, 1, pixels_count ? pixels : GLS_NONE);
  5458. }
  5459. writer->endCommand(writer);
  5460. end:
  5461. if (ctx->captureExitFunc) ctx->captureExitFunc(246);
  5462. --ctx->captureEntryCount;
  5463. }
  5464. void __gls_capture_glTexImage2D(GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) {
  5465. GLbitfield captureFlags;
  5466. __GLScontext *const ctx = __GLS_CONTEXT;
  5467. __GLSwriter *writer;
  5468. GLint pixels_count;
  5469. ++ctx->captureEntryCount;
  5470. if (ctx->captureEntryFunc) ctx->captureEntryFunc(247);
  5471. captureFlags = ctx->captureFlags[247];
  5472. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5473. __GLS_BEGIN_CAPTURE_EXEC(ctx, 247);
  5474. glTexImage2D(target, level, components, width, height, border, format, type, pixels);
  5475. __GLS_END_CAPTURE_EXEC(ctx, 247);
  5476. }
  5477. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5478. writer = ctx->writer;
  5479. pixels_count = pixels ? __gls_glTexImage2D_pixels_size(format, type, width, height) : 0;
  5480. if (!writer->beginCommand(writer, 247, 36 + pixels_count * 1)) goto end;
  5481. writer->putGLSimageFlags(writer, pixels ? GLS_NONE : GLS_IMAGE_NULL_BIT);
  5482. writer->nextList(writer);
  5483. if (writer->type == GLS_TEXT) {
  5484. writer->putGLenum(writer, target);
  5485. writer->putGLint(writer, level);
  5486. writer->putGLtextureComponentCount(writer, components);
  5487. writer->putGLint(writer, width);
  5488. writer->putGLint(writer, height);
  5489. writer->putGLint(writer, border);
  5490. writer->putGLenum(writer, format);
  5491. writer->putGLenum(writer, type);
  5492. __glsWriter_putPixelv(writer, format, type, width, height, pixels_count ? pixels : GLS_NONE);
  5493. } else {
  5494. writer->putGLint(writer, width);
  5495. writer->putGLint(writer, height);
  5496. writer->putGLenum(writer, format);
  5497. writer->putGLenum(writer, type);
  5498. writer->putGLenum(writer, target);
  5499. writer->putGLint(writer, level);
  5500. writer->putGLtextureComponentCount(writer, components);
  5501. writer->putGLint(writer, border);
  5502. __glsWriter_putPixelv(writer, format, type, width, height, pixels_count ? pixels : GLS_NONE);
  5503. }
  5504. writer->endCommand(writer);
  5505. end:
  5506. if (ctx->captureExitFunc) ctx->captureExitFunc(247);
  5507. --ctx->captureEntryCount;
  5508. }
  5509. void __gls_capture_glTexEnvf(GLenum target, GLenum pname, GLfloat param) {
  5510. GLbitfield captureFlags;
  5511. __GLScontext *const ctx = __GLS_CONTEXT;
  5512. __GLSwriter *writer;
  5513. ++ctx->captureEntryCount;
  5514. if (ctx->captureEntryFunc) ctx->captureEntryFunc(248);
  5515. captureFlags = ctx->captureFlags[248];
  5516. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5517. __GLS_BEGIN_CAPTURE_EXEC(ctx, 248);
  5518. glTexEnvf(target, pname, param);
  5519. __GLS_END_CAPTURE_EXEC(ctx, 248);
  5520. }
  5521. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5522. writer = ctx->writer;
  5523. if (!writer->beginCommand(writer, 248, 12)) goto end;
  5524. writer->putGLenum(writer, target);
  5525. writer->putGLenum(writer, pname);
  5526. writer->putGLfloatOrGLenum(writer, pname, param);
  5527. writer->endCommand(writer);
  5528. end:
  5529. if (ctx->captureExitFunc) ctx->captureExitFunc(248);
  5530. --ctx->captureEntryCount;
  5531. }
  5532. void __gls_capture_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) {
  5533. GLbitfield captureFlags;
  5534. __GLScontext *const ctx = __GLS_CONTEXT;
  5535. __GLSwriter *writer;
  5536. GLint params_count;
  5537. ++ctx->captureEntryCount;
  5538. if (ctx->captureEntryFunc) ctx->captureEntryFunc(249);
  5539. captureFlags = ctx->captureFlags[249];
  5540. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5541. __GLS_BEGIN_CAPTURE_EXEC(ctx, 249);
  5542. glTexEnvfv(target, pname, params);
  5543. __GLS_END_CAPTURE_EXEC(ctx, 249);
  5544. }
  5545. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5546. writer = ctx->writer;
  5547. params_count = __gls_glTexEnvfv_params_size(pname);
  5548. if (!writer->beginCommand(writer, 249, 8 + params_count * 4)) goto end;
  5549. if (writer->type == GLS_TEXT) {
  5550. writer->putGLenum(writer, target);
  5551. writer->putGLenum(writer, pname);
  5552. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  5553. } else {
  5554. writer->putGLenum(writer, pname);
  5555. writer->putGLenum(writer, target);
  5556. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  5557. }
  5558. writer->endCommand(writer);
  5559. end:
  5560. if (ctx->captureExitFunc) ctx->captureExitFunc(249);
  5561. --ctx->captureEntryCount;
  5562. }
  5563. void __gls_capture_glTexEnvi(GLenum target, GLenum pname, GLint param) {
  5564. GLbitfield captureFlags;
  5565. __GLScontext *const ctx = __GLS_CONTEXT;
  5566. __GLSwriter *writer;
  5567. ++ctx->captureEntryCount;
  5568. if (ctx->captureEntryFunc) ctx->captureEntryFunc(250);
  5569. captureFlags = ctx->captureFlags[250];
  5570. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5571. __GLS_BEGIN_CAPTURE_EXEC(ctx, 250);
  5572. glTexEnvi(target, pname, param);
  5573. __GLS_END_CAPTURE_EXEC(ctx, 250);
  5574. }
  5575. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5576. writer = ctx->writer;
  5577. if (!writer->beginCommand(writer, 250, 12)) goto end;
  5578. writer->putGLenum(writer, target);
  5579. writer->putGLenum(writer, pname);
  5580. writer->putGLintOrGLenum(writer, pname, param);
  5581. writer->endCommand(writer);
  5582. end:
  5583. if (ctx->captureExitFunc) ctx->captureExitFunc(250);
  5584. --ctx->captureEntryCount;
  5585. }
  5586. void __gls_capture_glTexEnviv(GLenum target, GLenum pname, const GLint *params) {
  5587. GLbitfield captureFlags;
  5588. __GLScontext *const ctx = __GLS_CONTEXT;
  5589. __GLSwriter *writer;
  5590. GLint params_count;
  5591. ++ctx->captureEntryCount;
  5592. if (ctx->captureEntryFunc) ctx->captureEntryFunc(251);
  5593. captureFlags = ctx->captureFlags[251];
  5594. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5595. __GLS_BEGIN_CAPTURE_EXEC(ctx, 251);
  5596. glTexEnviv(target, pname, params);
  5597. __GLS_END_CAPTURE_EXEC(ctx, 251);
  5598. }
  5599. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5600. writer = ctx->writer;
  5601. params_count = __gls_glTexEnviv_params_size(pname);
  5602. if (!writer->beginCommand(writer, 251, 8 + params_count * 4)) goto end;
  5603. if (writer->type == GLS_TEXT) {
  5604. writer->putGLenum(writer, target);
  5605. writer->putGLenum(writer, pname);
  5606. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  5607. } else {
  5608. writer->putGLenum(writer, pname);
  5609. writer->putGLenum(writer, target);
  5610. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  5611. }
  5612. writer->endCommand(writer);
  5613. end:
  5614. if (ctx->captureExitFunc) ctx->captureExitFunc(251);
  5615. --ctx->captureEntryCount;
  5616. }
  5617. void __gls_capture_glTexGend(GLenum coord, GLenum pname, GLdouble param) {
  5618. GLbitfield captureFlags;
  5619. __GLScontext *const ctx = __GLS_CONTEXT;
  5620. __GLSwriter *writer;
  5621. ++ctx->captureEntryCount;
  5622. if (ctx->captureEntryFunc) ctx->captureEntryFunc(252);
  5623. captureFlags = ctx->captureFlags[252];
  5624. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5625. __GLS_BEGIN_CAPTURE_EXEC(ctx, 252);
  5626. glTexGend(coord, pname, param);
  5627. __GLS_END_CAPTURE_EXEC(ctx, 252);
  5628. }
  5629. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5630. writer = ctx->writer;
  5631. if (!writer->padWordCount(writer, 1)) goto end;
  5632. if (!writer->beginCommand(writer, 252, 16)) goto end;
  5633. if (writer->type == GLS_TEXT) {
  5634. writer->putGLenum(writer, coord);
  5635. writer->putGLenum(writer, pname);
  5636. writer->putGLdoubleOrGLenum(writer, pname, param);
  5637. } else {
  5638. writer->putGLdoubleOrGLenum(writer, pname, param);
  5639. writer->putGLenum(writer, coord);
  5640. writer->putGLenum(writer, pname);
  5641. }
  5642. writer->endCommand(writer);
  5643. end:
  5644. if (ctx->captureExitFunc) ctx->captureExitFunc(252);
  5645. --ctx->captureEntryCount;
  5646. }
  5647. void __gls_capture_glTexGendv(GLenum coord, GLenum pname, const GLdouble *params) {
  5648. GLbitfield captureFlags;
  5649. __GLScontext *const ctx = __GLS_CONTEXT;
  5650. __GLSwriter *writer;
  5651. GLint params_count;
  5652. ++ctx->captureEntryCount;
  5653. if (ctx->captureEntryFunc) ctx->captureEntryFunc(253);
  5654. captureFlags = ctx->captureFlags[253];
  5655. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5656. __GLS_BEGIN_CAPTURE_EXEC(ctx, 253);
  5657. glTexGendv(coord, pname, params);
  5658. __GLS_END_CAPTURE_EXEC(ctx, 253);
  5659. }
  5660. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5661. writer = ctx->writer;
  5662. params_count = __gls_glTexGendv_params_size(pname);
  5663. if (!writer->padWordCount(writer, 0)) goto end;
  5664. if (!writer->beginCommand(writer, 253, 8 + params_count * 8)) goto end;
  5665. if (writer->type == GLS_TEXT) {
  5666. writer->putGLenum(writer, coord);
  5667. writer->putGLenum(writer, pname);
  5668. writer->putGLdoubleOrGLenumv(writer, pname, params_count, params);
  5669. } else {
  5670. writer->putGLenum(writer, pname);
  5671. writer->putGLdoubleOrGLenumv(writer, pname, params_count, params);
  5672. writer->putGLenum(writer, coord);
  5673. }
  5674. writer->endCommand(writer);
  5675. end:
  5676. if (ctx->captureExitFunc) ctx->captureExitFunc(253);
  5677. --ctx->captureEntryCount;
  5678. }
  5679. void __gls_capture_glTexGenf(GLenum coord, GLenum pname, GLfloat param) {
  5680. GLbitfield captureFlags;
  5681. __GLScontext *const ctx = __GLS_CONTEXT;
  5682. __GLSwriter *writer;
  5683. ++ctx->captureEntryCount;
  5684. if (ctx->captureEntryFunc) ctx->captureEntryFunc(254);
  5685. captureFlags = ctx->captureFlags[254];
  5686. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5687. __GLS_BEGIN_CAPTURE_EXEC(ctx, 254);
  5688. glTexGenf(coord, pname, param);
  5689. __GLS_END_CAPTURE_EXEC(ctx, 254);
  5690. }
  5691. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5692. writer = ctx->writer;
  5693. if (!writer->beginCommand(writer, 254, 12)) goto end;
  5694. writer->putGLenum(writer, coord);
  5695. writer->putGLenum(writer, pname);
  5696. writer->putGLfloatOrGLenum(writer, pname, param);
  5697. writer->endCommand(writer);
  5698. end:
  5699. if (ctx->captureExitFunc) ctx->captureExitFunc(254);
  5700. --ctx->captureEntryCount;
  5701. }
  5702. void __gls_capture_glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params) {
  5703. GLbitfield captureFlags;
  5704. __GLScontext *const ctx = __GLS_CONTEXT;
  5705. __GLSwriter *writer;
  5706. GLint params_count;
  5707. ++ctx->captureEntryCount;
  5708. if (ctx->captureEntryFunc) ctx->captureEntryFunc(255);
  5709. captureFlags = ctx->captureFlags[255];
  5710. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5711. __GLS_BEGIN_CAPTURE_EXEC(ctx, 255);
  5712. glTexGenfv(coord, pname, params);
  5713. __GLS_END_CAPTURE_EXEC(ctx, 255);
  5714. }
  5715. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5716. writer = ctx->writer;
  5717. params_count = __gls_glTexGenfv_params_size(pname);
  5718. if (!writer->beginCommand(writer, 255, 8 + params_count * 4)) goto end;
  5719. if (writer->type == GLS_TEXT) {
  5720. writer->putGLenum(writer, coord);
  5721. writer->putGLenum(writer, pname);
  5722. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  5723. } else {
  5724. writer->putGLenum(writer, pname);
  5725. writer->putGLenum(writer, coord);
  5726. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  5727. }
  5728. writer->endCommand(writer);
  5729. end:
  5730. if (ctx->captureExitFunc) ctx->captureExitFunc(255);
  5731. --ctx->captureEntryCount;
  5732. }
  5733. void __gls_capture_glTexGeni(GLenum coord, GLenum pname, GLint param) {
  5734. GLbitfield captureFlags;
  5735. __GLScontext *const ctx = __GLS_CONTEXT;
  5736. __GLSwriter *writer;
  5737. ++ctx->captureEntryCount;
  5738. if (ctx->captureEntryFunc) ctx->captureEntryFunc(256);
  5739. captureFlags = ctx->captureFlags[256];
  5740. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5741. __GLS_BEGIN_CAPTURE_EXEC(ctx, 256);
  5742. glTexGeni(coord, pname, param);
  5743. __GLS_END_CAPTURE_EXEC(ctx, 256);
  5744. }
  5745. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5746. writer = ctx->writer;
  5747. if (!writer->beginCommand(writer, 256, 12)) goto end;
  5748. writer->putGLenum(writer, coord);
  5749. writer->putGLenum(writer, pname);
  5750. writer->putGLintOrGLenum(writer, pname, param);
  5751. writer->endCommand(writer);
  5752. end:
  5753. if (ctx->captureExitFunc) ctx->captureExitFunc(256);
  5754. --ctx->captureEntryCount;
  5755. }
  5756. void __gls_capture_glTexGeniv(GLenum coord, GLenum pname, const GLint *params) {
  5757. GLbitfield captureFlags;
  5758. __GLScontext *const ctx = __GLS_CONTEXT;
  5759. __GLSwriter *writer;
  5760. GLint params_count;
  5761. ++ctx->captureEntryCount;
  5762. if (ctx->captureEntryFunc) ctx->captureEntryFunc(257);
  5763. captureFlags = ctx->captureFlags[257];
  5764. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5765. __GLS_BEGIN_CAPTURE_EXEC(ctx, 257);
  5766. glTexGeniv(coord, pname, params);
  5767. __GLS_END_CAPTURE_EXEC(ctx, 257);
  5768. }
  5769. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5770. writer = ctx->writer;
  5771. params_count = __gls_glTexGeniv_params_size(pname);
  5772. if (!writer->beginCommand(writer, 257, 8 + params_count * 4)) goto end;
  5773. if (writer->type == GLS_TEXT) {
  5774. writer->putGLenum(writer, coord);
  5775. writer->putGLenum(writer, pname);
  5776. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  5777. } else {
  5778. writer->putGLenum(writer, pname);
  5779. writer->putGLenum(writer, coord);
  5780. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  5781. }
  5782. writer->endCommand(writer);
  5783. end:
  5784. if (ctx->captureExitFunc) ctx->captureExitFunc(257);
  5785. --ctx->captureEntryCount;
  5786. }
  5787. void __gls_capture_glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer) {
  5788. GLbitfield captureFlags;
  5789. __GLScontext *const ctx = __GLS_CONTEXT;
  5790. __GLSwriter *writer;
  5791. ++ctx->captureEntryCount;
  5792. if (ctx->captureEntryFunc) ctx->captureEntryFunc(258);
  5793. captureFlags = ctx->captureFlags[258];
  5794. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5795. __GLS_BEGIN_CAPTURE_EXEC(ctx, 258);
  5796. glFeedbackBuffer(size, type, buffer);
  5797. __GLS_END_CAPTURE_EXEC(ctx, 258);
  5798. }
  5799. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5800. writer = ctx->writer;
  5801. if (!writer->padWordCount(writer, 0)) goto end;
  5802. if (!writer->beginCommand(writer, 258, 16)) goto end;
  5803. if (writer->type == GLS_TEXT) {
  5804. writer->putGLint(writer, size);
  5805. writer->putGLenum(writer, type);
  5806. writer->putGLoutArg(writer, 0, buffer);
  5807. } else {
  5808. writer->putGLint(writer, size);
  5809. writer->putGLoutArg(writer, 0, buffer);
  5810. writer->putGLenum(writer, type);
  5811. }
  5812. writer->endCommand(writer);
  5813. end:
  5814. if (ctx->captureExitFunc) ctx->captureExitFunc(258);
  5815. --ctx->captureEntryCount;
  5816. }
  5817. void __gls_capture_glSelectBuffer(GLsizei size, GLuint *buffer) {
  5818. GLbitfield captureFlags;
  5819. __GLScontext *const ctx = __GLS_CONTEXT;
  5820. __GLSwriter *writer;
  5821. ++ctx->captureEntryCount;
  5822. if (ctx->captureEntryFunc) ctx->captureEntryFunc(259);
  5823. captureFlags = ctx->captureFlags[259];
  5824. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5825. __GLS_BEGIN_CAPTURE_EXEC(ctx, 259);
  5826. glSelectBuffer(size, buffer);
  5827. __GLS_END_CAPTURE_EXEC(ctx, 259);
  5828. }
  5829. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5830. writer = ctx->writer;
  5831. if (!writer->padWordCount(writer, 0)) goto end;
  5832. if (!writer->beginCommand(writer, 259, 12)) goto end;
  5833. writer->putGLint(writer, size);
  5834. writer->putGLoutArg(writer, 0, buffer);
  5835. writer->endCommand(writer);
  5836. end:
  5837. if (ctx->captureExitFunc) ctx->captureExitFunc(259);
  5838. --ctx->captureEntryCount;
  5839. }
  5840. GLint __gls_capture_glRenderMode(GLenum mode) {
  5841. GLbitfield captureFlags;
  5842. __GLScontext *const ctx = __GLS_CONTEXT;
  5843. __GLSwriter *writer;
  5844. GLint _outVal = 0;
  5845. ++ctx->captureEntryCount;
  5846. if (ctx->captureEntryFunc) ctx->captureEntryFunc(260);
  5847. captureFlags = ctx->captureFlags[260];
  5848. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5849. __GLS_BEGIN_CAPTURE_EXEC(ctx, 260);
  5850. _outVal = glRenderMode(mode);
  5851. __GLS_END_CAPTURE_EXEC(ctx, 260);
  5852. }
  5853. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5854. writer = ctx->writer;
  5855. if (!writer->beginCommand(writer, 260, 4)) goto end;
  5856. writer->putGLenum(writer, mode);
  5857. writer->endCommand(writer);
  5858. end:
  5859. if (ctx->captureExitFunc) ctx->captureExitFunc(260);
  5860. --ctx->captureEntryCount;
  5861. return _outVal;
  5862. }
  5863. void __gls_capture_glInitNames(void) {
  5864. GLbitfield captureFlags;
  5865. __GLScontext *const ctx = __GLS_CONTEXT;
  5866. __GLSwriter *writer;
  5867. ++ctx->captureEntryCount;
  5868. if (ctx->captureEntryFunc) ctx->captureEntryFunc(261);
  5869. captureFlags = ctx->captureFlags[261];
  5870. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5871. __GLS_BEGIN_CAPTURE_EXEC(ctx, 261);
  5872. glInitNames();
  5873. __GLS_END_CAPTURE_EXEC(ctx, 261);
  5874. }
  5875. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5876. writer = ctx->writer;
  5877. if (!writer->beginCommand(writer, 261, 0)) goto end;
  5878. writer->endCommand(writer);
  5879. end:
  5880. if (ctx->captureExitFunc) ctx->captureExitFunc(261);
  5881. --ctx->captureEntryCount;
  5882. }
  5883. void __gls_capture_glLoadName(GLuint name) {
  5884. GLbitfield captureFlags;
  5885. __GLScontext *const ctx = __GLS_CONTEXT;
  5886. __GLSwriter *writer;
  5887. ++ctx->captureEntryCount;
  5888. if (ctx->captureEntryFunc) ctx->captureEntryFunc(262);
  5889. captureFlags = ctx->captureFlags[262];
  5890. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5891. __GLS_BEGIN_CAPTURE_EXEC(ctx, 262);
  5892. glLoadName(name);
  5893. __GLS_END_CAPTURE_EXEC(ctx, 262);
  5894. }
  5895. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5896. writer = ctx->writer;
  5897. if (!writer->beginCommand(writer, 262, 4)) goto end;
  5898. writer->putGLuint(writer, name);
  5899. writer->endCommand(writer);
  5900. end:
  5901. if (ctx->captureExitFunc) ctx->captureExitFunc(262);
  5902. --ctx->captureEntryCount;
  5903. }
  5904. void __gls_capture_glPassThrough(GLfloat token) {
  5905. GLbitfield captureFlags;
  5906. __GLScontext *const ctx = __GLS_CONTEXT;
  5907. __GLSwriter *writer;
  5908. ++ctx->captureEntryCount;
  5909. if (ctx->captureEntryFunc) ctx->captureEntryFunc(263);
  5910. captureFlags = ctx->captureFlags[263];
  5911. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5912. __GLS_BEGIN_CAPTURE_EXEC(ctx, 263);
  5913. glPassThrough(token);
  5914. __GLS_END_CAPTURE_EXEC(ctx, 263);
  5915. }
  5916. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5917. writer = ctx->writer;
  5918. if (!writer->beginCommand(writer, 263, 4)) goto end;
  5919. writer->putGLfloat(writer, token);
  5920. writer->endCommand(writer);
  5921. end:
  5922. if (ctx->captureExitFunc) ctx->captureExitFunc(263);
  5923. --ctx->captureEntryCount;
  5924. }
  5925. void __gls_capture_glPopName(void) {
  5926. GLbitfield captureFlags;
  5927. __GLScontext *const ctx = __GLS_CONTEXT;
  5928. __GLSwriter *writer;
  5929. ++ctx->captureEntryCount;
  5930. if (ctx->captureEntryFunc) ctx->captureEntryFunc(264);
  5931. captureFlags = ctx->captureFlags[264];
  5932. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5933. __GLS_BEGIN_CAPTURE_EXEC(ctx, 264);
  5934. glPopName();
  5935. __GLS_END_CAPTURE_EXEC(ctx, 264);
  5936. }
  5937. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5938. writer = ctx->writer;
  5939. if (!writer->beginCommand(writer, 264, 0)) goto end;
  5940. writer->endCommand(writer);
  5941. end:
  5942. if (ctx->captureExitFunc) ctx->captureExitFunc(264);
  5943. --ctx->captureEntryCount;
  5944. }
  5945. void __gls_capture_glPushName(GLuint name) {
  5946. GLbitfield captureFlags;
  5947. __GLScontext *const ctx = __GLS_CONTEXT;
  5948. __GLSwriter *writer;
  5949. ++ctx->captureEntryCount;
  5950. if (ctx->captureEntryFunc) ctx->captureEntryFunc(265);
  5951. captureFlags = ctx->captureFlags[265];
  5952. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5953. __GLS_BEGIN_CAPTURE_EXEC(ctx, 265);
  5954. glPushName(name);
  5955. __GLS_END_CAPTURE_EXEC(ctx, 265);
  5956. }
  5957. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5958. writer = ctx->writer;
  5959. if (!writer->beginCommand(writer, 265, 4)) goto end;
  5960. writer->putGLuint(writer, name);
  5961. writer->endCommand(writer);
  5962. end:
  5963. if (ctx->captureExitFunc) ctx->captureExitFunc(265);
  5964. --ctx->captureEntryCount;
  5965. }
  5966. void __gls_capture_glDrawBuffer(GLenum mode) {
  5967. GLbitfield captureFlags;
  5968. __GLScontext *const ctx = __GLS_CONTEXT;
  5969. __GLSwriter *writer;
  5970. ++ctx->captureEntryCount;
  5971. if (ctx->captureEntryFunc) ctx->captureEntryFunc(266);
  5972. captureFlags = ctx->captureFlags[266];
  5973. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5974. __GLS_BEGIN_CAPTURE_EXEC(ctx, 266);
  5975. glDrawBuffer(mode);
  5976. __GLS_END_CAPTURE_EXEC(ctx, 266);
  5977. }
  5978. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  5979. writer = ctx->writer;
  5980. if (!writer->beginCommand(writer, 266, 4)) goto end;
  5981. writer->putGLdrawBufferMode(writer, mode);
  5982. writer->endCommand(writer);
  5983. end:
  5984. if (ctx->captureExitFunc) ctx->captureExitFunc(266);
  5985. --ctx->captureEntryCount;
  5986. }
  5987. void __gls_capture_glClear(GLbitfield mask) {
  5988. GLbitfield captureFlags;
  5989. __GLScontext *const ctx = __GLS_CONTEXT;
  5990. __GLSwriter *writer;
  5991. ++ctx->captureEntryCount;
  5992. if (ctx->captureEntryFunc) ctx->captureEntryFunc(267);
  5993. captureFlags = ctx->captureFlags[267];
  5994. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  5995. __GLS_BEGIN_CAPTURE_EXEC(ctx, 267);
  5996. glClear(mask);
  5997. __GLS_END_CAPTURE_EXEC(ctx, 267);
  5998. }
  5999. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6000. writer = ctx->writer;
  6001. if (!writer->beginCommand(writer, 267, 4)) goto end;
  6002. writer->putGLclearBufferMask(writer, mask);
  6003. writer->endCommand(writer);
  6004. end:
  6005. if (ctx->captureExitFunc) ctx->captureExitFunc(267);
  6006. --ctx->captureEntryCount;
  6007. }
  6008. void __gls_capture_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
  6009. GLbitfield captureFlags;
  6010. __GLScontext *const ctx = __GLS_CONTEXT;
  6011. __GLSwriter *writer;
  6012. ++ctx->captureEntryCount;
  6013. if (ctx->captureEntryFunc) ctx->captureEntryFunc(268);
  6014. captureFlags = ctx->captureFlags[268];
  6015. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6016. __GLS_BEGIN_CAPTURE_EXEC(ctx, 268);
  6017. glClearAccum(red, green, blue, alpha);
  6018. __GLS_END_CAPTURE_EXEC(ctx, 268);
  6019. }
  6020. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6021. writer = ctx->writer;
  6022. if (!writer->beginCommand(writer, 268, 16)) goto end;
  6023. writer->putGLfloat(writer, red);
  6024. writer->putGLfloat(writer, green);
  6025. writer->putGLfloat(writer, blue);
  6026. writer->putGLfloat(writer, alpha);
  6027. writer->endCommand(writer);
  6028. end:
  6029. if (ctx->captureExitFunc) ctx->captureExitFunc(268);
  6030. --ctx->captureEntryCount;
  6031. }
  6032. void __gls_capture_glClearIndex(GLfloat c) {
  6033. GLbitfield captureFlags;
  6034. __GLScontext *const ctx = __GLS_CONTEXT;
  6035. __GLSwriter *writer;
  6036. ++ctx->captureEntryCount;
  6037. if (ctx->captureEntryFunc) ctx->captureEntryFunc(269);
  6038. captureFlags = ctx->captureFlags[269];
  6039. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6040. __GLS_BEGIN_CAPTURE_EXEC(ctx, 269);
  6041. glClearIndex(c);
  6042. __GLS_END_CAPTURE_EXEC(ctx, 269);
  6043. }
  6044. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6045. writer = ctx->writer;
  6046. if (!writer->beginCommand(writer, 269, 4)) goto end;
  6047. writer->putGLfloat(writer, c);
  6048. writer->endCommand(writer);
  6049. end:
  6050. if (ctx->captureExitFunc) ctx->captureExitFunc(269);
  6051. --ctx->captureEntryCount;
  6052. }
  6053. void __gls_capture_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
  6054. GLbitfield captureFlags;
  6055. __GLScontext *const ctx = __GLS_CONTEXT;
  6056. __GLSwriter *writer;
  6057. ++ctx->captureEntryCount;
  6058. if (ctx->captureEntryFunc) ctx->captureEntryFunc(270);
  6059. captureFlags = ctx->captureFlags[270];
  6060. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6061. __GLS_BEGIN_CAPTURE_EXEC(ctx, 270);
  6062. glClearColor(red, green, blue, alpha);
  6063. __GLS_END_CAPTURE_EXEC(ctx, 270);
  6064. }
  6065. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6066. writer = ctx->writer;
  6067. if (!writer->beginCommand(writer, 270, 16)) goto end;
  6068. writer->putGLfloat(writer, red);
  6069. writer->putGLfloat(writer, green);
  6070. writer->putGLfloat(writer, blue);
  6071. writer->putGLfloat(writer, alpha);
  6072. writer->endCommand(writer);
  6073. end:
  6074. if (ctx->captureExitFunc) ctx->captureExitFunc(270);
  6075. --ctx->captureEntryCount;
  6076. }
  6077. void __gls_capture_glClearStencil(GLint s) {
  6078. GLbitfield captureFlags;
  6079. __GLScontext *const ctx = __GLS_CONTEXT;
  6080. __GLSwriter *writer;
  6081. ++ctx->captureEntryCount;
  6082. if (ctx->captureEntryFunc) ctx->captureEntryFunc(271);
  6083. captureFlags = ctx->captureFlags[271];
  6084. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6085. __GLS_BEGIN_CAPTURE_EXEC(ctx, 271);
  6086. glClearStencil(s);
  6087. __GLS_END_CAPTURE_EXEC(ctx, 271);
  6088. }
  6089. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6090. writer = ctx->writer;
  6091. if (!writer->beginCommand(writer, 271, 4)) goto end;
  6092. writer->putGLint(writer, s);
  6093. writer->endCommand(writer);
  6094. end:
  6095. if (ctx->captureExitFunc) ctx->captureExitFunc(271);
  6096. --ctx->captureEntryCount;
  6097. }
  6098. void __gls_capture_glClearDepth(GLclampd depth) {
  6099. GLbitfield captureFlags;
  6100. __GLScontext *const ctx = __GLS_CONTEXT;
  6101. __GLSwriter *writer;
  6102. ++ctx->captureEntryCount;
  6103. if (ctx->captureEntryFunc) ctx->captureEntryFunc(272);
  6104. captureFlags = ctx->captureFlags[272];
  6105. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6106. __GLS_BEGIN_CAPTURE_EXEC(ctx, 272);
  6107. glClearDepth(depth);
  6108. __GLS_END_CAPTURE_EXEC(ctx, 272);
  6109. }
  6110. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6111. writer = ctx->writer;
  6112. if (!writer->padWordCount(writer, 1)) goto end;
  6113. if (!writer->beginCommand(writer, 272, 8)) goto end;
  6114. writer->putGLdouble(writer, depth);
  6115. writer->endCommand(writer);
  6116. end:
  6117. if (ctx->captureExitFunc) ctx->captureExitFunc(272);
  6118. --ctx->captureEntryCount;
  6119. }
  6120. void __gls_capture_glStencilMask(GLuint mask) {
  6121. GLbitfield captureFlags;
  6122. __GLScontext *const ctx = __GLS_CONTEXT;
  6123. __GLSwriter *writer;
  6124. ++ctx->captureEntryCount;
  6125. if (ctx->captureEntryFunc) ctx->captureEntryFunc(273);
  6126. captureFlags = ctx->captureFlags[273];
  6127. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6128. __GLS_BEGIN_CAPTURE_EXEC(ctx, 273);
  6129. glStencilMask(mask);
  6130. __GLS_END_CAPTURE_EXEC(ctx, 273);
  6131. }
  6132. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6133. writer = ctx->writer;
  6134. if (!writer->beginCommand(writer, 273, 4)) goto end;
  6135. writer->putGLuinthex(writer, mask);
  6136. writer->endCommand(writer);
  6137. end:
  6138. if (ctx->captureExitFunc) ctx->captureExitFunc(273);
  6139. --ctx->captureEntryCount;
  6140. }
  6141. void __gls_capture_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
  6142. GLbitfield captureFlags;
  6143. __GLScontext *const ctx = __GLS_CONTEXT;
  6144. __GLSwriter *writer;
  6145. ++ctx->captureEntryCount;
  6146. if (ctx->captureEntryFunc) ctx->captureEntryFunc(274);
  6147. captureFlags = ctx->captureFlags[274];
  6148. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6149. __GLS_BEGIN_CAPTURE_EXEC(ctx, 274);
  6150. glColorMask(red, green, blue, alpha);
  6151. __GLS_END_CAPTURE_EXEC(ctx, 274);
  6152. }
  6153. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6154. writer = ctx->writer;
  6155. if (!writer->beginCommand(writer, 274, 4)) goto end;
  6156. writer->putGLboolean(writer, red);
  6157. writer->putGLboolean(writer, green);
  6158. writer->putGLboolean(writer, blue);
  6159. writer->putGLboolean(writer, alpha);
  6160. writer->endCommand(writer);
  6161. end:
  6162. if (ctx->captureExitFunc) ctx->captureExitFunc(274);
  6163. --ctx->captureEntryCount;
  6164. }
  6165. void __gls_capture_glDepthMask(GLboolean flag) {
  6166. GLbitfield captureFlags;
  6167. __GLScontext *const ctx = __GLS_CONTEXT;
  6168. __GLSwriter *writer;
  6169. ++ctx->captureEntryCount;
  6170. if (ctx->captureEntryFunc) ctx->captureEntryFunc(275);
  6171. captureFlags = ctx->captureFlags[275];
  6172. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6173. __GLS_BEGIN_CAPTURE_EXEC(ctx, 275);
  6174. glDepthMask(flag);
  6175. __GLS_END_CAPTURE_EXEC(ctx, 275);
  6176. }
  6177. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6178. writer = ctx->writer;
  6179. if (!writer->beginCommand(writer, 275, 1)) goto end;
  6180. writer->putGLboolean(writer, flag);
  6181. writer->endCommand(writer);
  6182. end:
  6183. if (ctx->captureExitFunc) ctx->captureExitFunc(275);
  6184. --ctx->captureEntryCount;
  6185. }
  6186. void __gls_capture_glIndexMask(GLuint mask) {
  6187. GLbitfield captureFlags;
  6188. __GLScontext *const ctx = __GLS_CONTEXT;
  6189. __GLSwriter *writer;
  6190. ++ctx->captureEntryCount;
  6191. if (ctx->captureEntryFunc) ctx->captureEntryFunc(276);
  6192. captureFlags = ctx->captureFlags[276];
  6193. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6194. __GLS_BEGIN_CAPTURE_EXEC(ctx, 276);
  6195. glIndexMask(mask);
  6196. __GLS_END_CAPTURE_EXEC(ctx, 276);
  6197. }
  6198. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6199. writer = ctx->writer;
  6200. if (!writer->beginCommand(writer, 276, 4)) goto end;
  6201. writer->putGLuinthex(writer, mask);
  6202. writer->endCommand(writer);
  6203. end:
  6204. if (ctx->captureExitFunc) ctx->captureExitFunc(276);
  6205. --ctx->captureEntryCount;
  6206. }
  6207. void __gls_capture_glAccum(GLenum op, GLfloat value) {
  6208. GLbitfield captureFlags;
  6209. __GLScontext *const ctx = __GLS_CONTEXT;
  6210. __GLSwriter *writer;
  6211. ++ctx->captureEntryCount;
  6212. if (ctx->captureEntryFunc) ctx->captureEntryFunc(277);
  6213. captureFlags = ctx->captureFlags[277];
  6214. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6215. __GLS_BEGIN_CAPTURE_EXEC(ctx, 277);
  6216. glAccum(op, value);
  6217. __GLS_END_CAPTURE_EXEC(ctx, 277);
  6218. }
  6219. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6220. writer = ctx->writer;
  6221. if (!writer->beginCommand(writer, 277, 8)) goto end;
  6222. writer->putGLenum(writer, op);
  6223. writer->putGLfloat(writer, value);
  6224. writer->endCommand(writer);
  6225. end:
  6226. if (ctx->captureExitFunc) ctx->captureExitFunc(277);
  6227. --ctx->captureEntryCount;
  6228. }
  6229. void __gls_capture_glDisable(GLenum cap) {
  6230. GLbitfield captureFlags;
  6231. __GLScontext *const ctx = __GLS_CONTEXT;
  6232. __GLSwriter *writer;
  6233. ++ctx->captureEntryCount;
  6234. if (ctx->captureEntryFunc) ctx->captureEntryFunc(278);
  6235. captureFlags = ctx->captureFlags[278];
  6236. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6237. __GLS_BEGIN_CAPTURE_EXEC(ctx, 278);
  6238. glDisable(cap);
  6239. __GLS_END_CAPTURE_EXEC(ctx, 278);
  6240. }
  6241. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6242. writer = ctx->writer;
  6243. if (!writer->beginCommand(writer, 278, 4)) goto end;
  6244. writer->putGLenum(writer, cap);
  6245. writer->endCommand(writer);
  6246. end:
  6247. if (ctx->captureExitFunc) ctx->captureExitFunc(278);
  6248. --ctx->captureEntryCount;
  6249. }
  6250. void __gls_capture_glEnable(GLenum cap) {
  6251. GLbitfield captureFlags;
  6252. __GLScontext *const ctx = __GLS_CONTEXT;
  6253. __GLSwriter *writer;
  6254. ++ctx->captureEntryCount;
  6255. if (ctx->captureEntryFunc) ctx->captureEntryFunc(279);
  6256. captureFlags = ctx->captureFlags[279];
  6257. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6258. __GLS_BEGIN_CAPTURE_EXEC(ctx, 279);
  6259. glEnable(cap);
  6260. __GLS_END_CAPTURE_EXEC(ctx, 279);
  6261. }
  6262. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6263. writer = ctx->writer;
  6264. if (!writer->beginCommand(writer, 279, 4)) goto end;
  6265. writer->putGLenum(writer, cap);
  6266. writer->endCommand(writer);
  6267. end:
  6268. if (ctx->captureExitFunc) ctx->captureExitFunc(279);
  6269. --ctx->captureEntryCount;
  6270. }
  6271. void __gls_capture_glFinish(void) {
  6272. GLbitfield captureFlags;
  6273. __GLScontext *const ctx = __GLS_CONTEXT;
  6274. __GLSwriter *writer;
  6275. ++ctx->captureEntryCount;
  6276. if (ctx->captureEntryFunc) ctx->captureEntryFunc(280);
  6277. captureFlags = ctx->captureFlags[280];
  6278. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6279. __GLS_BEGIN_CAPTURE_EXEC(ctx, 280);
  6280. glFinish();
  6281. __GLS_END_CAPTURE_EXEC(ctx, 280);
  6282. }
  6283. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6284. writer = ctx->writer;
  6285. if (!writer->beginCommand(writer, 280, 0)) goto end;
  6286. writer->endCommand(writer);
  6287. end:
  6288. if (ctx->captureExitFunc) ctx->captureExitFunc(280);
  6289. --ctx->captureEntryCount;
  6290. }
  6291. void __gls_capture_glFlush(void) {
  6292. GLbitfield captureFlags;
  6293. __GLScontext *const ctx = __GLS_CONTEXT;
  6294. __GLSwriter *writer;
  6295. ++ctx->captureEntryCount;
  6296. if (ctx->captureEntryFunc) ctx->captureEntryFunc(281);
  6297. captureFlags = ctx->captureFlags[281];
  6298. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6299. __GLS_BEGIN_CAPTURE_EXEC(ctx, 281);
  6300. glFlush();
  6301. __GLS_END_CAPTURE_EXEC(ctx, 281);
  6302. }
  6303. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6304. writer = ctx->writer;
  6305. if (!writer->beginCommand(writer, 281, 0)) goto end;
  6306. writer->endCommand(writer);
  6307. end:
  6308. if (ctx->captureExitFunc) ctx->captureExitFunc(281);
  6309. --ctx->captureEntryCount;
  6310. }
  6311. void __gls_capture_glPopAttrib(void) {
  6312. GLbitfield captureFlags;
  6313. __GLScontext *const ctx = __GLS_CONTEXT;
  6314. __GLSwriter *writer;
  6315. ++ctx->captureEntryCount;
  6316. if (ctx->captureEntryFunc) ctx->captureEntryFunc(282);
  6317. captureFlags = ctx->captureFlags[282];
  6318. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6319. __GLS_BEGIN_CAPTURE_EXEC(ctx, 282);
  6320. glPopAttrib();
  6321. __GLS_END_CAPTURE_EXEC(ctx, 282);
  6322. }
  6323. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6324. writer = ctx->writer;
  6325. if (!writer->beginCommand(writer, 282, 0)) goto end;
  6326. writer->endCommand(writer);
  6327. end:
  6328. if (ctx->captureExitFunc) ctx->captureExitFunc(282);
  6329. --ctx->captureEntryCount;
  6330. }
  6331. void __gls_capture_glPushAttrib(GLbitfield mask) {
  6332. GLbitfield captureFlags;
  6333. __GLScontext *const ctx = __GLS_CONTEXT;
  6334. __GLSwriter *writer;
  6335. ++ctx->captureEntryCount;
  6336. if (ctx->captureEntryFunc) ctx->captureEntryFunc(283);
  6337. captureFlags = ctx->captureFlags[283];
  6338. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6339. __GLS_BEGIN_CAPTURE_EXEC(ctx, 283);
  6340. glPushAttrib(mask);
  6341. __GLS_END_CAPTURE_EXEC(ctx, 283);
  6342. }
  6343. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6344. writer = ctx->writer;
  6345. if (!writer->beginCommand(writer, 283, 4)) goto end;
  6346. writer->putGLattribMask(writer, mask);
  6347. writer->endCommand(writer);
  6348. end:
  6349. if (ctx->captureExitFunc) ctx->captureExitFunc(283);
  6350. --ctx->captureEntryCount;
  6351. }
  6352. void __gls_capture_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2) {
  6353. GLbitfield captureFlags;
  6354. __GLScontext *const ctx = __GLS_CONTEXT;
  6355. __GLSwriter *writer;
  6356. ++ctx->captureEntryCount;
  6357. if (ctx->captureEntryFunc) ctx->captureEntryFunc(288);
  6358. captureFlags = ctx->captureFlags[288];
  6359. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6360. __GLS_BEGIN_CAPTURE_EXEC(ctx, 288);
  6361. glMapGrid1d(un, u1, u2);
  6362. __GLS_END_CAPTURE_EXEC(ctx, 288);
  6363. }
  6364. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6365. writer = ctx->writer;
  6366. if (!writer->padWordCount(writer, 1)) goto end;
  6367. if (!writer->beginCommand(writer, 288, 20)) goto end;
  6368. if (writer->type == GLS_TEXT) {
  6369. writer->putGLint(writer, un);
  6370. writer->putGLdouble(writer, u1);
  6371. writer->putGLdouble(writer, u2);
  6372. } else {
  6373. writer->putGLdouble(writer, u1);
  6374. writer->putGLdouble(writer, u2);
  6375. writer->putGLint(writer, un);
  6376. }
  6377. writer->endCommand(writer);
  6378. end:
  6379. if (ctx->captureExitFunc) ctx->captureExitFunc(288);
  6380. --ctx->captureEntryCount;
  6381. }
  6382. void __gls_capture_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) {
  6383. GLbitfield captureFlags;
  6384. __GLScontext *const ctx = __GLS_CONTEXT;
  6385. __GLSwriter *writer;
  6386. ++ctx->captureEntryCount;
  6387. if (ctx->captureEntryFunc) ctx->captureEntryFunc(289);
  6388. captureFlags = ctx->captureFlags[289];
  6389. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6390. __GLS_BEGIN_CAPTURE_EXEC(ctx, 289);
  6391. glMapGrid1f(un, u1, u2);
  6392. __GLS_END_CAPTURE_EXEC(ctx, 289);
  6393. }
  6394. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6395. writer = ctx->writer;
  6396. if (!writer->beginCommand(writer, 289, 12)) goto end;
  6397. writer->putGLint(writer, un);
  6398. writer->putGLfloat(writer, u1);
  6399. writer->putGLfloat(writer, u2);
  6400. writer->endCommand(writer);
  6401. end:
  6402. if (ctx->captureExitFunc) ctx->captureExitFunc(289);
  6403. --ctx->captureEntryCount;
  6404. }
  6405. void __gls_capture_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) {
  6406. GLbitfield captureFlags;
  6407. __GLScontext *const ctx = __GLS_CONTEXT;
  6408. __GLSwriter *writer;
  6409. ++ctx->captureEntryCount;
  6410. if (ctx->captureEntryFunc) ctx->captureEntryFunc(290);
  6411. captureFlags = ctx->captureFlags[290];
  6412. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6413. __GLS_BEGIN_CAPTURE_EXEC(ctx, 290);
  6414. glMapGrid2d(un, u1, u2, vn, v1, v2);
  6415. __GLS_END_CAPTURE_EXEC(ctx, 290);
  6416. }
  6417. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6418. writer = ctx->writer;
  6419. if (!writer->padWordCount(writer, 1)) goto end;
  6420. if (!writer->beginCommand(writer, 290, 40)) goto end;
  6421. if (writer->type == GLS_TEXT) {
  6422. writer->putGLint(writer, un);
  6423. writer->putGLdouble(writer, u1);
  6424. writer->putGLdouble(writer, u2);
  6425. writer->putGLint(writer, vn);
  6426. writer->putGLdouble(writer, v1);
  6427. writer->putGLdouble(writer, v2);
  6428. } else {
  6429. writer->putGLdouble(writer, u1);
  6430. writer->putGLdouble(writer, u2);
  6431. writer->putGLdouble(writer, v1);
  6432. writer->putGLdouble(writer, v2);
  6433. writer->putGLint(writer, un);
  6434. writer->putGLint(writer, vn);
  6435. }
  6436. writer->endCommand(writer);
  6437. end:
  6438. if (ctx->captureExitFunc) ctx->captureExitFunc(290);
  6439. --ctx->captureEntryCount;
  6440. }
  6441. void __gls_capture_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) {
  6442. GLbitfield captureFlags;
  6443. __GLScontext *const ctx = __GLS_CONTEXT;
  6444. __GLSwriter *writer;
  6445. ++ctx->captureEntryCount;
  6446. if (ctx->captureEntryFunc) ctx->captureEntryFunc(291);
  6447. captureFlags = ctx->captureFlags[291];
  6448. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6449. __GLS_BEGIN_CAPTURE_EXEC(ctx, 291);
  6450. glMapGrid2f(un, u1, u2, vn, v1, v2);
  6451. __GLS_END_CAPTURE_EXEC(ctx, 291);
  6452. }
  6453. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6454. writer = ctx->writer;
  6455. if (!writer->beginCommand(writer, 291, 24)) goto end;
  6456. writer->putGLint(writer, un);
  6457. writer->putGLfloat(writer, u1);
  6458. writer->putGLfloat(writer, u2);
  6459. writer->putGLint(writer, vn);
  6460. writer->putGLfloat(writer, v1);
  6461. writer->putGLfloat(writer, v2);
  6462. writer->endCommand(writer);
  6463. end:
  6464. if (ctx->captureExitFunc) ctx->captureExitFunc(291);
  6465. --ctx->captureEntryCount;
  6466. }
  6467. void __gls_capture_glEvalCoord1d(GLdouble u) {
  6468. GLbitfield captureFlags;
  6469. __GLScontext *const ctx = __GLS_CONTEXT;
  6470. __GLSwriter *writer;
  6471. ++ctx->captureEntryCount;
  6472. if (ctx->captureEntryFunc) ctx->captureEntryFunc(292);
  6473. captureFlags = ctx->captureFlags[292];
  6474. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6475. __GLS_BEGIN_CAPTURE_EXEC(ctx, 292);
  6476. glEvalCoord1d(u);
  6477. __GLS_END_CAPTURE_EXEC(ctx, 292);
  6478. }
  6479. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6480. writer = ctx->writer;
  6481. if (!writer->padWordCount(writer, 1)) goto end;
  6482. if (!writer->beginCommand(writer, 292, 8)) goto end;
  6483. writer->putGLdouble(writer, u);
  6484. writer->endCommand(writer);
  6485. end:
  6486. if (ctx->captureExitFunc) ctx->captureExitFunc(292);
  6487. --ctx->captureEntryCount;
  6488. }
  6489. void __gls_capture_glEvalCoord1dv(const GLdouble *u) {
  6490. GLbitfield captureFlags;
  6491. __GLScontext *const ctx = __GLS_CONTEXT;
  6492. __GLSwriter *writer;
  6493. ++ctx->captureEntryCount;
  6494. if (ctx->captureEntryFunc) ctx->captureEntryFunc(293);
  6495. captureFlags = ctx->captureFlags[293];
  6496. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6497. __GLS_BEGIN_CAPTURE_EXEC(ctx, 293);
  6498. glEvalCoord1dv(u);
  6499. __GLS_END_CAPTURE_EXEC(ctx, 293);
  6500. }
  6501. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6502. writer = ctx->writer;
  6503. if (!writer->padWordCount(writer, 1)) goto end;
  6504. if (!writer->beginCommand(writer, 293, 8)) goto end;
  6505. writer->putGLdoublev(writer, 1, u);
  6506. writer->endCommand(writer);
  6507. end:
  6508. if (ctx->captureExitFunc) ctx->captureExitFunc(293);
  6509. --ctx->captureEntryCount;
  6510. }
  6511. void __gls_capture_glEvalCoord1f(GLfloat u) {
  6512. GLbitfield captureFlags;
  6513. __GLScontext *const ctx = __GLS_CONTEXT;
  6514. __GLSwriter *writer;
  6515. ++ctx->captureEntryCount;
  6516. if (ctx->captureEntryFunc) ctx->captureEntryFunc(294);
  6517. captureFlags = ctx->captureFlags[294];
  6518. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6519. __GLS_BEGIN_CAPTURE_EXEC(ctx, 294);
  6520. glEvalCoord1f(u);
  6521. __GLS_END_CAPTURE_EXEC(ctx, 294);
  6522. }
  6523. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6524. writer = ctx->writer;
  6525. if (!writer->beginCommand(writer, 294, 4)) goto end;
  6526. writer->putGLfloat(writer, u);
  6527. writer->endCommand(writer);
  6528. end:
  6529. if (ctx->captureExitFunc) ctx->captureExitFunc(294);
  6530. --ctx->captureEntryCount;
  6531. }
  6532. void __gls_capture_glEvalCoord1fv(const GLfloat *u) {
  6533. GLbitfield captureFlags;
  6534. __GLScontext *const ctx = __GLS_CONTEXT;
  6535. __GLSwriter *writer;
  6536. ++ctx->captureEntryCount;
  6537. if (ctx->captureEntryFunc) ctx->captureEntryFunc(295);
  6538. captureFlags = ctx->captureFlags[295];
  6539. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6540. __GLS_BEGIN_CAPTURE_EXEC(ctx, 295);
  6541. glEvalCoord1fv(u);
  6542. __GLS_END_CAPTURE_EXEC(ctx, 295);
  6543. }
  6544. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6545. writer = ctx->writer;
  6546. if (!writer->beginCommand(writer, 295, 4)) goto end;
  6547. writer->putGLfloatv(writer, 1, u);
  6548. writer->endCommand(writer);
  6549. end:
  6550. if (ctx->captureExitFunc) ctx->captureExitFunc(295);
  6551. --ctx->captureEntryCount;
  6552. }
  6553. void __gls_capture_glEvalCoord2d(GLdouble u, GLdouble v) {
  6554. GLbitfield captureFlags;
  6555. __GLScontext *const ctx = __GLS_CONTEXT;
  6556. __GLSwriter *writer;
  6557. ++ctx->captureEntryCount;
  6558. if (ctx->captureEntryFunc) ctx->captureEntryFunc(296);
  6559. captureFlags = ctx->captureFlags[296];
  6560. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6561. __GLS_BEGIN_CAPTURE_EXEC(ctx, 296);
  6562. glEvalCoord2d(u, v);
  6563. __GLS_END_CAPTURE_EXEC(ctx, 296);
  6564. }
  6565. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6566. writer = ctx->writer;
  6567. if (!writer->padWordCount(writer, 1)) goto end;
  6568. if (!writer->beginCommand(writer, 296, 16)) goto end;
  6569. writer->putGLdouble(writer, u);
  6570. writer->putGLdouble(writer, v);
  6571. writer->endCommand(writer);
  6572. end:
  6573. if (ctx->captureExitFunc) ctx->captureExitFunc(296);
  6574. --ctx->captureEntryCount;
  6575. }
  6576. void __gls_capture_glEvalCoord2dv(const GLdouble *u) {
  6577. GLbitfield captureFlags;
  6578. __GLScontext *const ctx = __GLS_CONTEXT;
  6579. __GLSwriter *writer;
  6580. ++ctx->captureEntryCount;
  6581. if (ctx->captureEntryFunc) ctx->captureEntryFunc(297);
  6582. captureFlags = ctx->captureFlags[297];
  6583. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6584. __GLS_BEGIN_CAPTURE_EXEC(ctx, 297);
  6585. glEvalCoord2dv(u);
  6586. __GLS_END_CAPTURE_EXEC(ctx, 297);
  6587. }
  6588. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6589. writer = ctx->writer;
  6590. if (!writer->padWordCount(writer, 1)) goto end;
  6591. if (!writer->beginCommand(writer, 297, 16)) goto end;
  6592. writer->putGLdoublev(writer, 2, u);
  6593. writer->endCommand(writer);
  6594. end:
  6595. if (ctx->captureExitFunc) ctx->captureExitFunc(297);
  6596. --ctx->captureEntryCount;
  6597. }
  6598. void __gls_capture_glEvalCoord2f(GLfloat u, GLfloat v) {
  6599. GLbitfield captureFlags;
  6600. __GLScontext *const ctx = __GLS_CONTEXT;
  6601. __GLSwriter *writer;
  6602. ++ctx->captureEntryCount;
  6603. if (ctx->captureEntryFunc) ctx->captureEntryFunc(298);
  6604. captureFlags = ctx->captureFlags[298];
  6605. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6606. __GLS_BEGIN_CAPTURE_EXEC(ctx, 298);
  6607. glEvalCoord2f(u, v);
  6608. __GLS_END_CAPTURE_EXEC(ctx, 298);
  6609. }
  6610. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6611. writer = ctx->writer;
  6612. if (!writer->beginCommand(writer, 298, 8)) goto end;
  6613. writer->putGLfloat(writer, u);
  6614. writer->putGLfloat(writer, v);
  6615. writer->endCommand(writer);
  6616. end:
  6617. if (ctx->captureExitFunc) ctx->captureExitFunc(298);
  6618. --ctx->captureEntryCount;
  6619. }
  6620. void __gls_capture_glEvalCoord2fv(const GLfloat *u) {
  6621. GLbitfield captureFlags;
  6622. __GLScontext *const ctx = __GLS_CONTEXT;
  6623. __GLSwriter *writer;
  6624. ++ctx->captureEntryCount;
  6625. if (ctx->captureEntryFunc) ctx->captureEntryFunc(299);
  6626. captureFlags = ctx->captureFlags[299];
  6627. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6628. __GLS_BEGIN_CAPTURE_EXEC(ctx, 299);
  6629. glEvalCoord2fv(u);
  6630. __GLS_END_CAPTURE_EXEC(ctx, 299);
  6631. }
  6632. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6633. writer = ctx->writer;
  6634. if (!writer->beginCommand(writer, 299, 8)) goto end;
  6635. writer->putGLfloatv(writer, 2, u);
  6636. writer->endCommand(writer);
  6637. end:
  6638. if (ctx->captureExitFunc) ctx->captureExitFunc(299);
  6639. --ctx->captureEntryCount;
  6640. }
  6641. void __gls_capture_glEvalMesh1(GLenum mode, GLint i1, GLint i2) {
  6642. GLbitfield captureFlags;
  6643. __GLScontext *const ctx = __GLS_CONTEXT;
  6644. __GLSwriter *writer;
  6645. ++ctx->captureEntryCount;
  6646. if (ctx->captureEntryFunc) ctx->captureEntryFunc(300);
  6647. captureFlags = ctx->captureFlags[300];
  6648. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6649. __GLS_BEGIN_CAPTURE_EXEC(ctx, 300);
  6650. glEvalMesh1(mode, i1, i2);
  6651. __GLS_END_CAPTURE_EXEC(ctx, 300);
  6652. }
  6653. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6654. writer = ctx->writer;
  6655. if (!writer->beginCommand(writer, 300, 12)) goto end;
  6656. writer->putGLenum(writer, mode);
  6657. writer->putGLint(writer, i1);
  6658. writer->putGLint(writer, i2);
  6659. writer->endCommand(writer);
  6660. end:
  6661. if (ctx->captureExitFunc) ctx->captureExitFunc(300);
  6662. --ctx->captureEntryCount;
  6663. }
  6664. void __gls_capture_glEvalPoint1(GLint i) {
  6665. GLbitfield captureFlags;
  6666. __GLScontext *const ctx = __GLS_CONTEXT;
  6667. __GLSwriter *writer;
  6668. ++ctx->captureEntryCount;
  6669. if (ctx->captureEntryFunc) ctx->captureEntryFunc(301);
  6670. captureFlags = ctx->captureFlags[301];
  6671. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6672. __GLS_BEGIN_CAPTURE_EXEC(ctx, 301);
  6673. glEvalPoint1(i);
  6674. __GLS_END_CAPTURE_EXEC(ctx, 301);
  6675. }
  6676. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6677. writer = ctx->writer;
  6678. if (!writer->beginCommand(writer, 301, 4)) goto end;
  6679. writer->putGLint(writer, i);
  6680. writer->endCommand(writer);
  6681. end:
  6682. if (ctx->captureExitFunc) ctx->captureExitFunc(301);
  6683. --ctx->captureEntryCount;
  6684. }
  6685. void __gls_capture_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) {
  6686. GLbitfield captureFlags;
  6687. __GLScontext *const ctx = __GLS_CONTEXT;
  6688. __GLSwriter *writer;
  6689. ++ctx->captureEntryCount;
  6690. if (ctx->captureEntryFunc) ctx->captureEntryFunc(302);
  6691. captureFlags = ctx->captureFlags[302];
  6692. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6693. __GLS_BEGIN_CAPTURE_EXEC(ctx, 302);
  6694. glEvalMesh2(mode, i1, i2, j1, j2);
  6695. __GLS_END_CAPTURE_EXEC(ctx, 302);
  6696. }
  6697. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6698. writer = ctx->writer;
  6699. if (!writer->beginCommand(writer, 302, 20)) goto end;
  6700. writer->putGLenum(writer, mode);
  6701. writer->putGLint(writer, i1);
  6702. writer->putGLint(writer, i2);
  6703. writer->putGLint(writer, j1);
  6704. writer->putGLint(writer, j2);
  6705. writer->endCommand(writer);
  6706. end:
  6707. if (ctx->captureExitFunc) ctx->captureExitFunc(302);
  6708. --ctx->captureEntryCount;
  6709. }
  6710. void __gls_capture_glEvalPoint2(GLint i, GLint j) {
  6711. GLbitfield captureFlags;
  6712. __GLScontext *const ctx = __GLS_CONTEXT;
  6713. __GLSwriter *writer;
  6714. ++ctx->captureEntryCount;
  6715. if (ctx->captureEntryFunc) ctx->captureEntryFunc(303);
  6716. captureFlags = ctx->captureFlags[303];
  6717. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6718. __GLS_BEGIN_CAPTURE_EXEC(ctx, 303);
  6719. glEvalPoint2(i, j);
  6720. __GLS_END_CAPTURE_EXEC(ctx, 303);
  6721. }
  6722. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6723. writer = ctx->writer;
  6724. if (!writer->beginCommand(writer, 303, 8)) goto end;
  6725. writer->putGLint(writer, i);
  6726. writer->putGLint(writer, j);
  6727. writer->endCommand(writer);
  6728. end:
  6729. if (ctx->captureExitFunc) ctx->captureExitFunc(303);
  6730. --ctx->captureEntryCount;
  6731. }
  6732. void __gls_capture_glAlphaFunc(GLenum func, GLclampf ref) {
  6733. GLbitfield captureFlags;
  6734. __GLScontext *const ctx = __GLS_CONTEXT;
  6735. __GLSwriter *writer;
  6736. ++ctx->captureEntryCount;
  6737. if (ctx->captureEntryFunc) ctx->captureEntryFunc(304);
  6738. captureFlags = ctx->captureFlags[304];
  6739. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6740. __GLS_BEGIN_CAPTURE_EXEC(ctx, 304);
  6741. glAlphaFunc(func, ref);
  6742. __GLS_END_CAPTURE_EXEC(ctx, 304);
  6743. }
  6744. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6745. writer = ctx->writer;
  6746. if (!writer->beginCommand(writer, 304, 8)) goto end;
  6747. writer->putGLenum(writer, func);
  6748. writer->putGLfloat(writer, ref);
  6749. writer->endCommand(writer);
  6750. end:
  6751. if (ctx->captureExitFunc) ctx->captureExitFunc(304);
  6752. --ctx->captureEntryCount;
  6753. }
  6754. void __gls_capture_glBlendFunc(GLenum sfactor, GLenum dfactor) {
  6755. GLbitfield captureFlags;
  6756. __GLScontext *const ctx = __GLS_CONTEXT;
  6757. __GLSwriter *writer;
  6758. ++ctx->captureEntryCount;
  6759. if (ctx->captureEntryFunc) ctx->captureEntryFunc(305);
  6760. captureFlags = ctx->captureFlags[305];
  6761. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6762. __GLS_BEGIN_CAPTURE_EXEC(ctx, 305);
  6763. glBlendFunc(sfactor, dfactor);
  6764. __GLS_END_CAPTURE_EXEC(ctx, 305);
  6765. }
  6766. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6767. writer = ctx->writer;
  6768. if (!writer->beginCommand(writer, 305, 8)) goto end;
  6769. writer->putGLblendingFactor(writer, sfactor);
  6770. writer->putGLblendingFactor(writer, dfactor);
  6771. writer->endCommand(writer);
  6772. end:
  6773. if (ctx->captureExitFunc) ctx->captureExitFunc(305);
  6774. --ctx->captureEntryCount;
  6775. }
  6776. void __gls_capture_glLogicOp(GLenum opcode) {
  6777. GLbitfield captureFlags;
  6778. __GLScontext *const ctx = __GLS_CONTEXT;
  6779. __GLSwriter *writer;
  6780. ++ctx->captureEntryCount;
  6781. if (ctx->captureEntryFunc) ctx->captureEntryFunc(306);
  6782. captureFlags = ctx->captureFlags[306];
  6783. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6784. __GLS_BEGIN_CAPTURE_EXEC(ctx, 306);
  6785. glLogicOp(opcode);
  6786. __GLS_END_CAPTURE_EXEC(ctx, 306);
  6787. }
  6788. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6789. writer = ctx->writer;
  6790. if (!writer->beginCommand(writer, 306, 4)) goto end;
  6791. writer->putGLenum(writer, opcode);
  6792. writer->endCommand(writer);
  6793. end:
  6794. if (ctx->captureExitFunc) ctx->captureExitFunc(306);
  6795. --ctx->captureEntryCount;
  6796. }
  6797. void __gls_capture_glStencilFunc(GLenum func, GLint ref, GLuint mask) {
  6798. GLbitfield captureFlags;
  6799. __GLScontext *const ctx = __GLS_CONTEXT;
  6800. __GLSwriter *writer;
  6801. ++ctx->captureEntryCount;
  6802. if (ctx->captureEntryFunc) ctx->captureEntryFunc(307);
  6803. captureFlags = ctx->captureFlags[307];
  6804. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6805. __GLS_BEGIN_CAPTURE_EXEC(ctx, 307);
  6806. glStencilFunc(func, ref, mask);
  6807. __GLS_END_CAPTURE_EXEC(ctx, 307);
  6808. }
  6809. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6810. writer = ctx->writer;
  6811. if (!writer->beginCommand(writer, 307, 12)) goto end;
  6812. writer->putGLenum(writer, func);
  6813. writer->putGLint(writer, ref);
  6814. writer->putGLuinthex(writer, mask);
  6815. writer->endCommand(writer);
  6816. end:
  6817. if (ctx->captureExitFunc) ctx->captureExitFunc(307);
  6818. --ctx->captureEntryCount;
  6819. }
  6820. void __gls_capture_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
  6821. GLbitfield captureFlags;
  6822. __GLScontext *const ctx = __GLS_CONTEXT;
  6823. __GLSwriter *writer;
  6824. ++ctx->captureEntryCount;
  6825. if (ctx->captureEntryFunc) ctx->captureEntryFunc(308);
  6826. captureFlags = ctx->captureFlags[308];
  6827. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6828. __GLS_BEGIN_CAPTURE_EXEC(ctx, 308);
  6829. glStencilOp(fail, zfail, zpass);
  6830. __GLS_END_CAPTURE_EXEC(ctx, 308);
  6831. }
  6832. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6833. writer = ctx->writer;
  6834. if (!writer->beginCommand(writer, 308, 12)) goto end;
  6835. writer->putGLstencilOp(writer, fail);
  6836. writer->putGLstencilOp(writer, zfail);
  6837. writer->putGLstencilOp(writer, zpass);
  6838. writer->endCommand(writer);
  6839. end:
  6840. if (ctx->captureExitFunc) ctx->captureExitFunc(308);
  6841. --ctx->captureEntryCount;
  6842. }
  6843. void __gls_capture_glDepthFunc(GLenum func) {
  6844. GLbitfield captureFlags;
  6845. __GLScontext *const ctx = __GLS_CONTEXT;
  6846. __GLSwriter *writer;
  6847. ++ctx->captureEntryCount;
  6848. if (ctx->captureEntryFunc) ctx->captureEntryFunc(309);
  6849. captureFlags = ctx->captureFlags[309];
  6850. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6851. __GLS_BEGIN_CAPTURE_EXEC(ctx, 309);
  6852. glDepthFunc(func);
  6853. __GLS_END_CAPTURE_EXEC(ctx, 309);
  6854. }
  6855. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6856. writer = ctx->writer;
  6857. if (!writer->beginCommand(writer, 309, 4)) goto end;
  6858. writer->putGLenum(writer, func);
  6859. writer->endCommand(writer);
  6860. end:
  6861. if (ctx->captureExitFunc) ctx->captureExitFunc(309);
  6862. --ctx->captureEntryCount;
  6863. }
  6864. void __gls_capture_glPixelZoom(GLfloat xfactor, GLfloat yfactor) {
  6865. GLbitfield captureFlags;
  6866. __GLScontext *const ctx = __GLS_CONTEXT;
  6867. __GLSwriter *writer;
  6868. ++ctx->captureEntryCount;
  6869. if (ctx->captureEntryFunc) ctx->captureEntryFunc(310);
  6870. captureFlags = ctx->captureFlags[310];
  6871. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6872. __GLS_BEGIN_CAPTURE_EXEC(ctx, 310);
  6873. glPixelZoom(xfactor, yfactor);
  6874. __GLS_END_CAPTURE_EXEC(ctx, 310);
  6875. }
  6876. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6877. writer = ctx->writer;
  6878. if (!writer->beginCommand(writer, 310, 8)) goto end;
  6879. writer->putGLfloat(writer, xfactor);
  6880. writer->putGLfloat(writer, yfactor);
  6881. writer->endCommand(writer);
  6882. end:
  6883. if (ctx->captureExitFunc) ctx->captureExitFunc(310);
  6884. --ctx->captureEntryCount;
  6885. }
  6886. void __gls_capture_glPixelTransferf(GLenum pname, GLfloat param) {
  6887. GLbitfield captureFlags;
  6888. __GLScontext *const ctx = __GLS_CONTEXT;
  6889. __GLSwriter *writer;
  6890. ++ctx->captureEntryCount;
  6891. if (ctx->captureEntryFunc) ctx->captureEntryFunc(311);
  6892. captureFlags = ctx->captureFlags[311];
  6893. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6894. __GLS_BEGIN_CAPTURE_EXEC(ctx, 311);
  6895. glPixelTransferf(pname, param);
  6896. __GLS_END_CAPTURE_EXEC(ctx, 311);
  6897. }
  6898. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6899. writer = ctx->writer;
  6900. if (!writer->beginCommand(writer, 311, 8)) goto end;
  6901. writer->putGLenum(writer, pname);
  6902. writer->putGLfloatOrGLenum(writer, pname, param);
  6903. writer->endCommand(writer);
  6904. end:
  6905. if (ctx->captureExitFunc) ctx->captureExitFunc(311);
  6906. --ctx->captureEntryCount;
  6907. }
  6908. void __gls_capture_glPixelTransferi(GLenum pname, GLint param) {
  6909. GLbitfield captureFlags;
  6910. __GLScontext *const ctx = __GLS_CONTEXT;
  6911. __GLSwriter *writer;
  6912. ++ctx->captureEntryCount;
  6913. if (ctx->captureEntryFunc) ctx->captureEntryFunc(312);
  6914. captureFlags = ctx->captureFlags[312];
  6915. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6916. __GLS_BEGIN_CAPTURE_EXEC(ctx, 312);
  6917. glPixelTransferi(pname, param);
  6918. __GLS_END_CAPTURE_EXEC(ctx, 312);
  6919. }
  6920. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6921. writer = ctx->writer;
  6922. if (!writer->beginCommand(writer, 312, 8)) goto end;
  6923. writer->putGLenum(writer, pname);
  6924. writer->putGLintOrGLenum(writer, pname, param);
  6925. writer->endCommand(writer);
  6926. end:
  6927. if (ctx->captureExitFunc) ctx->captureExitFunc(312);
  6928. --ctx->captureEntryCount;
  6929. }
  6930. void __gls_capture_glPixelStoref(GLenum pname, GLfloat param) {
  6931. GLbitfield captureFlags;
  6932. __GLScontext *const ctx = __GLS_CONTEXT;
  6933. __GLSwriter *writer;
  6934. ++ctx->captureEntryCount;
  6935. if (ctx->captureEntryFunc) ctx->captureEntryFunc(313);
  6936. captureFlags = ctx->captureFlags[313];
  6937. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6938. __GLS_BEGIN_CAPTURE_EXEC(ctx, 313);
  6939. glPixelStoref(pname, param);
  6940. __GLS_END_CAPTURE_EXEC(ctx, 313);
  6941. }
  6942. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6943. writer = ctx->writer;
  6944. if (!writer->beginCommand(writer, 313, 8)) goto end;
  6945. writer->putGLenum(writer, pname);
  6946. writer->putGLfloatOrGLenum(writer, pname, param);
  6947. writer->endCommand(writer);
  6948. end:
  6949. if (ctx->captureExitFunc) ctx->captureExitFunc(313);
  6950. --ctx->captureEntryCount;
  6951. }
  6952. void __gls_capture_glPixelStorei(GLenum pname, GLint param) {
  6953. GLbitfield captureFlags;
  6954. __GLScontext *const ctx = __GLS_CONTEXT;
  6955. __GLSwriter *writer;
  6956. ++ctx->captureEntryCount;
  6957. if (ctx->captureEntryFunc) ctx->captureEntryFunc(314);
  6958. captureFlags = ctx->captureFlags[314];
  6959. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6960. __GLS_BEGIN_CAPTURE_EXEC(ctx, 314);
  6961. glPixelStorei(pname, param);
  6962. __GLS_END_CAPTURE_EXEC(ctx, 314);
  6963. }
  6964. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6965. writer = ctx->writer;
  6966. if (!writer->beginCommand(writer, 314, 8)) goto end;
  6967. writer->putGLenum(writer, pname);
  6968. writer->putGLintOrGLenum(writer, pname, param);
  6969. writer->endCommand(writer);
  6970. end:
  6971. if (ctx->captureExitFunc) ctx->captureExitFunc(314);
  6972. --ctx->captureEntryCount;
  6973. }
  6974. void __gls_capture_glPixelMapfv(GLenum map, GLint mapsize, const GLfloat *values) {
  6975. GLbitfield captureFlags;
  6976. __GLScontext *const ctx = __GLS_CONTEXT;
  6977. __GLSwriter *writer;
  6978. ++ctx->captureEntryCount;
  6979. if (ctx->captureEntryFunc) ctx->captureEntryFunc(315);
  6980. captureFlags = ctx->captureFlags[315];
  6981. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  6982. __GLS_BEGIN_CAPTURE_EXEC(ctx, 315);
  6983. glPixelMapfv(map, mapsize, values);
  6984. __GLS_END_CAPTURE_EXEC(ctx, 315);
  6985. }
  6986. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  6987. writer = ctx->writer;
  6988. if (!writer->beginCommand(writer, 315, 8 + __GLS_MAX(mapsize, 0) * 4)) goto end;
  6989. if (writer->type == GLS_TEXT) {
  6990. writer->putGLenum(writer, map);
  6991. writer->putGLint(writer, mapsize);
  6992. writer->putGLfloatv(writer, __GLS_MAX(mapsize, 0), values);
  6993. } else {
  6994. writer->putGLint(writer, mapsize);
  6995. writer->putGLenum(writer, map);
  6996. writer->putGLfloatv(writer, __GLS_MAX(mapsize, 0), values);
  6997. }
  6998. writer->endCommand(writer);
  6999. end:
  7000. if (ctx->captureExitFunc) ctx->captureExitFunc(315);
  7001. --ctx->captureEntryCount;
  7002. }
  7003. void __gls_capture_glPixelMapuiv(GLenum map, GLint mapsize, const GLuint *values) {
  7004. GLbitfield captureFlags;
  7005. __GLScontext *const ctx = __GLS_CONTEXT;
  7006. __GLSwriter *writer;
  7007. ++ctx->captureEntryCount;
  7008. if (ctx->captureEntryFunc) ctx->captureEntryFunc(316);
  7009. captureFlags = ctx->captureFlags[316];
  7010. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7011. __GLS_BEGIN_CAPTURE_EXEC(ctx, 316);
  7012. glPixelMapuiv(map, mapsize, values);
  7013. __GLS_END_CAPTURE_EXEC(ctx, 316);
  7014. }
  7015. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7016. writer = ctx->writer;
  7017. if (!writer->beginCommand(writer, 316, 8 + __GLS_MAX(mapsize, 0) * 4)) goto end;
  7018. if (writer->type == GLS_TEXT) {
  7019. writer->putGLenum(writer, map);
  7020. writer->putGLint(writer, mapsize);
  7021. writer->putGLuintv(writer, __GLS_MAX(mapsize, 0), values);
  7022. } else {
  7023. writer->putGLint(writer, mapsize);
  7024. writer->putGLenum(writer, map);
  7025. writer->putGLuintv(writer, __GLS_MAX(mapsize, 0), values);
  7026. }
  7027. writer->endCommand(writer);
  7028. end:
  7029. if (ctx->captureExitFunc) ctx->captureExitFunc(316);
  7030. --ctx->captureEntryCount;
  7031. }
  7032. void __gls_capture_glPixelMapusv(GLenum map, GLint mapsize, const GLushort *values) {
  7033. GLbitfield captureFlags;
  7034. __GLScontext *const ctx = __GLS_CONTEXT;
  7035. __GLSwriter *writer;
  7036. ++ctx->captureEntryCount;
  7037. if (ctx->captureEntryFunc) ctx->captureEntryFunc(317);
  7038. captureFlags = ctx->captureFlags[317];
  7039. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7040. __GLS_BEGIN_CAPTURE_EXEC(ctx, 317);
  7041. glPixelMapusv(map, mapsize, values);
  7042. __GLS_END_CAPTURE_EXEC(ctx, 317);
  7043. }
  7044. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7045. writer = ctx->writer;
  7046. if (!writer->beginCommand(writer, 317, 8 + __GLS_MAX(mapsize, 0) * 2)) goto end;
  7047. if (writer->type == GLS_TEXT) {
  7048. writer->putGLenum(writer, map);
  7049. writer->putGLint(writer, mapsize);
  7050. writer->putGLushortv(writer, __GLS_MAX(mapsize, 0), values);
  7051. } else {
  7052. writer->putGLint(writer, mapsize);
  7053. writer->putGLenum(writer, map);
  7054. writer->putGLushortv(writer, __GLS_MAX(mapsize, 0), values);
  7055. }
  7056. writer->endCommand(writer);
  7057. end:
  7058. if (ctx->captureExitFunc) ctx->captureExitFunc(317);
  7059. --ctx->captureEntryCount;
  7060. }
  7061. void __gls_capture_glReadBuffer(GLenum mode) {
  7062. GLbitfield captureFlags;
  7063. __GLScontext *const ctx = __GLS_CONTEXT;
  7064. __GLSwriter *writer;
  7065. ++ctx->captureEntryCount;
  7066. if (ctx->captureEntryFunc) ctx->captureEntryFunc(318);
  7067. captureFlags = ctx->captureFlags[318];
  7068. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7069. __GLS_BEGIN_CAPTURE_EXEC(ctx, 318);
  7070. glReadBuffer(mode);
  7071. __GLS_END_CAPTURE_EXEC(ctx, 318);
  7072. }
  7073. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7074. writer = ctx->writer;
  7075. if (!writer->beginCommand(writer, 318, 4)) goto end;
  7076. writer->putGLenum(writer, mode);
  7077. writer->endCommand(writer);
  7078. end:
  7079. if (ctx->captureExitFunc) ctx->captureExitFunc(318);
  7080. --ctx->captureEntryCount;
  7081. }
  7082. void __gls_capture_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) {
  7083. GLbitfield captureFlags;
  7084. __GLScontext *const ctx = __GLS_CONTEXT;
  7085. __GLSwriter *writer;
  7086. ++ctx->captureEntryCount;
  7087. if (ctx->captureEntryFunc) ctx->captureEntryFunc(319);
  7088. captureFlags = ctx->captureFlags[319];
  7089. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7090. __GLS_BEGIN_CAPTURE_EXEC(ctx, 319);
  7091. glCopyPixels(x, y, width, height, type);
  7092. __GLS_END_CAPTURE_EXEC(ctx, 319);
  7093. }
  7094. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7095. writer = ctx->writer;
  7096. if (!writer->beginCommand(writer, 319, 20)) goto end;
  7097. writer->putGLint(writer, x);
  7098. writer->putGLint(writer, y);
  7099. writer->putGLint(writer, width);
  7100. writer->putGLint(writer, height);
  7101. writer->putGLenum(writer, type);
  7102. writer->endCommand(writer);
  7103. end:
  7104. if (ctx->captureExitFunc) ctx->captureExitFunc(319);
  7105. --ctx->captureEntryCount;
  7106. }
  7107. void __gls_capture_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) {
  7108. GLbitfield captureFlags;
  7109. __GLScontext *const ctx = __GLS_CONTEXT;
  7110. __GLSwriter *writer;
  7111. ++ctx->captureEntryCount;
  7112. if (ctx->captureEntryFunc) ctx->captureEntryFunc(320);
  7113. captureFlags = ctx->captureFlags[320];
  7114. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7115. __GLS_BEGIN_CAPTURE_EXEC(ctx, 320);
  7116. glReadPixels(x, y, width, height, format, type, pixels);
  7117. __GLS_END_CAPTURE_EXEC(ctx, 320);
  7118. }
  7119. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7120. writer = ctx->writer;
  7121. if (!writer->padWordCount(writer, 1)) goto end;
  7122. if (!writer->beginCommand(writer, 320, 32)) goto end;
  7123. if (writer->type == GLS_TEXT) {
  7124. writer->putGLint(writer, x);
  7125. writer->putGLint(writer, y);
  7126. writer->putGLint(writer, width);
  7127. writer->putGLint(writer, height);
  7128. writer->putGLenum(writer, format);
  7129. writer->putGLenum(writer, type);
  7130. writer->putGLoutArg(writer, 0, pixels);
  7131. } else {
  7132. writer->putGLint(writer, width);
  7133. writer->putGLint(writer, height);
  7134. writer->putGLenum(writer, format);
  7135. writer->putGLenum(writer, type);
  7136. writer->putGLoutArg(writer, 0, pixels);
  7137. writer->putGLint(writer, x);
  7138. writer->putGLint(writer, y);
  7139. }
  7140. writer->endCommand(writer);
  7141. end:
  7142. if (ctx->captureExitFunc) ctx->captureExitFunc(320);
  7143. --ctx->captureEntryCount;
  7144. }
  7145. void __gls_capture_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) {
  7146. GLbitfield captureFlags;
  7147. __GLScontext *const ctx = __GLS_CONTEXT;
  7148. __GLSwriter *writer;
  7149. GLint pixels_count;
  7150. ++ctx->captureEntryCount;
  7151. if (ctx->captureEntryFunc) ctx->captureEntryFunc(321);
  7152. captureFlags = ctx->captureFlags[321];
  7153. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7154. __GLS_BEGIN_CAPTURE_EXEC(ctx, 321);
  7155. glDrawPixels(width, height, format, type, pixels);
  7156. __GLS_END_CAPTURE_EXEC(ctx, 321);
  7157. }
  7158. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7159. writer = ctx->writer;
  7160. pixels_count = __gls_glDrawPixels_pixels_size(format, type, width, height);
  7161. if (!writer->beginCommand(writer, 321, 20 + pixels_count * 1)) goto end;
  7162. writer->putGLSimageFlags(writer, GLS_NONE);
  7163. writer->nextList(writer);
  7164. writer->putGLint(writer, width);
  7165. writer->putGLint(writer, height);
  7166. writer->putGLenum(writer, format);
  7167. writer->putGLenum(writer, type);
  7168. __glsWriter_putPixelv(writer, format, type, width, height, pixels_count ? pixels : GLS_NONE);
  7169. writer->endCommand(writer);
  7170. end:
  7171. if (ctx->captureExitFunc) ctx->captureExitFunc(321);
  7172. --ctx->captureEntryCount;
  7173. }
  7174. void __gls_capture_glGetBooleanv(GLenum pname, GLboolean *params) {
  7175. GLbitfield captureFlags;
  7176. __GLScontext *const ctx = __GLS_CONTEXT;
  7177. __GLSwriter *writer;
  7178. ++ctx->captureEntryCount;
  7179. if (ctx->captureEntryFunc) ctx->captureEntryFunc(322);
  7180. captureFlags = ctx->captureFlags[322];
  7181. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7182. __GLS_BEGIN_CAPTURE_EXEC(ctx, 322);
  7183. glGetBooleanv(pname, params);
  7184. __GLS_END_CAPTURE_EXEC(ctx, 322);
  7185. }
  7186. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7187. writer = ctx->writer;
  7188. if (!writer->padWordCount(writer, 0)) goto end;
  7189. if (!writer->beginCommand(writer, 322, 12)) goto end;
  7190. writer->putGLenum(writer, pname);
  7191. writer->putGLoutArg(writer, 0, params);
  7192. writer->endCommand(writer);
  7193. end:
  7194. if (ctx->captureExitFunc) ctx->captureExitFunc(322);
  7195. --ctx->captureEntryCount;
  7196. }
  7197. void __gls_capture_glGetClipPlane(GLenum plane, GLdouble *equation) {
  7198. GLbitfield captureFlags;
  7199. __GLScontext *const ctx = __GLS_CONTEXT;
  7200. __GLSwriter *writer;
  7201. ++ctx->captureEntryCount;
  7202. if (ctx->captureEntryFunc) ctx->captureEntryFunc(323);
  7203. captureFlags = ctx->captureFlags[323];
  7204. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7205. __GLS_BEGIN_CAPTURE_EXEC(ctx, 323);
  7206. glGetClipPlane(plane, equation);
  7207. __GLS_END_CAPTURE_EXEC(ctx, 323);
  7208. }
  7209. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7210. writer = ctx->writer;
  7211. if (!writer->padWordCount(writer, 1)) goto end;
  7212. if (!writer->beginCommand(writer, 323, 12)) goto end;
  7213. if (writer->type == GLS_TEXT) {
  7214. writer->putGLenum(writer, plane);
  7215. writer->putGLoutArg(writer, 0, equation);
  7216. } else {
  7217. writer->putGLoutArg(writer, 0, equation);
  7218. writer->putGLenum(writer, plane);
  7219. }
  7220. writer->endCommand(writer);
  7221. end:
  7222. if (ctx->captureExitFunc) ctx->captureExitFunc(323);
  7223. --ctx->captureEntryCount;
  7224. }
  7225. void __gls_capture_glGetDoublev(GLenum pname, GLdouble *params) {
  7226. GLbitfield captureFlags;
  7227. __GLScontext *const ctx = __GLS_CONTEXT;
  7228. __GLSwriter *writer;
  7229. ++ctx->captureEntryCount;
  7230. if (ctx->captureEntryFunc) ctx->captureEntryFunc(324);
  7231. captureFlags = ctx->captureFlags[324];
  7232. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7233. __GLS_BEGIN_CAPTURE_EXEC(ctx, 324);
  7234. glGetDoublev(pname, params);
  7235. __GLS_END_CAPTURE_EXEC(ctx, 324);
  7236. }
  7237. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7238. writer = ctx->writer;
  7239. if (!writer->padWordCount(writer, 0)) goto end;
  7240. if (!writer->beginCommand(writer, 324, 12)) goto end;
  7241. writer->putGLenum(writer, pname);
  7242. writer->putGLoutArg(writer, 0, params);
  7243. writer->endCommand(writer);
  7244. end:
  7245. if (ctx->captureExitFunc) ctx->captureExitFunc(324);
  7246. --ctx->captureEntryCount;
  7247. }
  7248. GLenum __gls_capture_glGetError(void) {
  7249. GLbitfield captureFlags;
  7250. __GLScontext *const ctx = __GLS_CONTEXT;
  7251. __GLSwriter *writer;
  7252. GLenum _outVal = 0;
  7253. ++ctx->captureEntryCount;
  7254. if (ctx->captureEntryFunc) ctx->captureEntryFunc(325);
  7255. captureFlags = ctx->captureFlags[325];
  7256. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7257. __GLS_BEGIN_CAPTURE_EXEC(ctx, 325);
  7258. _outVal = glGetError();
  7259. __GLS_END_CAPTURE_EXEC(ctx, 325);
  7260. }
  7261. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7262. writer = ctx->writer;
  7263. if (!writer->beginCommand(writer, 325, 0)) goto end;
  7264. writer->endCommand(writer);
  7265. end:
  7266. if (ctx->captureExitFunc) ctx->captureExitFunc(325);
  7267. --ctx->captureEntryCount;
  7268. return _outVal;
  7269. }
  7270. void __gls_capture_glGetFloatv(GLenum pname, GLfloat *params) {
  7271. GLbitfield captureFlags;
  7272. __GLScontext *const ctx = __GLS_CONTEXT;
  7273. __GLSwriter *writer;
  7274. ++ctx->captureEntryCount;
  7275. if (ctx->captureEntryFunc) ctx->captureEntryFunc(326);
  7276. captureFlags = ctx->captureFlags[326];
  7277. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7278. __GLS_BEGIN_CAPTURE_EXEC(ctx, 326);
  7279. glGetFloatv(pname, params);
  7280. __GLS_END_CAPTURE_EXEC(ctx, 326);
  7281. }
  7282. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7283. writer = ctx->writer;
  7284. if (!writer->padWordCount(writer, 0)) goto end;
  7285. if (!writer->beginCommand(writer, 326, 12)) goto end;
  7286. writer->putGLenum(writer, pname);
  7287. writer->putGLoutArg(writer, 0, params);
  7288. writer->endCommand(writer);
  7289. end:
  7290. if (ctx->captureExitFunc) ctx->captureExitFunc(326);
  7291. --ctx->captureEntryCount;
  7292. }
  7293. void __gls_capture_glGetIntegerv(GLenum pname, GLint *params) {
  7294. GLbitfield captureFlags;
  7295. __GLScontext *const ctx = __GLS_CONTEXT;
  7296. __GLSwriter *writer;
  7297. ++ctx->captureEntryCount;
  7298. if (ctx->captureEntryFunc) ctx->captureEntryFunc(327);
  7299. captureFlags = ctx->captureFlags[327];
  7300. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7301. __GLS_BEGIN_CAPTURE_EXEC(ctx, 327);
  7302. glGetIntegerv(pname, params);
  7303. __GLS_END_CAPTURE_EXEC(ctx, 327);
  7304. }
  7305. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7306. writer = ctx->writer;
  7307. if (!writer->padWordCount(writer, 0)) goto end;
  7308. if (!writer->beginCommand(writer, 327, 12)) goto end;
  7309. writer->putGLenum(writer, pname);
  7310. writer->putGLoutArg(writer, 0, params);
  7311. writer->endCommand(writer);
  7312. end:
  7313. if (ctx->captureExitFunc) ctx->captureExitFunc(327);
  7314. --ctx->captureEntryCount;
  7315. }
  7316. void __gls_capture_glGetLightfv(GLenum light, GLenum pname, GLfloat *params) {
  7317. GLbitfield captureFlags;
  7318. __GLScontext *const ctx = __GLS_CONTEXT;
  7319. __GLSwriter *writer;
  7320. ++ctx->captureEntryCount;
  7321. if (ctx->captureEntryFunc) ctx->captureEntryFunc(328);
  7322. captureFlags = ctx->captureFlags[328];
  7323. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7324. __GLS_BEGIN_CAPTURE_EXEC(ctx, 328);
  7325. glGetLightfv(light, pname, params);
  7326. __GLS_END_CAPTURE_EXEC(ctx, 328);
  7327. }
  7328. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7329. writer = ctx->writer;
  7330. if (!writer->padWordCount(writer, 0)) goto end;
  7331. if (!writer->beginCommand(writer, 328, 16)) goto end;
  7332. if (writer->type == GLS_TEXT) {
  7333. writer->putGLenum(writer, light);
  7334. writer->putGLenum(writer, pname);
  7335. writer->putGLoutArg(writer, 0, params);
  7336. } else {
  7337. writer->putGLenum(writer, pname);
  7338. writer->putGLoutArg(writer, 0, params);
  7339. writer->putGLenum(writer, light);
  7340. }
  7341. writer->endCommand(writer);
  7342. end:
  7343. if (ctx->captureExitFunc) ctx->captureExitFunc(328);
  7344. --ctx->captureEntryCount;
  7345. }
  7346. void __gls_capture_glGetLightiv(GLenum light, GLenum pname, GLint *params) {
  7347. GLbitfield captureFlags;
  7348. __GLScontext *const ctx = __GLS_CONTEXT;
  7349. __GLSwriter *writer;
  7350. ++ctx->captureEntryCount;
  7351. if (ctx->captureEntryFunc) ctx->captureEntryFunc(329);
  7352. captureFlags = ctx->captureFlags[329];
  7353. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7354. __GLS_BEGIN_CAPTURE_EXEC(ctx, 329);
  7355. glGetLightiv(light, pname, params);
  7356. __GLS_END_CAPTURE_EXEC(ctx, 329);
  7357. }
  7358. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7359. writer = ctx->writer;
  7360. if (!writer->padWordCount(writer, 0)) goto end;
  7361. if (!writer->beginCommand(writer, 329, 16)) goto end;
  7362. if (writer->type == GLS_TEXT) {
  7363. writer->putGLenum(writer, light);
  7364. writer->putGLenum(writer, pname);
  7365. writer->putGLoutArg(writer, 0, params);
  7366. } else {
  7367. writer->putGLenum(writer, pname);
  7368. writer->putGLoutArg(writer, 0, params);
  7369. writer->putGLenum(writer, light);
  7370. }
  7371. writer->endCommand(writer);
  7372. end:
  7373. if (ctx->captureExitFunc) ctx->captureExitFunc(329);
  7374. --ctx->captureEntryCount;
  7375. }
  7376. void __gls_capture_glGetMapdv(GLenum target, GLenum query, GLdouble *v) {
  7377. GLbitfield captureFlags;
  7378. __GLScontext *const ctx = __GLS_CONTEXT;
  7379. __GLSwriter *writer;
  7380. ++ctx->captureEntryCount;
  7381. if (ctx->captureEntryFunc) ctx->captureEntryFunc(330);
  7382. captureFlags = ctx->captureFlags[330];
  7383. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7384. __GLS_BEGIN_CAPTURE_EXEC(ctx, 330);
  7385. glGetMapdv(target, query, v);
  7386. __GLS_END_CAPTURE_EXEC(ctx, 330);
  7387. }
  7388. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7389. writer = ctx->writer;
  7390. if (!writer->padWordCount(writer, 1)) goto end;
  7391. if (!writer->beginCommand(writer, 330, 16)) goto end;
  7392. writer->putGLenum(writer, target);
  7393. writer->putGLenum(writer, query);
  7394. writer->putGLoutArg(writer, 0, v);
  7395. writer->endCommand(writer);
  7396. end:
  7397. if (ctx->captureExitFunc) ctx->captureExitFunc(330);
  7398. --ctx->captureEntryCount;
  7399. }
  7400. void __gls_capture_glGetMapfv(GLenum target, GLenum query, GLfloat *v) {
  7401. GLbitfield captureFlags;
  7402. __GLScontext *const ctx = __GLS_CONTEXT;
  7403. __GLSwriter *writer;
  7404. ++ctx->captureEntryCount;
  7405. if (ctx->captureEntryFunc) ctx->captureEntryFunc(331);
  7406. captureFlags = ctx->captureFlags[331];
  7407. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7408. __GLS_BEGIN_CAPTURE_EXEC(ctx, 331);
  7409. glGetMapfv(target, query, v);
  7410. __GLS_END_CAPTURE_EXEC(ctx, 331);
  7411. }
  7412. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7413. writer = ctx->writer;
  7414. if (!writer->padWordCount(writer, 1)) goto end;
  7415. if (!writer->beginCommand(writer, 331, 16)) goto end;
  7416. writer->putGLenum(writer, target);
  7417. writer->putGLenum(writer, query);
  7418. writer->putGLoutArg(writer, 0, v);
  7419. writer->endCommand(writer);
  7420. end:
  7421. if (ctx->captureExitFunc) ctx->captureExitFunc(331);
  7422. --ctx->captureEntryCount;
  7423. }
  7424. void __gls_capture_glGetMapiv(GLenum target, GLenum query, GLint *v) {
  7425. GLbitfield captureFlags;
  7426. __GLScontext *const ctx = __GLS_CONTEXT;
  7427. __GLSwriter *writer;
  7428. ++ctx->captureEntryCount;
  7429. if (ctx->captureEntryFunc) ctx->captureEntryFunc(332);
  7430. captureFlags = ctx->captureFlags[332];
  7431. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7432. __GLS_BEGIN_CAPTURE_EXEC(ctx, 332);
  7433. glGetMapiv(target, query, v);
  7434. __GLS_END_CAPTURE_EXEC(ctx, 332);
  7435. }
  7436. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7437. writer = ctx->writer;
  7438. if (!writer->padWordCount(writer, 1)) goto end;
  7439. if (!writer->beginCommand(writer, 332, 16)) goto end;
  7440. writer->putGLenum(writer, target);
  7441. writer->putGLenum(writer, query);
  7442. writer->putGLoutArg(writer, 0, v);
  7443. writer->endCommand(writer);
  7444. end:
  7445. if (ctx->captureExitFunc) ctx->captureExitFunc(332);
  7446. --ctx->captureEntryCount;
  7447. }
  7448. void __gls_capture_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) {
  7449. GLbitfield captureFlags;
  7450. __GLScontext *const ctx = __GLS_CONTEXT;
  7451. __GLSwriter *writer;
  7452. ++ctx->captureEntryCount;
  7453. if (ctx->captureEntryFunc) ctx->captureEntryFunc(333);
  7454. captureFlags = ctx->captureFlags[333];
  7455. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7456. __GLS_BEGIN_CAPTURE_EXEC(ctx, 333);
  7457. glGetMaterialfv(face, pname, params);
  7458. __GLS_END_CAPTURE_EXEC(ctx, 333);
  7459. }
  7460. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7461. writer = ctx->writer;
  7462. if (!writer->padWordCount(writer, 0)) goto end;
  7463. if (!writer->beginCommand(writer, 333, 16)) goto end;
  7464. if (writer->type == GLS_TEXT) {
  7465. writer->putGLenum(writer, face);
  7466. writer->putGLenum(writer, pname);
  7467. writer->putGLoutArg(writer, 0, params);
  7468. } else {
  7469. writer->putGLenum(writer, pname);
  7470. writer->putGLoutArg(writer, 0, params);
  7471. writer->putGLenum(writer, face);
  7472. }
  7473. writer->endCommand(writer);
  7474. end:
  7475. if (ctx->captureExitFunc) ctx->captureExitFunc(333);
  7476. --ctx->captureEntryCount;
  7477. }
  7478. void __gls_capture_glGetMaterialiv(GLenum face, GLenum pname, GLint *params) {
  7479. GLbitfield captureFlags;
  7480. __GLScontext *const ctx = __GLS_CONTEXT;
  7481. __GLSwriter *writer;
  7482. ++ctx->captureEntryCount;
  7483. if (ctx->captureEntryFunc) ctx->captureEntryFunc(334);
  7484. captureFlags = ctx->captureFlags[334];
  7485. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7486. __GLS_BEGIN_CAPTURE_EXEC(ctx, 334);
  7487. glGetMaterialiv(face, pname, params);
  7488. __GLS_END_CAPTURE_EXEC(ctx, 334);
  7489. }
  7490. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7491. writer = ctx->writer;
  7492. if (!writer->padWordCount(writer, 0)) goto end;
  7493. if (!writer->beginCommand(writer, 334, 16)) goto end;
  7494. if (writer->type == GLS_TEXT) {
  7495. writer->putGLenum(writer, face);
  7496. writer->putGLenum(writer, pname);
  7497. writer->putGLoutArg(writer, 0, params);
  7498. } else {
  7499. writer->putGLenum(writer, pname);
  7500. writer->putGLoutArg(writer, 0, params);
  7501. writer->putGLenum(writer, face);
  7502. }
  7503. writer->endCommand(writer);
  7504. end:
  7505. if (ctx->captureExitFunc) ctx->captureExitFunc(334);
  7506. --ctx->captureEntryCount;
  7507. }
  7508. void __gls_capture_glGetPixelMapfv(GLenum map, GLfloat *values) {
  7509. GLbitfield captureFlags;
  7510. __GLScontext *const ctx = __GLS_CONTEXT;
  7511. __GLSwriter *writer;
  7512. ++ctx->captureEntryCount;
  7513. if (ctx->captureEntryFunc) ctx->captureEntryFunc(335);
  7514. captureFlags = ctx->captureFlags[335];
  7515. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7516. __GLS_BEGIN_CAPTURE_EXEC(ctx, 335);
  7517. glGetPixelMapfv(map, values);
  7518. __GLS_END_CAPTURE_EXEC(ctx, 335);
  7519. }
  7520. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7521. writer = ctx->writer;
  7522. if (!writer->padWordCount(writer, 0)) goto end;
  7523. if (!writer->beginCommand(writer, 335, 12)) goto end;
  7524. writer->putGLenum(writer, map);
  7525. writer->putGLoutArg(writer, 0, values);
  7526. writer->endCommand(writer);
  7527. end:
  7528. if (ctx->captureExitFunc) ctx->captureExitFunc(335);
  7529. --ctx->captureEntryCount;
  7530. }
  7531. void __gls_capture_glGetPixelMapuiv(GLenum map, GLuint *values) {
  7532. GLbitfield captureFlags;
  7533. __GLScontext *const ctx = __GLS_CONTEXT;
  7534. __GLSwriter *writer;
  7535. ++ctx->captureEntryCount;
  7536. if (ctx->captureEntryFunc) ctx->captureEntryFunc(336);
  7537. captureFlags = ctx->captureFlags[336];
  7538. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7539. __GLS_BEGIN_CAPTURE_EXEC(ctx, 336);
  7540. glGetPixelMapuiv(map, values);
  7541. __GLS_END_CAPTURE_EXEC(ctx, 336);
  7542. }
  7543. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7544. writer = ctx->writer;
  7545. if (!writer->padWordCount(writer, 0)) goto end;
  7546. if (!writer->beginCommand(writer, 336, 12)) goto end;
  7547. writer->putGLenum(writer, map);
  7548. writer->putGLoutArg(writer, 0, values);
  7549. writer->endCommand(writer);
  7550. end:
  7551. if (ctx->captureExitFunc) ctx->captureExitFunc(336);
  7552. --ctx->captureEntryCount;
  7553. }
  7554. void __gls_capture_glGetPixelMapusv(GLenum map, GLushort *values) {
  7555. GLbitfield captureFlags;
  7556. __GLScontext *const ctx = __GLS_CONTEXT;
  7557. __GLSwriter *writer;
  7558. ++ctx->captureEntryCount;
  7559. if (ctx->captureEntryFunc) ctx->captureEntryFunc(337);
  7560. captureFlags = ctx->captureFlags[337];
  7561. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7562. __GLS_BEGIN_CAPTURE_EXEC(ctx, 337);
  7563. glGetPixelMapusv(map, values);
  7564. __GLS_END_CAPTURE_EXEC(ctx, 337);
  7565. }
  7566. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7567. writer = ctx->writer;
  7568. if (!writer->padWordCount(writer, 0)) goto end;
  7569. if (!writer->beginCommand(writer, 337, 12)) goto end;
  7570. writer->putGLenum(writer, map);
  7571. writer->putGLoutArg(writer, 0, values);
  7572. writer->endCommand(writer);
  7573. end:
  7574. if (ctx->captureExitFunc) ctx->captureExitFunc(337);
  7575. --ctx->captureEntryCount;
  7576. }
  7577. void __gls_capture_glGetPolygonStipple(GLubyte *mask) {
  7578. GLbitfield captureFlags;
  7579. __GLScontext *const ctx = __GLS_CONTEXT;
  7580. __GLSwriter *writer;
  7581. ++ctx->captureEntryCount;
  7582. if (ctx->captureEntryFunc) ctx->captureEntryFunc(338);
  7583. captureFlags = ctx->captureFlags[338];
  7584. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7585. __GLS_BEGIN_CAPTURE_EXEC(ctx, 338);
  7586. glGetPolygonStipple(mask);
  7587. __GLS_END_CAPTURE_EXEC(ctx, 338);
  7588. }
  7589. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7590. writer = ctx->writer;
  7591. if (!writer->padWordCount(writer, 1)) goto end;
  7592. if (!writer->beginCommand(writer, 338, 8)) goto end;
  7593. writer->putGLoutArg(writer, 0, mask);
  7594. writer->endCommand(writer);
  7595. end:
  7596. if (ctx->captureExitFunc) ctx->captureExitFunc(338);
  7597. --ctx->captureEntryCount;
  7598. }
  7599. const GLubyte * __gls_capture_glGetString(GLenum name) {
  7600. GLbitfield captureFlags;
  7601. __GLScontext *const ctx = __GLS_CONTEXT;
  7602. __GLSwriter *writer;
  7603. const GLubyte * _outVal = 0;
  7604. ++ctx->captureEntryCount;
  7605. if (ctx->captureEntryFunc) ctx->captureEntryFunc(339);
  7606. captureFlags = ctx->captureFlags[339];
  7607. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7608. __GLS_BEGIN_CAPTURE_EXEC(ctx, 339);
  7609. _outVal = glGetString(name);
  7610. __GLS_END_CAPTURE_EXEC(ctx, 339);
  7611. }
  7612. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7613. writer = ctx->writer;
  7614. if (!writer->beginCommand(writer, 339, 4)) goto end;
  7615. writer->putGLenum(writer, name);
  7616. writer->endCommand(writer);
  7617. end:
  7618. if (ctx->captureExitFunc) ctx->captureExitFunc(339);
  7619. --ctx->captureEntryCount;
  7620. return _outVal;
  7621. }
  7622. void __gls_capture_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params) {
  7623. GLbitfield captureFlags;
  7624. __GLScontext *const ctx = __GLS_CONTEXT;
  7625. __GLSwriter *writer;
  7626. ++ctx->captureEntryCount;
  7627. if (ctx->captureEntryFunc) ctx->captureEntryFunc(340);
  7628. captureFlags = ctx->captureFlags[340];
  7629. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7630. __GLS_BEGIN_CAPTURE_EXEC(ctx, 340);
  7631. glGetTexEnvfv(target, pname, params);
  7632. __GLS_END_CAPTURE_EXEC(ctx, 340);
  7633. }
  7634. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7635. writer = ctx->writer;
  7636. if (!writer->padWordCount(writer, 0)) goto end;
  7637. if (!writer->beginCommand(writer, 340, 16)) goto end;
  7638. if (writer->type == GLS_TEXT) {
  7639. writer->putGLenum(writer, target);
  7640. writer->putGLenum(writer, pname);
  7641. writer->putGLoutArg(writer, 0, params);
  7642. } else {
  7643. writer->putGLenum(writer, pname);
  7644. writer->putGLoutArg(writer, 0, params);
  7645. writer->putGLenum(writer, target);
  7646. }
  7647. writer->endCommand(writer);
  7648. end:
  7649. if (ctx->captureExitFunc) ctx->captureExitFunc(340);
  7650. --ctx->captureEntryCount;
  7651. }
  7652. void __gls_capture_glGetTexEnviv(GLenum target, GLenum pname, GLint *params) {
  7653. GLbitfield captureFlags;
  7654. __GLScontext *const ctx = __GLS_CONTEXT;
  7655. __GLSwriter *writer;
  7656. ++ctx->captureEntryCount;
  7657. if (ctx->captureEntryFunc) ctx->captureEntryFunc(341);
  7658. captureFlags = ctx->captureFlags[341];
  7659. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7660. __GLS_BEGIN_CAPTURE_EXEC(ctx, 341);
  7661. glGetTexEnviv(target, pname, params);
  7662. __GLS_END_CAPTURE_EXEC(ctx, 341);
  7663. }
  7664. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7665. writer = ctx->writer;
  7666. if (!writer->padWordCount(writer, 0)) goto end;
  7667. if (!writer->beginCommand(writer, 341, 16)) goto end;
  7668. if (writer->type == GLS_TEXT) {
  7669. writer->putGLenum(writer, target);
  7670. writer->putGLenum(writer, pname);
  7671. writer->putGLoutArg(writer, 0, params);
  7672. } else {
  7673. writer->putGLenum(writer, pname);
  7674. writer->putGLoutArg(writer, 0, params);
  7675. writer->putGLenum(writer, target);
  7676. }
  7677. writer->endCommand(writer);
  7678. end:
  7679. if (ctx->captureExitFunc) ctx->captureExitFunc(341);
  7680. --ctx->captureEntryCount;
  7681. }
  7682. void __gls_capture_glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params) {
  7683. GLbitfield captureFlags;
  7684. __GLScontext *const ctx = __GLS_CONTEXT;
  7685. __GLSwriter *writer;
  7686. ++ctx->captureEntryCount;
  7687. if (ctx->captureEntryFunc) ctx->captureEntryFunc(342);
  7688. captureFlags = ctx->captureFlags[342];
  7689. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7690. __GLS_BEGIN_CAPTURE_EXEC(ctx, 342);
  7691. glGetTexGendv(coord, pname, params);
  7692. __GLS_END_CAPTURE_EXEC(ctx, 342);
  7693. }
  7694. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7695. writer = ctx->writer;
  7696. if (!writer->padWordCount(writer, 0)) goto end;
  7697. if (!writer->beginCommand(writer, 342, 16)) goto end;
  7698. if (writer->type == GLS_TEXT) {
  7699. writer->putGLenum(writer, coord);
  7700. writer->putGLenum(writer, pname);
  7701. writer->putGLoutArg(writer, 0, params);
  7702. } else {
  7703. writer->putGLenum(writer, pname);
  7704. writer->putGLoutArg(writer, 0, params);
  7705. writer->putGLenum(writer, coord);
  7706. }
  7707. writer->endCommand(writer);
  7708. end:
  7709. if (ctx->captureExitFunc) ctx->captureExitFunc(342);
  7710. --ctx->captureEntryCount;
  7711. }
  7712. void __gls_capture_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params) {
  7713. GLbitfield captureFlags;
  7714. __GLScontext *const ctx = __GLS_CONTEXT;
  7715. __GLSwriter *writer;
  7716. ++ctx->captureEntryCount;
  7717. if (ctx->captureEntryFunc) ctx->captureEntryFunc(343);
  7718. captureFlags = ctx->captureFlags[343];
  7719. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7720. __GLS_BEGIN_CAPTURE_EXEC(ctx, 343);
  7721. glGetTexGenfv(coord, pname, params);
  7722. __GLS_END_CAPTURE_EXEC(ctx, 343);
  7723. }
  7724. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7725. writer = ctx->writer;
  7726. if (!writer->padWordCount(writer, 0)) goto end;
  7727. if (!writer->beginCommand(writer, 343, 16)) goto end;
  7728. if (writer->type == GLS_TEXT) {
  7729. writer->putGLenum(writer, coord);
  7730. writer->putGLenum(writer, pname);
  7731. writer->putGLoutArg(writer, 0, params);
  7732. } else {
  7733. writer->putGLenum(writer, pname);
  7734. writer->putGLoutArg(writer, 0, params);
  7735. writer->putGLenum(writer, coord);
  7736. }
  7737. writer->endCommand(writer);
  7738. end:
  7739. if (ctx->captureExitFunc) ctx->captureExitFunc(343);
  7740. --ctx->captureEntryCount;
  7741. }
  7742. void __gls_capture_glGetTexGeniv(GLenum coord, GLenum pname, GLint *params) {
  7743. GLbitfield captureFlags;
  7744. __GLScontext *const ctx = __GLS_CONTEXT;
  7745. __GLSwriter *writer;
  7746. ++ctx->captureEntryCount;
  7747. if (ctx->captureEntryFunc) ctx->captureEntryFunc(344);
  7748. captureFlags = ctx->captureFlags[344];
  7749. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7750. __GLS_BEGIN_CAPTURE_EXEC(ctx, 344);
  7751. glGetTexGeniv(coord, pname, params);
  7752. __GLS_END_CAPTURE_EXEC(ctx, 344);
  7753. }
  7754. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7755. writer = ctx->writer;
  7756. if (!writer->padWordCount(writer, 0)) goto end;
  7757. if (!writer->beginCommand(writer, 344, 16)) goto end;
  7758. if (writer->type == GLS_TEXT) {
  7759. writer->putGLenum(writer, coord);
  7760. writer->putGLenum(writer, pname);
  7761. writer->putGLoutArg(writer, 0, params);
  7762. } else {
  7763. writer->putGLenum(writer, pname);
  7764. writer->putGLoutArg(writer, 0, params);
  7765. writer->putGLenum(writer, coord);
  7766. }
  7767. writer->endCommand(writer);
  7768. end:
  7769. if (ctx->captureExitFunc) ctx->captureExitFunc(344);
  7770. --ctx->captureEntryCount;
  7771. }
  7772. void __gls_capture_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels) {
  7773. GLbitfield captureFlags;
  7774. __GLScontext *const ctx = __GLS_CONTEXT;
  7775. __GLSwriter *writer;
  7776. ++ctx->captureEntryCount;
  7777. if (ctx->captureEntryFunc) ctx->captureEntryFunc(345);
  7778. captureFlags = ctx->captureFlags[345];
  7779. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7780. __GLS_BEGIN_CAPTURE_EXEC(ctx, 345);
  7781. glGetTexImage(target, level, format, type, pixels);
  7782. __GLS_END_CAPTURE_EXEC(ctx, 345);
  7783. }
  7784. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7785. writer = ctx->writer;
  7786. if (!writer->padWordCount(writer, 1)) goto end;
  7787. if (!writer->beginCommand(writer, 345, 24)) goto end;
  7788. writer->putGLenum(writer, target);
  7789. writer->putGLint(writer, level);
  7790. writer->putGLenum(writer, format);
  7791. writer->putGLenum(writer, type);
  7792. writer->putGLoutArg(writer, 0, pixels);
  7793. writer->endCommand(writer);
  7794. end:
  7795. if (ctx->captureExitFunc) ctx->captureExitFunc(345);
  7796. --ctx->captureEntryCount;
  7797. }
  7798. void __gls_capture_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) {
  7799. GLbitfield captureFlags;
  7800. __GLScontext *const ctx = __GLS_CONTEXT;
  7801. __GLSwriter *writer;
  7802. ++ctx->captureEntryCount;
  7803. if (ctx->captureEntryFunc) ctx->captureEntryFunc(346);
  7804. captureFlags = ctx->captureFlags[346];
  7805. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7806. __GLS_BEGIN_CAPTURE_EXEC(ctx, 346);
  7807. glGetTexParameterfv(target, pname, params);
  7808. __GLS_END_CAPTURE_EXEC(ctx, 346);
  7809. }
  7810. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7811. writer = ctx->writer;
  7812. if (!writer->padWordCount(writer, 0)) goto end;
  7813. if (!writer->beginCommand(writer, 346, 16)) goto end;
  7814. if (writer->type == GLS_TEXT) {
  7815. writer->putGLenum(writer, target);
  7816. writer->putGLenum(writer, pname);
  7817. writer->putGLoutArg(writer, 0, params);
  7818. } else {
  7819. writer->putGLenum(writer, pname);
  7820. writer->putGLoutArg(writer, 0, params);
  7821. writer->putGLenum(writer, target);
  7822. }
  7823. writer->endCommand(writer);
  7824. end:
  7825. if (ctx->captureExitFunc) ctx->captureExitFunc(346);
  7826. --ctx->captureEntryCount;
  7827. }
  7828. void __gls_capture_glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) {
  7829. GLbitfield captureFlags;
  7830. __GLScontext *const ctx = __GLS_CONTEXT;
  7831. __GLSwriter *writer;
  7832. ++ctx->captureEntryCount;
  7833. if (ctx->captureEntryFunc) ctx->captureEntryFunc(347);
  7834. captureFlags = ctx->captureFlags[347];
  7835. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7836. __GLS_BEGIN_CAPTURE_EXEC(ctx, 347);
  7837. glGetTexParameteriv(target, pname, params);
  7838. __GLS_END_CAPTURE_EXEC(ctx, 347);
  7839. }
  7840. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7841. writer = ctx->writer;
  7842. if (!writer->padWordCount(writer, 0)) goto end;
  7843. if (!writer->beginCommand(writer, 347, 16)) goto end;
  7844. if (writer->type == GLS_TEXT) {
  7845. writer->putGLenum(writer, target);
  7846. writer->putGLenum(writer, pname);
  7847. writer->putGLoutArg(writer, 0, params);
  7848. } else {
  7849. writer->putGLenum(writer, pname);
  7850. writer->putGLoutArg(writer, 0, params);
  7851. writer->putGLenum(writer, target);
  7852. }
  7853. writer->endCommand(writer);
  7854. end:
  7855. if (ctx->captureExitFunc) ctx->captureExitFunc(347);
  7856. --ctx->captureEntryCount;
  7857. }
  7858. void __gls_capture_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params) {
  7859. GLbitfield captureFlags;
  7860. __GLScontext *const ctx = __GLS_CONTEXT;
  7861. __GLSwriter *writer;
  7862. ++ctx->captureEntryCount;
  7863. if (ctx->captureEntryFunc) ctx->captureEntryFunc(348);
  7864. captureFlags = ctx->captureFlags[348];
  7865. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7866. __GLS_BEGIN_CAPTURE_EXEC(ctx, 348);
  7867. glGetTexLevelParameterfv(target, level, pname, params);
  7868. __GLS_END_CAPTURE_EXEC(ctx, 348);
  7869. }
  7870. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7871. writer = ctx->writer;
  7872. if (!writer->padWordCount(writer, 0)) goto end;
  7873. if (!writer->beginCommand(writer, 348, 20)) goto end;
  7874. if (writer->type == GLS_TEXT) {
  7875. writer->putGLenum(writer, target);
  7876. writer->putGLint(writer, level);
  7877. writer->putGLenum(writer, pname);
  7878. writer->putGLoutArg(writer, 0, params);
  7879. } else {
  7880. writer->putGLenum(writer, pname);
  7881. writer->putGLoutArg(writer, 0, params);
  7882. writer->putGLenum(writer, target);
  7883. writer->putGLint(writer, level);
  7884. }
  7885. writer->endCommand(writer);
  7886. end:
  7887. if (ctx->captureExitFunc) ctx->captureExitFunc(348);
  7888. --ctx->captureEntryCount;
  7889. }
  7890. void __gls_capture_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params) {
  7891. GLbitfield captureFlags;
  7892. __GLScontext *const ctx = __GLS_CONTEXT;
  7893. __GLSwriter *writer;
  7894. ++ctx->captureEntryCount;
  7895. if (ctx->captureEntryFunc) ctx->captureEntryFunc(349);
  7896. captureFlags = ctx->captureFlags[349];
  7897. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7898. __GLS_BEGIN_CAPTURE_EXEC(ctx, 349);
  7899. glGetTexLevelParameteriv(target, level, pname, params);
  7900. __GLS_END_CAPTURE_EXEC(ctx, 349);
  7901. }
  7902. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7903. writer = ctx->writer;
  7904. if (!writer->padWordCount(writer, 0)) goto end;
  7905. if (!writer->beginCommand(writer, 349, 20)) goto end;
  7906. if (writer->type == GLS_TEXT) {
  7907. writer->putGLenum(writer, target);
  7908. writer->putGLint(writer, level);
  7909. writer->putGLenum(writer, pname);
  7910. writer->putGLoutArg(writer, 0, params);
  7911. } else {
  7912. writer->putGLenum(writer, pname);
  7913. writer->putGLoutArg(writer, 0, params);
  7914. writer->putGLenum(writer, target);
  7915. writer->putGLint(writer, level);
  7916. }
  7917. writer->endCommand(writer);
  7918. end:
  7919. if (ctx->captureExitFunc) ctx->captureExitFunc(349);
  7920. --ctx->captureEntryCount;
  7921. }
  7922. GLboolean __gls_capture_glIsEnabled(GLenum cap) {
  7923. GLbitfield captureFlags;
  7924. __GLScontext *const ctx = __GLS_CONTEXT;
  7925. __GLSwriter *writer;
  7926. GLboolean _outVal = 0;
  7927. ++ctx->captureEntryCount;
  7928. if (ctx->captureEntryFunc) ctx->captureEntryFunc(350);
  7929. captureFlags = ctx->captureFlags[350];
  7930. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7931. __GLS_BEGIN_CAPTURE_EXEC(ctx, 350);
  7932. _outVal = glIsEnabled(cap);
  7933. __GLS_END_CAPTURE_EXEC(ctx, 350);
  7934. }
  7935. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7936. writer = ctx->writer;
  7937. if (!writer->beginCommand(writer, 350, 4)) goto end;
  7938. writer->putGLenum(writer, cap);
  7939. writer->endCommand(writer);
  7940. end:
  7941. if (ctx->captureExitFunc) ctx->captureExitFunc(350);
  7942. --ctx->captureEntryCount;
  7943. return _outVal;
  7944. }
  7945. GLboolean __gls_capture_glIsList(GLuint list) {
  7946. GLbitfield captureFlags;
  7947. __GLScontext *const ctx = __GLS_CONTEXT;
  7948. __GLSwriter *writer;
  7949. GLboolean _outVal = 0;
  7950. ++ctx->captureEntryCount;
  7951. if (ctx->captureEntryFunc) ctx->captureEntryFunc(351);
  7952. captureFlags = ctx->captureFlags[351];
  7953. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7954. __GLS_BEGIN_CAPTURE_EXEC(ctx, 351);
  7955. _outVal = glIsList(list);
  7956. __GLS_END_CAPTURE_EXEC(ctx, 351);
  7957. }
  7958. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7959. writer = ctx->writer;
  7960. if (!writer->beginCommand(writer, 351, 4)) goto end;
  7961. writer->putGLuint(writer, list);
  7962. writer->endCommand(writer);
  7963. end:
  7964. if (ctx->captureExitFunc) ctx->captureExitFunc(351);
  7965. --ctx->captureEntryCount;
  7966. return _outVal;
  7967. }
  7968. void __gls_capture_glDepthRange(GLclampd zNear, GLclampd zFar) {
  7969. GLbitfield captureFlags;
  7970. __GLScontext *const ctx = __GLS_CONTEXT;
  7971. __GLSwriter *writer;
  7972. ++ctx->captureEntryCount;
  7973. if (ctx->captureEntryFunc) ctx->captureEntryFunc(352);
  7974. captureFlags = ctx->captureFlags[352];
  7975. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7976. __GLS_BEGIN_CAPTURE_EXEC(ctx, 352);
  7977. glDepthRange(zNear, zFar);
  7978. __GLS_END_CAPTURE_EXEC(ctx, 352);
  7979. }
  7980. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  7981. writer = ctx->writer;
  7982. if (!writer->padWordCount(writer, 1)) goto end;
  7983. if (!writer->beginCommand(writer, 352, 16)) goto end;
  7984. writer->putGLdouble(writer, zNear);
  7985. writer->putGLdouble(writer, zFar);
  7986. writer->endCommand(writer);
  7987. end:
  7988. if (ctx->captureExitFunc) ctx->captureExitFunc(352);
  7989. --ctx->captureEntryCount;
  7990. }
  7991. void __gls_capture_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) {
  7992. GLbitfield captureFlags;
  7993. __GLScontext *const ctx = __GLS_CONTEXT;
  7994. __GLSwriter *writer;
  7995. ++ctx->captureEntryCount;
  7996. if (ctx->captureEntryFunc) ctx->captureEntryFunc(353);
  7997. captureFlags = ctx->captureFlags[353];
  7998. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  7999. __GLS_BEGIN_CAPTURE_EXEC(ctx, 353);
  8000. glFrustum(left, right, bottom, top, zNear, zFar);
  8001. __GLS_END_CAPTURE_EXEC(ctx, 353);
  8002. }
  8003. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8004. writer = ctx->writer;
  8005. if (!writer->padWordCount(writer, 1)) goto end;
  8006. if (!writer->beginCommand(writer, 353, 48)) goto end;
  8007. writer->putGLdouble(writer, left);
  8008. writer->putGLdouble(writer, right);
  8009. writer->putGLdouble(writer, bottom);
  8010. writer->putGLdouble(writer, top);
  8011. writer->putGLdouble(writer, zNear);
  8012. writer->putGLdouble(writer, zFar);
  8013. writer->endCommand(writer);
  8014. end:
  8015. if (ctx->captureExitFunc) ctx->captureExitFunc(353);
  8016. --ctx->captureEntryCount;
  8017. }
  8018. void __gls_capture_glLoadIdentity(void) {
  8019. GLbitfield captureFlags;
  8020. __GLScontext *const ctx = __GLS_CONTEXT;
  8021. __GLSwriter *writer;
  8022. ++ctx->captureEntryCount;
  8023. if (ctx->captureEntryFunc) ctx->captureEntryFunc(354);
  8024. captureFlags = ctx->captureFlags[354];
  8025. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8026. __GLS_BEGIN_CAPTURE_EXEC(ctx, 354);
  8027. glLoadIdentity();
  8028. __GLS_END_CAPTURE_EXEC(ctx, 354);
  8029. }
  8030. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8031. writer = ctx->writer;
  8032. if (!writer->beginCommand(writer, 354, 0)) goto end;
  8033. writer->endCommand(writer);
  8034. end:
  8035. if (ctx->captureExitFunc) ctx->captureExitFunc(354);
  8036. --ctx->captureEntryCount;
  8037. }
  8038. void __gls_capture_glLoadMatrixf(const GLfloat *m) {
  8039. GLbitfield captureFlags;
  8040. __GLScontext *const ctx = __GLS_CONTEXT;
  8041. __GLSwriter *writer;
  8042. ++ctx->captureEntryCount;
  8043. if (ctx->captureEntryFunc) ctx->captureEntryFunc(355);
  8044. captureFlags = ctx->captureFlags[355];
  8045. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8046. __GLS_BEGIN_CAPTURE_EXEC(ctx, 355);
  8047. glLoadMatrixf(m);
  8048. __GLS_END_CAPTURE_EXEC(ctx, 355);
  8049. }
  8050. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8051. writer = ctx->writer;
  8052. if (!writer->beginCommand(writer, 355, 64)) goto end;
  8053. writer->putGLfloatm(writer, m);
  8054. writer->endCommand(writer);
  8055. end:
  8056. if (ctx->captureExitFunc) ctx->captureExitFunc(355);
  8057. --ctx->captureEntryCount;
  8058. }
  8059. void __gls_capture_glLoadMatrixd(const GLdouble *m) {
  8060. GLbitfield captureFlags;
  8061. __GLScontext *const ctx = __GLS_CONTEXT;
  8062. __GLSwriter *writer;
  8063. ++ctx->captureEntryCount;
  8064. if (ctx->captureEntryFunc) ctx->captureEntryFunc(356);
  8065. captureFlags = ctx->captureFlags[356];
  8066. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8067. __GLS_BEGIN_CAPTURE_EXEC(ctx, 356);
  8068. glLoadMatrixd(m);
  8069. __GLS_END_CAPTURE_EXEC(ctx, 356);
  8070. }
  8071. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8072. writer = ctx->writer;
  8073. if (!writer->padWordCount(writer, 1)) goto end;
  8074. if (!writer->beginCommand(writer, 356, 128)) goto end;
  8075. writer->putGLdoublem(writer, m);
  8076. writer->endCommand(writer);
  8077. end:
  8078. if (ctx->captureExitFunc) ctx->captureExitFunc(356);
  8079. --ctx->captureEntryCount;
  8080. }
  8081. void __gls_capture_glMatrixMode(GLenum mode) {
  8082. GLbitfield captureFlags;
  8083. __GLScontext *const ctx = __GLS_CONTEXT;
  8084. __GLSwriter *writer;
  8085. ++ctx->captureEntryCount;
  8086. if (ctx->captureEntryFunc) ctx->captureEntryFunc(357);
  8087. captureFlags = ctx->captureFlags[357];
  8088. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8089. __GLS_BEGIN_CAPTURE_EXEC(ctx, 357);
  8090. glMatrixMode(mode);
  8091. __GLS_END_CAPTURE_EXEC(ctx, 357);
  8092. }
  8093. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8094. writer = ctx->writer;
  8095. if (!writer->beginCommand(writer, 357, 4)) goto end;
  8096. writer->putGLenum(writer, mode);
  8097. writer->endCommand(writer);
  8098. end:
  8099. if (ctx->captureExitFunc) ctx->captureExitFunc(357);
  8100. --ctx->captureEntryCount;
  8101. }
  8102. void __gls_capture_glMultMatrixf(const GLfloat *m) {
  8103. GLbitfield captureFlags;
  8104. __GLScontext *const ctx = __GLS_CONTEXT;
  8105. __GLSwriter *writer;
  8106. ++ctx->captureEntryCount;
  8107. if (ctx->captureEntryFunc) ctx->captureEntryFunc(358);
  8108. captureFlags = ctx->captureFlags[358];
  8109. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8110. __GLS_BEGIN_CAPTURE_EXEC(ctx, 358);
  8111. glMultMatrixf(m);
  8112. __GLS_END_CAPTURE_EXEC(ctx, 358);
  8113. }
  8114. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8115. writer = ctx->writer;
  8116. if (!writer->beginCommand(writer, 358, 64)) goto end;
  8117. writer->putGLfloatm(writer, m);
  8118. writer->endCommand(writer);
  8119. end:
  8120. if (ctx->captureExitFunc) ctx->captureExitFunc(358);
  8121. --ctx->captureEntryCount;
  8122. }
  8123. void __gls_capture_glMultMatrixd(const GLdouble *m) {
  8124. GLbitfield captureFlags;
  8125. __GLScontext *const ctx = __GLS_CONTEXT;
  8126. __GLSwriter *writer;
  8127. ++ctx->captureEntryCount;
  8128. if (ctx->captureEntryFunc) ctx->captureEntryFunc(359);
  8129. captureFlags = ctx->captureFlags[359];
  8130. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8131. __GLS_BEGIN_CAPTURE_EXEC(ctx, 359);
  8132. glMultMatrixd(m);
  8133. __GLS_END_CAPTURE_EXEC(ctx, 359);
  8134. }
  8135. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8136. writer = ctx->writer;
  8137. if (!writer->padWordCount(writer, 1)) goto end;
  8138. if (!writer->beginCommand(writer, 359, 128)) goto end;
  8139. writer->putGLdoublem(writer, m);
  8140. writer->endCommand(writer);
  8141. end:
  8142. if (ctx->captureExitFunc) ctx->captureExitFunc(359);
  8143. --ctx->captureEntryCount;
  8144. }
  8145. void __gls_capture_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) {
  8146. GLbitfield captureFlags;
  8147. __GLScontext *const ctx = __GLS_CONTEXT;
  8148. __GLSwriter *writer;
  8149. ++ctx->captureEntryCount;
  8150. if (ctx->captureEntryFunc) ctx->captureEntryFunc(360);
  8151. captureFlags = ctx->captureFlags[360];
  8152. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8153. __GLS_BEGIN_CAPTURE_EXEC(ctx, 360);
  8154. glOrtho(left, right, bottom, top, zNear, zFar);
  8155. __GLS_END_CAPTURE_EXEC(ctx, 360);
  8156. }
  8157. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8158. writer = ctx->writer;
  8159. if (!writer->padWordCount(writer, 1)) goto end;
  8160. if (!writer->beginCommand(writer, 360, 48)) goto end;
  8161. writer->putGLdouble(writer, left);
  8162. writer->putGLdouble(writer, right);
  8163. writer->putGLdouble(writer, bottom);
  8164. writer->putGLdouble(writer, top);
  8165. writer->putGLdouble(writer, zNear);
  8166. writer->putGLdouble(writer, zFar);
  8167. writer->endCommand(writer);
  8168. end:
  8169. if (ctx->captureExitFunc) ctx->captureExitFunc(360);
  8170. --ctx->captureEntryCount;
  8171. }
  8172. void __gls_capture_glPopMatrix(void) {
  8173. GLbitfield captureFlags;
  8174. __GLScontext *const ctx = __GLS_CONTEXT;
  8175. __GLSwriter *writer;
  8176. ++ctx->captureEntryCount;
  8177. if (ctx->captureEntryFunc) ctx->captureEntryFunc(361);
  8178. captureFlags = ctx->captureFlags[361];
  8179. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8180. __GLS_BEGIN_CAPTURE_EXEC(ctx, 361);
  8181. glPopMatrix();
  8182. __GLS_END_CAPTURE_EXEC(ctx, 361);
  8183. }
  8184. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8185. writer = ctx->writer;
  8186. if (!writer->beginCommand(writer, 361, 0)) goto end;
  8187. writer->endCommand(writer);
  8188. end:
  8189. if (ctx->captureExitFunc) ctx->captureExitFunc(361);
  8190. --ctx->captureEntryCount;
  8191. }
  8192. void __gls_capture_glPushMatrix(void) {
  8193. GLbitfield captureFlags;
  8194. __GLScontext *const ctx = __GLS_CONTEXT;
  8195. __GLSwriter *writer;
  8196. ++ctx->captureEntryCount;
  8197. if (ctx->captureEntryFunc) ctx->captureEntryFunc(362);
  8198. captureFlags = ctx->captureFlags[362];
  8199. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8200. __GLS_BEGIN_CAPTURE_EXEC(ctx, 362);
  8201. glPushMatrix();
  8202. __GLS_END_CAPTURE_EXEC(ctx, 362);
  8203. }
  8204. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8205. writer = ctx->writer;
  8206. if (!writer->beginCommand(writer, 362, 0)) goto end;
  8207. writer->endCommand(writer);
  8208. end:
  8209. if (ctx->captureExitFunc) ctx->captureExitFunc(362);
  8210. --ctx->captureEntryCount;
  8211. }
  8212. void __gls_capture_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) {
  8213. GLbitfield captureFlags;
  8214. __GLScontext *const ctx = __GLS_CONTEXT;
  8215. __GLSwriter *writer;
  8216. ++ctx->captureEntryCount;
  8217. if (ctx->captureEntryFunc) ctx->captureEntryFunc(363);
  8218. captureFlags = ctx->captureFlags[363];
  8219. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8220. __GLS_BEGIN_CAPTURE_EXEC(ctx, 363);
  8221. glRotated(angle, x, y, z);
  8222. __GLS_END_CAPTURE_EXEC(ctx, 363);
  8223. }
  8224. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8225. writer = ctx->writer;
  8226. if (!writer->padWordCount(writer, 1)) goto end;
  8227. if (!writer->beginCommand(writer, 363, 32)) goto end;
  8228. writer->putGLdouble(writer, angle);
  8229. writer->putGLdouble(writer, x);
  8230. writer->putGLdouble(writer, y);
  8231. writer->putGLdouble(writer, z);
  8232. writer->endCommand(writer);
  8233. end:
  8234. if (ctx->captureExitFunc) ctx->captureExitFunc(363);
  8235. --ctx->captureEntryCount;
  8236. }
  8237. void __gls_capture_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
  8238. GLbitfield captureFlags;
  8239. __GLScontext *const ctx = __GLS_CONTEXT;
  8240. __GLSwriter *writer;
  8241. ++ctx->captureEntryCount;
  8242. if (ctx->captureEntryFunc) ctx->captureEntryFunc(364);
  8243. captureFlags = ctx->captureFlags[364];
  8244. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8245. __GLS_BEGIN_CAPTURE_EXEC(ctx, 364);
  8246. glRotatef(angle, x, y, z);
  8247. __GLS_END_CAPTURE_EXEC(ctx, 364);
  8248. }
  8249. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8250. writer = ctx->writer;
  8251. if (!writer->beginCommand(writer, 364, 16)) goto end;
  8252. writer->putGLfloat(writer, angle);
  8253. writer->putGLfloat(writer, x);
  8254. writer->putGLfloat(writer, y);
  8255. writer->putGLfloat(writer, z);
  8256. writer->endCommand(writer);
  8257. end:
  8258. if (ctx->captureExitFunc) ctx->captureExitFunc(364);
  8259. --ctx->captureEntryCount;
  8260. }
  8261. void __gls_capture_glScaled(GLdouble x, GLdouble y, GLdouble z) {
  8262. GLbitfield captureFlags;
  8263. __GLScontext *const ctx = __GLS_CONTEXT;
  8264. __GLSwriter *writer;
  8265. ++ctx->captureEntryCount;
  8266. if (ctx->captureEntryFunc) ctx->captureEntryFunc(365);
  8267. captureFlags = ctx->captureFlags[365];
  8268. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8269. __GLS_BEGIN_CAPTURE_EXEC(ctx, 365);
  8270. glScaled(x, y, z);
  8271. __GLS_END_CAPTURE_EXEC(ctx, 365);
  8272. }
  8273. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8274. writer = ctx->writer;
  8275. if (!writer->padWordCount(writer, 1)) goto end;
  8276. if (!writer->beginCommand(writer, 365, 24)) goto end;
  8277. writer->putGLdouble(writer, x);
  8278. writer->putGLdouble(writer, y);
  8279. writer->putGLdouble(writer, z);
  8280. writer->endCommand(writer);
  8281. end:
  8282. if (ctx->captureExitFunc) ctx->captureExitFunc(365);
  8283. --ctx->captureEntryCount;
  8284. }
  8285. void __gls_capture_glScalef(GLfloat x, GLfloat y, GLfloat z) {
  8286. GLbitfield captureFlags;
  8287. __GLScontext *const ctx = __GLS_CONTEXT;
  8288. __GLSwriter *writer;
  8289. ++ctx->captureEntryCount;
  8290. if (ctx->captureEntryFunc) ctx->captureEntryFunc(366);
  8291. captureFlags = ctx->captureFlags[366];
  8292. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8293. __GLS_BEGIN_CAPTURE_EXEC(ctx, 366);
  8294. glScalef(x, y, z);
  8295. __GLS_END_CAPTURE_EXEC(ctx, 366);
  8296. }
  8297. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8298. writer = ctx->writer;
  8299. if (!writer->beginCommand(writer, 366, 12)) goto end;
  8300. writer->putGLfloat(writer, x);
  8301. writer->putGLfloat(writer, y);
  8302. writer->putGLfloat(writer, z);
  8303. writer->endCommand(writer);
  8304. end:
  8305. if (ctx->captureExitFunc) ctx->captureExitFunc(366);
  8306. --ctx->captureEntryCount;
  8307. }
  8308. void __gls_capture_glTranslated(GLdouble x, GLdouble y, GLdouble z) {
  8309. GLbitfield captureFlags;
  8310. __GLScontext *const ctx = __GLS_CONTEXT;
  8311. __GLSwriter *writer;
  8312. ++ctx->captureEntryCount;
  8313. if (ctx->captureEntryFunc) ctx->captureEntryFunc(367);
  8314. captureFlags = ctx->captureFlags[367];
  8315. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8316. __GLS_BEGIN_CAPTURE_EXEC(ctx, 367);
  8317. glTranslated(x, y, z);
  8318. __GLS_END_CAPTURE_EXEC(ctx, 367);
  8319. }
  8320. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8321. writer = ctx->writer;
  8322. if (!writer->padWordCount(writer, 1)) goto end;
  8323. if (!writer->beginCommand(writer, 367, 24)) goto end;
  8324. writer->putGLdouble(writer, x);
  8325. writer->putGLdouble(writer, y);
  8326. writer->putGLdouble(writer, z);
  8327. writer->endCommand(writer);
  8328. end:
  8329. if (ctx->captureExitFunc) ctx->captureExitFunc(367);
  8330. --ctx->captureEntryCount;
  8331. }
  8332. void __gls_capture_glTranslatef(GLfloat x, GLfloat y, GLfloat z) {
  8333. GLbitfield captureFlags;
  8334. __GLScontext *const ctx = __GLS_CONTEXT;
  8335. __GLSwriter *writer;
  8336. ++ctx->captureEntryCount;
  8337. if (ctx->captureEntryFunc) ctx->captureEntryFunc(368);
  8338. captureFlags = ctx->captureFlags[368];
  8339. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8340. __GLS_BEGIN_CAPTURE_EXEC(ctx, 368);
  8341. glTranslatef(x, y, z);
  8342. __GLS_END_CAPTURE_EXEC(ctx, 368);
  8343. }
  8344. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8345. writer = ctx->writer;
  8346. if (!writer->beginCommand(writer, 368, 12)) goto end;
  8347. writer->putGLfloat(writer, x);
  8348. writer->putGLfloat(writer, y);
  8349. writer->putGLfloat(writer, z);
  8350. writer->endCommand(writer);
  8351. end:
  8352. if (ctx->captureExitFunc) ctx->captureExitFunc(368);
  8353. --ctx->captureEntryCount;
  8354. }
  8355. void __gls_capture_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
  8356. GLbitfield captureFlags;
  8357. __GLScontext *const ctx = __GLS_CONTEXT;
  8358. __GLSwriter *writer;
  8359. ++ctx->captureEntryCount;
  8360. if (ctx->captureEntryFunc) ctx->captureEntryFunc(369);
  8361. captureFlags = ctx->captureFlags[369];
  8362. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8363. __GLS_BEGIN_CAPTURE_EXEC(ctx, 369);
  8364. glViewport(x, y, width, height);
  8365. __GLS_END_CAPTURE_EXEC(ctx, 369);
  8366. }
  8367. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8368. writer = ctx->writer;
  8369. if (!writer->beginCommand(writer, 369, 16)) goto end;
  8370. writer->putGLint(writer, x);
  8371. writer->putGLint(writer, y);
  8372. writer->putGLint(writer, width);
  8373. writer->putGLint(writer, height);
  8374. writer->endCommand(writer);
  8375. end:
  8376. if (ctx->captureExitFunc) ctx->captureExitFunc(369);
  8377. --ctx->captureEntryCount;
  8378. }
  8379. #if __GL_EXT_blend_color
  8380. void __gls_capture_glBlendColorEXT(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
  8381. GLbitfield captureFlags;
  8382. __GLScontext *const ctx = __GLS_CONTEXT;
  8383. __GLSwriter *writer;
  8384. ++ctx->captureEntryCount;
  8385. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65520);
  8386. captureFlags = ctx->captureFlags[];
  8387. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8388. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65520);
  8389. glBlendColorEXT(red, green, blue, alpha);
  8390. __GLS_END_CAPTURE_EXEC(ctx, 65520);
  8391. }
  8392. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8393. writer = ctx->writer;
  8394. if (!writer->beginCommand(writer, 65520, 16)) goto end;
  8395. writer->putGLfloat(writer, red);
  8396. writer->putGLfloat(writer, green);
  8397. writer->putGLfloat(writer, blue);
  8398. writer->putGLfloat(writer, alpha);
  8399. writer->endCommand(writer);
  8400. end:
  8401. if (ctx->captureExitFunc) ctx->captureExitFunc(65520);
  8402. --ctx->captureEntryCount;
  8403. }
  8404. #endif /* __GL_EXT_blend_color */
  8405. #if __GL_EXT_blend_minmax
  8406. void __gls_capture_glBlendEquationEXT(GLenum mode) {
  8407. GLbitfield captureFlags;
  8408. __GLScontext *const ctx = __GLS_CONTEXT;
  8409. __GLSwriter *writer;
  8410. ++ctx->captureEntryCount;
  8411. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65521);
  8412. captureFlags = ctx->captureFlags[];
  8413. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8414. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65521);
  8415. glBlendEquationEXT(mode);
  8416. __GLS_END_CAPTURE_EXEC(ctx, 65521);
  8417. }
  8418. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8419. writer = ctx->writer;
  8420. if (!writer->beginCommand(writer, 65521, 4)) goto end;
  8421. writer->putGLenum(writer, mode);
  8422. writer->endCommand(writer);
  8423. end:
  8424. if (ctx->captureExitFunc) ctx->captureExitFunc(65521);
  8425. --ctx->captureEntryCount;
  8426. }
  8427. #endif /* __GL_EXT_blend_minmax */
  8428. #if __GL_EXT_polygon_offset
  8429. void __gls_capture_glPolygonOffsetEXT(GLfloat factor, GLfloat bias) {
  8430. GLbitfield captureFlags;
  8431. __GLScontext *const ctx = __GLS_CONTEXT;
  8432. __GLSwriter *writer;
  8433. ++ctx->captureEntryCount;
  8434. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65522);
  8435. captureFlags = ctx->captureFlags[];
  8436. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8437. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65522);
  8438. glPolygonOffsetEXT(factor, bias);
  8439. __GLS_END_CAPTURE_EXEC(ctx, 65522);
  8440. }
  8441. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8442. writer = ctx->writer;
  8443. if (!writer->beginCommand(writer, 65522, 8)) goto end;
  8444. writer->putGLfloat(writer, factor);
  8445. writer->putGLfloat(writer, bias);
  8446. writer->endCommand(writer);
  8447. end:
  8448. if (ctx->captureExitFunc) ctx->captureExitFunc(65522);
  8449. --ctx->captureEntryCount;
  8450. }
  8451. #endif /* __GL_EXT_polygon_offset */
  8452. void __gls_capture_glPolygonOffset(GLfloat factor, GLfloat units) {
  8453. GLbitfield captureFlags;
  8454. __GLScontext *const ctx = __GLS_CONTEXT;
  8455. __GLSwriter *writer;
  8456. ++ctx->captureEntryCount;
  8457. if (ctx->captureEntryFunc) ctx->captureEntryFunc(383);
  8458. captureFlags = ctx->captureFlags[383];
  8459. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8460. __GLS_BEGIN_CAPTURE_EXEC(ctx, 383);
  8461. glPolygonOffset(factor, units);
  8462. __GLS_END_CAPTURE_EXEC(ctx, 383);
  8463. }
  8464. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8465. writer = ctx->writer;
  8466. if (!writer->beginCommand(writer, 383, 8)) goto end;
  8467. writer->putGLfloat(writer, factor);
  8468. writer->putGLfloat(writer, units);
  8469. writer->endCommand(writer);
  8470. end:
  8471. if (ctx->captureExitFunc) ctx->captureExitFunc(383);
  8472. --ctx->captureEntryCount;
  8473. }
  8474. #if __GL_EXT_subtexture
  8475. void glTexSubImage1DEXT(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
  8476. void __gls_capture_glTexSubImage1DEXT(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) {
  8477. GLbitfield captureFlags;
  8478. __GLScontext *const ctx = __GLS_CONTEXT;
  8479. __GLSwriter *writer;
  8480. GLint pixels_count;
  8481. ++ctx->captureEntryCount;
  8482. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65523);
  8483. captureFlags = ctx->captureFlags[];
  8484. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8485. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65523);
  8486. glTexSubImage1DEXT(target, level, xoffset, width, format, type, pixels);
  8487. __GLS_END_CAPTURE_EXEC(ctx, 65523);
  8488. }
  8489. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8490. writer = ctx->writer;
  8491. pixels_count = __gls_glTexSubImage1DEXT_pixels_size(format, type, width);
  8492. if (!writer->beginCommand(writer, 65523, 28 + pixels_count * 1)) goto end;
  8493. writer->putGLSimageFlags(writer, GLS_NONE);
  8494. writer->nextList(writer);
  8495. if (writer->type == GLS_TEXT) {
  8496. writer->putGLenum(writer, target);
  8497. writer->putGLint(writer, level);
  8498. writer->putGLint(writer, xoffset);
  8499. writer->putGLint(writer, width);
  8500. writer->putGLenum(writer, format);
  8501. writer->putGLenum(writer, type);
  8502. __glsWriter_putPixelv(writer, format, type, width, 1, pixels_count ? pixels : GLS_NONE);
  8503. } else {
  8504. writer->putGLint(writer, width);
  8505. writer->putGLenum(writer, format);
  8506. writer->putGLenum(writer, type);
  8507. writer->putGLenum(writer, target);
  8508. writer->putGLint(writer, level);
  8509. writer->putGLint(writer, xoffset);
  8510. __glsWriter_putPixelv(writer, format, type, width, 1, pixels_count ? pixels : GLS_NONE);
  8511. }
  8512. writer->endCommand(writer);
  8513. end:
  8514. if (ctx->captureExitFunc) ctx->captureExitFunc(65523);
  8515. --ctx->captureEntryCount;
  8516. }
  8517. #endif /* __GL_EXT_subtexture */
  8518. void __gls_capture_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) {
  8519. GLbitfield captureFlags;
  8520. __GLScontext *const ctx = __GLS_CONTEXT;
  8521. __GLSwriter *writer;
  8522. GLint pixels_count;
  8523. ++ctx->captureEntryCount;
  8524. if (ctx->captureEntryFunc) ctx->captureEntryFunc(396);
  8525. captureFlags = ctx->captureFlags[396];
  8526. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8527. __GLS_BEGIN_CAPTURE_EXEC(ctx, 396);
  8528. glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
  8529. __GLS_END_CAPTURE_EXEC(ctx, 396);
  8530. }
  8531. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8532. writer = ctx->writer;
  8533. pixels_count = __gls_glTexSubImage1D_pixels_size(format, type, width);
  8534. if (!writer->beginCommand(writer, 396, 28 + pixels_count * 1)) goto end;
  8535. writer->putGLSimageFlags(writer, GLS_NONE);
  8536. writer->nextList(writer);
  8537. if (writer->type == GLS_TEXT) {
  8538. writer->putGLenum(writer, target);
  8539. writer->putGLint(writer, level);
  8540. writer->putGLint(writer, xoffset);
  8541. writer->putGLint(writer, width);
  8542. writer->putGLenum(writer, format);
  8543. writer->putGLenum(writer, type);
  8544. __glsWriter_putPixelv(writer, format, type, width, 1, pixels_count ? pixels : GLS_NONE);
  8545. } else {
  8546. writer->putGLint(writer, width);
  8547. writer->putGLenum(writer, format);
  8548. writer->putGLenum(writer, type);
  8549. writer->putGLenum(writer, target);
  8550. writer->putGLint(writer, level);
  8551. writer->putGLint(writer, xoffset);
  8552. __glsWriter_putPixelv(writer, format, type, width, 1, pixels_count ? pixels : GLS_NONE);
  8553. }
  8554. writer->endCommand(writer);
  8555. end:
  8556. if (ctx->captureExitFunc) ctx->captureExitFunc(396);
  8557. --ctx->captureEntryCount;
  8558. }
  8559. #if __GL_EXT_subtexture
  8560. void glTexSubImage2DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  8561. void __gls_capture_glTexSubImage2DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) {
  8562. GLbitfield captureFlags;
  8563. __GLScontext *const ctx = __GLS_CONTEXT;
  8564. __GLSwriter *writer;
  8565. GLint pixels_count;
  8566. ++ctx->captureEntryCount;
  8567. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65524);
  8568. captureFlags = ctx->captureFlags[];
  8569. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8570. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65524);
  8571. glTexSubImage2DEXT(target, level, xoffset, yoffset, width, height, format, type, pixels);
  8572. __GLS_END_CAPTURE_EXEC(ctx, 65524);
  8573. }
  8574. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8575. writer = ctx->writer;
  8576. pixels_count = __gls_glTexSubImage2DEXT_pixels_size(format, type, width, height);
  8577. if (!writer->beginCommand(writer, 65524, 36 + pixels_count * 1)) goto end;
  8578. writer->putGLSimageFlags(writer, GLS_NONE);
  8579. writer->nextList(writer);
  8580. if (writer->type == GLS_TEXT) {
  8581. writer->putGLenum(writer, target);
  8582. writer->putGLint(writer, level);
  8583. writer->putGLint(writer, xoffset);
  8584. writer->putGLint(writer, yoffset);
  8585. writer->putGLint(writer, width);
  8586. writer->putGLint(writer, height);
  8587. writer->putGLenum(writer, format);
  8588. writer->putGLenum(writer, type);
  8589. __glsWriter_putPixelv(writer, format, type, width, height, pixels_count ? pixels : GLS_NONE);
  8590. } else {
  8591. writer->putGLint(writer, width);
  8592. writer->putGLint(writer, height);
  8593. writer->putGLenum(writer, format);
  8594. writer->putGLenum(writer, type);
  8595. writer->putGLenum(writer, target);
  8596. writer->putGLint(writer, level);
  8597. writer->putGLint(writer, xoffset);
  8598. writer->putGLint(writer, yoffset);
  8599. __glsWriter_putPixelv(writer, format, type, width, height, pixels_count ? pixels : GLS_NONE);
  8600. }
  8601. writer->endCommand(writer);
  8602. end:
  8603. if (ctx->captureExitFunc) ctx->captureExitFunc(65524);
  8604. --ctx->captureEntryCount;
  8605. }
  8606. #endif /* __GL_EXT_subtexture */
  8607. void __gls_capture_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) {
  8608. GLbitfield captureFlags;
  8609. __GLScontext *const ctx = __GLS_CONTEXT;
  8610. __GLSwriter *writer;
  8611. GLint pixels_count;
  8612. ++ctx->captureEntryCount;
  8613. if (ctx->captureEntryFunc) ctx->captureEntryFunc(397);
  8614. captureFlags = ctx->captureFlags[397];
  8615. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8616. __GLS_BEGIN_CAPTURE_EXEC(ctx, 397);
  8617. glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
  8618. __GLS_END_CAPTURE_EXEC(ctx, 397);
  8619. }
  8620. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8621. writer = ctx->writer;
  8622. pixels_count = __gls_glTexSubImage2D_pixels_size(format, type, width, height);
  8623. if (!writer->beginCommand(writer, 397, 36 + pixels_count * 1)) goto end;
  8624. writer->putGLSimageFlags(writer, GLS_NONE);
  8625. writer->nextList(writer);
  8626. if (writer->type == GLS_TEXT) {
  8627. writer->putGLenum(writer, target);
  8628. writer->putGLint(writer, level);
  8629. writer->putGLint(writer, xoffset);
  8630. writer->putGLint(writer, yoffset);
  8631. writer->putGLint(writer, width);
  8632. writer->putGLint(writer, height);
  8633. writer->putGLenum(writer, format);
  8634. writer->putGLenum(writer, type);
  8635. __glsWriter_putPixelv(writer, format, type, width, height, pixels_count ? pixels : GLS_NONE);
  8636. } else {
  8637. writer->putGLint(writer, width);
  8638. writer->putGLint(writer, height);
  8639. writer->putGLenum(writer, format);
  8640. writer->putGLenum(writer, type);
  8641. writer->putGLenum(writer, target);
  8642. writer->putGLint(writer, level);
  8643. writer->putGLint(writer, xoffset);
  8644. writer->putGLint(writer, yoffset);
  8645. __glsWriter_putPixelv(writer, format, type, width, height, pixels_count ? pixels : GLS_NONE);
  8646. }
  8647. writer->endCommand(writer);
  8648. end:
  8649. if (ctx->captureExitFunc) ctx->captureExitFunc(397);
  8650. --ctx->captureEntryCount;
  8651. }
  8652. #if __GL_SGIS_multisample
  8653. void __gls_capture_glSampleMaskSGIS(GLclampf value, GLboolean invert) {
  8654. GLbitfield captureFlags;
  8655. __GLScontext *const ctx = __GLS_CONTEXT;
  8656. __GLSwriter *writer;
  8657. ++ctx->captureEntryCount;
  8658. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65525);
  8659. captureFlags = ctx->captureFlags[389];
  8660. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8661. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65525);
  8662. glSampleMaskSGIS(value, invert);
  8663. __GLS_END_CAPTURE_EXEC(ctx, 65525);
  8664. }
  8665. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8666. writer = ctx->writer;
  8667. if (!writer->beginCommand(writer, 65525, 5)) goto end;
  8668. writer->putGLfloat(writer, value);
  8669. writer->putGLboolean(writer, invert);
  8670. writer->endCommand(writer);
  8671. end:
  8672. if (ctx->captureExitFunc) ctx->captureExitFunc(65525);
  8673. --ctx->captureEntryCount;
  8674. }
  8675. #endif /* __GL_SGIS_multisample */
  8676. #if __GL_SGIS_multisample
  8677. void __gls_capture_glSamplePatternSGIS(GLenum pattern) {
  8678. GLbitfield captureFlags;
  8679. __GLScontext *const ctx = __GLS_CONTEXT;
  8680. __GLSwriter *writer;
  8681. ++ctx->captureEntryCount;
  8682. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65526);
  8683. captureFlags = ctx->captureFlags[390];
  8684. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8685. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65526);
  8686. glSamplePatternSGIS(pattern);
  8687. __GLS_END_CAPTURE_EXEC(ctx, 65526);
  8688. }
  8689. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8690. writer = ctx->writer;
  8691. if (!writer->beginCommand(writer, 65526, 4)) goto end;
  8692. writer->putGLenum(writer, pattern);
  8693. writer->endCommand(writer);
  8694. end:
  8695. if (ctx->captureExitFunc) ctx->captureExitFunc(65526);
  8696. --ctx->captureEntryCount;
  8697. }
  8698. #endif /* __GL_SGIS_multisample */
  8699. #if __GL_SGIX_multisample
  8700. void __gls_capture_glTagSampleBufferSGIX(void) {
  8701. GLbitfield captureFlags;
  8702. __GLScontext *const ctx = __GLS_CONTEXT;
  8703. __GLSwriter *writer;
  8704. ++ctx->captureEntryCount;
  8705. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65527);
  8706. captureFlags = ctx->captureFlags[391];
  8707. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8708. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65527);
  8709. glTagSampleBufferSGIX();
  8710. __GLS_END_CAPTURE_EXEC(ctx, 65527);
  8711. }
  8712. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8713. writer = ctx->writer;
  8714. if (!writer->beginCommand(writer, 65527, 0)) goto end;
  8715. writer->endCommand(writer);
  8716. end:
  8717. if (ctx->captureExitFunc) ctx->captureExitFunc(65527);
  8718. --ctx->captureEntryCount;
  8719. }
  8720. #endif /* __GL_SGIX_multisample */
  8721. #if __GL_EXT_convolution
  8722. void __gls_capture_glConvolutionFilter1DEXT(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) {
  8723. GLbitfield captureFlags;
  8724. __GLScontext *const ctx = __GLS_CONTEXT;
  8725. __GLSwriter *writer;
  8726. GLint image_count;
  8727. ++ctx->captureEntryCount;
  8728. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65528);
  8729. captureFlags = ctx->captureFlags[];
  8730. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8731. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65528);
  8732. glConvolutionFilter1DEXT(target, internalformat, width, format, type, image);
  8733. __GLS_END_CAPTURE_EXEC(ctx, 65528);
  8734. }
  8735. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8736. writer = ctx->writer;
  8737. image_count = __gls_glConvolutionFilter1DEXT_image_size(format, type, width);
  8738. if (!writer->beginCommand(writer, 65528, 24 + image_count * 1)) goto end;
  8739. writer->putGLSimageFlags(writer, GLS_NONE);
  8740. writer->nextList(writer);
  8741. if (writer->type == GLS_TEXT) {
  8742. writer->putGLenum(writer, target);
  8743. writer->putGLenum(writer, internalformat);
  8744. writer->putGLint(writer, width);
  8745. writer->putGLenum(writer, format);
  8746. writer->putGLenum(writer, type);
  8747. __glsWriter_putPixelv(writer, format, type, width, 1, image_count ? image : GLS_NONE);
  8748. } else {
  8749. writer->putGLint(writer, width);
  8750. writer->putGLenum(writer, format);
  8751. writer->putGLenum(writer, type);
  8752. writer->putGLenum(writer, target);
  8753. writer->putGLenum(writer, internalformat);
  8754. __glsWriter_putPixelv(writer, format, type, width, 1, image_count ? image : GLS_NONE);
  8755. }
  8756. writer->endCommand(writer);
  8757. end:
  8758. if (ctx->captureExitFunc) ctx->captureExitFunc(65528);
  8759. --ctx->captureEntryCount;
  8760. }
  8761. #endif /* __GL_EXT_convolution */
  8762. #if __GL_EXT_convolution
  8763. void __gls_capture_glConvolutionFilter2DEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) {
  8764. GLbitfield captureFlags;
  8765. __GLScontext *const ctx = __GLS_CONTEXT;
  8766. __GLSwriter *writer;
  8767. GLint image_count;
  8768. ++ctx->captureEntryCount;
  8769. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65529);
  8770. captureFlags = ctx->captureFlags[];
  8771. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8772. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65529);
  8773. glConvolutionFilter2DEXT(target, internalformat, width, height, format, type, image);
  8774. __GLS_END_CAPTURE_EXEC(ctx, 65529);
  8775. }
  8776. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8777. writer = ctx->writer;
  8778. image_count = __gls_glConvolutionFilter2DEXT_image_size(format, type, width, height);
  8779. if (!writer->beginCommand(writer, 65529, 28 + image_count * 1)) goto end;
  8780. writer->putGLSimageFlags(writer, GLS_NONE);
  8781. writer->nextList(writer);
  8782. if (writer->type == GLS_TEXT) {
  8783. writer->putGLenum(writer, target);
  8784. writer->putGLenum(writer, internalformat);
  8785. writer->putGLint(writer, width);
  8786. writer->putGLint(writer, height);
  8787. writer->putGLenum(writer, format);
  8788. writer->putGLenum(writer, type);
  8789. __glsWriter_putPixelv(writer, format, type, width, height, image_count ? image : GLS_NONE);
  8790. } else {
  8791. writer->putGLint(writer, width);
  8792. writer->putGLint(writer, height);
  8793. writer->putGLenum(writer, format);
  8794. writer->putGLenum(writer, type);
  8795. writer->putGLenum(writer, target);
  8796. writer->putGLenum(writer, internalformat);
  8797. __glsWriter_putPixelv(writer, format, type, width, height, image_count ? image : GLS_NONE);
  8798. }
  8799. writer->endCommand(writer);
  8800. end:
  8801. if (ctx->captureExitFunc) ctx->captureExitFunc(65529);
  8802. --ctx->captureEntryCount;
  8803. }
  8804. #endif /* __GL_EXT_convolution */
  8805. #if __GL_EXT_convolution
  8806. void __gls_capture_glConvolutionParameterfEXT(GLenum target, GLenum pname, GLfloat params) {
  8807. GLbitfield captureFlags;
  8808. __GLScontext *const ctx = __GLS_CONTEXT;
  8809. __GLSwriter *writer;
  8810. ++ctx->captureEntryCount;
  8811. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65530);
  8812. captureFlags = ctx->captureFlags[];
  8813. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8814. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65530);
  8815. glConvolutionParameterfEXT(target, pname, params);
  8816. __GLS_END_CAPTURE_EXEC(ctx, 65530);
  8817. }
  8818. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8819. writer = ctx->writer;
  8820. if (!writer->beginCommand(writer, 65530, 12)) goto end;
  8821. writer->putGLenum(writer, target);
  8822. writer->putGLenum(writer, pname);
  8823. writer->putGLfloatOrGLenum(writer, pname, params);
  8824. writer->endCommand(writer);
  8825. end:
  8826. if (ctx->captureExitFunc) ctx->captureExitFunc(65530);
  8827. --ctx->captureEntryCount;
  8828. }
  8829. #endif /* __GL_EXT_convolution */
  8830. #if __GL_EXT_convolution
  8831. void __gls_capture_glConvolutionParameterfvEXT(GLenum target, GLenum pname, const GLfloat *params) {
  8832. GLbitfield captureFlags;
  8833. __GLScontext *const ctx = __GLS_CONTEXT;
  8834. __GLSwriter *writer;
  8835. GLint params_count;
  8836. ++ctx->captureEntryCount;
  8837. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65531);
  8838. captureFlags = ctx->captureFlags[];
  8839. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8840. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65531);
  8841. glConvolutionParameterfvEXT(target, pname, params);
  8842. __GLS_END_CAPTURE_EXEC(ctx, 65531);
  8843. }
  8844. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8845. writer = ctx->writer;
  8846. params_count = __gls_glConvolutionParameterfvEXT_params_size(pname);
  8847. if (!writer->beginCommand(writer, 65531, 8 + params_count * 4)) goto end;
  8848. if (writer->type == GLS_TEXT) {
  8849. writer->putGLenum(writer, target);
  8850. writer->putGLenum(writer, pname);
  8851. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  8852. } else {
  8853. writer->putGLenum(writer, pname);
  8854. writer->putGLenum(writer, target);
  8855. writer->putGLfloatOrGLenumv(writer, pname, params_count, params);
  8856. }
  8857. writer->endCommand(writer);
  8858. end:
  8859. if (ctx->captureExitFunc) ctx->captureExitFunc(65531);
  8860. --ctx->captureEntryCount;
  8861. }
  8862. #endif /* __GL_EXT_convolution */
  8863. #if __GL_EXT_convolution
  8864. void __gls_capture_glConvolutionParameteriEXT(GLenum target, GLenum pname, GLint params) {
  8865. GLbitfield captureFlags;
  8866. __GLScontext *const ctx = __GLS_CONTEXT;
  8867. __GLSwriter *writer;
  8868. ++ctx->captureEntryCount;
  8869. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65532);
  8870. captureFlags = ctx->captureFlags[];
  8871. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8872. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65532);
  8873. glConvolutionParameteriEXT(target, pname, params);
  8874. __GLS_END_CAPTURE_EXEC(ctx, 65532);
  8875. }
  8876. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8877. writer = ctx->writer;
  8878. if (!writer->beginCommand(writer, 65532, 12)) goto end;
  8879. writer->putGLenum(writer, target);
  8880. writer->putGLenum(writer, pname);
  8881. writer->putGLintOrGLenum(writer, pname, params);
  8882. writer->endCommand(writer);
  8883. end:
  8884. if (ctx->captureExitFunc) ctx->captureExitFunc(65532);
  8885. --ctx->captureEntryCount;
  8886. }
  8887. #endif /* __GL_EXT_convolution */
  8888. #if __GL_EXT_convolution
  8889. void __gls_capture_glConvolutionParameterivEXT(GLenum target, GLenum pname, const GLint *params) {
  8890. GLbitfield captureFlags;
  8891. __GLScontext *const ctx = __GLS_CONTEXT;
  8892. __GLSwriter *writer;
  8893. GLint params_count;
  8894. ++ctx->captureEntryCount;
  8895. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65533);
  8896. captureFlags = ctx->captureFlags[];
  8897. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8898. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65533);
  8899. glConvolutionParameterivEXT(target, pname, params);
  8900. __GLS_END_CAPTURE_EXEC(ctx, 65533);
  8901. }
  8902. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8903. writer = ctx->writer;
  8904. params_count = __gls_glConvolutionParameterivEXT_params_size(pname);
  8905. if (!writer->beginCommand(writer, 65533, 8 + params_count * 4)) goto end;
  8906. if (writer->type == GLS_TEXT) {
  8907. writer->putGLenum(writer, target);
  8908. writer->putGLenum(writer, pname);
  8909. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  8910. } else {
  8911. writer->putGLenum(writer, pname);
  8912. writer->putGLenum(writer, target);
  8913. writer->putGLintOrGLenumv(writer, pname, params_count, params);
  8914. }
  8915. writer->endCommand(writer);
  8916. end:
  8917. if (ctx->captureExitFunc) ctx->captureExitFunc(65533);
  8918. --ctx->captureEntryCount;
  8919. }
  8920. #endif /* __GL_EXT_convolution */
  8921. #if __GL_EXT_convolution
  8922. void __gls_capture_glCopyConvolutionFilter1DEXT(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) {
  8923. GLbitfield captureFlags;
  8924. __GLScontext *const ctx = __GLS_CONTEXT;
  8925. __GLSwriter *writer;
  8926. ++ctx->captureEntryCount;
  8927. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65534);
  8928. captureFlags = ctx->captureFlags[];
  8929. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8930. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65534);
  8931. glCopyConvolutionFilter1DEXT(target, internalformat, x, y, width);
  8932. __GLS_END_CAPTURE_EXEC(ctx, 65534);
  8933. }
  8934. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8935. writer = ctx->writer;
  8936. if (!writer->beginCommand(writer, 65534, 20)) goto end;
  8937. writer->putGLenum(writer, target);
  8938. writer->putGLenum(writer, internalformat);
  8939. writer->putGLint(writer, x);
  8940. writer->putGLint(writer, y);
  8941. writer->putGLint(writer, width);
  8942. writer->endCommand(writer);
  8943. end:
  8944. if (ctx->captureExitFunc) ctx->captureExitFunc(65534);
  8945. --ctx->captureEntryCount;
  8946. }
  8947. #endif /* __GL_EXT_convolution */
  8948. #if __GL_EXT_convolution
  8949. void __gls_capture_glCopyConvolutionFilter2DEXT(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) {
  8950. GLbitfield captureFlags;
  8951. __GLScontext *const ctx = __GLS_CONTEXT;
  8952. __GLSwriter *writer;
  8953. ++ctx->captureEntryCount;
  8954. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65535);
  8955. captureFlags = ctx->captureFlags[];
  8956. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8957. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65535);
  8958. glCopyConvolutionFilter2DEXT(target, internalformat, x, y, width, height);
  8959. __GLS_END_CAPTURE_EXEC(ctx, 65535);
  8960. }
  8961. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8962. writer = ctx->writer;
  8963. if (!writer->beginCommand(writer, 65535, 24)) goto end;
  8964. writer->putGLenum(writer, target);
  8965. writer->putGLenum(writer, internalformat);
  8966. writer->putGLint(writer, x);
  8967. writer->putGLint(writer, y);
  8968. writer->putGLint(writer, width);
  8969. writer->putGLint(writer, height);
  8970. writer->endCommand(writer);
  8971. end:
  8972. if (ctx->captureExitFunc) ctx->captureExitFunc(65535);
  8973. --ctx->captureEntryCount;
  8974. }
  8975. #endif /* __GL_EXT_convolution */
  8976. #if __GL_EXT_convolution
  8977. void __gls_capture_glGetConvolutionFilterEXT(GLenum target, GLenum format, GLenum type, GLvoid *image) {
  8978. GLbitfield captureFlags;
  8979. __GLScontext *const ctx = __GLS_CONTEXT;
  8980. __GLSwriter *writer;
  8981. ++ctx->captureEntryCount;
  8982. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65504);
  8983. captureFlags = ctx->captureFlags[];
  8984. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  8985. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65504);
  8986. glGetConvolutionFilterEXT(target, format, type, image);
  8987. __GLS_END_CAPTURE_EXEC(ctx, 65504);
  8988. }
  8989. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  8990. writer = ctx->writer;
  8991. if (!writer->padWordCount(writer, 0)) goto end;
  8992. if (!writer->beginCommand(writer, 65504, 20)) goto end;
  8993. writer->putGLenum(writer, target);
  8994. writer->putGLenum(writer, format);
  8995. writer->putGLenum(writer, type);
  8996. writer->putGLoutArg(writer, 0, image);
  8997. writer->endCommand(writer);
  8998. end:
  8999. if (ctx->captureExitFunc) ctx->captureExitFunc(65504);
  9000. --ctx->captureEntryCount;
  9001. }
  9002. #endif /* __GL_EXT_convolution */
  9003. #if __GL_EXT_convolution
  9004. void __gls_capture_glGetConvolutionParameterfvEXT(GLenum target, GLenum pname, GLfloat *params) {
  9005. GLbitfield captureFlags;
  9006. __GLScontext *const ctx = __GLS_CONTEXT;
  9007. __GLSwriter *writer;
  9008. ++ctx->captureEntryCount;
  9009. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65505);
  9010. captureFlags = ctx->captureFlags[];
  9011. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9012. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65505);
  9013. glGetConvolutionParameterfvEXT(target, pname, params);
  9014. __GLS_END_CAPTURE_EXEC(ctx, 65505);
  9015. }
  9016. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9017. writer = ctx->writer;
  9018. if (!writer->padWordCount(writer, 0)) goto end;
  9019. if (!writer->beginCommand(writer, 65505, 16)) goto end;
  9020. if (writer->type == GLS_TEXT) {
  9021. writer->putGLenum(writer, target);
  9022. writer->putGLenum(writer, pname);
  9023. writer->putGLoutArg(writer, 0, params);
  9024. } else {
  9025. writer->putGLenum(writer, pname);
  9026. writer->putGLoutArg(writer, 0, params);
  9027. writer->putGLenum(writer, target);
  9028. }
  9029. writer->endCommand(writer);
  9030. end:
  9031. if (ctx->captureExitFunc) ctx->captureExitFunc(65505);
  9032. --ctx->captureEntryCount;
  9033. }
  9034. #endif /* __GL_EXT_convolution */
  9035. #if __GL_EXT_convolution
  9036. void __gls_capture_glGetConvolutionParameterivEXT(GLenum target, GLenum pname, GLint *params) {
  9037. GLbitfield captureFlags;
  9038. __GLScontext *const ctx = __GLS_CONTEXT;
  9039. __GLSwriter *writer;
  9040. ++ctx->captureEntryCount;
  9041. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65506);
  9042. captureFlags = ctx->captureFlags[];
  9043. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9044. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65506);
  9045. glGetConvolutionParameterivEXT(target, pname, params);
  9046. __GLS_END_CAPTURE_EXEC(ctx, 65506);
  9047. }
  9048. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9049. writer = ctx->writer;
  9050. if (!writer->padWordCount(writer, 0)) goto end;
  9051. if (!writer->beginCommand(writer, 65506, 16)) goto end;
  9052. if (writer->type == GLS_TEXT) {
  9053. writer->putGLenum(writer, target);
  9054. writer->putGLenum(writer, pname);
  9055. writer->putGLoutArg(writer, 0, params);
  9056. } else {
  9057. writer->putGLenum(writer, pname);
  9058. writer->putGLoutArg(writer, 0, params);
  9059. writer->putGLenum(writer, target);
  9060. }
  9061. writer->endCommand(writer);
  9062. end:
  9063. if (ctx->captureExitFunc) ctx->captureExitFunc(65506);
  9064. --ctx->captureEntryCount;
  9065. }
  9066. #endif /* __GL_EXT_convolution */
  9067. #if __GL_EXT_convolution
  9068. void __gls_capture_glGetSeparableFilterEXT(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span) {
  9069. GLbitfield captureFlags;
  9070. __GLScontext *const ctx = __GLS_CONTEXT;
  9071. __GLSwriter *writer;
  9072. ++ctx->captureEntryCount;
  9073. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65507);
  9074. captureFlags = ctx->captureFlags[];
  9075. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9076. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65507);
  9077. glGetSeparableFilterEXT(target, format, type, row, column, span);
  9078. __GLS_END_CAPTURE_EXEC(ctx, 65507);
  9079. }
  9080. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9081. writer = ctx->writer;
  9082. if (!writer->padWordCount(writer, 0)) goto end;
  9083. if (!writer->beginCommand(writer, 65507, 36)) goto end;
  9084. writer->putGLenum(writer, target);
  9085. writer->putGLenum(writer, format);
  9086. writer->putGLenum(writer, type);
  9087. writer->putGLoutArg(writer, 0, row);
  9088. writer->putGLoutArg(writer, 0, column);
  9089. writer->putGLoutArg(writer, 0, span);
  9090. writer->endCommand(writer);
  9091. end:
  9092. if (ctx->captureExitFunc) ctx->captureExitFunc(65507);
  9093. --ctx->captureEntryCount;
  9094. }
  9095. #endif /* __GL_EXT_convolution */
  9096. #if __GL_EXT_convolution
  9097. void __gls_capture_glSeparableFilter2DEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) {
  9098. GLbitfield captureFlags;
  9099. __GLScontext *const ctx = __GLS_CONTEXT;
  9100. __GLSwriter *writer;
  9101. GLint row_count;
  9102. GLint column_count;
  9103. ++ctx->captureEntryCount;
  9104. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65508);
  9105. captureFlags = ctx->captureFlags[];
  9106. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9107. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65508);
  9108. glSeparableFilter2DEXT(target, internalformat, width, height, format, type, row, column);
  9109. __GLS_END_CAPTURE_EXEC(ctx, 65508);
  9110. }
  9111. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9112. writer = ctx->writer;
  9113. row_count = __gls_glSeparableFilter2DEXT_row_size(target, format, type, width);
  9114. column_count = __gls_glSeparableFilter2DEXT_column_size(target, format, type, height);
  9115. if (!writer->beginCommand(writer, 65508, 28 + row_count * 1 + column_count * 1)) goto end;
  9116. writer->putGLSimageFlags(writer, GLS_NONE);
  9117. writer->nextList(writer);
  9118. if (writer->type == GLS_TEXT) {
  9119. writer->putGLenum(writer, target);
  9120. writer->putGLenum(writer, internalformat);
  9121. writer->putGLint(writer, width);
  9122. writer->putGLint(writer, height);
  9123. writer->putGLenum(writer, format);
  9124. writer->putGLenum(writer, type);
  9125. __glsWriter_putPixelv(writer, format, type, width, 1, row_count ? row : GLS_NONE);
  9126. __glsWriter_putPixelv(writer, format, type, height, 1, column_count ? column : GLS_NONE);
  9127. } else {
  9128. writer->putGLenum(writer, target);
  9129. writer->putGLint(writer, width);
  9130. writer->putGLint(writer, height);
  9131. writer->putGLenum(writer, format);
  9132. writer->putGLenum(writer, type);
  9133. writer->putGLenum(writer, internalformat);
  9134. __glsWriter_putPixelv(writer, format, type, width, 1, row_count ? row : GLS_NONE);
  9135. __glsWriter_putPixelv(writer, format, type, height, 1, column_count ? column : GLS_NONE);
  9136. }
  9137. writer->endCommand(writer);
  9138. end:
  9139. if (ctx->captureExitFunc) ctx->captureExitFunc(65508);
  9140. --ctx->captureEntryCount;
  9141. }
  9142. #endif /* __GL_EXT_convolution */
  9143. #if __GL_EXT_histogram
  9144. void __gls_capture_glGetHistogramEXT(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) {
  9145. GLbitfield captureFlags;
  9146. __GLScontext *const ctx = __GLS_CONTEXT;
  9147. __GLSwriter *writer;
  9148. ++ctx->captureEntryCount;
  9149. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65509);
  9150. captureFlags = ctx->captureFlags[];
  9151. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9152. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65509);
  9153. glGetHistogramEXT(target, reset, format, type, values);
  9154. __GLS_END_CAPTURE_EXEC(ctx, 65509);
  9155. }
  9156. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9157. writer = ctx->writer;
  9158. if (!writer->padWordCount(writer, 0)) goto end;
  9159. if (!writer->beginCommand(writer, 65509, 21)) goto end;
  9160. if (writer->type == GLS_TEXT) {
  9161. writer->putGLenum(writer, target);
  9162. writer->putGLboolean(writer, reset);
  9163. writer->putGLenum(writer, format);
  9164. writer->putGLenum(writer, type);
  9165. writer->putGLoutArg(writer, 0, values);
  9166. } else {
  9167. writer->putGLenum(writer, target);
  9168. writer->putGLenum(writer, format);
  9169. writer->putGLenum(writer, type);
  9170. writer->putGLoutArg(writer, 0, values);
  9171. writer->putGLboolean(writer, reset);
  9172. }
  9173. writer->endCommand(writer);
  9174. end:
  9175. if (ctx->captureExitFunc) ctx->captureExitFunc(65509);
  9176. --ctx->captureEntryCount;
  9177. }
  9178. #endif /* __GL_EXT_histogram */
  9179. #if __GL_EXT_histogram
  9180. void __gls_capture_glGetHistogramParameterfvEXT(GLenum target, GLenum pname, GLfloat *params) {
  9181. GLbitfield captureFlags;
  9182. __GLScontext *const ctx = __GLS_CONTEXT;
  9183. __GLSwriter *writer;
  9184. ++ctx->captureEntryCount;
  9185. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65510);
  9186. captureFlags = ctx->captureFlags[];
  9187. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9188. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65510);
  9189. glGetHistogramParameterfvEXT(target, pname, params);
  9190. __GLS_END_CAPTURE_EXEC(ctx, 65510);
  9191. }
  9192. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9193. writer = ctx->writer;
  9194. if (!writer->padWordCount(writer, 0)) goto end;
  9195. if (!writer->beginCommand(writer, 65510, 16)) goto end;
  9196. if (writer->type == GLS_TEXT) {
  9197. writer->putGLenum(writer, target);
  9198. writer->putGLenum(writer, pname);
  9199. writer->putGLoutArg(writer, 0, params);
  9200. } else {
  9201. writer->putGLenum(writer, pname);
  9202. writer->putGLoutArg(writer, 0, params);
  9203. writer->putGLenum(writer, target);
  9204. }
  9205. writer->endCommand(writer);
  9206. end:
  9207. if (ctx->captureExitFunc) ctx->captureExitFunc(65510);
  9208. --ctx->captureEntryCount;
  9209. }
  9210. #endif /* __GL_EXT_histogram */
  9211. #if __GL_EXT_histogram
  9212. void __gls_capture_glGetHistogramParameterivEXT(GLenum target, GLenum pname, GLint *params) {
  9213. GLbitfield captureFlags;
  9214. __GLScontext *const ctx = __GLS_CONTEXT;
  9215. __GLSwriter *writer;
  9216. ++ctx->captureEntryCount;
  9217. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65511);
  9218. captureFlags = ctx->captureFlags[];
  9219. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9220. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65511);
  9221. glGetHistogramParameterivEXT(target, pname, params);
  9222. __GLS_END_CAPTURE_EXEC(ctx, 65511);
  9223. }
  9224. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9225. writer = ctx->writer;
  9226. if (!writer->padWordCount(writer, 0)) goto end;
  9227. if (!writer->beginCommand(writer, 65511, 16)) goto end;
  9228. if (writer->type == GLS_TEXT) {
  9229. writer->putGLenum(writer, target);
  9230. writer->putGLenum(writer, pname);
  9231. writer->putGLoutArg(writer, 0, params);
  9232. } else {
  9233. writer->putGLenum(writer, pname);
  9234. writer->putGLoutArg(writer, 0, params);
  9235. writer->putGLenum(writer, target);
  9236. }
  9237. writer->endCommand(writer);
  9238. end:
  9239. if (ctx->captureExitFunc) ctx->captureExitFunc(65511);
  9240. --ctx->captureEntryCount;
  9241. }
  9242. #endif /* __GL_EXT_histogram */
  9243. #if __GL_EXT_histogram
  9244. void __gls_capture_glGetMinmaxEXT(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) {
  9245. GLbitfield captureFlags;
  9246. __GLScontext *const ctx = __GLS_CONTEXT;
  9247. __GLSwriter *writer;
  9248. ++ctx->captureEntryCount;
  9249. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65512);
  9250. captureFlags = ctx->captureFlags[];
  9251. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9252. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65512);
  9253. glGetMinmaxEXT(target, reset, format, type, values);
  9254. __GLS_END_CAPTURE_EXEC(ctx, 65512);
  9255. }
  9256. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9257. writer = ctx->writer;
  9258. if (!writer->padWordCount(writer, 0)) goto end;
  9259. if (!writer->beginCommand(writer, 65512, 21)) goto end;
  9260. if (writer->type == GLS_TEXT) {
  9261. writer->putGLenum(writer, target);
  9262. writer->putGLboolean(writer, reset);
  9263. writer->putGLenum(writer, format);
  9264. writer->putGLenum(writer, type);
  9265. writer->putGLoutArg(writer, 0, values);
  9266. } else {
  9267. writer->putGLenum(writer, target);
  9268. writer->putGLenum(writer, format);
  9269. writer->putGLenum(writer, type);
  9270. writer->putGLoutArg(writer, 0, values);
  9271. writer->putGLboolean(writer, reset);
  9272. }
  9273. writer->endCommand(writer);
  9274. end:
  9275. if (ctx->captureExitFunc) ctx->captureExitFunc(65512);
  9276. --ctx->captureEntryCount;
  9277. }
  9278. #endif /* __GL_EXT_histogram */
  9279. #if __GL_EXT_histogram
  9280. void __gls_capture_glGetMinmaxParameterfvEXT(GLenum target, GLenum pname, GLfloat *params) {
  9281. GLbitfield captureFlags;
  9282. __GLScontext *const ctx = __GLS_CONTEXT;
  9283. __GLSwriter *writer;
  9284. ++ctx->captureEntryCount;
  9285. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65513);
  9286. captureFlags = ctx->captureFlags[];
  9287. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9288. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65513);
  9289. glGetMinmaxParameterfvEXT(target, pname, params);
  9290. __GLS_END_CAPTURE_EXEC(ctx, 65513);
  9291. }
  9292. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9293. writer = ctx->writer;
  9294. if (!writer->padWordCount(writer, 0)) goto end;
  9295. if (!writer->beginCommand(writer, 65513, 16)) goto end;
  9296. if (writer->type == GLS_TEXT) {
  9297. writer->putGLenum(writer, target);
  9298. writer->putGLenum(writer, pname);
  9299. writer->putGLoutArg(writer, 0, params);
  9300. } else {
  9301. writer->putGLenum(writer, pname);
  9302. writer->putGLoutArg(writer, 0, params);
  9303. writer->putGLenum(writer, target);
  9304. }
  9305. writer->endCommand(writer);
  9306. end:
  9307. if (ctx->captureExitFunc) ctx->captureExitFunc(65513);
  9308. --ctx->captureEntryCount;
  9309. }
  9310. #endif /* __GL_EXT_histogram */
  9311. #if __GL_EXT_histogram
  9312. void __gls_capture_glGetMinmaxParameterivEXT(GLenum target, GLenum pname, GLint *params) {
  9313. GLbitfield captureFlags;
  9314. __GLScontext *const ctx = __GLS_CONTEXT;
  9315. __GLSwriter *writer;
  9316. ++ctx->captureEntryCount;
  9317. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65514);
  9318. captureFlags = ctx->captureFlags[];
  9319. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9320. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65514);
  9321. glGetMinmaxParameterivEXT(target, pname, params);
  9322. __GLS_END_CAPTURE_EXEC(ctx, 65514);
  9323. }
  9324. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9325. writer = ctx->writer;
  9326. if (!writer->padWordCount(writer, 0)) goto end;
  9327. if (!writer->beginCommand(writer, 65514, 16)) goto end;
  9328. if (writer->type == GLS_TEXT) {
  9329. writer->putGLenum(writer, target);
  9330. writer->putGLenum(writer, pname);
  9331. writer->putGLoutArg(writer, 0, params);
  9332. } else {
  9333. writer->putGLenum(writer, pname);
  9334. writer->putGLoutArg(writer, 0, params);
  9335. writer->putGLenum(writer, target);
  9336. }
  9337. writer->endCommand(writer);
  9338. end:
  9339. if (ctx->captureExitFunc) ctx->captureExitFunc(65514);
  9340. --ctx->captureEntryCount;
  9341. }
  9342. #endif /* __GL_EXT_histogram */
  9343. #if __GL_EXT_histogram
  9344. void __gls_capture_glHistogramEXT(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) {
  9345. GLbitfield captureFlags;
  9346. __GLScontext *const ctx = __GLS_CONTEXT;
  9347. __GLSwriter *writer;
  9348. ++ctx->captureEntryCount;
  9349. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65515);
  9350. captureFlags = ctx->captureFlags[];
  9351. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9352. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65515);
  9353. glHistogramEXT(target, width, internalformat, sink);
  9354. __GLS_END_CAPTURE_EXEC(ctx, 65515);
  9355. }
  9356. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9357. writer = ctx->writer;
  9358. if (!writer->beginCommand(writer, 65515, 13)) goto end;
  9359. writer->putGLenum(writer, target);
  9360. writer->putGLint(writer, width);
  9361. writer->putGLenum(writer, internalformat);
  9362. writer->putGLboolean(writer, sink);
  9363. writer->endCommand(writer);
  9364. end:
  9365. if (ctx->captureExitFunc) ctx->captureExitFunc(65515);
  9366. --ctx->captureEntryCount;
  9367. }
  9368. #endif /* __GL_EXT_histogram */
  9369. #if __GL_EXT_histogram
  9370. void __gls_capture_glMinmaxEXT(GLenum target, GLenum internalformat, GLboolean sink) {
  9371. GLbitfield captureFlags;
  9372. __GLScontext *const ctx = __GLS_CONTEXT;
  9373. __GLSwriter *writer;
  9374. ++ctx->captureEntryCount;
  9375. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65516);
  9376. captureFlags = ctx->captureFlags[];
  9377. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9378. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65516);
  9379. glMinmaxEXT(target, internalformat, sink);
  9380. __GLS_END_CAPTURE_EXEC(ctx, 65516);
  9381. }
  9382. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9383. writer = ctx->writer;
  9384. if (!writer->beginCommand(writer, 65516, 9)) goto end;
  9385. writer->putGLenum(writer, target);
  9386. writer->putGLenum(writer, internalformat);
  9387. writer->putGLboolean(writer, sink);
  9388. writer->endCommand(writer);
  9389. end:
  9390. if (ctx->captureExitFunc) ctx->captureExitFunc(65516);
  9391. --ctx->captureEntryCount;
  9392. }
  9393. #endif /* __GL_EXT_histogram */
  9394. #if __GL_EXT_histogram
  9395. void __gls_capture_glResetHistogramEXT(GLenum target) {
  9396. GLbitfield captureFlags;
  9397. __GLScontext *const ctx = __GLS_CONTEXT;
  9398. __GLSwriter *writer;
  9399. ++ctx->captureEntryCount;
  9400. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65517);
  9401. captureFlags = ctx->captureFlags[];
  9402. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9403. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65517);
  9404. glResetHistogramEXT(target);
  9405. __GLS_END_CAPTURE_EXEC(ctx, 65517);
  9406. }
  9407. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9408. writer = ctx->writer;
  9409. if (!writer->beginCommand(writer, 65517, 4)) goto end;
  9410. writer->putGLenum(writer, target);
  9411. writer->endCommand(writer);
  9412. end:
  9413. if (ctx->captureExitFunc) ctx->captureExitFunc(65517);
  9414. --ctx->captureEntryCount;
  9415. }
  9416. #endif /* __GL_EXT_histogram */
  9417. #if __GL_EXT_histogram
  9418. void __gls_capture_glResetMinmaxEXT(GLenum target) {
  9419. GLbitfield captureFlags;
  9420. __GLScontext *const ctx = __GLS_CONTEXT;
  9421. __GLSwriter *writer;
  9422. ++ctx->captureEntryCount;
  9423. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65518);
  9424. captureFlags = ctx->captureFlags[];
  9425. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9426. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65518);
  9427. glResetMinmaxEXT(target);
  9428. __GLS_END_CAPTURE_EXEC(ctx, 65518);
  9429. }
  9430. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9431. writer = ctx->writer;
  9432. if (!writer->beginCommand(writer, 65518, 4)) goto end;
  9433. writer->putGLenum(writer, target);
  9434. writer->endCommand(writer);
  9435. end:
  9436. if (ctx->captureExitFunc) ctx->captureExitFunc(65518);
  9437. --ctx->captureEntryCount;
  9438. }
  9439. #endif /* __GL_EXT_histogram */
  9440. #if __GL_EXT_texture3D
  9441. void __gls_capture_glTexImage3DEXT(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) {
  9442. GLbitfield captureFlags;
  9443. __GLScontext *const ctx = __GLS_CONTEXT;
  9444. __GLSwriter *writer;
  9445. GLint pixels_count;
  9446. ++ctx->captureEntryCount;
  9447. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65519);
  9448. captureFlags = ctx->captureFlags[];
  9449. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9450. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65519);
  9451. glTexImage3DEXT(target, level, internalformat, width, height, depth, border, format, type, pixels);
  9452. __GLS_END_CAPTURE_EXEC(ctx, 65519);
  9453. }
  9454. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9455. writer = ctx->writer;
  9456. pixels_count = pixels ? __gls_glTexImage3DEXT_pixels_size(format, type, width, height, depth) : 0;
  9457. if (!writer->beginCommand(writer, 65519, 40 + pixels_count * 1)) goto end;
  9458. writer->putGLSimageFlags(writer, pixels ? GLS_NONE : GLS_IMAGE_NULL_BIT);
  9459. writer->nextList(writer);
  9460. if (writer->type == GLS_TEXT) {
  9461. writer->putGLenum(writer, target);
  9462. writer->putGLint(writer, level);
  9463. writer->putGLenum(writer, internalformat);
  9464. writer->putGLint(writer, width);
  9465. writer->putGLint(writer, height);
  9466. writer->putGLint(writer, depth);
  9467. writer->putGLint(writer, border);
  9468. writer->putGLenum(writer, format);
  9469. writer->putGLenum(writer, type);
  9470. __glsWriter_putPixelv(writer, format, type, width, height * depth, pixels_count ? pixels : GLS_NONE);
  9471. } else {
  9472. writer->putGLint(writer, width);
  9473. writer->putGLint(writer, height);
  9474. writer->putGLint(writer, depth);
  9475. writer->putGLenum(writer, format);
  9476. writer->putGLenum(writer, type);
  9477. writer->putGLenum(writer, target);
  9478. writer->putGLint(writer, level);
  9479. writer->putGLenum(writer, internalformat);
  9480. writer->putGLint(writer, border);
  9481. __glsWriter_putPixelv(writer, format, type, width, height * depth, pixels_count ? pixels : GLS_NONE);
  9482. }
  9483. writer->endCommand(writer);
  9484. end:
  9485. if (ctx->captureExitFunc) ctx->captureExitFunc(65519);
  9486. --ctx->captureEntryCount;
  9487. }
  9488. #endif /* __GL_EXT_texture3D */
  9489. #if __GL_EXT_subtexture && __GL_EXT_texture3D
  9490. void glTexSubImage3DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
  9491. void __gls_capture_glTexSubImage3DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) {
  9492. GLbitfield captureFlags;
  9493. __GLScontext *const ctx = __GLS_CONTEXT;
  9494. __GLSwriter *writer;
  9495. GLint pixels_count;
  9496. ++ctx->captureEntryCount;
  9497. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65488);
  9498. captureFlags = ctx->captureFlags[];
  9499. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9500. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65488);
  9501. glTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
  9502. __GLS_END_CAPTURE_EXEC(ctx, 65488);
  9503. }
  9504. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9505. writer = ctx->writer;
  9506. pixels_count = __gls_glTexSubImage3DEXT_pixels_size(format, type, width, height, depth);
  9507. if (!writer->beginCommand(writer, 65488, 44 + pixels_count * 1)) goto end;
  9508. writer->putGLSimageFlags(writer, GLS_NONE);
  9509. writer->nextList(writer);
  9510. if (writer->type == GLS_TEXT) {
  9511. writer->putGLenum(writer, target);
  9512. writer->putGLint(writer, level);
  9513. writer->putGLint(writer, xoffset);
  9514. writer->putGLint(writer, yoffset);
  9515. writer->putGLint(writer, zoffset);
  9516. writer->putGLint(writer, width);
  9517. writer->putGLint(writer, height);
  9518. writer->putGLint(writer, depth);
  9519. writer->putGLenum(writer, format);
  9520. writer->putGLenum(writer, type);
  9521. __glsWriter_putPixelv(writer, format, type, width, height * depth, pixels_count ? pixels : GLS_NONE);
  9522. } else {
  9523. writer->putGLint(writer, width);
  9524. writer->putGLint(writer, height);
  9525. writer->putGLint(writer, depth);
  9526. writer->putGLenum(writer, format);
  9527. writer->putGLenum(writer, type);
  9528. writer->putGLenum(writer, target);
  9529. writer->putGLint(writer, level);
  9530. writer->putGLint(writer, xoffset);
  9531. writer->putGLint(writer, yoffset);
  9532. writer->putGLint(writer, zoffset);
  9533. __glsWriter_putPixelv(writer, format, type, width, height * depth, pixels_count ? pixels : GLS_NONE);
  9534. }
  9535. writer->endCommand(writer);
  9536. end:
  9537. if (ctx->captureExitFunc) ctx->captureExitFunc(65488);
  9538. --ctx->captureEntryCount;
  9539. }
  9540. #endif /* __GL_EXT_subtexture */
  9541. #if __GL_SGIS_detail_texture
  9542. void __gls_capture_glDetailTexFuncSGIS(GLenum target, GLsizei n, const GLfloat *points) {
  9543. GLbitfield captureFlags;
  9544. __GLScontext *const ctx = __GLS_CONTEXT;
  9545. __GLSwriter *writer;
  9546. ++ctx->captureEntryCount;
  9547. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65489);
  9548. captureFlags = ctx->captureFlags[417];
  9549. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9550. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65489);
  9551. glDetailTexFuncSGIS(target, n, points);
  9552. __GLS_END_CAPTURE_EXEC(ctx, 65489);
  9553. }
  9554. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9555. writer = ctx->writer;
  9556. if (!writer->beginCommand(writer, 65489, 8 + __GLS_MAX(n*2, 0) * 4)) goto end;
  9557. if (writer->type == GLS_TEXT) {
  9558. writer->putGLenum(writer, target);
  9559. writer->putGLint(writer, n);
  9560. writer->putGLfloatv(writer, __GLS_MAX(n*2, 0), points);
  9561. } else {
  9562. writer->putGLint(writer, n);
  9563. writer->putGLenum(writer, target);
  9564. writer->putGLfloatv(writer, __GLS_MAX(n*2, 0), points);
  9565. }
  9566. writer->endCommand(writer);
  9567. end:
  9568. if (ctx->captureExitFunc) ctx->captureExitFunc(65489);
  9569. --ctx->captureEntryCount;
  9570. }
  9571. #endif /* __GL_SGIS_detail_texture */
  9572. #if __GL_SGIS_detail_texture
  9573. void __gls_capture_glGetDetailTexFuncSGIS(GLenum target, GLfloat *points) {
  9574. GLbitfield captureFlags;
  9575. __GLScontext *const ctx = __GLS_CONTEXT;
  9576. __GLSwriter *writer;
  9577. ++ctx->captureEntryCount;
  9578. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65490);
  9579. captureFlags = ctx->captureFlags[418];
  9580. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9581. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65490);
  9582. glGetDetailTexFuncSGIS(target, points);
  9583. __GLS_END_CAPTURE_EXEC(ctx, 65490);
  9584. }
  9585. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9586. writer = ctx->writer;
  9587. if (!writer->padWordCount(writer, 0)) goto end;
  9588. if (!writer->beginCommand(writer, 65490, 12)) goto end;
  9589. writer->putGLenum(writer, target);
  9590. writer->putGLoutArg(writer, 0, points);
  9591. writer->endCommand(writer);
  9592. end:
  9593. if (ctx->captureExitFunc) ctx->captureExitFunc(65490);
  9594. --ctx->captureEntryCount;
  9595. }
  9596. #endif /* __GL_SGIS_detail_texture */
  9597. #if __GL_SGIS_sharpen_texture
  9598. void __gls_capture_glSharpenTexFuncSGIS(GLenum target, GLsizei n, const GLfloat *points) {
  9599. GLbitfield captureFlags;
  9600. __GLScontext *const ctx = __GLS_CONTEXT;
  9601. __GLSwriter *writer;
  9602. ++ctx->captureEntryCount;
  9603. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65491);
  9604. captureFlags = ctx->captureFlags[419];
  9605. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9606. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65491);
  9607. glSharpenTexFuncSGIS(target, n, points);
  9608. __GLS_END_CAPTURE_EXEC(ctx, 65491);
  9609. }
  9610. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9611. writer = ctx->writer;
  9612. if (!writer->beginCommand(writer, 65491, 8 + __GLS_MAX(n*2, 0) * 4)) goto end;
  9613. if (writer->type == GLS_TEXT) {
  9614. writer->putGLenum(writer, target);
  9615. writer->putGLint(writer, n);
  9616. writer->putGLfloatv(writer, __GLS_MAX(n*2, 0), points);
  9617. } else {
  9618. writer->putGLint(writer, n);
  9619. writer->putGLenum(writer, target);
  9620. writer->putGLfloatv(writer, __GLS_MAX(n*2, 0), points);
  9621. }
  9622. writer->endCommand(writer);
  9623. end:
  9624. if (ctx->captureExitFunc) ctx->captureExitFunc(65491);
  9625. --ctx->captureEntryCount;
  9626. }
  9627. #endif /* __GL_SGIS_sharpen_texture */
  9628. #if __GL_SGIS_sharpen_texture
  9629. void __gls_capture_glGetSharpenTexFuncSGIS(GLenum target, GLfloat *points) {
  9630. GLbitfield captureFlags;
  9631. __GLScontext *const ctx = __GLS_CONTEXT;
  9632. __GLSwriter *writer;
  9633. ++ctx->captureEntryCount;
  9634. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65492);
  9635. captureFlags = ctx->captureFlags[420];
  9636. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9637. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65492);
  9638. glGetSharpenTexFuncSGIS(target, points);
  9639. __GLS_END_CAPTURE_EXEC(ctx, 65492);
  9640. }
  9641. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9642. writer = ctx->writer;
  9643. if (!writer->padWordCount(writer, 0)) goto end;
  9644. if (!writer->beginCommand(writer, 65492, 12)) goto end;
  9645. writer->putGLenum(writer, target);
  9646. writer->putGLoutArg(writer, 0, points);
  9647. writer->endCommand(writer);
  9648. end:
  9649. if (ctx->captureExitFunc) ctx->captureExitFunc(65492);
  9650. --ctx->captureEntryCount;
  9651. }
  9652. #endif /* __GL_SGIS_sharpen_texture */
  9653. #if __GL_EXT_vertex_array
  9654. void glArrayElementEXT(GLint i);
  9655. void __gls_capture_glArrayElementEXT(GLint i) {
  9656. GLbitfield captureFlags;
  9657. __GLScontext *const ctx = __GLS_CONTEXT;
  9658. __GLSwriter *writer;
  9659. ++ctx->captureEntryCount;
  9660. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65493);
  9661. captureFlags = ctx->captureFlags[437];
  9662. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9663. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65493);
  9664. glArrayElementEXT(i);
  9665. __GLS_END_CAPTURE_EXEC(ctx, 65493);
  9666. }
  9667. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9668. writer = ctx->writer;
  9669. if (!writer->beginCommand(writer, 65493, 4)) goto end;
  9670. writer->putGLint(writer, i);
  9671. writer->endCommand(writer);
  9672. end:
  9673. if (ctx->captureExitFunc) ctx->captureExitFunc(65493);
  9674. --ctx->captureEntryCount;
  9675. }
  9676. #endif /* __GL_EXT_vertex_array */
  9677. void __gls_capture_glArrayElement(GLint i) {
  9678. GLbitfield captureFlags;
  9679. __GLScontext *const ctx = __GLS_CONTEXT;
  9680. __GLSwriter *writer;
  9681. GLint size;
  9682. __GLSarrayState arrayState;
  9683. ++ctx->captureEntryCount;
  9684. if (ctx->captureEntryFunc) ctx->captureEntryFunc(370);
  9685. captureFlags = ctx->captureFlags[370];
  9686. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9687. __GLS_BEGIN_CAPTURE_EXEC(ctx, 370);
  9688. glArrayElement(i);
  9689. __GLS_END_CAPTURE_EXEC(ctx, 370);
  9690. }
  9691. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9692. writer = ctx->writer;
  9693. __glsGetArrayState(ctx, &arrayState);
  9694. size = __glsArrayDataSize(1, &arrayState);
  9695. if (!writer->padWordCount(writer, 0)) goto end;
  9696. if (!writer->beginCommand(writer, 370, size)) goto end;
  9697. __glsWriteArrayData(writer, size, i, 1, GL_NONE, NULL, &arrayState);
  9698. writer->endCommand(writer);
  9699. end:
  9700. if (ctx->captureExitFunc) ctx->captureExitFunc(370);
  9701. --ctx->captureEntryCount;
  9702. }
  9703. #if __GL_EXT_vertex_array
  9704. void glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
  9705. void __gls_capture_glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) {
  9706. GLbitfield captureFlags;
  9707. __GLScontext *const ctx = __GLS_CONTEXT;
  9708. __GLSwriter *writer;
  9709. GLint pointer_count;
  9710. ++ctx->captureEntryCount;
  9711. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65494);
  9712. captureFlags = ctx->captureFlags[438];
  9713. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9714. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65494);
  9715. glColorPointerEXT(size, type, stride, count, pointer);
  9716. __GLS_END_CAPTURE_EXEC(ctx, 65494);
  9717. }
  9718. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9719. writer = ctx->writer;
  9720. pointer_count = __gls_glColorPointerEXT_pointer_size(size, type, stride, count);
  9721. if (!writer->beginCommand(writer, 65494, 16 + pointer_count * 1)) goto end;
  9722. writer->putGLint(writer, size);
  9723. writer->putGLenum(writer, type);
  9724. writer->putGLint(writer, __GLS_MIN(stride, 0));
  9725. writer->putGLint(writer, count);
  9726. __glsWriter_putVertexv(writer, size, type, stride, count, pointer_count ? pointer : GLS_NONE);
  9727. writer->endCommand(writer);
  9728. end:
  9729. if (ctx->captureExitFunc) ctx->captureExitFunc(65494);
  9730. --ctx->captureEntryCount;
  9731. }
  9732. #endif /* __GL_EXT_vertex_array */
  9733. void __gls_capture_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
  9734. GLbitfield captureFlags;
  9735. __GLScontext *const ctx = __GLS_CONTEXT;
  9736. ++ctx->captureEntryCount;
  9737. if (ctx->captureEntryFunc) ctx->captureEntryFunc(372);
  9738. captureFlags = ctx->captureFlags[372];
  9739. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9740. __GLS_BEGIN_CAPTURE_EXEC(ctx, 372);
  9741. glColorPointer(size, type, stride, pointer);
  9742. __GLS_END_CAPTURE_EXEC(ctx, 372);
  9743. }
  9744. // No record produced
  9745. if (ctx->captureExitFunc) ctx->captureExitFunc(372);
  9746. --ctx->captureEntryCount;
  9747. }
  9748. #if __GL_EXT_vertex_array
  9749. void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count);
  9750. void __gls_capture_glDrawArraysEXT(GLenum mode, GLint first, GLsizei count) {
  9751. GLbitfield captureFlags;
  9752. __GLScontext *const ctx = __GLS_CONTEXT;
  9753. __GLSwriter *writer;
  9754. ++ctx->captureEntryCount;
  9755. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65495);
  9756. captureFlags = ctx->captureFlags[439];
  9757. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9758. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65495);
  9759. glDrawArraysEXT(mode, first, count);
  9760. __GLS_END_CAPTURE_EXEC(ctx, 65495);
  9761. }
  9762. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9763. writer = ctx->writer;
  9764. if (!writer->beginCommand(writer, 65495, 12)) goto end;
  9765. writer->putGLenum(writer, mode);
  9766. writer->putGLint(writer, first);
  9767. writer->putGLint(writer, count);
  9768. writer->endCommand(writer);
  9769. end:
  9770. if (ctx->captureExitFunc) ctx->captureExitFunc(65495);
  9771. --ctx->captureEntryCount;
  9772. }
  9773. #endif /* __GL_EXT_vertex_array */
  9774. void __gls_capture_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
  9775. GLbitfield captureFlags;
  9776. __GLScontext *const ctx = __GLS_CONTEXT;
  9777. __GLSwriter *writer;
  9778. GLint size;
  9779. __GLSarrayState arrayState;
  9780. ++ctx->captureEntryCount;
  9781. if (ctx->captureEntryFunc) ctx->captureEntryFunc(374);
  9782. captureFlags = ctx->captureFlags[374];
  9783. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9784. __GLS_BEGIN_CAPTURE_EXEC(ctx, 374);
  9785. glDrawArrays(mode, first, count);
  9786. __GLS_END_CAPTURE_EXEC(ctx, 374);
  9787. }
  9788. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9789. writer = ctx->writer;
  9790. __glsGetArrayState(ctx, &arrayState);
  9791. size = __glsArrayDataSize(count, &arrayState);
  9792. if (!writer->padWordCount(writer, 1)) goto end;
  9793. if (!writer->beginCommand(writer, 374, size+4)) goto end;
  9794. writer->putGLenum(writer, mode);
  9795. __glsWriteArrayData(writer, size, first, count, GL_NONE, NULL, &arrayState);
  9796. writer->endCommand(writer);
  9797. end:
  9798. if (ctx->captureExitFunc) ctx->captureExitFunc(374);
  9799. --ctx->captureEntryCount;
  9800. }
  9801. void __gls_capture_glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) {
  9802. GLbitfield captureFlags;
  9803. __GLScontext *const ctx = __GLS_CONTEXT;
  9804. __GLSwriter *writer;
  9805. GLint size;
  9806. __GLSarrayState arrayState;
  9807. __GLSdrawElementsState deState;
  9808. ++ctx->captureEntryCount;
  9809. if (ctx->captureEntryFunc) ctx->captureEntryFunc(375);
  9810. captureFlags = ctx->captureFlags[375];
  9811. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9812. __GLS_BEGIN_CAPTURE_EXEC(ctx, 375);
  9813. glDrawElements(mode, count, type, indices);
  9814. __GLS_END_CAPTURE_EXEC(ctx, 375);
  9815. }
  9816. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9817. writer = ctx->writer;
  9818. __glsGetArrayState(ctx, &arrayState);
  9819. size = __glsDrawElementsDataSize(count, type, indices, &arrayState,
  9820. &deState);
  9821. if (size < 0)
  9822. {
  9823. goto end;
  9824. }
  9825. if (!writer->padWordCount(writer, 0)) goto end;
  9826. if (!writer->beginCommand(writer, 375, size+8)) goto end;
  9827. writer->putGLenum(writer, mode);
  9828. writer->putGLint(writer, count);
  9829. __glsWriteDrawElementsData(writer, size, count, &arrayState, &deState);
  9830. writer->endCommand(writer);
  9831. end:
  9832. if (ctx->captureExitFunc) ctx->captureExitFunc(375);
  9833. --ctx->captureEntryCount;
  9834. }
  9835. #if __GL_WIN_draw_range_elements
  9836. void __gls_capture_glDrawRangeElementsWIN(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) {
  9837. // XXX : For best performance, flesh out this function instead of calling
  9838. // DrawElements.
  9839. __gls_capture_glDrawElements(mode, count, type, indices);
  9840. }
  9841. #endif
  9842. void __gls_capture_glInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer) {
  9843. GLbitfield captureFlags;
  9844. __GLScontext *const ctx = __GLS_CONTEXT;
  9845. ++ctx->captureEntryCount;
  9846. if (ctx->captureEntryFunc) ctx->captureEntryFunc(381);
  9847. captureFlags = ctx->captureFlags[381];
  9848. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9849. __GLS_BEGIN_CAPTURE_EXEC(ctx, 381);
  9850. glInterleavedArrays(format, stride, pointer);
  9851. __GLS_END_CAPTURE_EXEC(ctx, 381);
  9852. }
  9853. // No record produced
  9854. if (ctx->captureExitFunc) ctx->captureExitFunc(381);
  9855. --ctx->captureEntryCount;
  9856. }
  9857. void __gls_capture_glEnableClientState(GLenum array) {
  9858. GLbitfield captureFlags;
  9859. __GLScontext *const ctx = __GLS_CONTEXT;
  9860. __GLSwriter *writer;
  9861. ++ctx->captureEntryCount;
  9862. if (ctx->captureEntryFunc) ctx->captureEntryFunc(377);
  9863. captureFlags = ctx->captureFlags[377];
  9864. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9865. __GLS_BEGIN_CAPTURE_EXEC(ctx, 377);
  9866. glEnableClientState(array);
  9867. __GLS_END_CAPTURE_EXEC(ctx, 377);
  9868. }
  9869. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9870. writer = ctx->writer;
  9871. if (!writer->beginCommand(writer, 377, 4)) goto end;
  9872. writer->putGLenum(writer, array);
  9873. writer->endCommand(writer);
  9874. end:
  9875. if (ctx->captureExitFunc) ctx->captureExitFunc(377);
  9876. --ctx->captureEntryCount;
  9877. }
  9878. void __gls_capture_glDisableClientState(GLenum array) {
  9879. GLbitfield captureFlags;
  9880. __GLScontext *const ctx = __GLS_CONTEXT;
  9881. __GLSwriter *writer;
  9882. ++ctx->captureEntryCount;
  9883. if (ctx->captureEntryFunc) ctx->captureEntryFunc(373);
  9884. captureFlags = ctx->captureFlags[373];
  9885. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9886. __GLS_BEGIN_CAPTURE_EXEC(ctx, 373);
  9887. glDisableClientState(array);
  9888. __GLS_END_CAPTURE_EXEC(ctx, 373);
  9889. }
  9890. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9891. writer = ctx->writer;
  9892. if (!writer->beginCommand(writer, 373, 4)) goto end;
  9893. writer->putGLenum(writer, array);
  9894. writer->endCommand(writer);
  9895. end:
  9896. if (ctx->captureExitFunc) ctx->captureExitFunc(373);
  9897. --ctx->captureEntryCount;
  9898. }
  9899. #if __GL_EXT_vertex_array
  9900. void glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *pointer);
  9901. void __gls_capture_glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *pointer) {
  9902. GLbitfield captureFlags;
  9903. __GLScontext *const ctx = __GLS_CONTEXT;
  9904. __GLSwriter *writer;
  9905. GLint pointer_count;
  9906. ++ctx->captureEntryCount;
  9907. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65496);
  9908. captureFlags = ctx->captureFlags[440];
  9909. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9910. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65496);
  9911. glEdgeFlagPointerEXT(stride, count, pointer);
  9912. __GLS_END_CAPTURE_EXEC(ctx, 65496);
  9913. }
  9914. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9915. writer = ctx->writer;
  9916. pointer_count = __gls_glEdgeFlagPointerEXT_pointer_size(stride, count);
  9917. if (!writer->beginCommand(writer, 65496, 8 + pointer_count * 1)) goto end;
  9918. writer->putGLint(writer, __GLS_MIN(stride, 0));
  9919. writer->putGLint(writer, count);
  9920. __glsWriter_putVertexv(writer, 1, __GLS_BOOLEAN, stride, count, pointer_count ? pointer : GLS_NONE);
  9921. writer->endCommand(writer);
  9922. end:
  9923. if (ctx->captureExitFunc) ctx->captureExitFunc(65496);
  9924. --ctx->captureEntryCount;
  9925. }
  9926. #endif /* __GL_EXT_vertex_array */
  9927. void __gls_capture_glEdgeFlagPointer(GLsizei stride, const GLvoid *pointer) {
  9928. GLbitfield captureFlags;
  9929. __GLScontext *const ctx = __GLS_CONTEXT;
  9930. ++ctx->captureEntryCount;
  9931. if (ctx->captureEntryFunc) ctx->captureEntryFunc(376);
  9932. captureFlags = ctx->captureFlags[376];
  9933. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9934. __GLS_BEGIN_CAPTURE_EXEC(ctx, 376);
  9935. glEdgeFlagPointer(stride, pointer);
  9936. __GLS_END_CAPTURE_EXEC(ctx, 376);
  9937. }
  9938. // No record produced
  9939. if (ctx->captureExitFunc) ctx->captureExitFunc(376);
  9940. --ctx->captureEntryCount;
  9941. }
  9942. #if __GL_EXT_vertex_array
  9943. void glGetPointervEXT(GLenum pname, GLvoid* *params);
  9944. void __gls_capture_glGetPointervEXT(GLenum pname, GLvoid* *params) {
  9945. GLbitfield captureFlags;
  9946. __GLScontext *const ctx = __GLS_CONTEXT;
  9947. __GLSwriter *writer;
  9948. ++ctx->captureEntryCount;
  9949. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65497);
  9950. captureFlags = ctx->captureFlags[441];
  9951. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9952. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65497);
  9953. glGetPointervEXT(pname, params);
  9954. __GLS_END_CAPTURE_EXEC(ctx, 65497);
  9955. }
  9956. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9957. writer = ctx->writer;
  9958. if (!writer->padWordCount(writer, 1)) goto end;
  9959. if (!writer->beginCommand(writer, 65497, 12)) goto end;
  9960. if (writer->type == GLS_TEXT) {
  9961. writer->putGLenum(writer, pname);
  9962. writer->putGLoutArg(writer, 0, params);
  9963. } else {
  9964. writer->putGLoutArg(writer, 0, params);
  9965. writer->putGLenum(writer, pname);
  9966. }
  9967. writer->endCommand(writer);
  9968. end:
  9969. if (ctx->captureExitFunc) ctx->captureExitFunc(65497);
  9970. --ctx->captureEntryCount;
  9971. }
  9972. #endif /* __GL_EXT_vertex_array */
  9973. void __gls_capture_glGetPointerv(GLenum pname, GLvoid* *params) {
  9974. GLbitfield captureFlags;
  9975. __GLScontext *const ctx = __GLS_CONTEXT;
  9976. __GLSwriter *writer;
  9977. ++ctx->captureEntryCount;
  9978. if (ctx->captureEntryFunc) ctx->captureEntryFunc(393);
  9979. captureFlags = ctx->captureFlags[393];
  9980. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  9981. __GLS_BEGIN_CAPTURE_EXEC(ctx, 393);
  9982. glGetPointerv(pname, params);
  9983. __GLS_END_CAPTURE_EXEC(ctx, 393);
  9984. }
  9985. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  9986. writer = ctx->writer;
  9987. if (!writer->padWordCount(writer, 1)) goto end;
  9988. if (!writer->beginCommand(writer, 393, 12)) goto end;
  9989. if (writer->type == GLS_TEXT) {
  9990. writer->putGLenum(writer, pname);
  9991. writer->putGLoutArg(writer, 0, params);
  9992. } else {
  9993. writer->putGLoutArg(writer, 0, params);
  9994. writer->putGLenum(writer, pname);
  9995. }
  9996. writer->endCommand(writer);
  9997. end:
  9998. if (ctx->captureExitFunc) ctx->captureExitFunc(393);
  9999. --ctx->captureEntryCount;
  10000. }
  10001. #if __GL_EXT_vertex_array
  10002. void glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
  10003. void __gls_capture_glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) {
  10004. GLbitfield captureFlags;
  10005. __GLScontext *const ctx = __GLS_CONTEXT;
  10006. __GLSwriter *writer;
  10007. GLint pointer_count;
  10008. ++ctx->captureEntryCount;
  10009. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65498);
  10010. captureFlags = ctx->captureFlags[442];
  10011. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10012. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65498);
  10013. glIndexPointerEXT(type, stride, count, pointer);
  10014. __GLS_END_CAPTURE_EXEC(ctx, 65498);
  10015. }
  10016. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10017. writer = ctx->writer;
  10018. pointer_count = __gls_glIndexPointerEXT_pointer_size(type, stride, count);
  10019. if (!writer->beginCommand(writer, 65498, 12 + pointer_count * 1)) goto end;
  10020. writer->putGLenum(writer, type);
  10021. writer->putGLint(writer, __GLS_MIN(stride, 0));
  10022. writer->putGLint(writer, count);
  10023. __glsWriter_putVertexv(writer, 1, type, stride, count, pointer_count ? pointer : GLS_NONE);
  10024. writer->endCommand(writer);
  10025. end:
  10026. if (ctx->captureExitFunc) ctx->captureExitFunc(65498);
  10027. --ctx->captureEntryCount;
  10028. }
  10029. #endif /* __GL_EXT_vertex_array */
  10030. void __gls_capture_glIndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer) {
  10031. GLbitfield captureFlags;
  10032. __GLScontext *const ctx = __GLS_CONTEXT;
  10033. ++ctx->captureEntryCount;
  10034. if (ctx->captureEntryFunc) ctx->captureEntryFunc(378);
  10035. captureFlags = ctx->captureFlags[378];
  10036. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10037. __GLS_BEGIN_CAPTURE_EXEC(ctx, 378);
  10038. glIndexPointer(type, stride, pointer);
  10039. __GLS_END_CAPTURE_EXEC(ctx, 378);
  10040. }
  10041. // No record produced
  10042. if (ctx->captureExitFunc) ctx->captureExitFunc(378);
  10043. --ctx->captureEntryCount;
  10044. }
  10045. #if __GL_EXT_vertex_array
  10046. void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
  10047. void __gls_capture_glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) {
  10048. GLbitfield captureFlags;
  10049. __GLScontext *const ctx = __GLS_CONTEXT;
  10050. __GLSwriter *writer;
  10051. GLint pointer_count;
  10052. ++ctx->captureEntryCount;
  10053. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65499);
  10054. captureFlags = ctx->captureFlags[443];
  10055. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10056. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65499);
  10057. glNormalPointerEXT(type, stride, count, pointer);
  10058. __GLS_END_CAPTURE_EXEC(ctx, 65499);
  10059. }
  10060. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10061. writer = ctx->writer;
  10062. pointer_count = __gls_glNormalPointerEXT_pointer_size(type, stride, count);
  10063. if (!writer->beginCommand(writer, 65499, 12 + pointer_count * 1)) goto end;
  10064. writer->putGLenum(writer, type);
  10065. writer->putGLint(writer, __GLS_MIN(stride, 0));
  10066. writer->putGLint(writer, count);
  10067. __glsWriter_putVertexv(writer, 3, type, stride, count, pointer_count ? pointer : GLS_NONE);
  10068. writer->endCommand(writer);
  10069. end:
  10070. if (ctx->captureExitFunc) ctx->captureExitFunc(65499);
  10071. --ctx->captureEntryCount;
  10072. }
  10073. #endif /* __GL_EXT_vertex_array */
  10074. void __gls_capture_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) {
  10075. GLbitfield captureFlags;
  10076. __GLScontext *const ctx = __GLS_CONTEXT;
  10077. ++ctx->captureEntryCount;
  10078. if (ctx->captureEntryFunc) ctx->captureEntryFunc(382);
  10079. captureFlags = ctx->captureFlags[382];
  10080. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10081. __GLS_BEGIN_CAPTURE_EXEC(ctx, 382);
  10082. glNormalPointer(type, stride, pointer);
  10083. __GLS_END_CAPTURE_EXEC(ctx, 382);
  10084. }
  10085. // No record produced
  10086. if (ctx->captureExitFunc) ctx->captureExitFunc(382);
  10087. --ctx->captureEntryCount;
  10088. }
  10089. #if __GL_EXT_vertex_array
  10090. void glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
  10091. void __gls_capture_glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) {
  10092. GLbitfield captureFlags;
  10093. __GLScontext *const ctx = __GLS_CONTEXT;
  10094. __GLSwriter *writer;
  10095. GLint pointer_count;
  10096. ++ctx->captureEntryCount;
  10097. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65500);
  10098. captureFlags = ctx->captureFlags[444];
  10099. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10100. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65500);
  10101. glTexCoordPointerEXT(size, type, stride, count, pointer);
  10102. __GLS_END_CAPTURE_EXEC(ctx, 65500);
  10103. }
  10104. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10105. writer = ctx->writer;
  10106. pointer_count = __gls_glTexCoordPointerEXT_pointer_size(size, type, stride, count);
  10107. if (!writer->beginCommand(writer, 65500, 16 + pointer_count * 1)) goto end;
  10108. writer->putGLint(writer, size);
  10109. writer->putGLenum(writer, type);
  10110. writer->putGLint(writer, __GLS_MIN(stride, 0));
  10111. writer->putGLint(writer, count);
  10112. __glsWriter_putVertexv(writer, size, type, stride, count, pointer_count ? pointer : GLS_NONE);
  10113. writer->endCommand(writer);
  10114. end:
  10115. if (ctx->captureExitFunc) ctx->captureExitFunc(65500);
  10116. --ctx->captureEntryCount;
  10117. }
  10118. #endif /* __GL_EXT_vertex_array */
  10119. void __gls_capture_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
  10120. GLbitfield captureFlags;
  10121. __GLScontext *const ctx = __GLS_CONTEXT;
  10122. ++ctx->captureEntryCount;
  10123. if (ctx->captureEntryFunc) ctx->captureEntryFunc(384);
  10124. captureFlags = ctx->captureFlags[384];
  10125. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10126. __GLS_BEGIN_CAPTURE_EXEC(ctx, 384);
  10127. glTexCoordPointer(size, type, stride, pointer);
  10128. __GLS_END_CAPTURE_EXEC(ctx, 384);
  10129. }
  10130. // No record produced
  10131. if (ctx->captureExitFunc) ctx->captureExitFunc(384);
  10132. --ctx->captureEntryCount;
  10133. }
  10134. #if __GL_EXT_vertex_array
  10135. void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
  10136. void __gls_capture_glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) {
  10137. GLbitfield captureFlags;
  10138. __GLScontext *const ctx = __GLS_CONTEXT;
  10139. __GLSwriter *writer;
  10140. GLint pointer_count;
  10141. ++ctx->captureEntryCount;
  10142. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65501);
  10143. captureFlags = ctx->captureFlags[445];
  10144. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10145. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65501);
  10146. glVertexPointerEXT(size, type, stride, count, pointer);
  10147. __GLS_END_CAPTURE_EXEC(ctx, 65501);
  10148. }
  10149. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10150. writer = ctx->writer;
  10151. pointer_count = __gls_glVertexPointerEXT_pointer_size(size, type, stride, count);
  10152. if (!writer->beginCommand(writer, 65501, 16 + pointer_count * 1)) goto end;
  10153. writer->putGLint(writer, size);
  10154. writer->putGLenum(writer, type);
  10155. writer->putGLint(writer, __GLS_MIN(stride, 0));
  10156. writer->putGLint(writer, count);
  10157. __glsWriter_putVertexv(writer, size, type, stride, count, pointer_count ? pointer : GLS_NONE);
  10158. writer->endCommand(writer);
  10159. end:
  10160. if (ctx->captureExitFunc) ctx->captureExitFunc(65501);
  10161. --ctx->captureEntryCount;
  10162. }
  10163. #endif /* __GL_EXT_vertex_array */
  10164. void __gls_capture_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
  10165. GLbitfield captureFlags;
  10166. __GLScontext *const ctx = __GLS_CONTEXT;
  10167. ++ctx->captureEntryCount;
  10168. if (ctx->captureEntryFunc) ctx->captureEntryFunc(385);
  10169. captureFlags = ctx->captureFlags[385];
  10170. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10171. __GLS_BEGIN_CAPTURE_EXEC(ctx, 385);
  10172. glVertexPointer(size, type, stride, pointer);
  10173. __GLS_END_CAPTURE_EXEC(ctx, 385);
  10174. }
  10175. // No record produced
  10176. if (ctx->captureExitFunc) ctx->captureExitFunc(385);
  10177. --ctx->captureEntryCount;
  10178. }
  10179. #if __GL_EXT_texture_object
  10180. GLboolean glAreTexturesResidentEXT(GLsizei n, const GLuint *textures, GLboolean *residences);
  10181. GLboolean __gls_capture_glAreTexturesResidentEXT(GLsizei n, const GLuint *textures, GLboolean *residences) {
  10182. GLbitfield captureFlags;
  10183. __GLScontext *const ctx = __GLS_CONTEXT;
  10184. __GLSwriter *writer;
  10185. GLboolean _outVal = 0;
  10186. ++ctx->captureEntryCount;
  10187. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65502);
  10188. captureFlags = ctx->captureFlags[];
  10189. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10190. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65502);
  10191. _outVal = glAreTexturesResidentEXT(n, textures, residences);
  10192. __GLS_END_CAPTURE_EXEC(ctx, 65502);
  10193. }
  10194. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10195. writer = ctx->writer;
  10196. if (!writer->padWordCount(writer, 0)) goto end;
  10197. if (!writer->beginCommand(writer, 65502, 12 + __GLS_MAX(n, 0) * 4)) goto end;
  10198. if (writer->type == GLS_TEXT) {
  10199. writer->putGLint(writer, n);
  10200. writer->putGLuintv(writer, __GLS_MAX(n, 0), textures);
  10201. writer->putGLoutArg(writer, 0, residences);
  10202. } else {
  10203. writer->putGLint(writer, n);
  10204. writer->putGLoutArg(writer, 0, residences);
  10205. writer->putGLuintv(writer, __GLS_MAX(n, 0), textures);
  10206. }
  10207. writer->endCommand(writer);
  10208. end:
  10209. if (ctx->captureExitFunc) ctx->captureExitFunc(65502);
  10210. --ctx->captureEntryCount;
  10211. return _outVal;
  10212. }
  10213. #endif /* __GL_EXT_texture_object */
  10214. GLboolean __gls_capture_glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences) {
  10215. GLbitfield captureFlags;
  10216. __GLScontext *const ctx = __GLS_CONTEXT;
  10217. __GLSwriter *writer;
  10218. GLboolean _outVal = 0;
  10219. ++ctx->captureEntryCount;
  10220. if (ctx->captureEntryFunc) ctx->captureEntryFunc(386);
  10221. captureFlags = ctx->captureFlags[386];
  10222. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10223. __GLS_BEGIN_CAPTURE_EXEC(ctx, 386);
  10224. _outVal = glAreTexturesResident(n, textures, residences);
  10225. __GLS_END_CAPTURE_EXEC(ctx, 386);
  10226. }
  10227. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10228. writer = ctx->writer;
  10229. if (!writer->padWordCount(writer, 0)) goto end;
  10230. if (!writer->beginCommand(writer, 386, 12 + __GLS_MAX(n, 0) * 4)) goto end;
  10231. if (writer->type == GLS_TEXT) {
  10232. writer->putGLint(writer, n);
  10233. writer->putGLuintv(writer, __GLS_MAX(n, 0), textures);
  10234. writer->putGLoutArg(writer, 0, residences);
  10235. } else {
  10236. writer->putGLint(writer, n);
  10237. writer->putGLoutArg(writer, 0, residences);
  10238. writer->putGLuintv(writer, __GLS_MAX(n, 0), textures);
  10239. }
  10240. writer->endCommand(writer);
  10241. end:
  10242. if (ctx->captureExitFunc) ctx->captureExitFunc(386);
  10243. --ctx->captureEntryCount;
  10244. return _outVal;
  10245. }
  10246. #if __GL_EXT_texture_object
  10247. void glBindTextureEXT(GLenum target, GLuint texture);
  10248. void __gls_capture_glBindTextureEXT(GLenum target, GLuint texture) {
  10249. GLbitfield captureFlags;
  10250. __GLScontext *const ctx = __GLS_CONTEXT;
  10251. __GLSwriter *writer;
  10252. ++ctx->captureEntryCount;
  10253. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65503);
  10254. captureFlags = ctx->captureFlags[];
  10255. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10256. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65503);
  10257. glBindTextureEXT(target, texture);
  10258. __GLS_END_CAPTURE_EXEC(ctx, 65503);
  10259. }
  10260. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10261. writer = ctx->writer;
  10262. if (!writer->beginCommand(writer, 65503, 8)) goto end;
  10263. writer->putGLenum(writer, target);
  10264. writer->putGLuint(writer, texture);
  10265. writer->endCommand(writer);
  10266. end:
  10267. if (ctx->captureExitFunc) ctx->captureExitFunc(65503);
  10268. --ctx->captureEntryCount;
  10269. }
  10270. #endif /* __GL_EXT_texture_object */
  10271. void __gls_capture_glBindTexture(GLenum target, GLuint texture) {
  10272. GLbitfield captureFlags;
  10273. __GLScontext *const ctx = __GLS_CONTEXT;
  10274. __GLSwriter *writer;
  10275. ++ctx->captureEntryCount;
  10276. if (ctx->captureEntryFunc) ctx->captureEntryFunc(371);
  10277. captureFlags = ctx->captureFlags[371];
  10278. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10279. __GLS_BEGIN_CAPTURE_EXEC(ctx, 371);
  10280. glBindTexture(target, texture);
  10281. __GLS_END_CAPTURE_EXEC(ctx, 371);
  10282. }
  10283. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10284. writer = ctx->writer;
  10285. if (!writer->beginCommand(writer, 371, 8)) goto end;
  10286. writer->putGLenum(writer, target);
  10287. writer->putGLuint(writer, texture);
  10288. writer->endCommand(writer);
  10289. end:
  10290. if (ctx->captureExitFunc) ctx->captureExitFunc(371);
  10291. --ctx->captureEntryCount;
  10292. }
  10293. #if __GL_EXT_texture_object
  10294. void glDeleteTexturesEXT(GLsizei n, const GLuint *textures);
  10295. void __gls_capture_glDeleteTexturesEXT(GLsizei n, const GLuint *textures) {
  10296. GLbitfield captureFlags;
  10297. __GLScontext *const ctx = __GLS_CONTEXT;
  10298. __GLSwriter *writer;
  10299. ++ctx->captureEntryCount;
  10300. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65472);
  10301. captureFlags = ctx->captureFlags[];
  10302. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10303. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65472);
  10304. glDeleteTexturesEXT(n, textures);
  10305. __GLS_END_CAPTURE_EXEC(ctx, 65472);
  10306. }
  10307. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10308. writer = ctx->writer;
  10309. if (!writer->beginCommand(writer, 65472, 4 + __GLS_MAX(n, 0) * 4)) goto end;
  10310. writer->putGLint(writer, n);
  10311. writer->putGLuintv(writer, __GLS_MAX(n, 0), textures);
  10312. writer->endCommand(writer);
  10313. end:
  10314. if (ctx->captureExitFunc) ctx->captureExitFunc(65472);
  10315. --ctx->captureEntryCount;
  10316. }
  10317. #endif /* __GL_EXT_texture_object */
  10318. void __gls_capture_glDeleteTextures(GLsizei n, const GLuint *textures) {
  10319. GLbitfield captureFlags;
  10320. __GLScontext *const ctx = __GLS_CONTEXT;
  10321. __GLSwriter *writer;
  10322. ++ctx->captureEntryCount;
  10323. if (ctx->captureEntryFunc) ctx->captureEntryFunc(391);
  10324. captureFlags = ctx->captureFlags[391];
  10325. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10326. __GLS_BEGIN_CAPTURE_EXEC(ctx, 391);
  10327. glDeleteTextures(n, textures);
  10328. __GLS_END_CAPTURE_EXEC(ctx, 391);
  10329. }
  10330. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10331. writer = ctx->writer;
  10332. if (!writer->beginCommand(writer, 391, 4 + __GLS_MAX(n, 0) * 4)) goto end;
  10333. writer->putGLint(writer, n);
  10334. writer->putGLuintv(writer, __GLS_MAX(n, 0), textures);
  10335. writer->endCommand(writer);
  10336. end:
  10337. if (ctx->captureExitFunc) ctx->captureExitFunc(391);
  10338. --ctx->captureEntryCount;
  10339. }
  10340. #if __GL_EXT_texture_object
  10341. void glGenTexturesEXT(GLsizei n, GLuint *textures);
  10342. void __gls_capture_glGenTexturesEXT(GLsizei n, GLuint *textures) {
  10343. GLbitfield captureFlags;
  10344. __GLScontext *const ctx = __GLS_CONTEXT;
  10345. __GLSwriter *writer;
  10346. ++ctx->captureEntryCount;
  10347. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65473);
  10348. captureFlags = ctx->captureFlags[];
  10349. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10350. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65473);
  10351. glGenTexturesEXT(n, textures);
  10352. __GLS_END_CAPTURE_EXEC(ctx, 65473);
  10353. }
  10354. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10355. writer = ctx->writer;
  10356. if (!writer->padWordCount(writer, 0)) goto end;
  10357. if (!writer->beginCommand(writer, 65473, 12)) goto end;
  10358. writer->putGLint(writer, n);
  10359. writer->putGLoutArg(writer, 0, textures);
  10360. writer->endCommand(writer);
  10361. end:
  10362. if (ctx->captureExitFunc) ctx->captureExitFunc(65473);
  10363. --ctx->captureEntryCount;
  10364. }
  10365. #endif /* __GL_EXT_texture_object */
  10366. void __gls_capture_glGenTextures(GLsizei n, GLuint *textures) {
  10367. GLbitfield captureFlags;
  10368. __GLScontext *const ctx = __GLS_CONTEXT;
  10369. __GLSwriter *writer;
  10370. ++ctx->captureEntryCount;
  10371. if (ctx->captureEntryFunc) ctx->captureEntryFunc(392);
  10372. captureFlags = ctx->captureFlags[392];
  10373. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10374. __GLS_BEGIN_CAPTURE_EXEC(ctx, 392);
  10375. glGenTextures(n, textures);
  10376. __GLS_END_CAPTURE_EXEC(ctx, 392);
  10377. }
  10378. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10379. writer = ctx->writer;
  10380. if (!writer->padWordCount(writer, 0)) goto end;
  10381. if (!writer->beginCommand(writer, 392, 12)) goto end;
  10382. writer->putGLint(writer, n);
  10383. writer->putGLoutArg(writer, 0, textures);
  10384. writer->endCommand(writer);
  10385. end:
  10386. if (ctx->captureExitFunc) ctx->captureExitFunc(392);
  10387. --ctx->captureEntryCount;
  10388. }
  10389. #if __GL_EXT_texture_object
  10390. GLboolean glIsTextureEXT(GLuint texture);
  10391. GLboolean __gls_capture_glIsTextureEXT(GLuint texture) {
  10392. GLbitfield captureFlags;
  10393. __GLScontext *const ctx = __GLS_CONTEXT;
  10394. __GLSwriter *writer;
  10395. GLboolean _outVal = 0;
  10396. ++ctx->captureEntryCount;
  10397. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65474);
  10398. captureFlags = ctx->captureFlags[];
  10399. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10400. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65474);
  10401. _outVal = glIsTextureEXT(texture);
  10402. __GLS_END_CAPTURE_EXEC(ctx, 65474);
  10403. }
  10404. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10405. writer = ctx->writer;
  10406. if (!writer->beginCommand(writer, 65474, 4)) goto end;
  10407. writer->putGLuint(writer, texture);
  10408. writer->endCommand(writer);
  10409. end:
  10410. if (ctx->captureExitFunc) ctx->captureExitFunc(65474);
  10411. --ctx->captureEntryCount;
  10412. return _outVal;
  10413. }
  10414. #endif /* __GL_EXT_texture_object */
  10415. GLboolean __gls_capture_glIsTexture(GLuint texture) {
  10416. GLbitfield captureFlags;
  10417. __GLScontext *const ctx = __GLS_CONTEXT;
  10418. __GLSwriter *writer;
  10419. GLboolean _outVal = 0;
  10420. ++ctx->captureEntryCount;
  10421. if (ctx->captureEntryFunc) ctx->captureEntryFunc(394);
  10422. captureFlags = ctx->captureFlags[394];
  10423. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10424. __GLS_BEGIN_CAPTURE_EXEC(ctx, 394);
  10425. _outVal = glIsTexture(texture);
  10426. __GLS_END_CAPTURE_EXEC(ctx, 394);
  10427. }
  10428. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10429. writer = ctx->writer;
  10430. if (!writer->beginCommand(writer, 394, 4)) goto end;
  10431. writer->putGLuint(writer, texture);
  10432. writer->endCommand(writer);
  10433. end:
  10434. if (ctx->captureExitFunc) ctx->captureExitFunc(394);
  10435. --ctx->captureEntryCount;
  10436. return _outVal;
  10437. }
  10438. #if __GL_EXT_texture_object
  10439. void glPrioritizeTexturesEXT(GLsizei n, const GLuint *textures, const GLclampf *priorities);
  10440. void __gls_capture_glPrioritizeTexturesEXT(GLsizei n, const GLuint *textures, const GLclampf *priorities) {
  10441. GLbitfield captureFlags;
  10442. __GLScontext *const ctx = __GLS_CONTEXT;
  10443. __GLSwriter *writer;
  10444. ++ctx->captureEntryCount;
  10445. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65475);
  10446. captureFlags = ctx->captureFlags[];
  10447. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10448. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65475);
  10449. glPrioritizeTexturesEXT(n, textures, priorities);
  10450. __GLS_END_CAPTURE_EXEC(ctx, 65475);
  10451. }
  10452. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10453. writer = ctx->writer;
  10454. if (!writer->beginCommand(writer, 65475, 4 + __GLS_MAX(n, 0) * 4 + __GLS_MAX(n, 0) * 4)) goto end;
  10455. writer->putGLint(writer, n);
  10456. writer->putGLuintv(writer, __GLS_MAX(n, 0), textures);
  10457. writer->putGLfloatv(writer, __GLS_MAX(n, 0), priorities);
  10458. writer->endCommand(writer);
  10459. end:
  10460. if (ctx->captureExitFunc) ctx->captureExitFunc(65475);
  10461. --ctx->captureEntryCount;
  10462. }
  10463. #endif /* __GL_EXT_texture_object */
  10464. void __gls_capture_glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities) {
  10465. GLbitfield captureFlags;
  10466. __GLScontext *const ctx = __GLS_CONTEXT;
  10467. __GLSwriter *writer;
  10468. ++ctx->captureEntryCount;
  10469. if (ctx->captureEntryFunc) ctx->captureEntryFunc(395);
  10470. captureFlags = ctx->captureFlags[395];
  10471. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10472. __GLS_BEGIN_CAPTURE_EXEC(ctx, 395);
  10473. glPrioritizeTextures(n, textures, priorities);
  10474. __GLS_END_CAPTURE_EXEC(ctx, 395);
  10475. }
  10476. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10477. writer = ctx->writer;
  10478. if (!writer->beginCommand(writer, 395, 4 + __GLS_MAX(n, 0) * 4 + __GLS_MAX(n, 0) * 4)) goto end;
  10479. writer->putGLint(writer, n);
  10480. writer->putGLuintv(writer, __GLS_MAX(n, 0), textures);
  10481. writer->putGLfloatv(writer, __GLS_MAX(n, 0), priorities);
  10482. writer->endCommand(writer);
  10483. end:
  10484. if (ctx->captureExitFunc) ctx->captureExitFunc(395);
  10485. --ctx->captureEntryCount;
  10486. }
  10487. #if __GL_EXT_paletted_texture
  10488. void glColorTableEXT(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
  10489. void __gls_capture_glColorTableEXT(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table) {
  10490. GLbitfield captureFlags;
  10491. __GLScontext *const ctx = __GLS_CONTEXT;
  10492. __GLSwriter *writer;
  10493. GLint table_count;
  10494. ++ctx->captureEntryCount;
  10495. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65476);
  10496. captureFlags = ctx->captureFlags[452];
  10497. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10498. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65476);
  10499. glColorTableEXT(target, internalformat, width, format, type, table);
  10500. __GLS_END_CAPTURE_EXEC(ctx, 65476);
  10501. }
  10502. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10503. writer = ctx->writer;
  10504. table_count = __gls_glColorTableEXT_table_size(format, type, width);
  10505. if (!writer->beginCommand(writer, 65476, 24 + table_count * 1)) goto end;
  10506. writer->putGLSimageFlags(writer, GLS_NONE);
  10507. writer->nextList(writer);
  10508. if (writer->type == GLS_TEXT) {
  10509. writer->putGLenum(writer, target);
  10510. writer->putGLenum(writer, internalformat);
  10511. writer->putGLint(writer, width);
  10512. writer->putGLenum(writer, format);
  10513. writer->putGLenum(writer, type);
  10514. __glsWriter_putPixelv(writer, format, type, width, 1, table_count ? table : GLS_NONE);
  10515. } else {
  10516. writer->putGLint(writer, width);
  10517. writer->putGLenum(writer, format);
  10518. writer->putGLenum(writer, type);
  10519. writer->putGLenum(writer, target);
  10520. writer->putGLenum(writer, internalformat);
  10521. __glsWriter_putPixelv(writer, format, type, width, 1, table_count ? table : GLS_NONE);
  10522. }
  10523. writer->endCommand(writer);
  10524. end:
  10525. if (ctx->captureExitFunc) ctx->captureExitFunc(65476);
  10526. --ctx->captureEntryCount;
  10527. }
  10528. #endif /* __GL_EXT_paletted_texture */
  10529. #if __GL_SGI_color_table
  10530. void __gls_capture_glColorTableParameterfvSGI(GLenum target, GLenum pname, const GLfloat *params) {
  10531. GLbitfield captureFlags;
  10532. __GLScontext *const ctx = __GLS_CONTEXT;
  10533. __GLSwriter *writer;
  10534. GLint params_count;
  10535. ++ctx->captureEntryCount;
  10536. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65477);
  10537. captureFlags = ctx->captureFlags[437];
  10538. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10539. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65477);
  10540. glColorTableParameterfvSGI(target, pname, params);
  10541. __GLS_END_CAPTURE_EXEC(ctx, 65477);
  10542. }
  10543. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10544. writer = ctx->writer;
  10545. params_count = __gls_glColorTableParameterfvSGI_params_size(pname);
  10546. if (!writer->beginCommand(writer, 65477, 8 + params_count * 4)) goto end;
  10547. if (writer->type == GLS_TEXT) {
  10548. writer->putGLenum(writer, target);
  10549. writer->putGLenum(writer, pname);
  10550. writer->putGLfloatv(writer, params_count, params);
  10551. } else {
  10552. writer->putGLenum(writer, pname);
  10553. writer->putGLenum(writer, target);
  10554. writer->putGLfloatv(writer, params_count, params);
  10555. }
  10556. writer->endCommand(writer);
  10557. end:
  10558. if (ctx->captureExitFunc) ctx->captureExitFunc(65477);
  10559. --ctx->captureEntryCount;
  10560. }
  10561. #endif /* __GL_SGI_color_table */
  10562. #if __GL_SGI_color_table
  10563. void __gls_capture_glColorTableParameterivSGI(GLenum target, GLenum pname, const GLint *params) {
  10564. GLbitfield captureFlags;
  10565. __GLScontext *const ctx = __GLS_CONTEXT;
  10566. __GLSwriter *writer;
  10567. GLint params_count;
  10568. ++ctx->captureEntryCount;
  10569. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65478);
  10570. captureFlags = ctx->captureFlags[438];
  10571. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10572. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65478);
  10573. glColorTableParameterivSGI(target, pname, params);
  10574. __GLS_END_CAPTURE_EXEC(ctx, 65478);
  10575. }
  10576. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10577. writer = ctx->writer;
  10578. params_count = __gls_glColorTableParameterivSGI_params_size(pname);
  10579. if (!writer->beginCommand(writer, 65478, 8 + params_count * 4)) goto end;
  10580. if (writer->type == GLS_TEXT) {
  10581. writer->putGLenum(writer, target);
  10582. writer->putGLenum(writer, pname);
  10583. writer->putGLintv(writer, params_count, params);
  10584. } else {
  10585. writer->putGLenum(writer, pname);
  10586. writer->putGLenum(writer, target);
  10587. writer->putGLintv(writer, params_count, params);
  10588. }
  10589. writer->endCommand(writer);
  10590. end:
  10591. if (ctx->captureExitFunc) ctx->captureExitFunc(65478);
  10592. --ctx->captureEntryCount;
  10593. }
  10594. #endif /* __GL_SGI_color_table */
  10595. #if __GL_SGI_color_table
  10596. void __gls_capture_glCopyColorTableSGI(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) {
  10597. GLbitfield captureFlags;
  10598. __GLScontext *const ctx = __GLS_CONTEXT;
  10599. __GLSwriter *writer;
  10600. ++ctx->captureEntryCount;
  10601. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65479);
  10602. captureFlags = ctx->captureFlags[439];
  10603. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10604. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65479);
  10605. glCopyColorTableSGI(target, internalformat, x, y, width);
  10606. __GLS_END_CAPTURE_EXEC(ctx, 65479);
  10607. }
  10608. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10609. writer = ctx->writer;
  10610. if (!writer->beginCommand(writer, 65479, 20)) goto end;
  10611. writer->putGLenum(writer, target);
  10612. writer->putGLenum(writer, internalformat);
  10613. writer->putGLint(writer, x);
  10614. writer->putGLint(writer, y);
  10615. writer->putGLint(writer, width);
  10616. writer->endCommand(writer);
  10617. end:
  10618. if (ctx->captureExitFunc) ctx->captureExitFunc(65479);
  10619. --ctx->captureEntryCount;
  10620. }
  10621. #endif /* __GL_SGI_color_table */
  10622. #if __GL_EXT_paletted_texture
  10623. void glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid *table);
  10624. void __gls_capture_glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid *table) {
  10625. GLbitfield captureFlags;
  10626. __GLScontext *const ctx = __GLS_CONTEXT;
  10627. __GLSwriter *writer;
  10628. ++ctx->captureEntryCount;
  10629. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65480);
  10630. captureFlags = ctx->captureFlags[456];
  10631. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10632. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65480);
  10633. glGetColorTableEXT(target, format, type, table);
  10634. __GLS_END_CAPTURE_EXEC(ctx, 65480);
  10635. }
  10636. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10637. writer = ctx->writer;
  10638. if (!writer->padWordCount(writer, 0)) goto end;
  10639. if (!writer->beginCommand(writer, 65480, 20)) goto end;
  10640. writer->putGLenum(writer, target);
  10641. writer->putGLenum(writer, format);
  10642. writer->putGLenum(writer, type);
  10643. writer->putGLoutArg(writer, 0, table);
  10644. writer->endCommand(writer);
  10645. end:
  10646. if (ctx->captureExitFunc) ctx->captureExitFunc(65480);
  10647. --ctx->captureEntryCount;
  10648. }
  10649. #endif /* __GL_EXT_paletted_texture */
  10650. #if __GL_EXT_paletted_texture
  10651. void glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat *params);
  10652. void __gls_capture_glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat *params) {
  10653. GLbitfield captureFlags;
  10654. __GLScontext *const ctx = __GLS_CONTEXT;
  10655. __GLSwriter *writer;
  10656. ++ctx->captureEntryCount;
  10657. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65481);
  10658. captureFlags = ctx->captureFlags[457];
  10659. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10660. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65481);
  10661. glGetColorTableParameterfvEXT(target, pname, params);
  10662. __GLS_END_CAPTURE_EXEC(ctx, 65481);
  10663. }
  10664. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10665. writer = ctx->writer;
  10666. if (!writer->padWordCount(writer, 0)) goto end;
  10667. if (!writer->beginCommand(writer, 65481, 16)) goto end;
  10668. if (writer->type == GLS_TEXT) {
  10669. writer->putGLenum(writer, target);
  10670. writer->putGLenum(writer, pname);
  10671. writer->putGLoutArg(writer, 0, params);
  10672. } else {
  10673. writer->putGLenum(writer, pname);
  10674. writer->putGLoutArg(writer, 0, params);
  10675. writer->putGLenum(writer, target);
  10676. }
  10677. writer->endCommand(writer);
  10678. end:
  10679. if (ctx->captureExitFunc) ctx->captureExitFunc(65481);
  10680. --ctx->captureEntryCount;
  10681. }
  10682. #endif /* __GL_EXT_paletted_texture */
  10683. #if __GL_EXT_paletted_texture
  10684. void glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint *params);
  10685. void __gls_capture_glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint *params) {
  10686. GLbitfield captureFlags;
  10687. __GLScontext *const ctx = __GLS_CONTEXT;
  10688. __GLSwriter *writer;
  10689. ++ctx->captureEntryCount;
  10690. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65482);
  10691. captureFlags = ctx->captureFlags[458];
  10692. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10693. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65482);
  10694. glGetColorTableParameterivEXT(target, pname, params);
  10695. __GLS_END_CAPTURE_EXEC(ctx, 65482);
  10696. }
  10697. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10698. writer = ctx->writer;
  10699. if (!writer->padWordCount(writer, 0)) goto end;
  10700. if (!writer->beginCommand(writer, 65482, 16)) goto end;
  10701. if (writer->type == GLS_TEXT) {
  10702. writer->putGLenum(writer, target);
  10703. writer->putGLenum(writer, pname);
  10704. writer->putGLoutArg(writer, 0, params);
  10705. } else {
  10706. writer->putGLenum(writer, pname);
  10707. writer->putGLoutArg(writer, 0, params);
  10708. writer->putGLenum(writer, target);
  10709. }
  10710. writer->endCommand(writer);
  10711. end:
  10712. if (ctx->captureExitFunc) ctx->captureExitFunc(65482);
  10713. --ctx->captureEntryCount;
  10714. }
  10715. #endif /* __GL_EXT_paletted_texture */
  10716. #if __GL_SGI_texture_color_table
  10717. void __gls_capture_glGetTexColorTableParameterfvSGI(GLenum target, GLenum pname, GLfloat *params) {
  10718. GLbitfield captureFlags;
  10719. __GLScontext *const ctx = __GLS_CONTEXT;
  10720. __GLSwriter *writer;
  10721. ++ctx->captureEntryCount;
  10722. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65483);
  10723. captureFlags = ctx->captureFlags[443];
  10724. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10725. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65483);
  10726. glGetTexColorTableParameterfvSGI(target, pname, params);
  10727. __GLS_END_CAPTURE_EXEC(ctx, 65483);
  10728. }
  10729. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10730. writer = ctx->writer;
  10731. if (!writer->padWordCount(writer, 0)) goto end;
  10732. if (!writer->beginCommand(writer, 65483, 16)) goto end;
  10733. if (writer->type == GLS_TEXT) {
  10734. writer->putGLenum(writer, target);
  10735. writer->putGLenum(writer, pname);
  10736. writer->putGLoutArg(writer, 0, params);
  10737. } else {
  10738. writer->putGLenum(writer, pname);
  10739. writer->putGLoutArg(writer, 0, params);
  10740. writer->putGLenum(writer, target);
  10741. }
  10742. writer->endCommand(writer);
  10743. end:
  10744. if (ctx->captureExitFunc) ctx->captureExitFunc(65483);
  10745. --ctx->captureEntryCount;
  10746. }
  10747. #endif /* __GL_SGI_texture_color_table */
  10748. #if __GL_SGI_texture_color_table
  10749. void __gls_capture_glGetTexColorTableParameterivSGI(GLenum target, GLenum pname, GLint *params) {
  10750. GLbitfield captureFlags;
  10751. __GLScontext *const ctx = __GLS_CONTEXT;
  10752. __GLSwriter *writer;
  10753. ++ctx->captureEntryCount;
  10754. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65484);
  10755. captureFlags = ctx->captureFlags[444];
  10756. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10757. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65484);
  10758. glGetTexColorTableParameterivSGI(target, pname, params);
  10759. __GLS_END_CAPTURE_EXEC(ctx, 65484);
  10760. }
  10761. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10762. writer = ctx->writer;
  10763. if (!writer->padWordCount(writer, 0)) goto end;
  10764. if (!writer->beginCommand(writer, 65484, 16)) goto end;
  10765. if (writer->type == GLS_TEXT) {
  10766. writer->putGLenum(writer, target);
  10767. writer->putGLenum(writer, pname);
  10768. writer->putGLoutArg(writer, 0, params);
  10769. } else {
  10770. writer->putGLenum(writer, pname);
  10771. writer->putGLoutArg(writer, 0, params);
  10772. writer->putGLenum(writer, target);
  10773. }
  10774. writer->endCommand(writer);
  10775. end:
  10776. if (ctx->captureExitFunc) ctx->captureExitFunc(65484);
  10777. --ctx->captureEntryCount;
  10778. }
  10779. #endif /* __GL_SGI_texture_color_table */
  10780. #if __GL_SGI_texture_color_table
  10781. void __gls_capture_glTexColorTableParameterfvSGI(GLenum target, GLenum pname, const GLfloat *params) {
  10782. GLbitfield captureFlags;
  10783. __GLScontext *const ctx = __GLS_CONTEXT;
  10784. __GLSwriter *writer;
  10785. GLint params_count;
  10786. ++ctx->captureEntryCount;
  10787. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65485);
  10788. captureFlags = ctx->captureFlags[445];
  10789. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10790. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65485);
  10791. glTexColorTableParameterfvSGI(target, pname, params);
  10792. __GLS_END_CAPTURE_EXEC(ctx, 65485);
  10793. }
  10794. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10795. writer = ctx->writer;
  10796. params_count = __gls_glTexColorTableParameterfvSGI_params_size(pname);
  10797. if (!writer->beginCommand(writer, 65485, 8 + params_count * 4)) goto end;
  10798. if (writer->type == GLS_TEXT) {
  10799. writer->putGLenum(writer, target);
  10800. writer->putGLenum(writer, pname);
  10801. writer->putGLfloatv(writer, params_count, params);
  10802. } else {
  10803. writer->putGLenum(writer, pname);
  10804. writer->putGLenum(writer, target);
  10805. writer->putGLfloatv(writer, params_count, params);
  10806. }
  10807. writer->endCommand(writer);
  10808. end:
  10809. if (ctx->captureExitFunc) ctx->captureExitFunc(65485);
  10810. --ctx->captureEntryCount;
  10811. }
  10812. #endif /* __GL_SGI_texture_color_table */
  10813. #if __GL_SGI_texture_color_table
  10814. void __gls_capture_glTexColorTableParameterivSGI(GLenum target, GLenum pname, const GLint *params) {
  10815. GLbitfield captureFlags;
  10816. __GLScontext *const ctx = __GLS_CONTEXT;
  10817. __GLSwriter *writer;
  10818. GLint params_count;
  10819. ++ctx->captureEntryCount;
  10820. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65486);
  10821. captureFlags = ctx->captureFlags[446];
  10822. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10823. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65486);
  10824. glTexColorTableParameterivSGI(target, pname, params);
  10825. __GLS_END_CAPTURE_EXEC(ctx, 65486);
  10826. }
  10827. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10828. writer = ctx->writer;
  10829. params_count = __gls_glTexColorTableParameterivSGI_params_size(pname);
  10830. if (!writer->beginCommand(writer, 65486, 8 + params_count * 4)) goto end;
  10831. if (writer->type == GLS_TEXT) {
  10832. writer->putGLenum(writer, target);
  10833. writer->putGLenum(writer, pname);
  10834. writer->putGLintv(writer, params_count, params);
  10835. } else {
  10836. writer->putGLenum(writer, pname);
  10837. writer->putGLenum(writer, target);
  10838. writer->putGLintv(writer, params_count, params);
  10839. }
  10840. writer->endCommand(writer);
  10841. end:
  10842. if (ctx->captureExitFunc) ctx->captureExitFunc(65486);
  10843. --ctx->captureEntryCount;
  10844. }
  10845. #endif /* __GL_SGI_texture_color_table */
  10846. #if __GL_EXT_copy_texture
  10847. void glCopyTexImage1DEXT(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
  10848. void __gls_capture_glCopyTexImage1DEXT(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) {
  10849. GLbitfield captureFlags;
  10850. __GLScontext *const ctx = __GLS_CONTEXT;
  10851. __GLSwriter *writer;
  10852. ++ctx->captureEntryCount;
  10853. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65487);
  10854. captureFlags = ctx->captureFlags[];
  10855. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10856. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65487);
  10857. glCopyTexImage1DEXT(target, level, internalformat, x, y, width, border);
  10858. __GLS_END_CAPTURE_EXEC(ctx, 65487);
  10859. }
  10860. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10861. writer = ctx->writer;
  10862. if (!writer->beginCommand(writer, 65487, 28)) goto end;
  10863. writer->putGLenum(writer, target);
  10864. writer->putGLint(writer, level);
  10865. writer->putGLenum(writer, internalformat);
  10866. writer->putGLint(writer, x);
  10867. writer->putGLint(writer, y);
  10868. writer->putGLint(writer, width);
  10869. writer->putGLint(writer, border);
  10870. writer->endCommand(writer);
  10871. end:
  10872. if (ctx->captureExitFunc) ctx->captureExitFunc(65487);
  10873. --ctx->captureEntryCount;
  10874. }
  10875. #endif /* __GL_EXT_copy_texture */
  10876. void __gls_capture_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) {
  10877. GLbitfield captureFlags;
  10878. __GLScontext *const ctx = __GLS_CONTEXT;
  10879. __GLSwriter *writer;
  10880. ++ctx->captureEntryCount;
  10881. if (ctx->captureEntryFunc) ctx->captureEntryFunc(387);
  10882. captureFlags = ctx->captureFlags[387];
  10883. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10884. __GLS_BEGIN_CAPTURE_EXEC(ctx, 387);
  10885. glCopyTexImage1D(target, level, internalformat, x, y, width, border);
  10886. __GLS_END_CAPTURE_EXEC(ctx, 387);
  10887. }
  10888. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10889. writer = ctx->writer;
  10890. if (!writer->beginCommand(writer, 387, 28)) goto end;
  10891. writer->putGLenum(writer, target);
  10892. writer->putGLint(writer, level);
  10893. writer->putGLenum(writer, internalformat);
  10894. writer->putGLint(writer, x);
  10895. writer->putGLint(writer, y);
  10896. writer->putGLint(writer, width);
  10897. writer->putGLint(writer, border);
  10898. writer->endCommand(writer);
  10899. end:
  10900. if (ctx->captureExitFunc) ctx->captureExitFunc(387);
  10901. --ctx->captureEntryCount;
  10902. }
  10903. #if __GL_EXT_copy_texture
  10904. void glCopyTexImage2DEXT(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  10905. void __gls_capture_glCopyTexImage2DEXT(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
  10906. GLbitfield captureFlags;
  10907. __GLScontext *const ctx = __GLS_CONTEXT;
  10908. __GLSwriter *writer;
  10909. ++ctx->captureEntryCount;
  10910. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65456);
  10911. captureFlags = ctx->captureFlags[];
  10912. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10913. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65456);
  10914. glCopyTexImage2DEXT(target, level, internalformat, x, y, width, height, border);
  10915. __GLS_END_CAPTURE_EXEC(ctx, 65456);
  10916. }
  10917. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10918. writer = ctx->writer;
  10919. if (!writer->beginCommand(writer, 65456, 32)) goto end;
  10920. writer->putGLenum(writer, target);
  10921. writer->putGLint(writer, level);
  10922. writer->putGLenum(writer, internalformat);
  10923. writer->putGLint(writer, x);
  10924. writer->putGLint(writer, y);
  10925. writer->putGLint(writer, width);
  10926. writer->putGLint(writer, height);
  10927. writer->putGLint(writer, border);
  10928. writer->endCommand(writer);
  10929. end:
  10930. if (ctx->captureExitFunc) ctx->captureExitFunc(65456);
  10931. --ctx->captureEntryCount;
  10932. }
  10933. #endif /* __GL_EXT_copy_texture */
  10934. void __gls_capture_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
  10935. GLbitfield captureFlags;
  10936. __GLScontext *const ctx = __GLS_CONTEXT;
  10937. __GLSwriter *writer;
  10938. ++ctx->captureEntryCount;
  10939. if (ctx->captureEntryFunc) ctx->captureEntryFunc(388);
  10940. captureFlags = ctx->captureFlags[388];
  10941. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10942. __GLS_BEGIN_CAPTURE_EXEC(ctx, 388);
  10943. glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
  10944. __GLS_END_CAPTURE_EXEC(ctx, 388);
  10945. }
  10946. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10947. writer = ctx->writer;
  10948. if (!writer->beginCommand(writer, 388, 32)) goto end;
  10949. writer->putGLenum(writer, target);
  10950. writer->putGLint(writer, level);
  10951. writer->putGLenum(writer, internalformat);
  10952. writer->putGLint(writer, x);
  10953. writer->putGLint(writer, y);
  10954. writer->putGLint(writer, width);
  10955. writer->putGLint(writer, height);
  10956. writer->putGLint(writer, border);
  10957. writer->endCommand(writer);
  10958. end:
  10959. if (ctx->captureExitFunc) ctx->captureExitFunc(388);
  10960. --ctx->captureEntryCount;
  10961. }
  10962. #if __GL_EXT_copy_texture
  10963. void glCopyTexSubImage1DEXT(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
  10964. void __gls_capture_glCopyTexSubImage1DEXT(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) {
  10965. GLbitfield captureFlags;
  10966. __GLScontext *const ctx = __GLS_CONTEXT;
  10967. __GLSwriter *writer;
  10968. ++ctx->captureEntryCount;
  10969. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65457);
  10970. captureFlags = ctx->captureFlags[];
  10971. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10972. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65457);
  10973. glCopyTexSubImage1DEXT(target, level, xoffset, x, y, width);
  10974. __GLS_END_CAPTURE_EXEC(ctx, 65457);
  10975. }
  10976. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  10977. writer = ctx->writer;
  10978. if (!writer->beginCommand(writer, 65457, 24)) goto end;
  10979. writer->putGLenum(writer, target);
  10980. writer->putGLint(writer, level);
  10981. writer->putGLint(writer, xoffset);
  10982. writer->putGLint(writer, x);
  10983. writer->putGLint(writer, y);
  10984. writer->putGLint(writer, width);
  10985. writer->endCommand(writer);
  10986. end:
  10987. if (ctx->captureExitFunc) ctx->captureExitFunc(65457);
  10988. --ctx->captureEntryCount;
  10989. }
  10990. #endif /* __GL_EXT_copy_texture */
  10991. void __gls_capture_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) {
  10992. GLbitfield captureFlags;
  10993. __GLScontext *const ctx = __GLS_CONTEXT;
  10994. __GLSwriter *writer;
  10995. ++ctx->captureEntryCount;
  10996. if (ctx->captureEntryFunc) ctx->captureEntryFunc(389);
  10997. captureFlags = ctx->captureFlags[389];
  10998. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  10999. __GLS_BEGIN_CAPTURE_EXEC(ctx, 389);
  11000. glCopyTexSubImage1D(target, level, xoffset, x, y, width);
  11001. __GLS_END_CAPTURE_EXEC(ctx, 389);
  11002. }
  11003. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11004. writer = ctx->writer;
  11005. if (!writer->beginCommand(writer, 389, 24)) goto end;
  11006. writer->putGLenum(writer, target);
  11007. writer->putGLint(writer, level);
  11008. writer->putGLint(writer, xoffset);
  11009. writer->putGLint(writer, x);
  11010. writer->putGLint(writer, y);
  11011. writer->putGLint(writer, width);
  11012. writer->endCommand(writer);
  11013. end:
  11014. if (ctx->captureExitFunc) ctx->captureExitFunc(389);
  11015. --ctx->captureEntryCount;
  11016. }
  11017. #if __GL_EXT_copy_texture
  11018. void glCopyTexSubImage2DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  11019. void __gls_capture_glCopyTexSubImage2DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
  11020. GLbitfield captureFlags;
  11021. __GLScontext *const ctx = __GLS_CONTEXT;
  11022. __GLSwriter *writer;
  11023. ++ctx->captureEntryCount;
  11024. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65458);
  11025. captureFlags = ctx->captureFlags[];
  11026. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11027. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65458);
  11028. glCopyTexSubImage2DEXT(target, level, xoffset, yoffset, x, y, width, height);
  11029. __GLS_END_CAPTURE_EXEC(ctx, 65458);
  11030. }
  11031. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11032. writer = ctx->writer;
  11033. if (!writer->beginCommand(writer, 65458, 32)) goto end;
  11034. writer->putGLenum(writer, target);
  11035. writer->putGLint(writer, level);
  11036. writer->putGLint(writer, xoffset);
  11037. writer->putGLint(writer, yoffset);
  11038. writer->putGLint(writer, x);
  11039. writer->putGLint(writer, y);
  11040. writer->putGLint(writer, width);
  11041. writer->putGLint(writer, height);
  11042. writer->endCommand(writer);
  11043. end:
  11044. if (ctx->captureExitFunc) ctx->captureExitFunc(65458);
  11045. --ctx->captureEntryCount;
  11046. }
  11047. #endif /* __GL_EXT_copy_texture */
  11048. void __gls_capture_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
  11049. GLbitfield captureFlags;
  11050. __GLScontext *const ctx = __GLS_CONTEXT;
  11051. __GLSwriter *writer;
  11052. ++ctx->captureEntryCount;
  11053. if (ctx->captureEntryFunc) ctx->captureEntryFunc(390);
  11054. captureFlags = ctx->captureFlags[390];
  11055. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11056. __GLS_BEGIN_CAPTURE_EXEC(ctx, 390);
  11057. glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
  11058. __GLS_END_CAPTURE_EXEC(ctx, 390);
  11059. }
  11060. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11061. writer = ctx->writer;
  11062. if (!writer->beginCommand(writer, 390, 32)) goto end;
  11063. writer->putGLenum(writer, target);
  11064. writer->putGLint(writer, level);
  11065. writer->putGLint(writer, xoffset);
  11066. writer->putGLint(writer, yoffset);
  11067. writer->putGLint(writer, x);
  11068. writer->putGLint(writer, y);
  11069. writer->putGLint(writer, width);
  11070. writer->putGLint(writer, height);
  11071. writer->endCommand(writer);
  11072. end:
  11073. if (ctx->captureExitFunc) ctx->captureExitFunc(390);
  11074. --ctx->captureEntryCount;
  11075. }
  11076. #if __GL_EXT_copy_texture && __GL_EXT_texture3D
  11077. void __gls_capture_glCopyTexSubImage3DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
  11078. GLbitfield captureFlags;
  11079. __GLScontext *const ctx = __GLS_CONTEXT;
  11080. __GLSwriter *writer;
  11081. ++ctx->captureEntryCount;
  11082. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65459);
  11083. captureFlags = ctx->captureFlags[];
  11084. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11085. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65459);
  11086. glCopyTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, x, y, width, height);
  11087. __GLS_END_CAPTURE_EXEC(ctx, 65459);
  11088. }
  11089. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11090. writer = ctx->writer;
  11091. if (!writer->beginCommand(writer, 65459, 36)) goto end;
  11092. writer->putGLenum(writer, target);
  11093. writer->putGLint(writer, level);
  11094. writer->putGLint(writer, xoffset);
  11095. writer->putGLint(writer, yoffset);
  11096. writer->putGLint(writer, zoffset);
  11097. writer->putGLint(writer, x);
  11098. writer->putGLint(writer, y);
  11099. writer->putGLint(writer, width);
  11100. writer->putGLint(writer, height);
  11101. writer->endCommand(writer);
  11102. end:
  11103. if (ctx->captureExitFunc) ctx->captureExitFunc(65459);
  11104. --ctx->captureEntryCount;
  11105. }
  11106. #endif /* __GL_EXT_copy_texture */
  11107. #if __GL_SGIS_texture4D
  11108. void __gls_capture_glTexImage4DSGIS(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels) {
  11109. GLbitfield captureFlags;
  11110. __GLScontext *const ctx = __GLS_CONTEXT;
  11111. __GLSwriter *writer;
  11112. GLint pixels_count;
  11113. ++ctx->captureEntryCount;
  11114. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65460);
  11115. captureFlags = ctx->captureFlags[452];
  11116. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11117. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65460);
  11118. glTexImage4DSGIS(target, level, internalformat, width, height, depth, size4d, border, format, type, pixels);
  11119. __GLS_END_CAPTURE_EXEC(ctx, 65460);
  11120. }
  11121. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11122. writer = ctx->writer;
  11123. pixels_count = pixels ? __gls_glTexImage4DSGIS_pixels_size(format, type, width, height, depth, size4d) : 0;
  11124. if (!writer->beginCommand(writer, 65460, 44 + pixels_count * 1)) goto end;
  11125. writer->putGLSimageFlags(writer, pixels ? GLS_NONE : GLS_IMAGE_NULL_BIT);
  11126. writer->nextList(writer);
  11127. if (writer->type == GLS_TEXT) {
  11128. writer->putGLenum(writer, target);
  11129. writer->putGLint(writer, level);
  11130. writer->putGLenum(writer, internalformat);
  11131. writer->putGLint(writer, width);
  11132. writer->putGLint(writer, height);
  11133. writer->putGLint(writer, depth);
  11134. writer->putGLint(writer, size4d);
  11135. writer->putGLint(writer, border);
  11136. writer->putGLenum(writer, format);
  11137. writer->putGLenum(writer, type);
  11138. __glsWriter_putPixelv(writer, format, type, width, height * depth * size4d, pixels_count ? pixels : GLS_NONE);
  11139. } else {
  11140. writer->putGLint(writer, width);
  11141. writer->putGLint(writer, height);
  11142. writer->putGLint(writer, depth);
  11143. writer->putGLint(writer, size4d);
  11144. writer->putGLenum(writer, format);
  11145. writer->putGLenum(writer, type);
  11146. writer->putGLenum(writer, target);
  11147. writer->putGLint(writer, level);
  11148. writer->putGLenum(writer, internalformat);
  11149. writer->putGLint(writer, border);
  11150. __glsWriter_putPixelv(writer, format, type, width, height * depth * size4d, pixels_count ? pixels : GLS_NONE);
  11151. }
  11152. writer->endCommand(writer);
  11153. end:
  11154. if (ctx->captureExitFunc) ctx->captureExitFunc(65460);
  11155. --ctx->captureEntryCount;
  11156. }
  11157. #endif /* __GL_SGIS_texture4D */
  11158. #if __GL_SGIS_texture4D
  11159. void __gls_capture_glTexSubImage4DSGIS(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels) {
  11160. GLbitfield captureFlags;
  11161. __GLScontext *const ctx = __GLS_CONTEXT;
  11162. __GLSwriter *writer;
  11163. GLint pixels_count;
  11164. ++ctx->captureEntryCount;
  11165. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65461);
  11166. captureFlags = ctx->captureFlags[453];
  11167. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11168. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65461);
  11169. glTexSubImage4DSGIS(target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels);
  11170. __GLS_END_CAPTURE_EXEC(ctx, 65461);
  11171. }
  11172. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11173. writer = ctx->writer;
  11174. pixels_count = __gls_glTexSubImage4DSGIS_pixels_size(format, type, width, height, depth, size4d);
  11175. if (!writer->beginCommand(writer, 65461, 52 + pixels_count * 1)) goto end;
  11176. writer->putGLSimageFlags(writer, GLS_NONE);
  11177. writer->nextList(writer);
  11178. if (writer->type == GLS_TEXT) {
  11179. writer->putGLenum(writer, target);
  11180. writer->putGLint(writer, level);
  11181. writer->putGLint(writer, xoffset);
  11182. writer->putGLint(writer, yoffset);
  11183. writer->putGLint(writer, zoffset);
  11184. writer->putGLint(writer, woffset);
  11185. writer->putGLint(writer, width);
  11186. writer->putGLint(writer, height);
  11187. writer->putGLint(writer, depth);
  11188. writer->putGLint(writer, size4d);
  11189. writer->putGLenum(writer, format);
  11190. writer->putGLenum(writer, type);
  11191. __glsWriter_putPixelv(writer, format, type, width, height * depth * size4d, pixels_count ? pixels : GLS_NONE);
  11192. } else {
  11193. writer->putGLint(writer, width);
  11194. writer->putGLint(writer, height);
  11195. writer->putGLint(writer, depth);
  11196. writer->putGLint(writer, size4d);
  11197. writer->putGLenum(writer, format);
  11198. writer->putGLenum(writer, type);
  11199. writer->putGLenum(writer, target);
  11200. writer->putGLint(writer, level);
  11201. writer->putGLint(writer, xoffset);
  11202. writer->putGLint(writer, yoffset);
  11203. writer->putGLint(writer, zoffset);
  11204. writer->putGLint(writer, woffset);
  11205. __glsWriter_putPixelv(writer, format, type, width, height * depth * size4d, pixels_count ? pixels : GLS_NONE);
  11206. }
  11207. writer->endCommand(writer);
  11208. end:
  11209. if (ctx->captureExitFunc) ctx->captureExitFunc(65461);
  11210. --ctx->captureEntryCount;
  11211. }
  11212. #endif /* __GL_SGIS_texture4D */
  11213. #if __GL_SGIX_pixel_texture
  11214. void __gls_capture_glPixelTexGenSGIX(GLenum mode) {
  11215. GLbitfield captureFlags;
  11216. __GLScontext *const ctx = __GLS_CONTEXT;
  11217. __GLSwriter *writer;
  11218. ++ctx->captureEntryCount;
  11219. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65462);
  11220. captureFlags = ctx->captureFlags[454];
  11221. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11222. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65462);
  11223. glPixelTexGenSGIX(mode);
  11224. __GLS_END_CAPTURE_EXEC(ctx, 65462);
  11225. }
  11226. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11227. writer = ctx->writer;
  11228. if (!writer->beginCommand(writer, 65462, 4)) goto end;
  11229. writer->putGLenum(writer, mode);
  11230. writer->endCommand(writer);
  11231. end:
  11232. if (ctx->captureExitFunc) ctx->captureExitFunc(65462);
  11233. --ctx->captureEntryCount;
  11234. }
  11235. #endif /* __GL_SGIX_pixel_texture */
  11236. #if __GL_EXT_paletted_texture
  11237. extern void glColorSubTableEXT(GLenum target, GLuint start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
  11238. void __gls_capture_glColorSubTableEXT(GLenum target, GLuint start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)
  11239. {
  11240. GLbitfield captureFlags;
  11241. __GLScontext *const ctx = __GLS_CONTEXT;
  11242. __GLSwriter *writer;
  11243. GLint entries_count;
  11244. ++ctx->captureEntryCount;
  11245. if (ctx->captureEntryFunc) ctx->captureEntryFunc(65424);
  11246. captureFlags = ctx->captureFlags[496];
  11247. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11248. __GLS_BEGIN_CAPTURE_EXEC(ctx, 65424);
  11249. glColorSubTableEXT(target, start, count, format, type, data);
  11250. __GLS_END_CAPTURE_EXEC(ctx, 65424);
  11251. }
  11252. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11253. writer = ctx->writer;
  11254. entries_count = data ? __gls_glColorSubTableEXT_entries_size(format, type, count) : 0;
  11255. if (!writer->beginCommand(writer, 65424, 24 + entries_count * 1)) goto end;
  11256. writer->putGLSimageFlags(writer, data ? GLS_NONE : GLS_IMAGE_NULL_BIT);
  11257. writer->nextList(writer);
  11258. writer->putGLenum(writer, target);
  11259. writer->putGLuint(writer, start);
  11260. writer->putGLint(writer, count);
  11261. writer->putGLenum(writer, format);
  11262. writer->putGLenum(writer, type);
  11263. __glsWriter_putPixelv(writer, format, type, count, 1, entries_count ? data : GLS_NONE);
  11264. writer->endCommand(writer);
  11265. end:
  11266. if (ctx->captureExitFunc) ctx->captureExitFunc(65424);
  11267. --ctx->captureEntryCount;
  11268. }
  11269. #endif /* __GL_EXT_paletted_texture */
  11270. void __gls_capture_glPushClientAttrib(GLbitfield mask) {
  11271. GLbitfield captureFlags;
  11272. __GLScontext *const ctx = __GLS_CONTEXT;
  11273. __GLSwriter *writer;
  11274. ++ctx->captureEntryCount;
  11275. if (ctx->captureEntryFunc) ctx->captureEntryFunc(398);
  11276. captureFlags = ctx->captureFlags[398];
  11277. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11278. __GLS_BEGIN_CAPTURE_EXEC(ctx, 398);
  11279. glPushClientAttrib(mask);
  11280. __GLS_END_CAPTURE_EXEC(ctx, 398);
  11281. }
  11282. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11283. writer = ctx->writer;
  11284. if (!writer->beginCommand(writer, 398, 4)) goto end;
  11285. // Consider - Breaks enum representation, should have
  11286. // clientAttribMask
  11287. writer->putGLuint(writer, mask);
  11288. writer->endCommand(writer);
  11289. end:
  11290. if (ctx->captureExitFunc) ctx->captureExitFunc(398);
  11291. --ctx->captureEntryCount;
  11292. }
  11293. void __gls_capture_glPopClientAttrib(void) {
  11294. GLbitfield captureFlags;
  11295. __GLScontext *const ctx = __GLS_CONTEXT;
  11296. __GLSwriter *writer;
  11297. ++ctx->captureEntryCount;
  11298. if (ctx->captureEntryFunc) ctx->captureEntryFunc(399);
  11299. captureFlags = ctx->captureFlags[399];
  11300. if (captureFlags & GLS_CAPTURE_EXECUTE_BIT) {
  11301. __GLS_BEGIN_CAPTURE_EXEC(ctx, 399);
  11302. glPopClientAttrib();
  11303. __GLS_END_CAPTURE_EXEC(ctx, 399);
  11304. }
  11305. if (!(captureFlags & GLS_CAPTURE_WRITE_BIT)) goto end;
  11306. writer = ctx->writer;
  11307. if (!writer->beginCommand(writer, 399, 0)) goto end;
  11308. writer->endCommand(writer);
  11309. end:
  11310. if (ctx->captureExitFunc) ctx->captureExitFunc(399);
  11311. --ctx->captureEntryCount;
  11312. }