/src/regal/RegalDispatchError.cpp

https://bitbucket.org/nigels_com/regal · C++ · 29650 lines · 28209 code · 1294 blank · 147 comment · 4685 complexity · c991d608f374cecd00c7f4d6810ff70d MD5 · raw file

  1. /* NOTE: Do not edit this file, it is generated by a script:
  2. Export.py --api gl 4.4 --api wgl 4.4 --api glx 4.4 --api cgl 1.4 --api egl 1.0 --outdir .
  3. */
  4. /*
  5. Copyright (c) 2011-2013 NVIDIA Corporation
  6. Copyright (c) 2011-2013 Cass Everitt
  7. Copyright (c) 2012-2013 Scott Nations
  8. Copyright (c) 2012 Mathias Schott
  9. Copyright (c) 2012-2013 Nigel Stewart
  10. Copyright (c) 2012-2013 Google Inc.
  11. All rights reserved.
  12. Redistribution and use in source and binary forms, with or without modification,
  13. are permitted provided that the following conditions are met:
  14. Redistributions of source code must retain the above copyright notice, this
  15. list of conditions and the following disclaimer.
  16. Redistributions in binary form must reproduce the above copyright notice,
  17. this list of conditions and the following disclaimer in the documentation
  18. and/or other materials provided with the distribution.
  19. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  20. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  22. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  23. INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  24. BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  26. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  27. OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  28. OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. /*
  31. Intended formatting conventions:
  32. $ astyle --style=allman --indent=spaces=2 --indent-switches
  33. */
  34. #include "pch.h" /* For MS precompiled header support */
  35. #include "RegalUtil.h"
  36. #if REGAL_ERROR
  37. REGAL_GLOBAL_BEGIN
  38. #include <string>
  39. using namespace std;
  40. #include "RegalLog.h"
  41. #include "RegalBreak.h"
  42. #include "RegalPush.h"
  43. #include "RegalToken.h"
  44. #include "RegalHelper.h"
  45. #include "RegalPrivate.h"
  46. #include "RegalContext.h"
  47. REGAL_GLOBAL_END
  48. REGAL_NAMESPACE_BEGIN
  49. using namespace ::REGAL_NAMESPACE_INTERNAL::Logging;
  50. using namespace ::REGAL_NAMESPACE_INTERNAL::Token;
  51. // GL_VERSION_1_0
  52. static void REGAL_CALL error_glAccum(GLenum op, GLfloat value)
  53. {
  54. Internal("error_glAccum","()");
  55. RegalContext *_context = REGAL_GET_CONTEXT();
  56. RegalAssert(_context);
  57. DispatchTableGL *_next = _context->dispatcher.error.next();
  58. RegalAssert(_next);
  59. GLenum _error = GL_NO_ERROR;
  60. if (!_context->err.inBeginEnd)
  61. _error = _next->call(&_next->glGetError)();
  62. RegalAssert(_error==GL_NO_ERROR);
  63. _next->call(&_next->glAccum)(op, value);
  64. if (!_context->err.inBeginEnd) {
  65. _error = _next->call(&_next->glGetError)();
  66. if (_error!=GL_NO_ERROR) {
  67. Error("glAccum : ",Token::GLerrorToString(_error));
  68. #if REGAL_BREAK
  69. Break::ErrorCB(_error);
  70. #endif
  71. if (_context->err.callback)
  72. _context->err.callback( _error );
  73. }
  74. }
  75. }
  76. static void REGAL_CALL error_glAlphaFunc(GLenum func, GLclampf ref)
  77. {
  78. Internal("error_glAlphaFunc","()");
  79. RegalContext *_context = REGAL_GET_CONTEXT();
  80. RegalAssert(_context);
  81. DispatchTableGL *_next = _context->dispatcher.error.next();
  82. RegalAssert(_next);
  83. GLenum _error = GL_NO_ERROR;
  84. if (!_context->err.inBeginEnd)
  85. _error = _next->call(&_next->glGetError)();
  86. RegalAssert(_error==GL_NO_ERROR);
  87. _next->call(&_next->glAlphaFunc)(func, ref);
  88. if (!_context->err.inBeginEnd) {
  89. _error = _next->call(&_next->glGetError)();
  90. if (_error!=GL_NO_ERROR) {
  91. Error("glAlphaFunc : ",Token::GLerrorToString(_error));
  92. #if REGAL_BREAK
  93. Break::ErrorCB(_error);
  94. #endif
  95. if (_context->err.callback)
  96. _context->err.callback( _error );
  97. }
  98. }
  99. }
  100. static void REGAL_CALL error_glBegin(GLenum mode)
  101. {
  102. Internal("error_glBegin","()");
  103. RegalContext *_context = REGAL_GET_CONTEXT();
  104. RegalAssert(_context);
  105. DispatchTableGL *_next = _context->dispatcher.error.next();
  106. RegalAssert(_next);
  107. GLenum _error = GL_NO_ERROR;
  108. if (!_context->err.inBeginEnd)
  109. _error = _next->call(&_next->glGetError)();
  110. RegalAssert(_error==GL_NO_ERROR);
  111. _context->err.inBeginEnd = true;
  112. _next->call(&_next->glBegin)(mode);
  113. if (!_context->err.inBeginEnd) {
  114. _error = _next->call(&_next->glGetError)();
  115. if (_error!=GL_NO_ERROR) {
  116. Error("glBegin : ",Token::GLerrorToString(_error));
  117. #if REGAL_BREAK
  118. Break::ErrorCB(_error);
  119. #endif
  120. if (_context->err.callback)
  121. _context->err.callback( _error );
  122. }
  123. }
  124. }
  125. static void REGAL_CALL error_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
  126. {
  127. Internal("error_glBitmap","()");
  128. RegalContext *_context = REGAL_GET_CONTEXT();
  129. RegalAssert(_context);
  130. DispatchTableGL *_next = _context->dispatcher.error.next();
  131. RegalAssert(_next);
  132. GLenum _error = GL_NO_ERROR;
  133. if (!_context->err.inBeginEnd)
  134. _error = _next->call(&_next->glGetError)();
  135. RegalAssert(_error==GL_NO_ERROR);
  136. _next->call(&_next->glBitmap)(width, height, xorig, yorig, xmove, ymove, bitmap);
  137. if (!_context->err.inBeginEnd) {
  138. _error = _next->call(&_next->glGetError)();
  139. if (_error!=GL_NO_ERROR) {
  140. Error("glBitmap : ",Token::GLerrorToString(_error));
  141. #if REGAL_BREAK
  142. Break::ErrorCB(_error);
  143. #endif
  144. if (_context->err.callback)
  145. _context->err.callback( _error );
  146. }
  147. }
  148. }
  149. static void REGAL_CALL error_glBlendFunc(GLenum sfactor, GLenum dfactor)
  150. {
  151. Internal("error_glBlendFunc","()");
  152. RegalContext *_context = REGAL_GET_CONTEXT();
  153. RegalAssert(_context);
  154. DispatchTableGL *_next = _context->dispatcher.error.next();
  155. RegalAssert(_next);
  156. GLenum _error = GL_NO_ERROR;
  157. if (!_context->err.inBeginEnd)
  158. _error = _next->call(&_next->glGetError)();
  159. RegalAssert(_error==GL_NO_ERROR);
  160. _next->call(&_next->glBlendFunc)(sfactor, dfactor);
  161. if (!_context->err.inBeginEnd) {
  162. _error = _next->call(&_next->glGetError)();
  163. if (_error!=GL_NO_ERROR) {
  164. Error("glBlendFunc : ",Token::GLerrorToString(_error));
  165. #if REGAL_BREAK
  166. Break::ErrorCB(_error);
  167. #endif
  168. if (_context->err.callback)
  169. _context->err.callback( _error );
  170. }
  171. }
  172. }
  173. static void REGAL_CALL error_glCallList(GLuint list)
  174. {
  175. Internal("error_glCallList","()");
  176. RegalContext *_context = REGAL_GET_CONTEXT();
  177. RegalAssert(_context);
  178. DispatchTableGL *_next = _context->dispatcher.error.next();
  179. RegalAssert(_next);
  180. GLenum _error = GL_NO_ERROR;
  181. if (!_context->err.inBeginEnd)
  182. _error = _next->call(&_next->glGetError)();
  183. RegalAssert(_error==GL_NO_ERROR);
  184. _next->call(&_next->glCallList)(list);
  185. if (!_context->err.inBeginEnd) {
  186. _error = _next->call(&_next->glGetError)();
  187. if (_error!=GL_NO_ERROR) {
  188. Error("glCallList : ",Token::GLerrorToString(_error));
  189. #if REGAL_BREAK
  190. Break::ErrorCB(_error);
  191. #endif
  192. if (_context->err.callback)
  193. _context->err.callback( _error );
  194. }
  195. }
  196. }
  197. static void REGAL_CALL error_glCallLists(GLsizei n, GLenum type, const GLvoid *lists)
  198. {
  199. Internal("error_glCallLists","()");
  200. RegalContext *_context = REGAL_GET_CONTEXT();
  201. RegalAssert(_context);
  202. DispatchTableGL *_next = _context->dispatcher.error.next();
  203. RegalAssert(_next);
  204. GLenum _error = GL_NO_ERROR;
  205. if (!_context->err.inBeginEnd)
  206. _error = _next->call(&_next->glGetError)();
  207. RegalAssert(_error==GL_NO_ERROR);
  208. _next->call(&_next->glCallLists)(n, type, lists);
  209. if (!_context->err.inBeginEnd) {
  210. _error = _next->call(&_next->glGetError)();
  211. if (_error!=GL_NO_ERROR) {
  212. Error("glCallLists : ",Token::GLerrorToString(_error));
  213. #if REGAL_BREAK
  214. Break::ErrorCB(_error);
  215. #endif
  216. if (_context->err.callback)
  217. _context->err.callback( _error );
  218. }
  219. }
  220. }
  221. static void REGAL_CALL error_glClear(GLbitfield mask)
  222. {
  223. Internal("error_glClear","()");
  224. RegalContext *_context = REGAL_GET_CONTEXT();
  225. RegalAssert(_context);
  226. DispatchTableGL *_next = _context->dispatcher.error.next();
  227. RegalAssert(_next);
  228. GLenum _error = GL_NO_ERROR;
  229. if (!_context->err.inBeginEnd)
  230. _error = _next->call(&_next->glGetError)();
  231. RegalAssert(_error==GL_NO_ERROR);
  232. _next->call(&_next->glClear)(mask);
  233. if (!_context->err.inBeginEnd) {
  234. _error = _next->call(&_next->glGetError)();
  235. if (_error!=GL_NO_ERROR) {
  236. Error("glClear : ",Token::GLerrorToString(_error));
  237. #if REGAL_BREAK
  238. Break::ErrorCB(_error);
  239. #endif
  240. if (_context->err.callback)
  241. _context->err.callback( _error );
  242. }
  243. }
  244. }
  245. static void REGAL_CALL error_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  246. {
  247. Internal("error_glClearAccum","()");
  248. RegalContext *_context = REGAL_GET_CONTEXT();
  249. RegalAssert(_context);
  250. DispatchTableGL *_next = _context->dispatcher.error.next();
  251. RegalAssert(_next);
  252. GLenum _error = GL_NO_ERROR;
  253. if (!_context->err.inBeginEnd)
  254. _error = _next->call(&_next->glGetError)();
  255. RegalAssert(_error==GL_NO_ERROR);
  256. _next->call(&_next->glClearAccum)(red, green, blue, alpha);
  257. if (!_context->err.inBeginEnd) {
  258. _error = _next->call(&_next->glGetError)();
  259. if (_error!=GL_NO_ERROR) {
  260. Error("glClearAccum : ",Token::GLerrorToString(_error));
  261. #if REGAL_BREAK
  262. Break::ErrorCB(_error);
  263. #endif
  264. if (_context->err.callback)
  265. _context->err.callback( _error );
  266. }
  267. }
  268. }
  269. static void REGAL_CALL error_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  270. {
  271. Internal("error_glClearColor","()");
  272. RegalContext *_context = REGAL_GET_CONTEXT();
  273. RegalAssert(_context);
  274. DispatchTableGL *_next = _context->dispatcher.error.next();
  275. RegalAssert(_next);
  276. GLenum _error = GL_NO_ERROR;
  277. if (!_context->err.inBeginEnd)
  278. _error = _next->call(&_next->glGetError)();
  279. RegalAssert(_error==GL_NO_ERROR);
  280. _next->call(&_next->glClearColor)(red, green, blue, alpha);
  281. if (!_context->err.inBeginEnd) {
  282. _error = _next->call(&_next->glGetError)();
  283. if (_error!=GL_NO_ERROR) {
  284. Error("glClearColor : ",Token::GLerrorToString(_error));
  285. #if REGAL_BREAK
  286. Break::ErrorCB(_error);
  287. #endif
  288. if (_context->err.callback)
  289. _context->err.callback( _error );
  290. }
  291. }
  292. }
  293. static void REGAL_CALL error_glClearDepth(GLclampd depth)
  294. {
  295. Internal("error_glClearDepth","()");
  296. RegalContext *_context = REGAL_GET_CONTEXT();
  297. RegalAssert(_context);
  298. DispatchTableGL *_next = _context->dispatcher.error.next();
  299. RegalAssert(_next);
  300. GLenum _error = GL_NO_ERROR;
  301. if (!_context->err.inBeginEnd)
  302. _error = _next->call(&_next->glGetError)();
  303. RegalAssert(_error==GL_NO_ERROR);
  304. _next->call(&_next->glClearDepth)(depth);
  305. if (!_context->err.inBeginEnd) {
  306. _error = _next->call(&_next->glGetError)();
  307. if (_error!=GL_NO_ERROR) {
  308. Error("glClearDepth : ",Token::GLerrorToString(_error));
  309. #if REGAL_BREAK
  310. Break::ErrorCB(_error);
  311. #endif
  312. if (_context->err.callback)
  313. _context->err.callback( _error );
  314. }
  315. }
  316. }
  317. static void REGAL_CALL error_glClearIndex(GLfloat c)
  318. {
  319. Internal("error_glClearIndex","()");
  320. RegalContext *_context = REGAL_GET_CONTEXT();
  321. RegalAssert(_context);
  322. DispatchTableGL *_next = _context->dispatcher.error.next();
  323. RegalAssert(_next);
  324. GLenum _error = GL_NO_ERROR;
  325. if (!_context->err.inBeginEnd)
  326. _error = _next->call(&_next->glGetError)();
  327. RegalAssert(_error==GL_NO_ERROR);
  328. _next->call(&_next->glClearIndex)(c);
  329. if (!_context->err.inBeginEnd) {
  330. _error = _next->call(&_next->glGetError)();
  331. if (_error!=GL_NO_ERROR) {
  332. Error("glClearIndex : ",Token::GLerrorToString(_error));
  333. #if REGAL_BREAK
  334. Break::ErrorCB(_error);
  335. #endif
  336. if (_context->err.callback)
  337. _context->err.callback( _error );
  338. }
  339. }
  340. }
  341. static void REGAL_CALL error_glClearStencil(GLint s)
  342. {
  343. Internal("error_glClearStencil","()");
  344. RegalContext *_context = REGAL_GET_CONTEXT();
  345. RegalAssert(_context);
  346. DispatchTableGL *_next = _context->dispatcher.error.next();
  347. RegalAssert(_next);
  348. GLenum _error = GL_NO_ERROR;
  349. if (!_context->err.inBeginEnd)
  350. _error = _next->call(&_next->glGetError)();
  351. RegalAssert(_error==GL_NO_ERROR);
  352. _next->call(&_next->glClearStencil)(s);
  353. if (!_context->err.inBeginEnd) {
  354. _error = _next->call(&_next->glGetError)();
  355. if (_error!=GL_NO_ERROR) {
  356. Error("glClearStencil : ",Token::GLerrorToString(_error));
  357. #if REGAL_BREAK
  358. Break::ErrorCB(_error);
  359. #endif
  360. if (_context->err.callback)
  361. _context->err.callback( _error );
  362. }
  363. }
  364. }
  365. static void REGAL_CALL error_glClipPlane(GLenum plane, const GLdouble *equation)
  366. {
  367. Internal("error_glClipPlane","()");
  368. RegalContext *_context = REGAL_GET_CONTEXT();
  369. RegalAssert(_context);
  370. DispatchTableGL *_next = _context->dispatcher.error.next();
  371. RegalAssert(_next);
  372. GLenum _error = GL_NO_ERROR;
  373. if (!_context->err.inBeginEnd)
  374. _error = _next->call(&_next->glGetError)();
  375. RegalAssert(_error==GL_NO_ERROR);
  376. _next->call(&_next->glClipPlane)(plane, equation);
  377. if (!_context->err.inBeginEnd) {
  378. _error = _next->call(&_next->glGetError)();
  379. if (_error!=GL_NO_ERROR) {
  380. Error("glClipPlane : ",Token::GLerrorToString(_error));
  381. #if REGAL_BREAK
  382. Break::ErrorCB(_error);
  383. #endif
  384. if (_context->err.callback)
  385. _context->err.callback( _error );
  386. }
  387. }
  388. }
  389. static void REGAL_CALL error_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
  390. {
  391. Internal("error_glColor3b","()");
  392. RegalContext *_context = REGAL_GET_CONTEXT();
  393. RegalAssert(_context);
  394. DispatchTableGL *_next = _context->dispatcher.error.next();
  395. RegalAssert(_next);
  396. GLenum _error = GL_NO_ERROR;
  397. if (!_context->err.inBeginEnd)
  398. _error = _next->call(&_next->glGetError)();
  399. RegalAssert(_error==GL_NO_ERROR);
  400. _next->call(&_next->glColor3b)(red, green, blue);
  401. if (!_context->err.inBeginEnd) {
  402. _error = _next->call(&_next->glGetError)();
  403. if (_error!=GL_NO_ERROR) {
  404. Error("glColor3b : ",Token::GLerrorToString(_error));
  405. #if REGAL_BREAK
  406. Break::ErrorCB(_error);
  407. #endif
  408. if (_context->err.callback)
  409. _context->err.callback( _error );
  410. }
  411. }
  412. }
  413. static void REGAL_CALL error_glColor3bv(const GLbyte *v)
  414. {
  415. Internal("error_glColor3bv","()");
  416. RegalContext *_context = REGAL_GET_CONTEXT();
  417. RegalAssert(_context);
  418. DispatchTableGL *_next = _context->dispatcher.error.next();
  419. RegalAssert(_next);
  420. GLenum _error = GL_NO_ERROR;
  421. if (!_context->err.inBeginEnd)
  422. _error = _next->call(&_next->glGetError)();
  423. RegalAssert(_error==GL_NO_ERROR);
  424. _next->call(&_next->glColor3bv)(v);
  425. if (!_context->err.inBeginEnd) {
  426. _error = _next->call(&_next->glGetError)();
  427. if (_error!=GL_NO_ERROR) {
  428. Error("glColor3bv : ",Token::GLerrorToString(_error));
  429. #if REGAL_BREAK
  430. Break::ErrorCB(_error);
  431. #endif
  432. if (_context->err.callback)
  433. _context->err.callback( _error );
  434. }
  435. }
  436. }
  437. static void REGAL_CALL error_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
  438. {
  439. Internal("error_glColor3d","()");
  440. RegalContext *_context = REGAL_GET_CONTEXT();
  441. RegalAssert(_context);
  442. DispatchTableGL *_next = _context->dispatcher.error.next();
  443. RegalAssert(_next);
  444. GLenum _error = GL_NO_ERROR;
  445. if (!_context->err.inBeginEnd)
  446. _error = _next->call(&_next->glGetError)();
  447. RegalAssert(_error==GL_NO_ERROR);
  448. _next->call(&_next->glColor3d)(red, green, blue);
  449. if (!_context->err.inBeginEnd) {
  450. _error = _next->call(&_next->glGetError)();
  451. if (_error!=GL_NO_ERROR) {
  452. Error("glColor3d : ",Token::GLerrorToString(_error));
  453. #if REGAL_BREAK
  454. Break::ErrorCB(_error);
  455. #endif
  456. if (_context->err.callback)
  457. _context->err.callback( _error );
  458. }
  459. }
  460. }
  461. static void REGAL_CALL error_glColor3dv(const GLdouble *v)
  462. {
  463. Internal("error_glColor3dv","()");
  464. RegalContext *_context = REGAL_GET_CONTEXT();
  465. RegalAssert(_context);
  466. DispatchTableGL *_next = _context->dispatcher.error.next();
  467. RegalAssert(_next);
  468. GLenum _error = GL_NO_ERROR;
  469. if (!_context->err.inBeginEnd)
  470. _error = _next->call(&_next->glGetError)();
  471. RegalAssert(_error==GL_NO_ERROR);
  472. _next->call(&_next->glColor3dv)(v);
  473. if (!_context->err.inBeginEnd) {
  474. _error = _next->call(&_next->glGetError)();
  475. if (_error!=GL_NO_ERROR) {
  476. Error("glColor3dv : ",Token::GLerrorToString(_error));
  477. #if REGAL_BREAK
  478. Break::ErrorCB(_error);
  479. #endif
  480. if (_context->err.callback)
  481. _context->err.callback( _error );
  482. }
  483. }
  484. }
  485. static void REGAL_CALL error_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
  486. {
  487. Internal("error_glColor3f","()");
  488. RegalContext *_context = REGAL_GET_CONTEXT();
  489. RegalAssert(_context);
  490. DispatchTableGL *_next = _context->dispatcher.error.next();
  491. RegalAssert(_next);
  492. GLenum _error = GL_NO_ERROR;
  493. if (!_context->err.inBeginEnd)
  494. _error = _next->call(&_next->glGetError)();
  495. RegalAssert(_error==GL_NO_ERROR);
  496. _next->call(&_next->glColor3f)(red, green, blue);
  497. if (!_context->err.inBeginEnd) {
  498. _error = _next->call(&_next->glGetError)();
  499. if (_error!=GL_NO_ERROR) {
  500. Error("glColor3f : ",Token::GLerrorToString(_error));
  501. #if REGAL_BREAK
  502. Break::ErrorCB(_error);
  503. #endif
  504. if (_context->err.callback)
  505. _context->err.callback( _error );
  506. }
  507. }
  508. }
  509. static void REGAL_CALL error_glColor3fv(const GLfloat *v)
  510. {
  511. Internal("error_glColor3fv","()");
  512. RegalContext *_context = REGAL_GET_CONTEXT();
  513. RegalAssert(_context);
  514. DispatchTableGL *_next = _context->dispatcher.error.next();
  515. RegalAssert(_next);
  516. GLenum _error = GL_NO_ERROR;
  517. if (!_context->err.inBeginEnd)
  518. _error = _next->call(&_next->glGetError)();
  519. RegalAssert(_error==GL_NO_ERROR);
  520. _next->call(&_next->glColor3fv)(v);
  521. if (!_context->err.inBeginEnd) {
  522. _error = _next->call(&_next->glGetError)();
  523. if (_error!=GL_NO_ERROR) {
  524. Error("glColor3fv : ",Token::GLerrorToString(_error));
  525. #if REGAL_BREAK
  526. Break::ErrorCB(_error);
  527. #endif
  528. if (_context->err.callback)
  529. _context->err.callback( _error );
  530. }
  531. }
  532. }
  533. static void REGAL_CALL error_glColor3i(GLint red, GLint green, GLint blue)
  534. {
  535. Internal("error_glColor3i","()");
  536. RegalContext *_context = REGAL_GET_CONTEXT();
  537. RegalAssert(_context);
  538. DispatchTableGL *_next = _context->dispatcher.error.next();
  539. RegalAssert(_next);
  540. GLenum _error = GL_NO_ERROR;
  541. if (!_context->err.inBeginEnd)
  542. _error = _next->call(&_next->glGetError)();
  543. RegalAssert(_error==GL_NO_ERROR);
  544. _next->call(&_next->glColor3i)(red, green, blue);
  545. if (!_context->err.inBeginEnd) {
  546. _error = _next->call(&_next->glGetError)();
  547. if (_error!=GL_NO_ERROR) {
  548. Error("glColor3i : ",Token::GLerrorToString(_error));
  549. #if REGAL_BREAK
  550. Break::ErrorCB(_error);
  551. #endif
  552. if (_context->err.callback)
  553. _context->err.callback( _error );
  554. }
  555. }
  556. }
  557. static void REGAL_CALL error_glColor3iv(const GLint *v)
  558. {
  559. Internal("error_glColor3iv","()");
  560. RegalContext *_context = REGAL_GET_CONTEXT();
  561. RegalAssert(_context);
  562. DispatchTableGL *_next = _context->dispatcher.error.next();
  563. RegalAssert(_next);
  564. GLenum _error = GL_NO_ERROR;
  565. if (!_context->err.inBeginEnd)
  566. _error = _next->call(&_next->glGetError)();
  567. RegalAssert(_error==GL_NO_ERROR);
  568. _next->call(&_next->glColor3iv)(v);
  569. if (!_context->err.inBeginEnd) {
  570. _error = _next->call(&_next->glGetError)();
  571. if (_error!=GL_NO_ERROR) {
  572. Error("glColor3iv : ",Token::GLerrorToString(_error));
  573. #if REGAL_BREAK
  574. Break::ErrorCB(_error);
  575. #endif
  576. if (_context->err.callback)
  577. _context->err.callback( _error );
  578. }
  579. }
  580. }
  581. static void REGAL_CALL error_glColor3s(GLshort red, GLshort green, GLshort blue)
  582. {
  583. Internal("error_glColor3s","()");
  584. RegalContext *_context = REGAL_GET_CONTEXT();
  585. RegalAssert(_context);
  586. DispatchTableGL *_next = _context->dispatcher.error.next();
  587. RegalAssert(_next);
  588. GLenum _error = GL_NO_ERROR;
  589. if (!_context->err.inBeginEnd)
  590. _error = _next->call(&_next->glGetError)();
  591. RegalAssert(_error==GL_NO_ERROR);
  592. _next->call(&_next->glColor3s)(red, green, blue);
  593. if (!_context->err.inBeginEnd) {
  594. _error = _next->call(&_next->glGetError)();
  595. if (_error!=GL_NO_ERROR) {
  596. Error("glColor3s : ",Token::GLerrorToString(_error));
  597. #if REGAL_BREAK
  598. Break::ErrorCB(_error);
  599. #endif
  600. if (_context->err.callback)
  601. _context->err.callback( _error );
  602. }
  603. }
  604. }
  605. static void REGAL_CALL error_glColor3sv(const GLshort *v)
  606. {
  607. Internal("error_glColor3sv","()");
  608. RegalContext *_context = REGAL_GET_CONTEXT();
  609. RegalAssert(_context);
  610. DispatchTableGL *_next = _context->dispatcher.error.next();
  611. RegalAssert(_next);
  612. GLenum _error = GL_NO_ERROR;
  613. if (!_context->err.inBeginEnd)
  614. _error = _next->call(&_next->glGetError)();
  615. RegalAssert(_error==GL_NO_ERROR);
  616. _next->call(&_next->glColor3sv)(v);
  617. if (!_context->err.inBeginEnd) {
  618. _error = _next->call(&_next->glGetError)();
  619. if (_error!=GL_NO_ERROR) {
  620. Error("glColor3sv : ",Token::GLerrorToString(_error));
  621. #if REGAL_BREAK
  622. Break::ErrorCB(_error);
  623. #endif
  624. if (_context->err.callback)
  625. _context->err.callback( _error );
  626. }
  627. }
  628. }
  629. static void REGAL_CALL error_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
  630. {
  631. Internal("error_glColor3ub","()");
  632. RegalContext *_context = REGAL_GET_CONTEXT();
  633. RegalAssert(_context);
  634. DispatchTableGL *_next = _context->dispatcher.error.next();
  635. RegalAssert(_next);
  636. GLenum _error = GL_NO_ERROR;
  637. if (!_context->err.inBeginEnd)
  638. _error = _next->call(&_next->glGetError)();
  639. RegalAssert(_error==GL_NO_ERROR);
  640. _next->call(&_next->glColor3ub)(red, green, blue);
  641. if (!_context->err.inBeginEnd) {
  642. _error = _next->call(&_next->glGetError)();
  643. if (_error!=GL_NO_ERROR) {
  644. Error("glColor3ub : ",Token::GLerrorToString(_error));
  645. #if REGAL_BREAK
  646. Break::ErrorCB(_error);
  647. #endif
  648. if (_context->err.callback)
  649. _context->err.callback( _error );
  650. }
  651. }
  652. }
  653. static void REGAL_CALL error_glColor3ubv(const GLubyte *v)
  654. {
  655. Internal("error_glColor3ubv","()");
  656. RegalContext *_context = REGAL_GET_CONTEXT();
  657. RegalAssert(_context);
  658. DispatchTableGL *_next = _context->dispatcher.error.next();
  659. RegalAssert(_next);
  660. GLenum _error = GL_NO_ERROR;
  661. if (!_context->err.inBeginEnd)
  662. _error = _next->call(&_next->glGetError)();
  663. RegalAssert(_error==GL_NO_ERROR);
  664. _next->call(&_next->glColor3ubv)(v);
  665. if (!_context->err.inBeginEnd) {
  666. _error = _next->call(&_next->glGetError)();
  667. if (_error!=GL_NO_ERROR) {
  668. Error("glColor3ubv : ",Token::GLerrorToString(_error));
  669. #if REGAL_BREAK
  670. Break::ErrorCB(_error);
  671. #endif
  672. if (_context->err.callback)
  673. _context->err.callback( _error );
  674. }
  675. }
  676. }
  677. static void REGAL_CALL error_glColor3ui(GLuint red, GLuint green, GLuint blue)
  678. {
  679. Internal("error_glColor3ui","()");
  680. RegalContext *_context = REGAL_GET_CONTEXT();
  681. RegalAssert(_context);
  682. DispatchTableGL *_next = _context->dispatcher.error.next();
  683. RegalAssert(_next);
  684. GLenum _error = GL_NO_ERROR;
  685. if (!_context->err.inBeginEnd)
  686. _error = _next->call(&_next->glGetError)();
  687. RegalAssert(_error==GL_NO_ERROR);
  688. _next->call(&_next->glColor3ui)(red, green, blue);
  689. if (!_context->err.inBeginEnd) {
  690. _error = _next->call(&_next->glGetError)();
  691. if (_error!=GL_NO_ERROR) {
  692. Error("glColor3ui : ",Token::GLerrorToString(_error));
  693. #if REGAL_BREAK
  694. Break::ErrorCB(_error);
  695. #endif
  696. if (_context->err.callback)
  697. _context->err.callback( _error );
  698. }
  699. }
  700. }
  701. static void REGAL_CALL error_glColor3uiv(const GLuint *v)
  702. {
  703. Internal("error_glColor3uiv","()");
  704. RegalContext *_context = REGAL_GET_CONTEXT();
  705. RegalAssert(_context);
  706. DispatchTableGL *_next = _context->dispatcher.error.next();
  707. RegalAssert(_next);
  708. GLenum _error = GL_NO_ERROR;
  709. if (!_context->err.inBeginEnd)
  710. _error = _next->call(&_next->glGetError)();
  711. RegalAssert(_error==GL_NO_ERROR);
  712. _next->call(&_next->glColor3uiv)(v);
  713. if (!_context->err.inBeginEnd) {
  714. _error = _next->call(&_next->glGetError)();
  715. if (_error!=GL_NO_ERROR) {
  716. Error("glColor3uiv : ",Token::GLerrorToString(_error));
  717. #if REGAL_BREAK
  718. Break::ErrorCB(_error);
  719. #endif
  720. if (_context->err.callback)
  721. _context->err.callback( _error );
  722. }
  723. }
  724. }
  725. static void REGAL_CALL error_glColor3us(GLushort red, GLushort green, GLushort blue)
  726. {
  727. Internal("error_glColor3us","()");
  728. RegalContext *_context = REGAL_GET_CONTEXT();
  729. RegalAssert(_context);
  730. DispatchTableGL *_next = _context->dispatcher.error.next();
  731. RegalAssert(_next);
  732. GLenum _error = GL_NO_ERROR;
  733. if (!_context->err.inBeginEnd)
  734. _error = _next->call(&_next->glGetError)();
  735. RegalAssert(_error==GL_NO_ERROR);
  736. _next->call(&_next->glColor3us)(red, green, blue);
  737. if (!_context->err.inBeginEnd) {
  738. _error = _next->call(&_next->glGetError)();
  739. if (_error!=GL_NO_ERROR) {
  740. Error("glColor3us : ",Token::GLerrorToString(_error));
  741. #if REGAL_BREAK
  742. Break::ErrorCB(_error);
  743. #endif
  744. if (_context->err.callback)
  745. _context->err.callback( _error );
  746. }
  747. }
  748. }
  749. static void REGAL_CALL error_glColor3usv(const GLushort *v)
  750. {
  751. Internal("error_glColor3usv","()");
  752. RegalContext *_context = REGAL_GET_CONTEXT();
  753. RegalAssert(_context);
  754. DispatchTableGL *_next = _context->dispatcher.error.next();
  755. RegalAssert(_next);
  756. GLenum _error = GL_NO_ERROR;
  757. if (!_context->err.inBeginEnd)
  758. _error = _next->call(&_next->glGetError)();
  759. RegalAssert(_error==GL_NO_ERROR);
  760. _next->call(&_next->glColor3usv)(v);
  761. if (!_context->err.inBeginEnd) {
  762. _error = _next->call(&_next->glGetError)();
  763. if (_error!=GL_NO_ERROR) {
  764. Error("glColor3usv : ",Token::GLerrorToString(_error));
  765. #if REGAL_BREAK
  766. Break::ErrorCB(_error);
  767. #endif
  768. if (_context->err.callback)
  769. _context->err.callback( _error );
  770. }
  771. }
  772. }
  773. static void REGAL_CALL error_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
  774. {
  775. Internal("error_glColor4b","()");
  776. RegalContext *_context = REGAL_GET_CONTEXT();
  777. RegalAssert(_context);
  778. DispatchTableGL *_next = _context->dispatcher.error.next();
  779. RegalAssert(_next);
  780. GLenum _error = GL_NO_ERROR;
  781. if (!_context->err.inBeginEnd)
  782. _error = _next->call(&_next->glGetError)();
  783. RegalAssert(_error==GL_NO_ERROR);
  784. _next->call(&_next->glColor4b)(red, green, blue, alpha);
  785. if (!_context->err.inBeginEnd) {
  786. _error = _next->call(&_next->glGetError)();
  787. if (_error!=GL_NO_ERROR) {
  788. Error("glColor4b : ",Token::GLerrorToString(_error));
  789. #if REGAL_BREAK
  790. Break::ErrorCB(_error);
  791. #endif
  792. if (_context->err.callback)
  793. _context->err.callback( _error );
  794. }
  795. }
  796. }
  797. static void REGAL_CALL error_glColor4bv(const GLbyte *v)
  798. {
  799. Internal("error_glColor4bv","()");
  800. RegalContext *_context = REGAL_GET_CONTEXT();
  801. RegalAssert(_context);
  802. DispatchTableGL *_next = _context->dispatcher.error.next();
  803. RegalAssert(_next);
  804. GLenum _error = GL_NO_ERROR;
  805. if (!_context->err.inBeginEnd)
  806. _error = _next->call(&_next->glGetError)();
  807. RegalAssert(_error==GL_NO_ERROR);
  808. _next->call(&_next->glColor4bv)(v);
  809. if (!_context->err.inBeginEnd) {
  810. _error = _next->call(&_next->glGetError)();
  811. if (_error!=GL_NO_ERROR) {
  812. Error("glColor4bv : ",Token::GLerrorToString(_error));
  813. #if REGAL_BREAK
  814. Break::ErrorCB(_error);
  815. #endif
  816. if (_context->err.callback)
  817. _context->err.callback( _error );
  818. }
  819. }
  820. }
  821. static void REGAL_CALL error_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
  822. {
  823. Internal("error_glColor4d","()");
  824. RegalContext *_context = REGAL_GET_CONTEXT();
  825. RegalAssert(_context);
  826. DispatchTableGL *_next = _context->dispatcher.error.next();
  827. RegalAssert(_next);
  828. GLenum _error = GL_NO_ERROR;
  829. if (!_context->err.inBeginEnd)
  830. _error = _next->call(&_next->glGetError)();
  831. RegalAssert(_error==GL_NO_ERROR);
  832. _next->call(&_next->glColor4d)(red, green, blue, alpha);
  833. if (!_context->err.inBeginEnd) {
  834. _error = _next->call(&_next->glGetError)();
  835. if (_error!=GL_NO_ERROR) {
  836. Error("glColor4d : ",Token::GLerrorToString(_error));
  837. #if REGAL_BREAK
  838. Break::ErrorCB(_error);
  839. #endif
  840. if (_context->err.callback)
  841. _context->err.callback( _error );
  842. }
  843. }
  844. }
  845. static void REGAL_CALL error_glColor4dv(const GLdouble *v)
  846. {
  847. Internal("error_glColor4dv","()");
  848. RegalContext *_context = REGAL_GET_CONTEXT();
  849. RegalAssert(_context);
  850. DispatchTableGL *_next = _context->dispatcher.error.next();
  851. RegalAssert(_next);
  852. GLenum _error = GL_NO_ERROR;
  853. if (!_context->err.inBeginEnd)
  854. _error = _next->call(&_next->glGetError)();
  855. RegalAssert(_error==GL_NO_ERROR);
  856. _next->call(&_next->glColor4dv)(v);
  857. if (!_context->err.inBeginEnd) {
  858. _error = _next->call(&_next->glGetError)();
  859. if (_error!=GL_NO_ERROR) {
  860. Error("glColor4dv : ",Token::GLerrorToString(_error));
  861. #if REGAL_BREAK
  862. Break::ErrorCB(_error);
  863. #endif
  864. if (_context->err.callback)
  865. _context->err.callback( _error );
  866. }
  867. }
  868. }
  869. static void REGAL_CALL error_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  870. {
  871. Internal("error_glColor4f","()");
  872. RegalContext *_context = REGAL_GET_CONTEXT();
  873. RegalAssert(_context);
  874. DispatchTableGL *_next = _context->dispatcher.error.next();
  875. RegalAssert(_next);
  876. GLenum _error = GL_NO_ERROR;
  877. if (!_context->err.inBeginEnd)
  878. _error = _next->call(&_next->glGetError)();
  879. RegalAssert(_error==GL_NO_ERROR);
  880. _next->call(&_next->glColor4f)(red, green, blue, alpha);
  881. if (!_context->err.inBeginEnd) {
  882. _error = _next->call(&_next->glGetError)();
  883. if (_error!=GL_NO_ERROR) {
  884. Error("glColor4f : ",Token::GLerrorToString(_error));
  885. #if REGAL_BREAK
  886. Break::ErrorCB(_error);
  887. #endif
  888. if (_context->err.callback)
  889. _context->err.callback( _error );
  890. }
  891. }
  892. }
  893. static void REGAL_CALL error_glColor4fv(const GLfloat *v)
  894. {
  895. Internal("error_glColor4fv","()");
  896. RegalContext *_context = REGAL_GET_CONTEXT();
  897. RegalAssert(_context);
  898. DispatchTableGL *_next = _context->dispatcher.error.next();
  899. RegalAssert(_next);
  900. GLenum _error = GL_NO_ERROR;
  901. if (!_context->err.inBeginEnd)
  902. _error = _next->call(&_next->glGetError)();
  903. RegalAssert(_error==GL_NO_ERROR);
  904. _next->call(&_next->glColor4fv)(v);
  905. if (!_context->err.inBeginEnd) {
  906. _error = _next->call(&_next->glGetError)();
  907. if (_error!=GL_NO_ERROR) {
  908. Error("glColor4fv : ",Token::GLerrorToString(_error));
  909. #if REGAL_BREAK
  910. Break::ErrorCB(_error);
  911. #endif
  912. if (_context->err.callback)
  913. _context->err.callback( _error );
  914. }
  915. }
  916. }
  917. static void REGAL_CALL error_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
  918. {
  919. Internal("error_glColor4i","()");
  920. RegalContext *_context = REGAL_GET_CONTEXT();
  921. RegalAssert(_context);
  922. DispatchTableGL *_next = _context->dispatcher.error.next();
  923. RegalAssert(_next);
  924. GLenum _error = GL_NO_ERROR;
  925. if (!_context->err.inBeginEnd)
  926. _error = _next->call(&_next->glGetError)();
  927. RegalAssert(_error==GL_NO_ERROR);
  928. _next->call(&_next->glColor4i)(red, green, blue, alpha);
  929. if (!_context->err.inBeginEnd) {
  930. _error = _next->call(&_next->glGetError)();
  931. if (_error!=GL_NO_ERROR) {
  932. Error("glColor4i : ",Token::GLerrorToString(_error));
  933. #if REGAL_BREAK
  934. Break::ErrorCB(_error);
  935. #endif
  936. if (_context->err.callback)
  937. _context->err.callback( _error );
  938. }
  939. }
  940. }
  941. static void REGAL_CALL error_glColor4iv(const GLint *v)
  942. {
  943. Internal("error_glColor4iv","()");
  944. RegalContext *_context = REGAL_GET_CONTEXT();
  945. RegalAssert(_context);
  946. DispatchTableGL *_next = _context->dispatcher.error.next();
  947. RegalAssert(_next);
  948. GLenum _error = GL_NO_ERROR;
  949. if (!_context->err.inBeginEnd)
  950. _error = _next->call(&_next->glGetError)();
  951. RegalAssert(_error==GL_NO_ERROR);
  952. _next->call(&_next->glColor4iv)(v);
  953. if (!_context->err.inBeginEnd) {
  954. _error = _next->call(&_next->glGetError)();
  955. if (_error!=GL_NO_ERROR) {
  956. Error("glColor4iv : ",Token::GLerrorToString(_error));
  957. #if REGAL_BREAK
  958. Break::ErrorCB(_error);
  959. #endif
  960. if (_context->err.callback)
  961. _context->err.callback( _error );
  962. }
  963. }
  964. }
  965. static void REGAL_CALL error_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
  966. {
  967. Internal("error_glColor4s","()");
  968. RegalContext *_context = REGAL_GET_CONTEXT();
  969. RegalAssert(_context);
  970. DispatchTableGL *_next = _context->dispatcher.error.next();
  971. RegalAssert(_next);
  972. GLenum _error = GL_NO_ERROR;
  973. if (!_context->err.inBeginEnd)
  974. _error = _next->call(&_next->glGetError)();
  975. RegalAssert(_error==GL_NO_ERROR);
  976. _next->call(&_next->glColor4s)(red, green, blue, alpha);
  977. if (!_context->err.inBeginEnd) {
  978. _error = _next->call(&_next->glGetError)();
  979. if (_error!=GL_NO_ERROR) {
  980. Error("glColor4s : ",Token::GLerrorToString(_error));
  981. #if REGAL_BREAK
  982. Break::ErrorCB(_error);
  983. #endif
  984. if (_context->err.callback)
  985. _context->err.callback( _error );
  986. }
  987. }
  988. }
  989. static void REGAL_CALL error_glColor4sv(const GLshort *v)
  990. {
  991. Internal("error_glColor4sv","()");
  992. RegalContext *_context = REGAL_GET_CONTEXT();
  993. RegalAssert(_context);
  994. DispatchTableGL *_next = _context->dispatcher.error.next();
  995. RegalAssert(_next);
  996. GLenum _error = GL_NO_ERROR;
  997. if (!_context->err.inBeginEnd)
  998. _error = _next->call(&_next->glGetError)();
  999. RegalAssert(_error==GL_NO_ERROR);
  1000. _next->call(&_next->glColor4sv)(v);
  1001. if (!_context->err.inBeginEnd) {
  1002. _error = _next->call(&_next->glGetError)();
  1003. if (_error!=GL_NO_ERROR) {
  1004. Error("glColor4sv : ",Token::GLerrorToString(_error));
  1005. #if REGAL_BREAK
  1006. Break::ErrorCB(_error);
  1007. #endif
  1008. if (_context->err.callback)
  1009. _context->err.callback( _error );
  1010. }
  1011. }
  1012. }
  1013. static void REGAL_CALL error_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
  1014. {
  1015. Internal("error_glColor4ub","()");
  1016. RegalContext *_context = REGAL_GET_CONTEXT();
  1017. RegalAssert(_context);
  1018. DispatchTableGL *_next = _context->dispatcher.error.next();
  1019. RegalAssert(_next);
  1020. GLenum _error = GL_NO_ERROR;
  1021. if (!_context->err.inBeginEnd)
  1022. _error = _next->call(&_next->glGetError)();
  1023. RegalAssert(_error==GL_NO_ERROR);
  1024. _next->call(&_next->glColor4ub)(red, green, blue, alpha);
  1025. if (!_context->err.inBeginEnd) {
  1026. _error = _next->call(&_next->glGetError)();
  1027. if (_error!=GL_NO_ERROR) {
  1028. Error("glColor4ub : ",Token::GLerrorToString(_error));
  1029. #if REGAL_BREAK
  1030. Break::ErrorCB(_error);
  1031. #endif
  1032. if (_context->err.callback)
  1033. _context->err.callback( _error );
  1034. }
  1035. }
  1036. }
  1037. static void REGAL_CALL error_glColor4ubv(const GLubyte *v)
  1038. {
  1039. Internal("error_glColor4ubv","()");
  1040. RegalContext *_context = REGAL_GET_CONTEXT();
  1041. RegalAssert(_context);
  1042. DispatchTableGL *_next = _context->dispatcher.error.next();
  1043. RegalAssert(_next);
  1044. GLenum _error = GL_NO_ERROR;
  1045. if (!_context->err.inBeginEnd)
  1046. _error = _next->call(&_next->glGetError)();
  1047. RegalAssert(_error==GL_NO_ERROR);
  1048. _next->call(&_next->glColor4ubv)(v);
  1049. if (!_context->err.inBeginEnd) {
  1050. _error = _next->call(&_next->glGetError)();
  1051. if (_error!=GL_NO_ERROR) {
  1052. Error("glColor4ubv : ",Token::GLerrorToString(_error));
  1053. #if REGAL_BREAK
  1054. Break::ErrorCB(_error);
  1055. #endif
  1056. if (_context->err.callback)
  1057. _context->err.callback( _error );
  1058. }
  1059. }
  1060. }
  1061. static void REGAL_CALL error_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
  1062. {
  1063. Internal("error_glColor4ui","()");
  1064. RegalContext *_context = REGAL_GET_CONTEXT();
  1065. RegalAssert(_context);
  1066. DispatchTableGL *_next = _context->dispatcher.error.next();
  1067. RegalAssert(_next);
  1068. GLenum _error = GL_NO_ERROR;
  1069. if (!_context->err.inBeginEnd)
  1070. _error = _next->call(&_next->glGetError)();
  1071. RegalAssert(_error==GL_NO_ERROR);
  1072. _next->call(&_next->glColor4ui)(red, green, blue, alpha);
  1073. if (!_context->err.inBeginEnd) {
  1074. _error = _next->call(&_next->glGetError)();
  1075. if (_error!=GL_NO_ERROR) {
  1076. Error("glColor4ui : ",Token::GLerrorToString(_error));
  1077. #if REGAL_BREAK
  1078. Break::ErrorCB(_error);
  1079. #endif
  1080. if (_context->err.callback)
  1081. _context->err.callback( _error );
  1082. }
  1083. }
  1084. }
  1085. static void REGAL_CALL error_glColor4uiv(const GLuint *v)
  1086. {
  1087. Internal("error_glColor4uiv","()");
  1088. RegalContext *_context = REGAL_GET_CONTEXT();
  1089. RegalAssert(_context);
  1090. DispatchTableGL *_next = _context->dispatcher.error.next();
  1091. RegalAssert(_next);
  1092. GLenum _error = GL_NO_ERROR;
  1093. if (!_context->err.inBeginEnd)
  1094. _error = _next->call(&_next->glGetError)();
  1095. RegalAssert(_error==GL_NO_ERROR);
  1096. _next->call(&_next->glColor4uiv)(v);
  1097. if (!_context->err.inBeginEnd) {
  1098. _error = _next->call(&_next->glGetError)();
  1099. if (_error!=GL_NO_ERROR) {
  1100. Error("glColor4uiv : ",Token::GLerrorToString(_error));
  1101. #if REGAL_BREAK
  1102. Break::ErrorCB(_error);
  1103. #endif
  1104. if (_context->err.callback)
  1105. _context->err.callback( _error );
  1106. }
  1107. }
  1108. }
  1109. static void REGAL_CALL error_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
  1110. {
  1111. Internal("error_glColor4us","()");
  1112. RegalContext *_context = REGAL_GET_CONTEXT();
  1113. RegalAssert(_context);
  1114. DispatchTableGL *_next = _context->dispatcher.error.next();
  1115. RegalAssert(_next);
  1116. GLenum _error = GL_NO_ERROR;
  1117. if (!_context->err.inBeginEnd)
  1118. _error = _next->call(&_next->glGetError)();
  1119. RegalAssert(_error==GL_NO_ERROR);
  1120. _next->call(&_next->glColor4us)(red, green, blue, alpha);
  1121. if (!_context->err.inBeginEnd) {
  1122. _error = _next->call(&_next->glGetError)();
  1123. if (_error!=GL_NO_ERROR) {
  1124. Error("glColor4us : ",Token::GLerrorToString(_error));
  1125. #if REGAL_BREAK
  1126. Break::ErrorCB(_error);
  1127. #endif
  1128. if (_context->err.callback)
  1129. _context->err.callback( _error );
  1130. }
  1131. }
  1132. }
  1133. static void REGAL_CALL error_glColor4usv(const GLushort *v)
  1134. {
  1135. Internal("error_glColor4usv","()");
  1136. RegalContext *_context = REGAL_GET_CONTEXT();
  1137. RegalAssert(_context);
  1138. DispatchTableGL *_next = _context->dispatcher.error.next();
  1139. RegalAssert(_next);
  1140. GLenum _error = GL_NO_ERROR;
  1141. if (!_context->err.inBeginEnd)
  1142. _error = _next->call(&_next->glGetError)();
  1143. RegalAssert(_error==GL_NO_ERROR);
  1144. _next->call(&_next->glColor4usv)(v);
  1145. if (!_context->err.inBeginEnd) {
  1146. _error = _next->call(&_next->glGetError)();
  1147. if (_error!=GL_NO_ERROR) {
  1148. Error("glColor4usv : ",Token::GLerrorToString(_error));
  1149. #if REGAL_BREAK
  1150. Break::ErrorCB(_error);
  1151. #endif
  1152. if (_context->err.callback)
  1153. _context->err.callback( _error );
  1154. }
  1155. }
  1156. }
  1157. static void REGAL_CALL error_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
  1158. {
  1159. Internal("error_glColorMask","()");
  1160. RegalContext *_context = REGAL_GET_CONTEXT();
  1161. RegalAssert(_context);
  1162. DispatchTableGL *_next = _context->dispatcher.error.next();
  1163. RegalAssert(_next);
  1164. GLenum _error = GL_NO_ERROR;
  1165. if (!_context->err.inBeginEnd)
  1166. _error = _next->call(&_next->glGetError)();
  1167. RegalAssert(_error==GL_NO_ERROR);
  1168. _next->call(&_next->glColorMask)(red, green, blue, alpha);
  1169. if (!_context->err.inBeginEnd) {
  1170. _error = _next->call(&_next->glGetError)();
  1171. if (_error!=GL_NO_ERROR) {
  1172. Error("glColorMask : ",Token::GLerrorToString(_error));
  1173. #if REGAL_BREAK
  1174. Break::ErrorCB(_error);
  1175. #endif
  1176. if (_context->err.callback)
  1177. _context->err.callback( _error );
  1178. }
  1179. }
  1180. }
  1181. static void REGAL_CALL error_glColorMaterial(GLenum face, GLenum mode)
  1182. {
  1183. Internal("error_glColorMaterial","()");
  1184. RegalContext *_context = REGAL_GET_CONTEXT();
  1185. RegalAssert(_context);
  1186. DispatchTableGL *_next = _context->dispatcher.error.next();
  1187. RegalAssert(_next);
  1188. GLenum _error = GL_NO_ERROR;
  1189. if (!_context->err.inBeginEnd)
  1190. _error = _next->call(&_next->glGetError)();
  1191. RegalAssert(_error==GL_NO_ERROR);
  1192. _next->call(&_next->glColorMaterial)(face, mode);
  1193. if (!_context->err.inBeginEnd) {
  1194. _error = _next->call(&_next->glGetError)();
  1195. if (_error!=GL_NO_ERROR) {
  1196. Error("glColorMaterial : ",Token::GLerrorToString(_error));
  1197. #if REGAL_BREAK
  1198. Break::ErrorCB(_error);
  1199. #endif
  1200. if (_context->err.callback)
  1201. _context->err.callback( _error );
  1202. }
  1203. }
  1204. }
  1205. static void REGAL_CALL error_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
  1206. {
  1207. Internal("error_glCopyPixels","()");
  1208. RegalContext *_context = REGAL_GET_CONTEXT();
  1209. RegalAssert(_context);
  1210. DispatchTableGL *_next = _context->dispatcher.error.next();
  1211. RegalAssert(_next);
  1212. GLenum _error = GL_NO_ERROR;
  1213. if (!_context->err.inBeginEnd)
  1214. _error = _next->call(&_next->glGetError)();
  1215. RegalAssert(_error==GL_NO_ERROR);
  1216. _next->call(&_next->glCopyPixels)(x, y, width, height, type);
  1217. if (!_context->err.inBeginEnd) {
  1218. _error = _next->call(&_next->glGetError)();
  1219. if (_error!=GL_NO_ERROR) {
  1220. Error("glCopyPixels : ",Token::GLerrorToString(_error));
  1221. #if REGAL_BREAK
  1222. Break::ErrorCB(_error);
  1223. #endif
  1224. if (_context->err.callback)
  1225. _context->err.callback( _error );
  1226. }
  1227. }
  1228. }
  1229. static void REGAL_CALL error_glCullFace(GLenum mode)
  1230. {
  1231. Internal("error_glCullFace","()");
  1232. RegalContext *_context = REGAL_GET_CONTEXT();
  1233. RegalAssert(_context);
  1234. DispatchTableGL *_next = _context->dispatcher.error.next();
  1235. RegalAssert(_next);
  1236. GLenum _error = GL_NO_ERROR;
  1237. if (!_context->err.inBeginEnd)
  1238. _error = _next->call(&_next->glGetError)();
  1239. RegalAssert(_error==GL_NO_ERROR);
  1240. _next->call(&_next->glCullFace)(mode);
  1241. if (!_context->err.inBeginEnd) {
  1242. _error = _next->call(&_next->glGetError)();
  1243. if (_error!=GL_NO_ERROR) {
  1244. Error("glCullFace : ",Token::GLerrorToString(_error));
  1245. #if REGAL_BREAK
  1246. Break::ErrorCB(_error);
  1247. #endif
  1248. if (_context->err.callback)
  1249. _context->err.callback( _error );
  1250. }
  1251. }
  1252. }
  1253. static void REGAL_CALL error_glDeleteLists(GLuint list, GLsizei range)
  1254. {
  1255. Internal("error_glDeleteLists","()");
  1256. RegalContext *_context = REGAL_GET_CONTEXT();
  1257. RegalAssert(_context);
  1258. DispatchTableGL *_next = _context->dispatcher.error.next();
  1259. RegalAssert(_next);
  1260. GLenum _error = GL_NO_ERROR;
  1261. if (!_context->err.inBeginEnd)
  1262. _error = _next->call(&_next->glGetError)();
  1263. RegalAssert(_error==GL_NO_ERROR);
  1264. _next->call(&_next->glDeleteLists)(list, range);
  1265. if (!_context->err.inBeginEnd) {
  1266. _error = _next->call(&_next->glGetError)();
  1267. if (_error!=GL_NO_ERROR) {
  1268. Error("glDeleteLists : ",Token::GLerrorToString(_error));
  1269. #if REGAL_BREAK
  1270. Break::ErrorCB(_error);
  1271. #endif
  1272. if (_context->err.callback)
  1273. _context->err.callback( _error );
  1274. }
  1275. }
  1276. }
  1277. static void REGAL_CALL error_glDepthFunc(GLenum func)
  1278. {
  1279. Internal("error_glDepthFunc","()");
  1280. RegalContext *_context = REGAL_GET_CONTEXT();
  1281. RegalAssert(_context);
  1282. DispatchTableGL *_next = _context->dispatcher.error.next();
  1283. RegalAssert(_next);
  1284. GLenum _error = GL_NO_ERROR;
  1285. if (!_context->err.inBeginEnd)
  1286. _error = _next->call(&_next->glGetError)();
  1287. RegalAssert(_error==GL_NO_ERROR);
  1288. _next->call(&_next->glDepthFunc)(func);
  1289. if (!_context->err.inBeginEnd) {
  1290. _error = _next->call(&_next->glGetError)();
  1291. if (_error!=GL_NO_ERROR) {
  1292. Error("glDepthFunc : ",Token::GLerrorToString(_error));
  1293. #if REGAL_BREAK
  1294. Break::ErrorCB(_error);
  1295. #endif
  1296. if (_context->err.callback)
  1297. _context->err.callback( _error );
  1298. }
  1299. }
  1300. }
  1301. static void REGAL_CALL error_glDepthMask(GLboolean flag)
  1302. {
  1303. Internal("error_glDepthMask","()");
  1304. RegalContext *_context = REGAL_GET_CONTEXT();
  1305. RegalAssert(_context);
  1306. DispatchTableGL *_next = _context->dispatcher.error.next();
  1307. RegalAssert(_next);
  1308. GLenum _error = GL_NO_ERROR;
  1309. if (!_context->err.inBeginEnd)
  1310. _error = _next->call(&_next->glGetError)();
  1311. RegalAssert(_error==GL_NO_ERROR);
  1312. _next->call(&_next->glDepthMask)(flag);
  1313. if (!_context->err.inBeginEnd) {
  1314. _error = _next->call(&_next->glGetError)();
  1315. if (_error!=GL_NO_ERROR) {
  1316. Error("glDepthMask : ",Token::GLerrorToString(_error));
  1317. #if REGAL_BREAK
  1318. Break::ErrorCB(_error);
  1319. #endif
  1320. if (_context->err.callback)
  1321. _context->err.callback( _error );
  1322. }
  1323. }
  1324. }
  1325. static void REGAL_CALL error_glDepthRange(GLclampd zNear, GLclampd zFar)
  1326. {
  1327. Internal("error_glDepthRange","()");
  1328. RegalContext *_context = REGAL_GET_CONTEXT();
  1329. RegalAssert(_context);
  1330. DispatchTableGL *_next = _context->dispatcher.error.next();
  1331. RegalAssert(_next);
  1332. GLenum _error = GL_NO_ERROR;
  1333. if (!_context->err.inBeginEnd)
  1334. _error = _next->call(&_next->glGetError)();
  1335. RegalAssert(_error==GL_NO_ERROR);
  1336. _next->call(&_next->glDepthRange)(zNear, zFar);
  1337. if (!_context->err.inBeginEnd) {
  1338. _error = _next->call(&_next->glGetError)();
  1339. if (_error!=GL_NO_ERROR) {
  1340. Error("glDepthRange : ",Token::GLerrorToString(_error));
  1341. #if REGAL_BREAK
  1342. Break::ErrorCB(_error);
  1343. #endif
  1344. if (_context->err.callback)
  1345. _context->err.callback( _error );
  1346. }
  1347. }
  1348. }
  1349. static void REGAL_CALL error_glDisable(GLenum cap)
  1350. {
  1351. Internal("error_glDisable","()");
  1352. RegalContext *_context = REGAL_GET_CONTEXT();
  1353. RegalAssert(_context);
  1354. DispatchTableGL *_next = _context->dispatcher.error.next();
  1355. RegalAssert(_next);
  1356. GLenum _error = GL_NO_ERROR;
  1357. if (!_context->err.inBeginEnd)
  1358. _error = _next->call(&_next->glGetError)();
  1359. RegalAssert(_error==GL_NO_ERROR);
  1360. _next->call(&_next->glDisable)(cap);
  1361. if (!_context->err.inBeginEnd) {
  1362. _error = _next->call(&_next->glGetError)();
  1363. if (_error!=GL_NO_ERROR) {
  1364. Error("glDisable : ",Token::GLerrorToString(_error));
  1365. #if REGAL_BREAK
  1366. Break::ErrorCB(_error);
  1367. #endif
  1368. if (_context->err.callback)
  1369. _context->err.callback( _error );
  1370. }
  1371. }
  1372. }
  1373. static void REGAL_CALL error_glDrawBuffer(GLenum mode)
  1374. {
  1375. Internal("error_glDrawBuffer","()");
  1376. RegalContext *_context = REGAL_GET_CONTEXT();
  1377. RegalAssert(_context);
  1378. DispatchTableGL *_next = _context->dispatcher.error.next();
  1379. RegalAssert(_next);
  1380. GLenum _error = GL_NO_ERROR;
  1381. if (!_context->err.inBeginEnd)
  1382. _error = _next->call(&_next->glGetError)();
  1383. RegalAssert(_error==GL_NO_ERROR);
  1384. _next->call(&_next->glDrawBuffer)(mode);
  1385. if (!_context->err.inBeginEnd) {
  1386. _error = _next->call(&_next->glGetError)();
  1387. if (_error!=GL_NO_ERROR) {
  1388. Error("glDrawBuffer : ",Token::GLerrorToString(_error));
  1389. #if REGAL_BREAK
  1390. Break::ErrorCB(_error);
  1391. #endif
  1392. if (_context->err.callback)
  1393. _context->err.callback( _error );
  1394. }
  1395. }
  1396. }
  1397. static void REGAL_CALL error_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
  1398. {
  1399. Internal("error_glDrawPixels","()");
  1400. RegalContext *_context = REGAL_GET_CONTEXT();
  1401. RegalAssert(_context);
  1402. DispatchTableGL *_next = _context->dispatcher.error.next();
  1403. RegalAssert(_next);
  1404. GLenum _error = GL_NO_ERROR;
  1405. if (!_context->err.inBeginEnd)
  1406. _error = _next->call(&_next->glGetError)();
  1407. RegalAssert(_error==GL_NO_ERROR);
  1408. _next->call(&_next->glDrawPixels)(width, height, format, type, pixels);
  1409. if (!_context->err.inBeginEnd) {
  1410. _error = _next->call(&_next->glGetError)();
  1411. if (_error!=GL_NO_ERROR) {
  1412. Error("glDrawPixels : ",Token::GLerrorToString(_error));
  1413. #if REGAL_BREAK
  1414. Break::ErrorCB(_error);
  1415. #endif
  1416. if (_context->err.callback)
  1417. _context->err.callback( _error );
  1418. }
  1419. }
  1420. }
  1421. static void REGAL_CALL error_glEdgeFlag(GLboolean flag)
  1422. {
  1423. Internal("error_glEdgeFlag","()");
  1424. RegalContext *_context = REGAL_GET_CONTEXT();
  1425. RegalAssert(_context);
  1426. DispatchTableGL *_next = _context->dispatcher.error.next();
  1427. RegalAssert(_next);
  1428. GLenum _error = GL_NO_ERROR;
  1429. if (!_context->err.inBeginEnd)
  1430. _error = _next->call(&_next->glGetError)();
  1431. RegalAssert(_error==GL_NO_ERROR);
  1432. _next->call(&_next->glEdgeFlag)(flag);
  1433. if (!_context->err.inBeginEnd) {
  1434. _error = _next->call(&_next->glGetError)();
  1435. if (_error!=GL_NO_ERROR) {
  1436. Error("glEdgeFlag : ",Token::GLerrorToString(_error));
  1437. #if REGAL_BREAK
  1438. Break::ErrorCB(_error);
  1439. #endif
  1440. if (_context->err.callback)
  1441. _context->err.callback( _error );
  1442. }
  1443. }
  1444. }
  1445. static void REGAL_CALL error_glEdgeFlagv(const GLboolean *flag)
  1446. {
  1447. Internal("error_glEdgeFlagv","()");
  1448. RegalContext *_context = REGAL_GET_CONTEXT();
  1449. RegalAssert(_context);
  1450. DispatchTableGL *_next = _context->dispatcher.error.next();
  1451. RegalAssert(_next);
  1452. GLenum _error = GL_NO_ERROR;
  1453. if (!_context->err.inBeginEnd)
  1454. _error = _next->call(&_next->glGetError)();
  1455. RegalAssert(_error==GL_NO_ERROR);
  1456. _next->call(&_next->glEdgeFlagv)(flag);
  1457. if (!_context->err.inBeginEnd) {
  1458. _error = _next->call(&_next->glGetError)();
  1459. if (_error!=GL_NO_ERROR) {
  1460. Error("glEdgeFlagv : ",Token::GLerrorToString(_error));
  1461. #if REGAL_BREAK
  1462. Break::ErrorCB(_error);
  1463. #endif
  1464. if (_context->err.callback)
  1465. _context->err.callback( _error );
  1466. }
  1467. }
  1468. }
  1469. static void REGAL_CALL error_glEnable(GLenum cap)
  1470. {
  1471. Internal("error_glEnable","()");
  1472. RegalContext *_context = REGAL_GET_CONTEXT();
  1473. RegalAssert(_context);
  1474. DispatchTableGL *_next = _context->dispatcher.error.next();
  1475. RegalAssert(_next);
  1476. GLenum _error = GL_NO_ERROR;
  1477. if (!_context->err.inBeginEnd)
  1478. _error = _next->call(&_next->glGetError)();
  1479. RegalAssert(_error==GL_NO_ERROR);
  1480. _next->call(&_next->glEnable)(cap);
  1481. if (!_context->err.inBeginEnd) {
  1482. _error = _next->call(&_next->glGetError)();
  1483. if (_error!=GL_NO_ERROR) {
  1484. Error("glEnable : ",Token::GLerrorToString(_error));
  1485. #if REGAL_BREAK
  1486. Break::ErrorCB(_error);
  1487. #endif
  1488. if (_context->err.callback)
  1489. _context->err.callback( _error );
  1490. }
  1491. }
  1492. }
  1493. static void REGAL_CALL error_glEnd(void)
  1494. {
  1495. Internal("error_glEnd","()");
  1496. RegalContext *_context = REGAL_GET_CONTEXT();
  1497. RegalAssert(_context);
  1498. DispatchTableGL *_next = _context->dispatcher.error.next();
  1499. RegalAssert(_next);
  1500. GLenum _error = GL_NO_ERROR;
  1501. if (!_context->err.inBeginEnd)
  1502. _error = _next->call(&_next->glGetError)();
  1503. RegalAssert(_error==GL_NO_ERROR);
  1504. _next->call(&_next->glEnd)();
  1505. _context->err.inBeginEnd = false;
  1506. if (!_context->err.inBeginEnd) {
  1507. _error = _next->call(&_next->glGetError)();
  1508. if (_error!=GL_NO_ERROR) {
  1509. Error("glEnd : ",Token::GLerrorToString(_error));
  1510. #if REGAL_BREAK
  1511. Break::ErrorCB(_error);
  1512. #endif
  1513. if (_context->err.callback)
  1514. _context->err.callback( _error );
  1515. }
  1516. }
  1517. }
  1518. static void REGAL_CALL error_glEndList(void)
  1519. {
  1520. Internal("error_glEndList","()");
  1521. RegalContext *_context = REGAL_GET_CONTEXT();
  1522. RegalAssert(_context);
  1523. DispatchTableGL *_next = _context->dispatcher.error.next();
  1524. RegalAssert(_next);
  1525. GLenum _error = GL_NO_ERROR;
  1526. if (!_context->err.inBeginEnd)
  1527. _error = _next->call(&_next->glGetError)();
  1528. RegalAssert(_error==GL_NO_ERROR);
  1529. _next->call(&_next->glEndList)();
  1530. if (!_context->err.inBeginEnd) {
  1531. _error = _next->call(&_next->glGetError)();
  1532. if (_error!=GL_NO_ERROR) {
  1533. Error("glEndList : ",Token::GLerrorToString(_error));
  1534. #if REGAL_BREAK
  1535. Break::ErrorCB(_error);
  1536. #endif
  1537. if (_context->err.callback)
  1538. _context->err.callback( _error );
  1539. }
  1540. }
  1541. }
  1542. static void REGAL_CALL error_glEvalCoord1d(GLdouble u)
  1543. {
  1544. Internal("error_glEvalCoord1d","()");
  1545. RegalContext *_context = REGAL_GET_CONTEXT();
  1546. RegalAssert(_context);
  1547. DispatchTableGL *_next = _context->dispatcher.error.next();
  1548. RegalAssert(_next);
  1549. GLenum _error = GL_NO_ERROR;
  1550. if (!_context->err.inBeginEnd)
  1551. _error = _next->call(&_next->glGetError)();
  1552. RegalAssert(_error==GL_NO_ERROR);
  1553. _next->call(&_next->glEvalCoord1d)(u);
  1554. if (!_context->err.inBeginEnd) {
  1555. _error = _next->call(&_next->glGetError)();
  1556. if (_error!=GL_NO_ERROR) {
  1557. Error("glEvalCoord1d : ",Token::GLerrorToString(_error));
  1558. #if REGAL_BREAK
  1559. Break::ErrorCB(_error);
  1560. #endif
  1561. if (_context->err.callback)
  1562. _context->err.callback( _error );
  1563. }
  1564. }
  1565. }
  1566. static void REGAL_CALL error_glEvalCoord1dv(const GLdouble *u)
  1567. {
  1568. Internal("error_glEvalCoord1dv","()");
  1569. RegalContext *_context = REGAL_GET_CONTEXT();
  1570. RegalAssert(_context);
  1571. DispatchTableGL *_next = _context->dispatcher.error.next();
  1572. RegalAssert(_next);
  1573. GLenum _error = GL_NO_ERROR;
  1574. if (!_context->err.inBeginEnd)
  1575. _error = _next->call(&_next->glGetError)();
  1576. RegalAssert(_error==GL_NO_ERROR);
  1577. _next->call(&_next->glEvalCoord1dv)(u);
  1578. if (!_context->err.inBeginEnd) {
  1579. _error = _next->call(&_next->glGetError)();
  1580. if (_error!=GL_NO_ERROR) {
  1581. Error("glEvalCoord1dv : ",Token::GLerrorToString(_error));
  1582. #if REGAL_BREAK
  1583. Break::ErrorCB(_error);
  1584. #endif
  1585. if (_context->err.callback)
  1586. _context->err.callback( _error );
  1587. }
  1588. }
  1589. }
  1590. static void REGAL_CALL error_glEvalCoord1f(GLfloat u)
  1591. {
  1592. Internal("error_glEvalCoord1f","()");
  1593. RegalContext *_context = REGAL_GET_CONTEXT();
  1594. RegalAssert(_context);
  1595. DispatchTableGL *_next = _context->dispatcher.error.next();
  1596. RegalAssert(_next);
  1597. GLenum _error = GL_NO_ERROR;
  1598. if (!_context->err.inBeginEnd)
  1599. _error = _next->call(&_next->glGetError)();
  1600. RegalAssert(_error==GL_NO_ERROR);
  1601. _next->call(&_next->glEvalCoord1f)(u);
  1602. if (!_context->err.inBeginEnd) {
  1603. _error = _next->call(&_next->glGetError)();
  1604. if (_error!=GL_NO_ERROR) {
  1605. Error("glEvalCoord1f : ",Token::GLerrorToString(_error));
  1606. #if REGAL_BREAK
  1607. Break::ErrorCB(_error);
  1608. #endif
  1609. if (_context->err.callback)
  1610. _context->err.callback( _error );
  1611. }
  1612. }
  1613. }
  1614. static void REGAL_CALL error_glEvalCoord1fv(const GLfloat *u)
  1615. {
  1616. Internal("error_glEvalCoord1fv","()");
  1617. RegalContext *_context = REGAL_GET_CONTEXT();
  1618. RegalAssert(_context);
  1619. DispatchTableGL *_next = _context->dispatcher.error.next();
  1620. RegalAssert(_next);
  1621. GLenum _error = GL_NO_ERROR;
  1622. if (!_context->err.inBeginEnd)
  1623. _error = _next->call(&_next->glGetError)();
  1624. RegalAssert(_error==GL_NO_ERROR);
  1625. _next->call(&_next->glEvalCoord1fv)(u);
  1626. if (!_context->err.inBeginEnd) {
  1627. _error = _next->call(&_next->glGetError)();
  1628. if (_error!=GL_NO_ERROR) {
  1629. Error("glEvalCoord1fv : ",Token::GLerrorToString(_error));
  1630. #if REGAL_BREAK
  1631. Break::ErrorCB(_error);
  1632. #endif
  1633. if (_context->err.callback)
  1634. _context->err.callback( _error );
  1635. }
  1636. }
  1637. }
  1638. static void REGAL_CALL error_glEvalCoord2d(GLdouble u, GLdouble v)
  1639. {
  1640. Internal("error_glEvalCoord2d","()");
  1641. RegalContext *_context = REGAL_GET_CONTEXT();
  1642. RegalAssert(_context);
  1643. DispatchTableGL *_next = _context->dispatcher.error.next();
  1644. RegalAssert(_next);
  1645. GLenum _error = GL_NO_ERROR;
  1646. if (!_context->err.inBeginEnd)
  1647. _error = _next->call(&_next->glGetError)();
  1648. RegalAssert(_error==GL_NO_ERROR);
  1649. _next->call(&_next->glEvalCoord2d)(u, v);
  1650. if (!_context->err.inBeginEnd) {
  1651. _error = _next->call(&_next->glGetError)();
  1652. if (_error!=GL_NO_ERROR) {
  1653. Error("glEvalCoord2d : ",Token::GLerrorToString(_error));
  1654. #if REGAL_BREAK
  1655. Break::ErrorCB(_error);
  1656. #endif
  1657. if (_context->err.callback)
  1658. _context->err.callback( _error );
  1659. }
  1660. }
  1661. }
  1662. static void REGAL_CALL error_glEvalCoord2dv(const GLdouble *u)
  1663. {
  1664. Internal("error_glEvalCoord2dv","()");
  1665. RegalContext *_context = REGAL_GET_CONTEXT();
  1666. RegalAssert(_context);
  1667. DispatchTableGL *_next = _context->dispatcher.error.next();
  1668. RegalAssert(_next);
  1669. GLenum _error = GL_NO_ERROR;
  1670. if (!_context->err.inBeginEnd)
  1671. _error = _next->call(&_next->glGetError)();
  1672. RegalAssert(_error==GL_NO_ERROR);
  1673. _next->call(&_next->glEvalCoord2dv)(u);
  1674. if (!_context->err.inBeginEnd) {
  1675. _error = _next->call(&_next->glGetError)();
  1676. if (_error!=GL_NO_ERROR) {
  1677. Error("glEvalCoord2dv : ",Token::GLerrorToString(_error));
  1678. #if REGAL_BREAK
  1679. Break::ErrorCB(_error);
  1680. #endif
  1681. if (_context->err.callback)
  1682. _context->err.callback( _error );
  1683. }
  1684. }
  1685. }
  1686. static void REGAL_CALL error_glEvalCoord2f(GLfloat u, GLfloat v)
  1687. {
  1688. Internal("error_glEvalCoord2f","()");
  1689. RegalContext *_context = REGAL_GET_CONTEXT();
  1690. RegalAssert(_context);
  1691. DispatchTableGL *_next = _context->dispatcher.error.next();
  1692. RegalAssert(_next);
  1693. GLenum _error = GL_NO_ERROR;
  1694. if (!_context->err.inBeginEnd)
  1695. _error = _next->call(&_next->glGetError)();
  1696. RegalAssert(_error==GL_NO_ERROR);
  1697. _next->call(&_next->glEvalCoord2f)(u, v);
  1698. if (!_context->err.inBeginEnd) {
  1699. _error = _next->call(&_next->glGetError)();
  1700. if (_error!=GL_NO_ERROR) {
  1701. Error("glEvalCoord2f : ",Token::GLerrorToString(_error));
  1702. #if REGAL_BREAK
  1703. Break::ErrorCB(_error);
  1704. #endif
  1705. if (_context->err.callback)
  1706. _context->err.callback( _error );
  1707. }
  1708. }
  1709. }
  1710. static void REGAL_CALL error_glEvalCoord2fv(const GLfloat *u)
  1711. {
  1712. Internal("error_glEvalCoord2fv","()");
  1713. RegalContext *_context = REGAL_GET_CONTEXT();
  1714. RegalAssert(_context);
  1715. DispatchTableGL *_next = _context->dispatcher.error.next();
  1716. RegalAssert(_next);
  1717. GLenum _error = GL_NO_ERROR;
  1718. if (!_context->err.inBeginEnd)
  1719. _error = _next->call(&_next->glGetError)();
  1720. RegalAssert(_error==GL_NO_ERROR);
  1721. _next->call(&_next->glEvalCoord2fv)(u);
  1722. if (!_context->err.inBeginEnd) {
  1723. _error = _next->call(&_next->glGetError)();
  1724. if (_error!=GL_NO_ERROR) {
  1725. Error("glEvalCoord2fv : ",Token::GLerrorToString(_error));
  1726. #if REGAL_BREAK
  1727. Break::ErrorCB(_error);
  1728. #endif
  1729. if (_context->err.callback)
  1730. _context->err.callback( _error );
  1731. }
  1732. }
  1733. }
  1734. static void REGAL_CALL error_glEvalMesh1(GLenum mode, GLint i1, GLint i2)
  1735. {
  1736. Internal("error_glEvalMesh1","()");
  1737. RegalContext *_context = REGAL_GET_CONTEXT();
  1738. RegalAssert(_context);
  1739. DispatchTableGL *_next = _context->dispatcher.error.next();
  1740. RegalAssert(_next);
  1741. GLenum _error = GL_NO_ERROR;
  1742. if (!_context->err.inBeginEnd)
  1743. _error = _next->call(&_next->glGetError)();
  1744. RegalAssert(_error==GL_NO_ERROR);
  1745. _next->call(&_next->glEvalMesh1)(mode, i1, i2);
  1746. if (!_context->err.inBeginEnd) {
  1747. _error = _next->call(&_next->glGetError)();
  1748. if (_error!=GL_NO_ERROR) {
  1749. Error("glEvalMesh1 : ",Token::GLerrorToString(_error));
  1750. #if REGAL_BREAK
  1751. Break::ErrorCB(_error);
  1752. #endif
  1753. if (_context->err.callback)
  1754. _context->err.callback( _error );
  1755. }
  1756. }
  1757. }
  1758. static void REGAL_CALL error_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
  1759. {
  1760. Internal("error_glEvalMesh2","()");
  1761. RegalContext *_context = REGAL_GET_CONTEXT();
  1762. RegalAssert(_context);
  1763. DispatchTableGL *_next = _context->dispatcher.error.next();
  1764. RegalAssert(_next);
  1765. GLenum _error = GL_NO_ERROR;
  1766. if (!_context->err.inBeginEnd)
  1767. _error = _next->call(&_next->glGetError)();
  1768. RegalAssert(_error==GL_NO_ERROR);
  1769. _next->call(&_next->glEvalMesh2)(mode, i1, i2, j1, j2);
  1770. if (!_context->err.inBeginEnd) {
  1771. _error = _next->call(&_next->glGetError)();
  1772. if (_error!=GL_NO_ERROR) {
  1773. Error("glEvalMesh2 : ",Token::GLerrorToString(_error));
  1774. #if REGAL_BREAK
  1775. Break::ErrorCB(_error);
  1776. #endif
  1777. if (_context->err.callback)
  1778. _context->err.callback( _error );
  1779. }
  1780. }
  1781. }
  1782. static void REGAL_CALL error_glEvalPoint1(GLint i)
  1783. {
  1784. Internal("error_glEvalPoint1","()");
  1785. RegalContext *_context = REGAL_GET_CONTEXT();
  1786. RegalAssert(_context);
  1787. DispatchTableGL *_next = _context->dispatcher.error.next();
  1788. RegalAssert(_next);
  1789. GLenum _error = GL_NO_ERROR;
  1790. if (!_context->err.inBeginEnd)
  1791. _error = _next->call(&_next->glGetError)();
  1792. RegalAssert(_error==GL_NO_ERROR);
  1793. _next->call(&_next->glEvalPoint1)(i);
  1794. if (!_context->err.inBeginEnd) {
  1795. _error = _next->call(&_next->glGetError)();
  1796. if (_error!=GL_NO_ERROR) {
  1797. Error("glEvalPoint1 : ",Token::GLerrorToString(_error));
  1798. #if REGAL_BREAK
  1799. Break::ErrorCB(_error);
  1800. #endif
  1801. if (_context->err.callback)
  1802. _context->err.callback( _error );
  1803. }
  1804. }
  1805. }
  1806. static void REGAL_CALL error_glEvalPoint2(GLint i, GLint j)
  1807. {
  1808. Internal("error_glEvalPoint2","()");
  1809. RegalContext *_context = REGAL_GET_CONTEXT();
  1810. RegalAssert(_context);
  1811. DispatchTableGL *_next = _context->dispatcher.error.next();
  1812. RegalAssert(_next);
  1813. GLenum _error = GL_NO_ERROR;
  1814. if (!_context->err.inBeginEnd)
  1815. _error = _next->call(&_next->glGetError)();
  1816. RegalAssert(_error==GL_NO_ERROR);
  1817. _next->call(&_next->glEvalPoint2)(i, j);
  1818. if (!_context->err.inBeginEnd) {
  1819. _error = _next->call(&_next->glGetError)();
  1820. if (_error!=GL_NO_ERROR) {
  1821. Error("glEvalPoint2 : ",Token::GLerrorToString(_error));
  1822. #if REGAL_BREAK
  1823. Break::ErrorCB(_error);
  1824. #endif
  1825. if (_context->err.callback)
  1826. _context->err.callback( _error );
  1827. }
  1828. }
  1829. }
  1830. static void REGAL_CALL error_glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
  1831. {
  1832. Internal("error_glFeedbackBuffer","()");
  1833. RegalContext *_context = REGAL_GET_CONTEXT();
  1834. RegalAssert(_context);
  1835. DispatchTableGL *_next = _context->dispatcher.error.next();
  1836. RegalAssert(_next);
  1837. GLenum _error = GL_NO_ERROR;
  1838. if (!_context->err.inBeginEnd)
  1839. _error = _next->call(&_next->glGetError)();
  1840. RegalAssert(_error==GL_NO_ERROR);
  1841. _next->call(&_next->glFeedbackBuffer)(size, type, buffer);
  1842. if (!_context->err.inBeginEnd) {
  1843. _error = _next->call(&_next->glGetError)();
  1844. if (_error!=GL_NO_ERROR) {
  1845. Error("glFeedbackBuffer : ",Token::GLerrorToString(_error));
  1846. #if REGAL_BREAK
  1847. Break::ErrorCB(_error);
  1848. #endif
  1849. if (_context->err.callback)
  1850. _context->err.callback( _error );
  1851. }
  1852. }
  1853. }
  1854. static void REGAL_CALL error_glFinish(void)
  1855. {
  1856. Internal("error_glFinish","()");
  1857. RegalContext *_context = REGAL_GET_CONTEXT();
  1858. RegalAssert(_context);
  1859. DispatchTableGL *_next = _context->dispatcher.error.next();
  1860. RegalAssert(_next);
  1861. GLenum _error = GL_NO_ERROR;
  1862. if (!_context->err.inBeginEnd)
  1863. _error = _next->call(&_next->glGetError)();
  1864. RegalAssert(_error==GL_NO_ERROR);
  1865. _next->call(&_next->glFinish)();
  1866. if (!_context->err.inBeginEnd) {
  1867. _error = _next->call(&_next->glGetError)();
  1868. if (_error!=GL_NO_ERROR) {
  1869. Error("glFinish : ",Token::GLerrorToString(_error));
  1870. #if REGAL_BREAK
  1871. Break::ErrorCB(_error);
  1872. #endif
  1873. if (_context->err.callback)
  1874. _context->err.callback( _error );
  1875. }
  1876. }
  1877. }
  1878. static void REGAL_CALL error_glFlush(void)
  1879. {
  1880. Internal("error_glFlush","()");
  1881. RegalContext *_context = REGAL_GET_CONTEXT();
  1882. RegalAssert(_context);
  1883. DispatchTableGL *_next = _context->dispatcher.error.next();
  1884. RegalAssert(_next);
  1885. GLenum _error = GL_NO_ERROR;
  1886. if (!_context->err.inBeginEnd)
  1887. _error = _next->call(&_next->glGetError)();
  1888. RegalAssert(_error==GL_NO_ERROR);
  1889. _next->call(&_next->glFlush)();
  1890. if (!_context->err.inBeginEnd) {
  1891. _error = _next->call(&_next->glGetError)();
  1892. if (_error!=GL_NO_ERROR) {
  1893. Error("glFlush : ",Token::GLerrorToString(_error));
  1894. #if REGAL_BREAK
  1895. Break::ErrorCB(_error);
  1896. #endif
  1897. if (_context->err.callback)
  1898. _context->err.callback( _error );
  1899. }
  1900. }
  1901. }
  1902. static void REGAL_CALL error_glFogf(GLenum pname, GLfloat param)
  1903. {
  1904. Internal("error_glFogf","()");
  1905. RegalContext *_context = REGAL_GET_CONTEXT();
  1906. RegalAssert(_context);
  1907. DispatchTableGL *_next = _context->dispatcher.error.next();
  1908. RegalAssert(_next);
  1909. GLenum _error = GL_NO_ERROR;
  1910. if (!_context->err.inBeginEnd)
  1911. _error = _next->call(&_next->glGetError)();
  1912. RegalAssert(_error==GL_NO_ERROR);
  1913. _next->call(&_next->glFogf)(pname, param);
  1914. if (!_context->err.inBeginEnd) {
  1915. _error = _next->call(&_next->glGetError)();
  1916. if (_error!=GL_NO_ERROR) {
  1917. Error("glFogf : ",Token::GLerrorToString(_error));
  1918. #if REGAL_BREAK
  1919. Break::ErrorCB(_error);
  1920. #endif
  1921. if (_context->err.callback)
  1922. _context->err.callback( _error );
  1923. }
  1924. }
  1925. }
  1926. static void REGAL_CALL error_glFogfv(GLenum pname, const GLfloat *params)
  1927. {
  1928. Internal("error_glFogfv","()");
  1929. RegalContext *_context = REGAL_GET_CONTEXT();
  1930. RegalAssert(_context);
  1931. DispatchTableGL *_next = _context->dispatcher.error.next();
  1932. RegalAssert(_next);
  1933. GLenum _error = GL_NO_ERROR;
  1934. if (!_context->err.inBeginEnd)
  1935. _error = _next->call(&_next->glGetError)();
  1936. RegalAssert(_error==GL_NO_ERROR);
  1937. _next->call(&_next->glFogfv)(pname, params);
  1938. if (!_context->err.inBeginEnd) {
  1939. _error = _next->call(&_next->glGetError)();
  1940. if (_error!=GL_NO_ERROR) {
  1941. Error("glFogfv : ",Token::GLerrorToString(_error));
  1942. #if REGAL_BREAK
  1943. Break::ErrorCB(_error);
  1944. #endif
  1945. if (_context->err.callback)
  1946. _context->err.callback( _error );
  1947. }
  1948. }
  1949. }
  1950. static void REGAL_CALL error_glFogi(GLenum pname, GLint param)
  1951. {
  1952. Internal("error_glFogi","()");
  1953. RegalContext *_context = REGAL_GET_CONTEXT();
  1954. RegalAssert(_context);
  1955. DispatchTableGL *_next = _context->dispatcher.error.next();
  1956. RegalAssert(_next);
  1957. GLenum _error = GL_NO_ERROR;
  1958. if (!_context->err.inBeginEnd)
  1959. _error = _next->call(&_next->glGetError)();
  1960. RegalAssert(_error==GL_NO_ERROR);
  1961. _next->call(&_next->glFogi)(pname, param);
  1962. if (!_context->err.inBeginEnd) {
  1963. _error = _next->call(&_next->glGetError)();
  1964. if (_error!=GL_NO_ERROR) {
  1965. Error("glFogi : ",Token::GLerrorToString(_error));
  1966. #if REGAL_BREAK
  1967. Break::ErrorCB(_error);
  1968. #endif
  1969. if (_context->err.callback)
  1970. _context->err.callback( _error );
  1971. }
  1972. }
  1973. }
  1974. static void REGAL_CALL error_glFogiv(GLenum pname, const GLint *params)
  1975. {
  1976. Internal("error_glFogiv","()");
  1977. RegalContext *_context = REGAL_GET_CONTEXT();
  1978. RegalAssert(_context);
  1979. DispatchTableGL *_next = _context->dispatcher.error.next();
  1980. RegalAssert(_next);
  1981. GLenum _error = GL_NO_ERROR;
  1982. if (!_context->err.inBeginEnd)
  1983. _error = _next->call(&_next->glGetError)();
  1984. RegalAssert(_error==GL_NO_ERROR);
  1985. _next->call(&_next->glFogiv)(pname, params);
  1986. if (!_context->err.inBeginEnd) {
  1987. _error = _next->call(&_next->glGetError)();
  1988. if (_error!=GL_NO_ERROR) {
  1989. Error("glFogiv : ",Token::GLerrorToString(_error));
  1990. #if REGAL_BREAK
  1991. Break::ErrorCB(_error);
  1992. #endif
  1993. if (_context->err.callback)
  1994. _context->err.callback( _error );
  1995. }
  1996. }
  1997. }
  1998. static void REGAL_CALL error_glFrontFace(GLenum mode)
  1999. {
  2000. Internal("error_glFrontFace","()");
  2001. RegalContext *_context = REGAL_GET_CONTEXT();
  2002. RegalAssert(_context);
  2003. DispatchTableGL *_next = _context->dispatcher.error.next();
  2004. RegalAssert(_next);
  2005. GLenum _error = GL_NO_ERROR;
  2006. if (!_context->err.inBeginEnd)
  2007. _error = _next->call(&_next->glGetError)();
  2008. RegalAssert(_error==GL_NO_ERROR);
  2009. _next->call(&_next->glFrontFace)(mode);
  2010. if (!_context->err.inBeginEnd) {
  2011. _error = _next->call(&_next->glGetError)();
  2012. if (_error!=GL_NO_ERROR) {
  2013. Error("glFrontFace : ",Token::GLerrorToString(_error));
  2014. #if REGAL_BREAK
  2015. Break::ErrorCB(_error);
  2016. #endif
  2017. if (_context->err.callback)
  2018. _context->err.callback( _error );
  2019. }
  2020. }
  2021. }
  2022. static void REGAL_CALL error_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
  2023. {
  2024. Internal("error_glFrustum","()");
  2025. RegalContext *_context = REGAL_GET_CONTEXT();
  2026. RegalAssert(_context);
  2027. DispatchTableGL *_next = _context->dispatcher.error.next();
  2028. RegalAssert(_next);
  2029. GLenum _error = GL_NO_ERROR;
  2030. if (!_context->err.inBeginEnd)
  2031. _error = _next->call(&_next->glGetError)();
  2032. RegalAssert(_error==GL_NO_ERROR);
  2033. _next->call(&_next->glFrustum)(left, right, bottom, top, zNear, zFar);
  2034. if (!_context->err.inBeginEnd) {
  2035. _error = _next->call(&_next->glGetError)();
  2036. if (_error!=GL_NO_ERROR) {
  2037. Error("glFrustum : ",Token::GLerrorToString(_error));
  2038. #if REGAL_BREAK
  2039. Break::ErrorCB(_error);
  2040. #endif
  2041. if (_context->err.callback)
  2042. _context->err.callback( _error );
  2043. }
  2044. }
  2045. }
  2046. static GLuint REGAL_CALL error_glGenLists(GLsizei range)
  2047. {
  2048. Internal("error_glGenLists","()");
  2049. RegalContext *_context = REGAL_GET_CONTEXT();
  2050. RegalAssert(_context);
  2051. DispatchTableGL *_next = _context->dispatcher.error.next();
  2052. RegalAssert(_next);
  2053. GLenum _error = GL_NO_ERROR;
  2054. if (!_context->err.inBeginEnd)
  2055. _error = _next->call(&_next->glGetError)();
  2056. RegalAssert(_error==GL_NO_ERROR);
  2057. GLuint ret = _next->call(&_next->glGenLists)(range);
  2058. if (!_context->err.inBeginEnd) {
  2059. _error = _next->call(&_next->glGetError)();
  2060. if (_error!=GL_NO_ERROR) {
  2061. Error("glGenLists : ",Token::GLerrorToString(_error));
  2062. #if REGAL_BREAK
  2063. Break::ErrorCB(_error);
  2064. #endif
  2065. if (_context->err.callback)
  2066. _context->err.callback( _error );
  2067. }
  2068. }
  2069. return ret;
  2070. }
  2071. static void REGAL_CALL error_glGetBooleanv(GLenum pname, GLboolean *params)
  2072. {
  2073. Internal("error_glGetBooleanv","()");
  2074. RegalContext *_context = REGAL_GET_CONTEXT();
  2075. RegalAssert(_context);
  2076. DispatchTableGL *_next = _context->dispatcher.error.next();
  2077. RegalAssert(_next);
  2078. GLenum _error = GL_NO_ERROR;
  2079. if (!_context->err.inBeginEnd)
  2080. _error = _next->call(&_next->glGetError)();
  2081. RegalAssert(_error==GL_NO_ERROR);
  2082. _next->call(&_next->glGetBooleanv)(pname, params);
  2083. if (!_context->err.inBeginEnd) {
  2084. _error = _next->call(&_next->glGetError)();
  2085. if (_error!=GL_NO_ERROR) {
  2086. Error("glGetBooleanv : ",Token::GLerrorToString(_error));
  2087. #if REGAL_BREAK
  2088. Break::ErrorCB(_error);
  2089. #endif
  2090. if (_context->err.callback)
  2091. _context->err.callback( _error );
  2092. }
  2093. }
  2094. }
  2095. static void REGAL_CALL error_glGetClipPlane(GLenum plane, GLdouble *equation)
  2096. {
  2097. Internal("error_glGetClipPlane","()");
  2098. RegalContext *_context = REGAL_GET_CONTEXT();
  2099. RegalAssert(_context);
  2100. DispatchTableGL *_next = _context->dispatcher.error.next();
  2101. RegalAssert(_next);
  2102. GLenum _error = GL_NO_ERROR;
  2103. if (!_context->err.inBeginEnd)
  2104. _error = _next->call(&_next->glGetError)();
  2105. RegalAssert(_error==GL_NO_ERROR);
  2106. _next->call(&_next->glGetClipPlane)(plane, equation);
  2107. if (!_context->err.inBeginEnd) {
  2108. _error = _next->call(&_next->glGetError)();
  2109. if (_error!=GL_NO_ERROR) {
  2110. Error("glGetClipPlane : ",Token::GLerrorToString(_error));
  2111. #if REGAL_BREAK
  2112. Break::ErrorCB(_error);
  2113. #endif
  2114. if (_context->err.callback)
  2115. _context->err.callback( _error );
  2116. }
  2117. }
  2118. }
  2119. static void REGAL_CALL error_glGetDoublev(GLenum pname, GLdouble *params)
  2120. {
  2121. Internal("error_glGetDoublev","()");
  2122. RegalContext *_context = REGAL_GET_CONTEXT();
  2123. RegalAssert(_context);
  2124. DispatchTableGL *_next = _context->dispatcher.error.next();
  2125. RegalAssert(_next);
  2126. GLenum _error = GL_NO_ERROR;
  2127. if (!_context->err.inBeginEnd)
  2128. _error = _next->call(&_next->glGetError)();
  2129. RegalAssert(_error==GL_NO_ERROR);
  2130. _next->call(&_next->glGetDoublev)(pname, params);
  2131. if (!_context->err.inBeginEnd) {
  2132. _error = _next->call(&_next->glGetError)();
  2133. if (_error!=GL_NO_ERROR) {
  2134. Error("glGetDoublev : ",Token::GLerrorToString(_error));
  2135. #if REGAL_BREAK
  2136. Break::ErrorCB(_error);
  2137. #endif
  2138. if (_context->err.callback)
  2139. _context->err.callback( _error );
  2140. }
  2141. }
  2142. }
  2143. static GLenum REGAL_CALL error_glGetError(void)
  2144. {
  2145. Internal("error_glGetError","()");
  2146. RegalContext *_context = REGAL_GET_CONTEXT();
  2147. RegalAssert(_context);
  2148. DispatchTableGL *_next = _context->dispatcher.error.next();
  2149. RegalAssert(_next);
  2150. GLenum error = _next->call(&_next->glGetError)();
  2151. return error;
  2152. }
  2153. static void REGAL_CALL error_glGetFloatv(GLenum pname, GLfloat *params)
  2154. {
  2155. Internal("error_glGetFloatv","()");
  2156. RegalContext *_context = REGAL_GET_CONTEXT();
  2157. RegalAssert(_context);
  2158. DispatchTableGL *_next = _context->dispatcher.error.next();
  2159. RegalAssert(_next);
  2160. GLenum _error = GL_NO_ERROR;
  2161. if (!_context->err.inBeginEnd)
  2162. _error = _next->call(&_next->glGetError)();
  2163. RegalAssert(_error==GL_NO_ERROR);
  2164. _next->call(&_next->glGetFloatv)(pname, params);
  2165. if (!_context->err.inBeginEnd) {
  2166. _error = _next->call(&_next->glGetError)();
  2167. if (_error!=GL_NO_ERROR) {
  2168. Error("glGetFloatv : ",Token::GLerrorToString(_error));
  2169. #if REGAL_BREAK
  2170. Break::ErrorCB(_error);
  2171. #endif
  2172. if (_context->err.callback)
  2173. _context->err.callback( _error );
  2174. }
  2175. }
  2176. }
  2177. static void REGAL_CALL error_glGetIntegerv(GLenum pname, GLint *params)
  2178. {
  2179. Internal("error_glGetIntegerv","()");
  2180. RegalContext *_context = REGAL_GET_CONTEXT();
  2181. RegalAssert(_context);
  2182. DispatchTableGL *_next = _context->dispatcher.error.next();
  2183. RegalAssert(_next);
  2184. GLenum _error = GL_NO_ERROR;
  2185. if (!_context->err.inBeginEnd)
  2186. _error = _next->call(&_next->glGetError)();
  2187. RegalAssert(_error==GL_NO_ERROR);
  2188. _next->call(&_next->glGetIntegerv)(pname, params);
  2189. if (!_context->err.inBeginEnd) {
  2190. _error = _next->call(&_next->glGetError)();
  2191. if (_error!=GL_NO_ERROR) {
  2192. Error("glGetIntegerv : ",Token::GLerrorToString(_error));
  2193. #if REGAL_BREAK
  2194. Break::ErrorCB(_error);
  2195. #endif
  2196. if (_context->err.callback)
  2197. _context->err.callback( _error );
  2198. }
  2199. }
  2200. }
  2201. static void REGAL_CALL error_glGetLightfv(GLenum light, GLenum pname, GLfloat *params)
  2202. {
  2203. Internal("error_glGetLightfv","()");
  2204. RegalContext *_context = REGAL_GET_CONTEXT();
  2205. RegalAssert(_context);
  2206. DispatchTableGL *_next = _context->dispatcher.error.next();
  2207. RegalAssert(_next);
  2208. GLenum _error = GL_NO_ERROR;
  2209. if (!_context->err.inBeginEnd)
  2210. _error = _next->call(&_next->glGetError)();
  2211. RegalAssert(_error==GL_NO_ERROR);
  2212. _next->call(&_next->glGetLightfv)(light, pname, params);
  2213. if (!_context->err.inBeginEnd) {
  2214. _error = _next->call(&_next->glGetError)();
  2215. if (_error!=GL_NO_ERROR) {
  2216. Error("glGetLightfv : ",Token::GLerrorToString(_error));
  2217. #if REGAL_BREAK
  2218. Break::ErrorCB(_error);
  2219. #endif
  2220. if (_context->err.callback)
  2221. _context->err.callback( _error );
  2222. }
  2223. }
  2224. }
  2225. static void REGAL_CALL error_glGetLightiv(GLenum light, GLenum pname, GLint *params)
  2226. {
  2227. Internal("error_glGetLightiv","()");
  2228. RegalContext *_context = REGAL_GET_CONTEXT();
  2229. RegalAssert(_context);
  2230. DispatchTableGL *_next = _context->dispatcher.error.next();
  2231. RegalAssert(_next);
  2232. GLenum _error = GL_NO_ERROR;
  2233. if (!_context->err.inBeginEnd)
  2234. _error = _next->call(&_next->glGetError)();
  2235. RegalAssert(_error==GL_NO_ERROR);
  2236. _next->call(&_next->glGetLightiv)(light, pname, params);
  2237. if (!_context->err.inBeginEnd) {
  2238. _error = _next->call(&_next->glGetError)();
  2239. if (_error!=GL_NO_ERROR) {
  2240. Error("glGetLightiv : ",Token::GLerrorToString(_error));
  2241. #if REGAL_BREAK
  2242. Break::ErrorCB(_error);
  2243. #endif
  2244. if (_context->err.callback)
  2245. _context->err.callback( _error );
  2246. }
  2247. }
  2248. }
  2249. static void REGAL_CALL error_glGetMapdv(GLenum target, GLenum query, GLdouble *v)
  2250. {
  2251. Internal("error_glGetMapdv","()");
  2252. RegalContext *_context = REGAL_GET_CONTEXT();
  2253. RegalAssert(_context);
  2254. DispatchTableGL *_next = _context->dispatcher.error.next();
  2255. RegalAssert(_next);
  2256. GLenum _error = GL_NO_ERROR;
  2257. if (!_context->err.inBeginEnd)
  2258. _error = _next->call(&_next->glGetError)();
  2259. RegalAssert(_error==GL_NO_ERROR);
  2260. _next->call(&_next->glGetMapdv)(target, query, v);
  2261. if (!_context->err.inBeginEnd) {
  2262. _error = _next->call(&_next->glGetError)();
  2263. if (_error!=GL_NO_ERROR) {
  2264. Error("glGetMapdv : ",Token::GLerrorToString(_error));
  2265. #if REGAL_BREAK
  2266. Break::ErrorCB(_error);
  2267. #endif
  2268. if (_context->err.callback)
  2269. _context->err.callback( _error );
  2270. }
  2271. }
  2272. }
  2273. static void REGAL_CALL error_glGetMapfv(GLenum target, GLenum query, GLfloat *v)
  2274. {
  2275. Internal("error_glGetMapfv","()");
  2276. RegalContext *_context = REGAL_GET_CONTEXT();
  2277. RegalAssert(_context);
  2278. DispatchTableGL *_next = _context->dispatcher.error.next();
  2279. RegalAssert(_next);
  2280. GLenum _error = GL_NO_ERROR;
  2281. if (!_context->err.inBeginEnd)
  2282. _error = _next->call(&_next->glGetError)();
  2283. RegalAssert(_error==GL_NO_ERROR);
  2284. _next->call(&_next->glGetMapfv)(target, query, v);
  2285. if (!_context->err.inBeginEnd) {
  2286. _error = _next->call(&_next->glGetError)();
  2287. if (_error!=GL_NO_ERROR) {
  2288. Error("glGetMapfv : ",Token::GLerrorToString(_error));
  2289. #if REGAL_BREAK
  2290. Break::ErrorCB(_error);
  2291. #endif
  2292. if (_context->err.callback)
  2293. _context->err.callback( _error );
  2294. }
  2295. }
  2296. }
  2297. static void REGAL_CALL error_glGetMapiv(GLenum target, GLenum query, GLint *v)
  2298. {
  2299. Internal("error_glGetMapiv","()");
  2300. RegalContext *_context = REGAL_GET_CONTEXT();
  2301. RegalAssert(_context);
  2302. DispatchTableGL *_next = _context->dispatcher.error.next();
  2303. RegalAssert(_next);
  2304. GLenum _error = GL_NO_ERROR;
  2305. if (!_context->err.inBeginEnd)
  2306. _error = _next->call(&_next->glGetError)();
  2307. RegalAssert(_error==GL_NO_ERROR);
  2308. _next->call(&_next->glGetMapiv)(target, query, v);
  2309. if (!_context->err.inBeginEnd) {
  2310. _error = _next->call(&_next->glGetError)();
  2311. if (_error!=GL_NO_ERROR) {
  2312. Error("glGetMapiv : ",Token::GLerrorToString(_error));
  2313. #if REGAL_BREAK
  2314. Break::ErrorCB(_error);
  2315. #endif
  2316. if (_context->err.callback)
  2317. _context->err.callback( _error );
  2318. }
  2319. }
  2320. }
  2321. static void REGAL_CALL error_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
  2322. {
  2323. Internal("error_glGetMaterialfv","()");
  2324. RegalContext *_context = REGAL_GET_CONTEXT();
  2325. RegalAssert(_context);
  2326. DispatchTableGL *_next = _context->dispatcher.error.next();
  2327. RegalAssert(_next);
  2328. GLenum _error = GL_NO_ERROR;
  2329. if (!_context->err.inBeginEnd)
  2330. _error = _next->call(&_next->glGetError)();
  2331. RegalAssert(_error==GL_NO_ERROR);
  2332. _next->call(&_next->glGetMaterialfv)(face, pname, params);
  2333. if (!_context->err.inBeginEnd) {
  2334. _error = _next->call(&_next->glGetError)();
  2335. if (_error!=GL_NO_ERROR) {
  2336. Error("glGetMaterialfv : ",Token::GLerrorToString(_error));
  2337. #if REGAL_BREAK
  2338. Break::ErrorCB(_error);
  2339. #endif
  2340. if (_context->err.callback)
  2341. _context->err.callback( _error );
  2342. }
  2343. }
  2344. }
  2345. static void REGAL_CALL error_glGetMaterialiv(GLenum face, GLenum pname, GLint *params)
  2346. {
  2347. Internal("error_glGetMaterialiv","()");
  2348. RegalContext *_context = REGAL_GET_CONTEXT();
  2349. RegalAssert(_context);
  2350. DispatchTableGL *_next = _context->dispatcher.error.next();
  2351. RegalAssert(_next);
  2352. GLenum _error = GL_NO_ERROR;
  2353. if (!_context->err.inBeginEnd)
  2354. _error = _next->call(&_next->glGetError)();
  2355. RegalAssert(_error==GL_NO_ERROR);
  2356. _next->call(&_next->glGetMaterialiv)(face, pname, params);
  2357. if (!_context->err.inBeginEnd) {
  2358. _error = _next->call(&_next->glGetError)();
  2359. if (_error!=GL_NO_ERROR) {
  2360. Error("glGetMaterialiv : ",Token::GLerrorToString(_error));
  2361. #if REGAL_BREAK
  2362. Break::ErrorCB(_error);
  2363. #endif
  2364. if (_context->err.callback)
  2365. _context->err.callback( _error );
  2366. }
  2367. }
  2368. }
  2369. static void REGAL_CALL error_glGetPixelMapfv(GLenum map, GLfloat *values)
  2370. {
  2371. Internal("error_glGetPixelMapfv","()");
  2372. RegalContext *_context = REGAL_GET_CONTEXT();
  2373. RegalAssert(_context);
  2374. DispatchTableGL *_next = _context->dispatcher.error.next();
  2375. RegalAssert(_next);
  2376. GLenum _error = GL_NO_ERROR;
  2377. if (!_context->err.inBeginEnd)
  2378. _error = _next->call(&_next->glGetError)();
  2379. RegalAssert(_error==GL_NO_ERROR);
  2380. _next->call(&_next->glGetPixelMapfv)(map, values);
  2381. if (!_context->err.inBeginEnd) {
  2382. _error = _next->call(&_next->glGetError)();
  2383. if (_error!=GL_NO_ERROR) {
  2384. Error("glGetPixelMapfv : ",Token::GLerrorToString(_error));
  2385. #if REGAL_BREAK
  2386. Break::ErrorCB(_error);
  2387. #endif
  2388. if (_context->err.callback)
  2389. _context->err.callback( _error );
  2390. }
  2391. }
  2392. }
  2393. static void REGAL_CALL error_glGetPixelMapuiv(GLenum map, GLuint *values)
  2394. {
  2395. Internal("error_glGetPixelMapuiv","()");
  2396. RegalContext *_context = REGAL_GET_CONTEXT();
  2397. RegalAssert(_context);
  2398. DispatchTableGL *_next = _context->dispatcher.error.next();
  2399. RegalAssert(_next);
  2400. GLenum _error = GL_NO_ERROR;
  2401. if (!_context->err.inBeginEnd)
  2402. _error = _next->call(&_next->glGetError)();
  2403. RegalAssert(_error==GL_NO_ERROR);
  2404. _next->call(&_next->glGetPixelMapuiv)(map, values);
  2405. if (!_context->err.inBeginEnd) {
  2406. _error = _next->call(&_next->glGetError)();
  2407. if (_error!=GL_NO_ERROR) {
  2408. Error("glGetPixelMapuiv : ",Token::GLerrorToString(_error));
  2409. #if REGAL_BREAK
  2410. Break::ErrorCB(_error);
  2411. #endif
  2412. if (_context->err.callback)
  2413. _context->err.callback( _error );
  2414. }
  2415. }
  2416. }
  2417. static void REGAL_CALL error_glGetPixelMapusv(GLenum map, GLushort *values)
  2418. {
  2419. Internal("error_glGetPixelMapusv","()");
  2420. RegalContext *_context = REGAL_GET_CONTEXT();
  2421. RegalAssert(_context);
  2422. DispatchTableGL *_next = _context->dispatcher.error.next();
  2423. RegalAssert(_next);
  2424. GLenum _error = GL_NO_ERROR;
  2425. if (!_context->err.inBeginEnd)
  2426. _error = _next->call(&_next->glGetError)();
  2427. RegalAssert(_error==GL_NO_ERROR);
  2428. _next->call(&_next->glGetPixelMapusv)(map, values);
  2429. if (!_context->err.inBeginEnd) {
  2430. _error = _next->call(&_next->glGetError)();
  2431. if (_error!=GL_NO_ERROR) {
  2432. Error("glGetPixelMapusv : ",Token::GLerrorToString(_error));
  2433. #if REGAL_BREAK
  2434. Break::ErrorCB(_error);
  2435. #endif
  2436. if (_context->err.callback)
  2437. _context->err.callback( _error );
  2438. }
  2439. }
  2440. }
  2441. static void REGAL_CALL error_glGetPolygonStipple(GLubyte *mask)
  2442. {
  2443. Internal("error_glGetPolygonStipple","()");
  2444. RegalContext *_context = REGAL_GET_CONTEXT();
  2445. RegalAssert(_context);
  2446. DispatchTableGL *_next = _context->dispatcher.error.next();
  2447. RegalAssert(_next);
  2448. GLenum _error = GL_NO_ERROR;
  2449. if (!_context->err.inBeginEnd)
  2450. _error = _next->call(&_next->glGetError)();
  2451. RegalAssert(_error==GL_NO_ERROR);
  2452. _next->call(&_next->glGetPolygonStipple)(mask);
  2453. if (!_context->err.inBeginEnd) {
  2454. _error = _next->call(&_next->glGetError)();
  2455. if (_error!=GL_NO_ERROR) {
  2456. Error("glGetPolygonStipple : ",Token::GLerrorToString(_error));
  2457. #if REGAL_BREAK
  2458. Break::ErrorCB(_error);
  2459. #endif
  2460. if (_context->err.callback)
  2461. _context->err.callback( _error );
  2462. }
  2463. }
  2464. }
  2465. static const GLubyte *REGAL_CALL error_glGetString(GLenum name)
  2466. {
  2467. Internal("error_glGetString","()");
  2468. RegalContext *_context = REGAL_GET_CONTEXT();
  2469. RegalAssert(_context);
  2470. DispatchTableGL *_next = _context->dispatcher.error.next();
  2471. RegalAssert(_next);
  2472. GLenum _error = GL_NO_ERROR;
  2473. if (!_context->err.inBeginEnd)
  2474. _error = _next->call(&_next->glGetError)();
  2475. RegalAssert(_error==GL_NO_ERROR);
  2476. const GLubyte * ret = _next->call(&_next->glGetString)(name);
  2477. if (!_context->err.inBeginEnd) {
  2478. _error = _next->call(&_next->glGetError)();
  2479. if (_error!=GL_NO_ERROR) {
  2480. Error("glGetString : ",Token::GLerrorToString(_error));
  2481. #if REGAL_BREAK
  2482. Break::ErrorCB(_error);
  2483. #endif
  2484. if (_context->err.callback)
  2485. _context->err.callback( _error );
  2486. }
  2487. }
  2488. return ret;
  2489. }
  2490. static void REGAL_CALL error_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
  2491. {
  2492. Internal("error_glGetTexEnvfv","()");
  2493. RegalContext *_context = REGAL_GET_CONTEXT();
  2494. RegalAssert(_context);
  2495. DispatchTableGL *_next = _context->dispatcher.error.next();
  2496. RegalAssert(_next);
  2497. GLenum _error = GL_NO_ERROR;
  2498. if (!_context->err.inBeginEnd)
  2499. _error = _next->call(&_next->glGetError)();
  2500. RegalAssert(_error==GL_NO_ERROR);
  2501. _next->call(&_next->glGetTexEnvfv)(target, pname, params);
  2502. if (!_context->err.inBeginEnd) {
  2503. _error = _next->call(&_next->glGetError)();
  2504. if (_error!=GL_NO_ERROR) {
  2505. Error("glGetTexEnvfv : ",Token::GLerrorToString(_error));
  2506. #if REGAL_BREAK
  2507. Break::ErrorCB(_error);
  2508. #endif
  2509. if (_context->err.callback)
  2510. _context->err.callback( _error );
  2511. }
  2512. }
  2513. }
  2514. static void REGAL_CALL error_glGetTexEnviv(GLenum target, GLenum pname, GLint *params)
  2515. {
  2516. Internal("error_glGetTexEnviv","()");
  2517. RegalContext *_context = REGAL_GET_CONTEXT();
  2518. RegalAssert(_context);
  2519. DispatchTableGL *_next = _context->dispatcher.error.next();
  2520. RegalAssert(_next);
  2521. GLenum _error = GL_NO_ERROR;
  2522. if (!_context->err.inBeginEnd)
  2523. _error = _next->call(&_next->glGetError)();
  2524. RegalAssert(_error==GL_NO_ERROR);
  2525. _next->call(&_next->glGetTexEnviv)(target, pname, params);
  2526. if (!_context->err.inBeginEnd) {
  2527. _error = _next->call(&_next->glGetError)();
  2528. if (_error!=GL_NO_ERROR) {
  2529. Error("glGetTexEnviv : ",Token::GLerrorToString(_error));
  2530. #if REGAL_BREAK
  2531. Break::ErrorCB(_error);
  2532. #endif
  2533. if (_context->err.callback)
  2534. _context->err.callback( _error );
  2535. }
  2536. }
  2537. }
  2538. static void REGAL_CALL error_glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
  2539. {
  2540. Internal("error_glGetTexGendv","()");
  2541. RegalContext *_context = REGAL_GET_CONTEXT();
  2542. RegalAssert(_context);
  2543. DispatchTableGL *_next = _context->dispatcher.error.next();
  2544. RegalAssert(_next);
  2545. GLenum _error = GL_NO_ERROR;
  2546. if (!_context->err.inBeginEnd)
  2547. _error = _next->call(&_next->glGetError)();
  2548. RegalAssert(_error==GL_NO_ERROR);
  2549. _next->call(&_next->glGetTexGendv)(coord, pname, params);
  2550. if (!_context->err.inBeginEnd) {
  2551. _error = _next->call(&_next->glGetError)();
  2552. if (_error!=GL_NO_ERROR) {
  2553. Error("glGetTexGendv : ",Token::GLerrorToString(_error));
  2554. #if REGAL_BREAK
  2555. Break::ErrorCB(_error);
  2556. #endif
  2557. if (_context->err.callback)
  2558. _context->err.callback( _error );
  2559. }
  2560. }
  2561. }
  2562. static void REGAL_CALL error_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
  2563. {
  2564. Internal("error_glGetTexGenfv","()");
  2565. RegalContext *_context = REGAL_GET_CONTEXT();
  2566. RegalAssert(_context);
  2567. DispatchTableGL *_next = _context->dispatcher.error.next();
  2568. RegalAssert(_next);
  2569. GLenum _error = GL_NO_ERROR;
  2570. if (!_context->err.inBeginEnd)
  2571. _error = _next->call(&_next->glGetError)();
  2572. RegalAssert(_error==GL_NO_ERROR);
  2573. _next->call(&_next->glGetTexGenfv)(coord, pname, params);
  2574. if (!_context->err.inBeginEnd) {
  2575. _error = _next->call(&_next->glGetError)();
  2576. if (_error!=GL_NO_ERROR) {
  2577. Error("glGetTexGenfv : ",Token::GLerrorToString(_error));
  2578. #if REGAL_BREAK
  2579. Break::ErrorCB(_error);
  2580. #endif
  2581. if (_context->err.callback)
  2582. _context->err.callback( _error );
  2583. }
  2584. }
  2585. }
  2586. static void REGAL_CALL error_glGetTexGeniv(GLenum coord, GLenum pname, GLint *params)
  2587. {
  2588. Internal("error_glGetTexGeniv","()");
  2589. RegalContext *_context = REGAL_GET_CONTEXT();
  2590. RegalAssert(_context);
  2591. DispatchTableGL *_next = _context->dispatcher.error.next();
  2592. RegalAssert(_next);
  2593. GLenum _error = GL_NO_ERROR;
  2594. if (!_context->err.inBeginEnd)
  2595. _error = _next->call(&_next->glGetError)();
  2596. RegalAssert(_error==GL_NO_ERROR);
  2597. _next->call(&_next->glGetTexGeniv)(coord, pname, params);
  2598. if (!_context->err.inBeginEnd) {
  2599. _error = _next->call(&_next->glGetError)();
  2600. if (_error!=GL_NO_ERROR) {
  2601. Error("glGetTexGeniv : ",Token::GLerrorToString(_error));
  2602. #if REGAL_BREAK
  2603. Break::ErrorCB(_error);
  2604. #endif
  2605. if (_context->err.callback)
  2606. _context->err.callback( _error );
  2607. }
  2608. }
  2609. }
  2610. static void REGAL_CALL error_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)
  2611. {
  2612. Internal("error_glGetTexImage","()");
  2613. RegalContext *_context = REGAL_GET_CONTEXT();
  2614. RegalAssert(_context);
  2615. DispatchTableGL *_next = _context->dispatcher.error.next();
  2616. RegalAssert(_next);
  2617. GLenum _error = GL_NO_ERROR;
  2618. if (!_context->err.inBeginEnd)
  2619. _error = _next->call(&_next->glGetError)();
  2620. RegalAssert(_error==GL_NO_ERROR);
  2621. _next->call(&_next->glGetTexImage)(target, level, format, type, pixels);
  2622. if (!_context->err.inBeginEnd) {
  2623. _error = _next->call(&_next->glGetError)();
  2624. if (_error!=GL_NO_ERROR) {
  2625. Error("glGetTexImage : ",Token::GLerrorToString(_error));
  2626. #if REGAL_BREAK
  2627. Break::ErrorCB(_error);
  2628. #endif
  2629. if (_context->err.callback)
  2630. _context->err.callback( _error );
  2631. }
  2632. }
  2633. }
  2634. static void REGAL_CALL error_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
  2635. {
  2636. Internal("error_glGetTexLevelParameterfv","()");
  2637. RegalContext *_context = REGAL_GET_CONTEXT();
  2638. RegalAssert(_context);
  2639. DispatchTableGL *_next = _context->dispatcher.error.next();
  2640. RegalAssert(_next);
  2641. GLenum _error = GL_NO_ERROR;
  2642. if (!_context->err.inBeginEnd)
  2643. _error = _next->call(&_next->glGetError)();
  2644. RegalAssert(_error==GL_NO_ERROR);
  2645. _next->call(&_next->glGetTexLevelParameterfv)(target, level, pname, params);
  2646. if (!_context->err.inBeginEnd) {
  2647. _error = _next->call(&_next->glGetError)();
  2648. if (_error!=GL_NO_ERROR) {
  2649. Error("glGetTexLevelParameterfv : ",Token::GLerrorToString(_error));
  2650. #if REGAL_BREAK
  2651. Break::ErrorCB(_error);
  2652. #endif
  2653. if (_context->err.callback)
  2654. _context->err.callback( _error );
  2655. }
  2656. }
  2657. }
  2658. static void REGAL_CALL error_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
  2659. {
  2660. Internal("error_glGetTexLevelParameteriv","()");
  2661. RegalContext *_context = REGAL_GET_CONTEXT();
  2662. RegalAssert(_context);
  2663. DispatchTableGL *_next = _context->dispatcher.error.next();
  2664. RegalAssert(_next);
  2665. GLenum _error = GL_NO_ERROR;
  2666. if (!_context->err.inBeginEnd)
  2667. _error = _next->call(&_next->glGetError)();
  2668. RegalAssert(_error==GL_NO_ERROR);
  2669. _next->call(&_next->glGetTexLevelParameteriv)(target, level, pname, params);
  2670. if (!_context->err.inBeginEnd) {
  2671. _error = _next->call(&_next->glGetError)();
  2672. if (_error!=GL_NO_ERROR) {
  2673. Error("glGetTexLevelParameteriv : ",Token::GLerrorToString(_error));
  2674. #if REGAL_BREAK
  2675. Break::ErrorCB(_error);
  2676. #endif
  2677. if (_context->err.callback)
  2678. _context->err.callback( _error );
  2679. }
  2680. }
  2681. }
  2682. static void REGAL_CALL error_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
  2683. {
  2684. Internal("error_glGetTexParameterfv","()");
  2685. RegalContext *_context = REGAL_GET_CONTEXT();
  2686. RegalAssert(_context);
  2687. DispatchTableGL *_next = _context->dispatcher.error.next();
  2688. RegalAssert(_next);
  2689. GLenum _error = GL_NO_ERROR;
  2690. if (!_context->err.inBeginEnd)
  2691. _error = _next->call(&_next->glGetError)();
  2692. RegalAssert(_error==GL_NO_ERROR);
  2693. _next->call(&_next->glGetTexParameterfv)(target, pname, params);
  2694. if (!_context->err.inBeginEnd) {
  2695. _error = _next->call(&_next->glGetError)();
  2696. if (_error!=GL_NO_ERROR) {
  2697. Error("glGetTexParameterfv : ",Token::GLerrorToString(_error));
  2698. #if REGAL_BREAK
  2699. Break::ErrorCB(_error);
  2700. #endif
  2701. if (_context->err.callback)
  2702. _context->err.callback( _error );
  2703. }
  2704. }
  2705. }
  2706. static void REGAL_CALL error_glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
  2707. {
  2708. Internal("error_glGetTexParameteriv","()");
  2709. RegalContext *_context = REGAL_GET_CONTEXT();
  2710. RegalAssert(_context);
  2711. DispatchTableGL *_next = _context->dispatcher.error.next();
  2712. RegalAssert(_next);
  2713. GLenum _error = GL_NO_ERROR;
  2714. if (!_context->err.inBeginEnd)
  2715. _error = _next->call(&_next->glGetError)();
  2716. RegalAssert(_error==GL_NO_ERROR);
  2717. _next->call(&_next->glGetTexParameteriv)(target, pname, params);
  2718. if (!_context->err.inBeginEnd) {
  2719. _error = _next->call(&_next->glGetError)();
  2720. if (_error!=GL_NO_ERROR) {
  2721. Error("glGetTexParameteriv : ",Token::GLerrorToString(_error));
  2722. #if REGAL_BREAK
  2723. Break::ErrorCB(_error);
  2724. #endif
  2725. if (_context->err.callback)
  2726. _context->err.callback( _error );
  2727. }
  2728. }
  2729. }
  2730. static void REGAL_CALL error_glHint(GLenum target, GLenum mode)
  2731. {
  2732. Internal("error_glHint","()");
  2733. RegalContext *_context = REGAL_GET_CONTEXT();
  2734. RegalAssert(_context);
  2735. DispatchTableGL *_next = _context->dispatcher.error.next();
  2736. RegalAssert(_next);
  2737. GLenum _error = GL_NO_ERROR;
  2738. if (!_context->err.inBeginEnd)
  2739. _error = _next->call(&_next->glGetError)();
  2740. RegalAssert(_error==GL_NO_ERROR);
  2741. _next->call(&_next->glHint)(target, mode);
  2742. if (!_context->err.inBeginEnd) {
  2743. _error = _next->call(&_next->glGetError)();
  2744. if (_error!=GL_NO_ERROR) {
  2745. Error("glHint : ",Token::GLerrorToString(_error));
  2746. #if REGAL_BREAK
  2747. Break::ErrorCB(_error);
  2748. #endif
  2749. if (_context->err.callback)
  2750. _context->err.callback( _error );
  2751. }
  2752. }
  2753. }
  2754. static void REGAL_CALL error_glIndexMask(GLuint mask)
  2755. {
  2756. Internal("error_glIndexMask","()");
  2757. RegalContext *_context = REGAL_GET_CONTEXT();
  2758. RegalAssert(_context);
  2759. DispatchTableGL *_next = _context->dispatcher.error.next();
  2760. RegalAssert(_next);
  2761. GLenum _error = GL_NO_ERROR;
  2762. if (!_context->err.inBeginEnd)
  2763. _error = _next->call(&_next->glGetError)();
  2764. RegalAssert(_error==GL_NO_ERROR);
  2765. _next->call(&_next->glIndexMask)(mask);
  2766. if (!_context->err.inBeginEnd) {
  2767. _error = _next->call(&_next->glGetError)();
  2768. if (_error!=GL_NO_ERROR) {
  2769. Error("glIndexMask : ",Token::GLerrorToString(_error));
  2770. #if REGAL_BREAK
  2771. Break::ErrorCB(_error);
  2772. #endif
  2773. if (_context->err.callback)
  2774. _context->err.callback( _error );
  2775. }
  2776. }
  2777. }
  2778. static void REGAL_CALL error_glIndexd(GLdouble c)
  2779. {
  2780. Internal("error_glIndexd","()");
  2781. RegalContext *_context = REGAL_GET_CONTEXT();
  2782. RegalAssert(_context);
  2783. DispatchTableGL *_next = _context->dispatcher.error.next();
  2784. RegalAssert(_next);
  2785. GLenum _error = GL_NO_ERROR;
  2786. if (!_context->err.inBeginEnd)
  2787. _error = _next->call(&_next->glGetError)();
  2788. RegalAssert(_error==GL_NO_ERROR);
  2789. _next->call(&_next->glIndexd)(c);
  2790. if (!_context->err.inBeginEnd) {
  2791. _error = _next->call(&_next->glGetError)();
  2792. if (_error!=GL_NO_ERROR) {
  2793. Error("glIndexd : ",Token::GLerrorToString(_error));
  2794. #if REGAL_BREAK
  2795. Break::ErrorCB(_error);
  2796. #endif
  2797. if (_context->err.callback)
  2798. _context->err.callback( _error );
  2799. }
  2800. }
  2801. }
  2802. static void REGAL_CALL error_glIndexdv(const GLdouble *c)
  2803. {
  2804. Internal("error_glIndexdv","()");
  2805. RegalContext *_context = REGAL_GET_CONTEXT();
  2806. RegalAssert(_context);
  2807. DispatchTableGL *_next = _context->dispatcher.error.next();
  2808. RegalAssert(_next);
  2809. GLenum _error = GL_NO_ERROR;
  2810. if (!_context->err.inBeginEnd)
  2811. _error = _next->call(&_next->glGetError)();
  2812. RegalAssert(_error==GL_NO_ERROR);
  2813. _next->call(&_next->glIndexdv)(c);
  2814. if (!_context->err.inBeginEnd) {
  2815. _error = _next->call(&_next->glGetError)();
  2816. if (_error!=GL_NO_ERROR) {
  2817. Error("glIndexdv : ",Token::GLerrorToString(_error));
  2818. #if REGAL_BREAK
  2819. Break::ErrorCB(_error);
  2820. #endif
  2821. if (_context->err.callback)
  2822. _context->err.callback( _error );
  2823. }
  2824. }
  2825. }
  2826. static void REGAL_CALL error_glIndexf(GLfloat c)
  2827. {
  2828. Internal("error_glIndexf","()");
  2829. RegalContext *_context = REGAL_GET_CONTEXT();
  2830. RegalAssert(_context);
  2831. DispatchTableGL *_next = _context->dispatcher.error.next();
  2832. RegalAssert(_next);
  2833. GLenum _error = GL_NO_ERROR;
  2834. if (!_context->err.inBeginEnd)
  2835. _error = _next->call(&_next->glGetError)();
  2836. RegalAssert(_error==GL_NO_ERROR);
  2837. _next->call(&_next->glIndexf)(c);
  2838. if (!_context->err.inBeginEnd) {
  2839. _error = _next->call(&_next->glGetError)();
  2840. if (_error!=GL_NO_ERROR) {
  2841. Error("glIndexf : ",Token::GLerrorToString(_error));
  2842. #if REGAL_BREAK
  2843. Break::ErrorCB(_error);
  2844. #endif
  2845. if (_context->err.callback)
  2846. _context->err.callback( _error );
  2847. }
  2848. }
  2849. }
  2850. static void REGAL_CALL error_glIndexfv(const GLfloat *c)
  2851. {
  2852. Internal("error_glIndexfv","()");
  2853. RegalContext *_context = REGAL_GET_CONTEXT();
  2854. RegalAssert(_context);
  2855. DispatchTableGL *_next = _context->dispatcher.error.next();
  2856. RegalAssert(_next);
  2857. GLenum _error = GL_NO_ERROR;
  2858. if (!_context->err.inBeginEnd)
  2859. _error = _next->call(&_next->glGetError)();
  2860. RegalAssert(_error==GL_NO_ERROR);
  2861. _next->call(&_next->glIndexfv)(c);
  2862. if (!_context->err.inBeginEnd) {
  2863. _error = _next->call(&_next->glGetError)();
  2864. if (_error!=GL_NO_ERROR) {
  2865. Error("glIndexfv : ",Token::GLerrorToString(_error));
  2866. #if REGAL_BREAK
  2867. Break::ErrorCB(_error);
  2868. #endif
  2869. if (_context->err.callback)
  2870. _context->err.callback( _error );
  2871. }
  2872. }
  2873. }
  2874. static void REGAL_CALL error_glIndexi(GLint c)
  2875. {
  2876. Internal("error_glIndexi","()");
  2877. RegalContext *_context = REGAL_GET_CONTEXT();
  2878. RegalAssert(_context);
  2879. DispatchTableGL *_next = _context->dispatcher.error.next();
  2880. RegalAssert(_next);
  2881. GLenum _error = GL_NO_ERROR;
  2882. if (!_context->err.inBeginEnd)
  2883. _error = _next->call(&_next->glGetError)();
  2884. RegalAssert(_error==GL_NO_ERROR);
  2885. _next->call(&_next->glIndexi)(c);
  2886. if (!_context->err.inBeginEnd) {
  2887. _error = _next->call(&_next->glGetError)();
  2888. if (_error!=GL_NO_ERROR) {
  2889. Error("glIndexi : ",Token::GLerrorToString(_error));
  2890. #if REGAL_BREAK
  2891. Break::ErrorCB(_error);
  2892. #endif
  2893. if (_context->err.callback)
  2894. _context->err.callback( _error );
  2895. }
  2896. }
  2897. }
  2898. static void REGAL_CALL error_glIndexiv(const GLint *c)
  2899. {
  2900. Internal("error_glIndexiv","()");
  2901. RegalContext *_context = REGAL_GET_CONTEXT();
  2902. RegalAssert(_context);
  2903. DispatchTableGL *_next = _context->dispatcher.error.next();
  2904. RegalAssert(_next);
  2905. GLenum _error = GL_NO_ERROR;
  2906. if (!_context->err.inBeginEnd)
  2907. _error = _next->call(&_next->glGetError)();
  2908. RegalAssert(_error==GL_NO_ERROR);
  2909. _next->call(&_next->glIndexiv)(c);
  2910. if (!_context->err.inBeginEnd) {
  2911. _error = _next->call(&_next->glGetError)();
  2912. if (_error!=GL_NO_ERROR) {
  2913. Error("glIndexiv : ",Token::GLerrorToString(_error));
  2914. #if REGAL_BREAK
  2915. Break::ErrorCB(_error);
  2916. #endif
  2917. if (_context->err.callback)
  2918. _context->err.callback( _error );
  2919. }
  2920. }
  2921. }
  2922. static void REGAL_CALL error_glIndexs(GLshort c)
  2923. {
  2924. Internal("error_glIndexs","()");
  2925. RegalContext *_context = REGAL_GET_CONTEXT();
  2926. RegalAssert(_context);
  2927. DispatchTableGL *_next = _context->dispatcher.error.next();
  2928. RegalAssert(_next);
  2929. GLenum _error = GL_NO_ERROR;
  2930. if (!_context->err.inBeginEnd)
  2931. _error = _next->call(&_next->glGetError)();
  2932. RegalAssert(_error==GL_NO_ERROR);
  2933. _next->call(&_next->glIndexs)(c);
  2934. if (!_context->err.inBeginEnd) {
  2935. _error = _next->call(&_next->glGetError)();
  2936. if (_error!=GL_NO_ERROR) {
  2937. Error("glIndexs : ",Token::GLerrorToString(_error));
  2938. #if REGAL_BREAK
  2939. Break::ErrorCB(_error);
  2940. #endif
  2941. if (_context->err.callback)
  2942. _context->err.callback( _error );
  2943. }
  2944. }
  2945. }
  2946. static void REGAL_CALL error_glIndexsv(const GLshort *c)
  2947. {
  2948. Internal("error_glIndexsv","()");
  2949. RegalContext *_context = REGAL_GET_CONTEXT();
  2950. RegalAssert(_context);
  2951. DispatchTableGL *_next = _context->dispatcher.error.next();
  2952. RegalAssert(_next);
  2953. GLenum _error = GL_NO_ERROR;
  2954. if (!_context->err.inBeginEnd)
  2955. _error = _next->call(&_next->glGetError)();
  2956. RegalAssert(_error==GL_NO_ERROR);
  2957. _next->call(&_next->glIndexsv)(c);
  2958. if (!_context->err.inBeginEnd) {
  2959. _error = _next->call(&_next->glGetError)();
  2960. if (_error!=GL_NO_ERROR) {
  2961. Error("glIndexsv : ",Token::GLerrorToString(_error));
  2962. #if REGAL_BREAK
  2963. Break::ErrorCB(_error);
  2964. #endif
  2965. if (_context->err.callback)
  2966. _context->err.callback( _error );
  2967. }
  2968. }
  2969. }
  2970. static void REGAL_CALL error_glInitNames(void)
  2971. {
  2972. Internal("error_glInitNames","()");
  2973. RegalContext *_context = REGAL_GET_CONTEXT();
  2974. RegalAssert(_context);
  2975. DispatchTableGL *_next = _context->dispatcher.error.next();
  2976. RegalAssert(_next);
  2977. GLenum _error = GL_NO_ERROR;
  2978. if (!_context->err.inBeginEnd)
  2979. _error = _next->call(&_next->glGetError)();
  2980. RegalAssert(_error==GL_NO_ERROR);
  2981. _next->call(&_next->glInitNames)();
  2982. if (!_context->err.inBeginEnd) {
  2983. _error = _next->call(&_next->glGetError)();
  2984. if (_error!=GL_NO_ERROR) {
  2985. Error("glInitNames : ",Token::GLerrorToString(_error));
  2986. #if REGAL_BREAK
  2987. Break::ErrorCB(_error);
  2988. #endif
  2989. if (_context->err.callback)
  2990. _context->err.callback( _error );
  2991. }
  2992. }
  2993. }
  2994. static GLboolean REGAL_CALL error_glIsEnabled(GLenum cap)
  2995. {
  2996. Internal("error_glIsEnabled","()");
  2997. RegalContext *_context = REGAL_GET_CONTEXT();
  2998. RegalAssert(_context);
  2999. DispatchTableGL *_next = _context->dispatcher.error.next();
  3000. RegalAssert(_next);
  3001. GLenum _error = GL_NO_ERROR;
  3002. if (!_context->err.inBeginEnd)
  3003. _error = _next->call(&_next->glGetError)();
  3004. RegalAssert(_error==GL_NO_ERROR);
  3005. GLboolean ret = _next->call(&_next->glIsEnabled)(cap);
  3006. if (!_context->err.inBeginEnd) {
  3007. _error = _next->call(&_next->glGetError)();
  3008. if (_error!=GL_NO_ERROR) {
  3009. Error("glIsEnabled : ",Token::GLerrorToString(_error));
  3010. #if REGAL_BREAK
  3011. Break::ErrorCB(_error);
  3012. #endif
  3013. if (_context->err.callback)
  3014. _context->err.callback( _error );
  3015. }
  3016. }
  3017. return ret;
  3018. }
  3019. static GLboolean REGAL_CALL error_glIsList(GLuint list)
  3020. {
  3021. Internal("error_glIsList","()");
  3022. RegalContext *_context = REGAL_GET_CONTEXT();
  3023. RegalAssert(_context);
  3024. DispatchTableGL *_next = _context->dispatcher.error.next();
  3025. RegalAssert(_next);
  3026. GLenum _error = GL_NO_ERROR;
  3027. if (!_context->err.inBeginEnd)
  3028. _error = _next->call(&_next->glGetError)();
  3029. RegalAssert(_error==GL_NO_ERROR);
  3030. GLboolean ret = _next->call(&_next->glIsList)(list);
  3031. if (!_context->err.inBeginEnd) {
  3032. _error = _next->call(&_next->glGetError)();
  3033. if (_error!=GL_NO_ERROR) {
  3034. Error("glIsList : ",Token::GLerrorToString(_error));
  3035. #if REGAL_BREAK
  3036. Break::ErrorCB(_error);
  3037. #endif
  3038. if (_context->err.callback)
  3039. _context->err.callback( _error );
  3040. }
  3041. }
  3042. return ret;
  3043. }
  3044. static void REGAL_CALL error_glLightModelf(GLenum pname, GLfloat param)
  3045. {
  3046. Internal("error_glLightModelf","()");
  3047. RegalContext *_context = REGAL_GET_CONTEXT();
  3048. RegalAssert(_context);
  3049. DispatchTableGL *_next = _context->dispatcher.error.next();
  3050. RegalAssert(_next);
  3051. GLenum _error = GL_NO_ERROR;
  3052. if (!_context->err.inBeginEnd)
  3053. _error = _next->call(&_next->glGetError)();
  3054. RegalAssert(_error==GL_NO_ERROR);
  3055. _next->call(&_next->glLightModelf)(pname, param);
  3056. if (!_context->err.inBeginEnd) {
  3057. _error = _next->call(&_next->glGetError)();
  3058. if (_error!=GL_NO_ERROR) {
  3059. Error("glLightModelf : ",Token::GLerrorToString(_error));
  3060. #if REGAL_BREAK
  3061. Break::ErrorCB(_error);
  3062. #endif
  3063. if (_context->err.callback)
  3064. _context->err.callback( _error );
  3065. }
  3066. }
  3067. }
  3068. static void REGAL_CALL error_glLightModelfv(GLenum pname, const GLfloat *params)
  3069. {
  3070. Internal("error_glLightModelfv","()");
  3071. RegalContext *_context = REGAL_GET_CONTEXT();
  3072. RegalAssert(_context);
  3073. DispatchTableGL *_next = _context->dispatcher.error.next();
  3074. RegalAssert(_next);
  3075. GLenum _error = GL_NO_ERROR;
  3076. if (!_context->err.inBeginEnd)
  3077. _error = _next->call(&_next->glGetError)();
  3078. RegalAssert(_error==GL_NO_ERROR);
  3079. _next->call(&_next->glLightModelfv)(pname, params);
  3080. if (!_context->err.inBeginEnd) {
  3081. _error = _next->call(&_next->glGetError)();
  3082. if (_error!=GL_NO_ERROR) {
  3083. Error("glLightModelfv : ",Token::GLerrorToString(_error));
  3084. #if REGAL_BREAK
  3085. Break::ErrorCB(_error);
  3086. #endif
  3087. if (_context->err.callback)
  3088. _context->err.callback( _error );
  3089. }
  3090. }
  3091. }
  3092. static void REGAL_CALL error_glLightModeli(GLenum pname, GLint param)
  3093. {
  3094. Internal("error_glLightModeli","()");
  3095. RegalContext *_context = REGAL_GET_CONTEXT();
  3096. RegalAssert(_context);
  3097. DispatchTableGL *_next = _context->dispatcher.error.next();
  3098. RegalAssert(_next);
  3099. GLenum _error = GL_NO_ERROR;
  3100. if (!_context->err.inBeginEnd)
  3101. _error = _next->call(&_next->glGetError)();
  3102. RegalAssert(_error==GL_NO_ERROR);
  3103. _next->call(&_next->glLightModeli)(pname, param);
  3104. if (!_context->err.inBeginEnd) {
  3105. _error = _next->call(&_next->glGetError)();
  3106. if (_error!=GL_NO_ERROR) {
  3107. Error("glLightModeli : ",Token::GLerrorToString(_error));
  3108. #if REGAL_BREAK
  3109. Break::ErrorCB(_error);
  3110. #endif
  3111. if (_context->err.callback)
  3112. _context->err.callback( _error );
  3113. }
  3114. }
  3115. }
  3116. static void REGAL_CALL error_glLightModeliv(GLenum pname, const GLint *params)
  3117. {
  3118. Internal("error_glLightModeliv","()");
  3119. RegalContext *_context = REGAL_GET_CONTEXT();
  3120. RegalAssert(_context);
  3121. DispatchTableGL *_next = _context->dispatcher.error.next();
  3122. RegalAssert(_next);
  3123. GLenum _error = GL_NO_ERROR;
  3124. if (!_context->err.inBeginEnd)
  3125. _error = _next->call(&_next->glGetError)();
  3126. RegalAssert(_error==GL_NO_ERROR);
  3127. _next->call(&_next->glLightModeliv)(pname, params);
  3128. if (!_context->err.inBeginEnd) {
  3129. _error = _next->call(&_next->glGetError)();
  3130. if (_error!=GL_NO_ERROR) {
  3131. Error("glLightModeliv : ",Token::GLerrorToString(_error));
  3132. #if REGAL_BREAK
  3133. Break::ErrorCB(_error);
  3134. #endif
  3135. if (_context->err.callback)
  3136. _context->err.callback( _error );
  3137. }
  3138. }
  3139. }
  3140. static void REGAL_CALL error_glLightf(GLenum light, GLenum pname, GLfloat param)
  3141. {
  3142. Internal("error_glLightf","()");
  3143. RegalContext *_context = REGAL_GET_CONTEXT();
  3144. RegalAssert(_context);
  3145. DispatchTableGL *_next = _context->dispatcher.error.next();
  3146. RegalAssert(_next);
  3147. GLenum _error = GL_NO_ERROR;
  3148. if (!_context->err.inBeginEnd)
  3149. _error = _next->call(&_next->glGetError)();
  3150. RegalAssert(_error==GL_NO_ERROR);
  3151. _next->call(&_next->glLightf)(light, pname, param);
  3152. if (!_context->err.inBeginEnd) {
  3153. _error = _next->call(&_next->glGetError)();
  3154. if (_error!=GL_NO_ERROR) {
  3155. Error("glLightf : ",Token::GLerrorToString(_error));
  3156. #if REGAL_BREAK
  3157. Break::ErrorCB(_error);
  3158. #endif
  3159. if (_context->err.callback)
  3160. _context->err.callback( _error );
  3161. }
  3162. }
  3163. }
  3164. static void REGAL_CALL error_glLightfv(GLenum light, GLenum pname, const GLfloat *params)
  3165. {
  3166. Internal("error_glLightfv","()");
  3167. RegalContext *_context = REGAL_GET_CONTEXT();
  3168. RegalAssert(_context);
  3169. DispatchTableGL *_next = _context->dispatcher.error.next();
  3170. RegalAssert(_next);
  3171. GLenum _error = GL_NO_ERROR;
  3172. if (!_context->err.inBeginEnd)
  3173. _error = _next->call(&_next->glGetError)();
  3174. RegalAssert(_error==GL_NO_ERROR);
  3175. _next->call(&_next->glLightfv)(light, pname, params);
  3176. if (!_context->err.inBeginEnd) {
  3177. _error = _next->call(&_next->glGetError)();
  3178. if (_error!=GL_NO_ERROR) {
  3179. Error("glLightfv : ",Token::GLerrorToString(_error));
  3180. #if REGAL_BREAK
  3181. Break::ErrorCB(_error);
  3182. #endif
  3183. if (_context->err.callback)
  3184. _context->err.callback( _error );
  3185. }
  3186. }
  3187. }
  3188. static void REGAL_CALL error_glLighti(GLenum light, GLenum pname, GLint param)
  3189. {
  3190. Internal("error_glLighti","()");
  3191. RegalContext *_context = REGAL_GET_CONTEXT();
  3192. RegalAssert(_context);
  3193. DispatchTableGL *_next = _context->dispatcher.error.next();
  3194. RegalAssert(_next);
  3195. GLenum _error = GL_NO_ERROR;
  3196. if (!_context->err.inBeginEnd)
  3197. _error = _next->call(&_next->glGetError)();
  3198. RegalAssert(_error==GL_NO_ERROR);
  3199. _next->call(&_next->glLighti)(light, pname, param);
  3200. if (!_context->err.inBeginEnd) {
  3201. _error = _next->call(&_next->glGetError)();
  3202. if (_error!=GL_NO_ERROR) {
  3203. Error("glLighti : ",Token::GLerrorToString(_error));
  3204. #if REGAL_BREAK
  3205. Break::ErrorCB(_error);
  3206. #endif
  3207. if (_context->err.callback)
  3208. _context->err.callback( _error );
  3209. }
  3210. }
  3211. }
  3212. static void REGAL_CALL error_glLightiv(GLenum light, GLenum pname, const GLint *params)
  3213. {
  3214. Internal("error_glLightiv","()");
  3215. RegalContext *_context = REGAL_GET_CONTEXT();
  3216. RegalAssert(_context);
  3217. DispatchTableGL *_next = _context->dispatcher.error.next();
  3218. RegalAssert(_next);
  3219. GLenum _error = GL_NO_ERROR;
  3220. if (!_context->err.inBeginEnd)
  3221. _error = _next->call(&_next->glGetError)();
  3222. RegalAssert(_error==GL_NO_ERROR);
  3223. _next->call(&_next->glLightiv)(light, pname, params);
  3224. if (!_context->err.inBeginEnd) {
  3225. _error = _next->call(&_next->glGetError)();
  3226. if (_error!=GL_NO_ERROR) {
  3227. Error("glLightiv : ",Token::GLerrorToString(_error));
  3228. #if REGAL_BREAK
  3229. Break::ErrorCB(_error);
  3230. #endif
  3231. if (_context->err.callback)
  3232. _context->err.callback( _error );
  3233. }
  3234. }
  3235. }
  3236. static void REGAL_CALL error_glLineStipple(GLint factor, GLushort pattern)
  3237. {
  3238. Internal("error_glLineStipple","()");
  3239. RegalContext *_context = REGAL_GET_CONTEXT();
  3240. RegalAssert(_context);
  3241. DispatchTableGL *_next = _context->dispatcher.error.next();
  3242. RegalAssert(_next);
  3243. GLenum _error = GL_NO_ERROR;
  3244. if (!_context->err.inBeginEnd)
  3245. _error = _next->call(&_next->glGetError)();
  3246. RegalAssert(_error==GL_NO_ERROR);
  3247. _next->call(&_next->glLineStipple)(factor, pattern);
  3248. if (!_context->err.inBeginEnd) {
  3249. _error = _next->call(&_next->glGetError)();
  3250. if (_error!=GL_NO_ERROR) {
  3251. Error("glLineStipple : ",Token::GLerrorToString(_error));
  3252. #if REGAL_BREAK
  3253. Break::ErrorCB(_error);
  3254. #endif
  3255. if (_context->err.callback)
  3256. _context->err.callback( _error );
  3257. }
  3258. }
  3259. }
  3260. static void REGAL_CALL error_glLineWidth(GLfloat width)
  3261. {
  3262. Internal("error_glLineWidth","()");
  3263. RegalContext *_context = REGAL_GET_CONTEXT();
  3264. RegalAssert(_context);
  3265. DispatchTableGL *_next = _context->dispatcher.error.next();
  3266. RegalAssert(_next);
  3267. GLenum _error = GL_NO_ERROR;
  3268. if (!_context->err.inBeginEnd)
  3269. _error = _next->call(&_next->glGetError)();
  3270. RegalAssert(_error==GL_NO_ERROR);
  3271. _next->call(&_next->glLineWidth)(width);
  3272. if (!_context->err.inBeginEnd) {
  3273. _error = _next->call(&_next->glGetError)();
  3274. if (_error!=GL_NO_ERROR) {
  3275. Error("glLineWidth : ",Token::GLerrorToString(_error));
  3276. #if REGAL_BREAK
  3277. Break::ErrorCB(_error);
  3278. #endif
  3279. if (_context->err.callback)
  3280. _context->err.callback( _error );
  3281. }
  3282. }
  3283. }
  3284. static void REGAL_CALL error_glListBase(GLuint base)
  3285. {
  3286. Internal("error_glListBase","()");
  3287. RegalContext *_context = REGAL_GET_CONTEXT();
  3288. RegalAssert(_context);
  3289. DispatchTableGL *_next = _context->dispatcher.error.next();
  3290. RegalAssert(_next);
  3291. GLenum _error = GL_NO_ERROR;
  3292. if (!_context->err.inBeginEnd)
  3293. _error = _next->call(&_next->glGetError)();
  3294. RegalAssert(_error==GL_NO_ERROR);
  3295. _next->call(&_next->glListBase)(base);
  3296. if (!_context->err.inBeginEnd) {
  3297. _error = _next->call(&_next->glGetError)();
  3298. if (_error!=GL_NO_ERROR) {
  3299. Error("glListBase : ",Token::GLerrorToString(_error));
  3300. #if REGAL_BREAK
  3301. Break::ErrorCB(_error);
  3302. #endif
  3303. if (_context->err.callback)
  3304. _context->err.callback( _error );
  3305. }
  3306. }
  3307. }
  3308. static void REGAL_CALL error_glLoadIdentity(void)
  3309. {
  3310. Internal("error_glLoadIdentity","()");
  3311. RegalContext *_context = REGAL_GET_CONTEXT();
  3312. RegalAssert(_context);
  3313. DispatchTableGL *_next = _context->dispatcher.error.next();
  3314. RegalAssert(_next);
  3315. GLenum _error = GL_NO_ERROR;
  3316. if (!_context->err.inBeginEnd)
  3317. _error = _next->call(&_next->glGetError)();
  3318. RegalAssert(_error==GL_NO_ERROR);
  3319. _next->call(&_next->glLoadIdentity)();
  3320. if (!_context->err.inBeginEnd) {
  3321. _error = _next->call(&_next->glGetError)();
  3322. if (_error!=GL_NO_ERROR) {
  3323. Error("glLoadIdentity : ",Token::GLerrorToString(_error));
  3324. #if REGAL_BREAK
  3325. Break::ErrorCB(_error);
  3326. #endif
  3327. if (_context->err.callback)
  3328. _context->err.callback( _error );
  3329. }
  3330. }
  3331. }
  3332. static void REGAL_CALL error_glLoadMatrixd(const GLdouble *m)
  3333. {
  3334. Internal("error_glLoadMatrixd","()");
  3335. RegalContext *_context = REGAL_GET_CONTEXT();
  3336. RegalAssert(_context);
  3337. DispatchTableGL *_next = _context->dispatcher.error.next();
  3338. RegalAssert(_next);
  3339. GLenum _error = GL_NO_ERROR;
  3340. if (!_context->err.inBeginEnd)
  3341. _error = _next->call(&_next->glGetError)();
  3342. RegalAssert(_error==GL_NO_ERROR);
  3343. _next->call(&_next->glLoadMatrixd)(m);
  3344. if (!_context->err.inBeginEnd) {
  3345. _error = _next->call(&_next->glGetError)();
  3346. if (_error!=GL_NO_ERROR) {
  3347. Error("glLoadMatrixd : ",Token::GLerrorToString(_error));
  3348. #if REGAL_BREAK
  3349. Break::ErrorCB(_error);
  3350. #endif
  3351. if (_context->err.callback)
  3352. _context->err.callback( _error );
  3353. }
  3354. }
  3355. }
  3356. static void REGAL_CALL error_glLoadMatrixf(const GLfloat *m)
  3357. {
  3358. Internal("error_glLoadMatrixf","()");
  3359. RegalContext *_context = REGAL_GET_CONTEXT();
  3360. RegalAssert(_context);
  3361. DispatchTableGL *_next = _context->dispatcher.error.next();
  3362. RegalAssert(_next);
  3363. GLenum _error = GL_NO_ERROR;
  3364. if (!_context->err.inBeginEnd)
  3365. _error = _next->call(&_next->glGetError)();
  3366. RegalAssert(_error==GL_NO_ERROR);
  3367. _next->call(&_next->glLoadMatrixf)(m);
  3368. if (!_context->err.inBeginEnd) {
  3369. _error = _next->call(&_next->glGetError)();
  3370. if (_error!=GL_NO_ERROR) {
  3371. Error("glLoadMatrixf : ",Token::GLerrorToString(_error));
  3372. #if REGAL_BREAK
  3373. Break::ErrorCB(_error);
  3374. #endif
  3375. if (_context->err.callback)
  3376. _context->err.callback( _error );
  3377. }
  3378. }
  3379. }
  3380. static void REGAL_CALL error_glLoadName(GLuint name)
  3381. {
  3382. Internal("error_glLoadName","()");
  3383. RegalContext *_context = REGAL_GET_CONTEXT();
  3384. RegalAssert(_context);
  3385. DispatchTableGL *_next = _context->dispatcher.error.next();
  3386. RegalAssert(_next);
  3387. GLenum _error = GL_NO_ERROR;
  3388. if (!_context->err.inBeginEnd)
  3389. _error = _next->call(&_next->glGetError)();
  3390. RegalAssert(_error==GL_NO_ERROR);
  3391. _next->call(&_next->glLoadName)(name);
  3392. if (!_context->err.inBeginEnd) {
  3393. _error = _next->call(&_next->glGetError)();
  3394. if (_error!=GL_NO_ERROR) {
  3395. Error("glLoadName : ",Token::GLerrorToString(_error));
  3396. #if REGAL_BREAK
  3397. Break::ErrorCB(_error);
  3398. #endif
  3399. if (_context->err.callback)
  3400. _context->err.callback( _error );
  3401. }
  3402. }
  3403. }
  3404. static void REGAL_CALL error_glLogicOp(GLenum opcode)
  3405. {
  3406. Internal("error_glLogicOp","()");
  3407. RegalContext *_context = REGAL_GET_CONTEXT();
  3408. RegalAssert(_context);
  3409. DispatchTableGL *_next = _context->dispatcher.error.next();
  3410. RegalAssert(_next);
  3411. GLenum _error = GL_NO_ERROR;
  3412. if (!_context->err.inBeginEnd)
  3413. _error = _next->call(&_next->glGetError)();
  3414. RegalAssert(_error==GL_NO_ERROR);
  3415. _next->call(&_next->glLogicOp)(opcode);
  3416. if (!_context->err.inBeginEnd) {
  3417. _error = _next->call(&_next->glGetError)();
  3418. if (_error!=GL_NO_ERROR) {
  3419. Error("glLogicOp : ",Token::GLerrorToString(_error));
  3420. #if REGAL_BREAK
  3421. Break::ErrorCB(_error);
  3422. #endif
  3423. if (_context->err.callback)
  3424. _context->err.callback( _error );
  3425. }
  3426. }
  3427. }
  3428. static void REGAL_CALL error_glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
  3429. {
  3430. Internal("error_glMap1d","()");
  3431. RegalContext *_context = REGAL_GET_CONTEXT();
  3432. RegalAssert(_context);
  3433. DispatchTableGL *_next = _context->dispatcher.error.next();
  3434. RegalAssert(_next);
  3435. GLenum _error = GL_NO_ERROR;
  3436. if (!_context->err.inBeginEnd)
  3437. _error = _next->call(&_next->glGetError)();
  3438. RegalAssert(_error==GL_NO_ERROR);
  3439. _next->call(&_next->glMap1d)(target, u1, u2, stride, order, points);
  3440. if (!_context->err.inBeginEnd) {
  3441. _error = _next->call(&_next->glGetError)();
  3442. if (_error!=GL_NO_ERROR) {
  3443. Error("glMap1d : ",Token::GLerrorToString(_error));
  3444. #if REGAL_BREAK
  3445. Break::ErrorCB(_error);
  3446. #endif
  3447. if (_context->err.callback)
  3448. _context->err.callback( _error );
  3449. }
  3450. }
  3451. }
  3452. static void REGAL_CALL error_glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
  3453. {
  3454. Internal("error_glMap1f","()");
  3455. RegalContext *_context = REGAL_GET_CONTEXT();
  3456. RegalAssert(_context);
  3457. DispatchTableGL *_next = _context->dispatcher.error.next();
  3458. RegalAssert(_next);
  3459. GLenum _error = GL_NO_ERROR;
  3460. if (!_context->err.inBeginEnd)
  3461. _error = _next->call(&_next->glGetError)();
  3462. RegalAssert(_error==GL_NO_ERROR);
  3463. _next->call(&_next->glMap1f)(target, u1, u2, stride, order, points);
  3464. if (!_context->err.inBeginEnd) {
  3465. _error = _next->call(&_next->glGetError)();
  3466. if (_error!=GL_NO_ERROR) {
  3467. Error("glMap1f : ",Token::GLerrorToString(_error));
  3468. #if REGAL_BREAK
  3469. Break::ErrorCB(_error);
  3470. #endif
  3471. if (_context->err.callback)
  3472. _context->err.callback( _error );
  3473. }
  3474. }
  3475. }
  3476. static void REGAL_CALL error_glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
  3477. {
  3478. Internal("error_glMap2d","()");
  3479. RegalContext *_context = REGAL_GET_CONTEXT();
  3480. RegalAssert(_context);
  3481. DispatchTableGL *_next = _context->dispatcher.error.next();
  3482. RegalAssert(_next);
  3483. GLenum _error = GL_NO_ERROR;
  3484. if (!_context->err.inBeginEnd)
  3485. _error = _next->call(&_next->glGetError)();
  3486. RegalAssert(_error==GL_NO_ERROR);
  3487. _next->call(&_next->glMap2d)(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
  3488. if (!_context->err.inBeginEnd) {
  3489. _error = _next->call(&_next->glGetError)();
  3490. if (_error!=GL_NO_ERROR) {
  3491. Error("glMap2d : ",Token::GLerrorToString(_error));
  3492. #if REGAL_BREAK
  3493. Break::ErrorCB(_error);
  3494. #endif
  3495. if (_context->err.callback)
  3496. _context->err.callback( _error );
  3497. }
  3498. }
  3499. }
  3500. static void REGAL_CALL error_glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
  3501. {
  3502. Internal("error_glMap2f","()");
  3503. RegalContext *_context = REGAL_GET_CONTEXT();
  3504. RegalAssert(_context);
  3505. DispatchTableGL *_next = _context->dispatcher.error.next();
  3506. RegalAssert(_next);
  3507. GLenum _error = GL_NO_ERROR;
  3508. if (!_context->err.inBeginEnd)
  3509. _error = _next->call(&_next->glGetError)();
  3510. RegalAssert(_error==GL_NO_ERROR);
  3511. _next->call(&_next->glMap2f)(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
  3512. if (!_context->err.inBeginEnd) {
  3513. _error = _next->call(&_next->glGetError)();
  3514. if (_error!=GL_NO_ERROR) {
  3515. Error("glMap2f : ",Token::GLerrorToString(_error));
  3516. #if REGAL_BREAK
  3517. Break::ErrorCB(_error);
  3518. #endif
  3519. if (_context->err.callback)
  3520. _context->err.callback( _error );
  3521. }
  3522. }
  3523. }
  3524. static void REGAL_CALL error_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
  3525. {
  3526. Internal("error_glMapGrid1d","()");
  3527. RegalContext *_context = REGAL_GET_CONTEXT();
  3528. RegalAssert(_context);
  3529. DispatchTableGL *_next = _context->dispatcher.error.next();
  3530. RegalAssert(_next);
  3531. GLenum _error = GL_NO_ERROR;
  3532. if (!_context->err.inBeginEnd)
  3533. _error = _next->call(&_next->glGetError)();
  3534. RegalAssert(_error==GL_NO_ERROR);
  3535. _next->call(&_next->glMapGrid1d)(un, u1, u2);
  3536. if (!_context->err.inBeginEnd) {
  3537. _error = _next->call(&_next->glGetError)();
  3538. if (_error!=GL_NO_ERROR) {
  3539. Error("glMapGrid1d : ",Token::GLerrorToString(_error));
  3540. #if REGAL_BREAK
  3541. Break::ErrorCB(_error);
  3542. #endif
  3543. if (_context->err.callback)
  3544. _context->err.callback( _error );
  3545. }
  3546. }
  3547. }
  3548. static void REGAL_CALL error_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
  3549. {
  3550. Internal("error_glMapGrid1f","()");
  3551. RegalContext *_context = REGAL_GET_CONTEXT();
  3552. RegalAssert(_context);
  3553. DispatchTableGL *_next = _context->dispatcher.error.next();
  3554. RegalAssert(_next);
  3555. GLenum _error = GL_NO_ERROR;
  3556. if (!_context->err.inBeginEnd)
  3557. _error = _next->call(&_next->glGetError)();
  3558. RegalAssert(_error==GL_NO_ERROR);
  3559. _next->call(&_next->glMapGrid1f)(un, u1, u2);
  3560. if (!_context->err.inBeginEnd) {
  3561. _error = _next->call(&_next->glGetError)();
  3562. if (_error!=GL_NO_ERROR) {
  3563. Error("glMapGrid1f : ",Token::GLerrorToString(_error));
  3564. #if REGAL_BREAK
  3565. Break::ErrorCB(_error);
  3566. #endif
  3567. if (_context->err.callback)
  3568. _context->err.callback( _error );
  3569. }
  3570. }
  3571. }
  3572. static void REGAL_CALL error_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
  3573. {
  3574. Internal("error_glMapGrid2d","()");
  3575. RegalContext *_context = REGAL_GET_CONTEXT();
  3576. RegalAssert(_context);
  3577. DispatchTableGL *_next = _context->dispatcher.error.next();
  3578. RegalAssert(_next);
  3579. GLenum _error = GL_NO_ERROR;
  3580. if (!_context->err.inBeginEnd)
  3581. _error = _next->call(&_next->glGetError)();
  3582. RegalAssert(_error==GL_NO_ERROR);
  3583. _next->call(&_next->glMapGrid2d)(un, u1, u2, vn, v1, v2);
  3584. if (!_context->err.inBeginEnd) {
  3585. _error = _next->call(&_next->glGetError)();
  3586. if (_error!=GL_NO_ERROR) {
  3587. Error("glMapGrid2d : ",Token::GLerrorToString(_error));
  3588. #if REGAL_BREAK
  3589. Break::ErrorCB(_error);
  3590. #endif
  3591. if (_context->err.callback)
  3592. _context->err.callback( _error );
  3593. }
  3594. }
  3595. }
  3596. static void REGAL_CALL error_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
  3597. {
  3598. Internal("error_glMapGrid2f","()");
  3599. RegalContext *_context = REGAL_GET_CONTEXT();
  3600. RegalAssert(_context);
  3601. DispatchTableGL *_next = _context->dispatcher.error.next();
  3602. RegalAssert(_next);
  3603. GLenum _error = GL_NO_ERROR;
  3604. if (!_context->err.inBeginEnd)
  3605. _error = _next->call(&_next->glGetError)();
  3606. RegalAssert(_error==GL_NO_ERROR);
  3607. _next->call(&_next->glMapGrid2f)(un, u1, u2, vn, v1, v2);
  3608. if (!_context->err.inBeginEnd) {
  3609. _error = _next->call(&_next->glGetError)();
  3610. if (_error!=GL_NO_ERROR) {
  3611. Error("glMapGrid2f : ",Token::GLerrorToString(_error));
  3612. #if REGAL_BREAK
  3613. Break::ErrorCB(_error);
  3614. #endif
  3615. if (_context->err.callback)
  3616. _context->err.callback( _error );
  3617. }
  3618. }
  3619. }
  3620. static void REGAL_CALL error_glMaterialf(GLenum face, GLenum pname, GLfloat param)
  3621. {
  3622. Internal("error_glMaterialf","()");
  3623. RegalContext *_context = REGAL_GET_CONTEXT();
  3624. RegalAssert(_context);
  3625. DispatchTableGL *_next = _context->dispatcher.error.next();
  3626. RegalAssert(_next);
  3627. GLenum _error = GL_NO_ERROR;
  3628. if (!_context->err.inBeginEnd)
  3629. _error = _next->call(&_next->glGetError)();
  3630. RegalAssert(_error==GL_NO_ERROR);
  3631. _next->call(&_next->glMaterialf)(face, pname, param);
  3632. if (!_context->err.inBeginEnd) {
  3633. _error = _next->call(&_next->glGetError)();
  3634. if (_error!=GL_NO_ERROR) {
  3635. Error("glMaterialf : ",Token::GLerrorToString(_error));
  3636. #if REGAL_BREAK
  3637. Break::ErrorCB(_error);
  3638. #endif
  3639. if (_context->err.callback)
  3640. _context->err.callback( _error );
  3641. }
  3642. }
  3643. }
  3644. static void REGAL_CALL error_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
  3645. {
  3646. Internal("error_glMaterialfv","()");
  3647. RegalContext *_context = REGAL_GET_CONTEXT();
  3648. RegalAssert(_context);
  3649. DispatchTableGL *_next = _context->dispatcher.error.next();
  3650. RegalAssert(_next);
  3651. GLenum _error = GL_NO_ERROR;
  3652. if (!_context->err.inBeginEnd)
  3653. _error = _next->call(&_next->glGetError)();
  3654. RegalAssert(_error==GL_NO_ERROR);
  3655. _next->call(&_next->glMaterialfv)(face, pname, params);
  3656. if (!_context->err.inBeginEnd) {
  3657. _error = _next->call(&_next->glGetError)();
  3658. if (_error!=GL_NO_ERROR) {
  3659. Error("glMaterialfv : ",Token::GLerrorToString(_error));
  3660. #if REGAL_BREAK
  3661. Break::ErrorCB(_error);
  3662. #endif
  3663. if (_context->err.callback)
  3664. _context->err.callback( _error );
  3665. }
  3666. }
  3667. }
  3668. static void REGAL_CALL error_glMateriali(GLenum face, GLenum pname, GLint param)
  3669. {
  3670. Internal("error_glMateriali","()");
  3671. RegalContext *_context = REGAL_GET_CONTEXT();
  3672. RegalAssert(_context);
  3673. DispatchTableGL *_next = _context->dispatcher.error.next();
  3674. RegalAssert(_next);
  3675. GLenum _error = GL_NO_ERROR;
  3676. if (!_context->err.inBeginEnd)
  3677. _error = _next->call(&_next->glGetError)();
  3678. RegalAssert(_error==GL_NO_ERROR);
  3679. _next->call(&_next->glMateriali)(face, pname, param);
  3680. if (!_context->err.inBeginEnd) {
  3681. _error = _next->call(&_next->glGetError)();
  3682. if (_error!=GL_NO_ERROR) {
  3683. Error("glMateriali : ",Token::GLerrorToString(_error));
  3684. #if REGAL_BREAK
  3685. Break::ErrorCB(_error);
  3686. #endif
  3687. if (_context->err.callback)
  3688. _context->err.callback( _error );
  3689. }
  3690. }
  3691. }
  3692. static void REGAL_CALL error_glMaterialiv(GLenum face, GLenum pname, const GLint *params)
  3693. {
  3694. Internal("error_glMaterialiv","()");
  3695. RegalContext *_context = REGAL_GET_CONTEXT();
  3696. RegalAssert(_context);
  3697. DispatchTableGL *_next = _context->dispatcher.error.next();
  3698. RegalAssert(_next);
  3699. GLenum _error = GL_NO_ERROR;
  3700. if (!_context->err.inBeginEnd)
  3701. _error = _next->call(&_next->glGetError)();
  3702. RegalAssert(_error==GL_NO_ERROR);
  3703. _next->call(&_next->glMaterialiv)(face, pname, params);
  3704. if (!_context->err.inBeginEnd) {
  3705. _error = _next->call(&_next->glGetError)();
  3706. if (_error!=GL_NO_ERROR) {
  3707. Error("glMaterialiv : ",Token::GLerrorToString(_error));
  3708. #if REGAL_BREAK
  3709. Break::ErrorCB(_error);
  3710. #endif
  3711. if (_context->err.callback)
  3712. _context->err.callback( _error );
  3713. }
  3714. }
  3715. }
  3716. static void REGAL_CALL error_glMatrixMode(GLenum mode)
  3717. {
  3718. Internal("error_glMatrixMode","()");
  3719. RegalContext *_context = REGAL_GET_CONTEXT();
  3720. RegalAssert(_context);
  3721. DispatchTableGL *_next = _context->dispatcher.error.next();
  3722. RegalAssert(_next);
  3723. GLenum _error = GL_NO_ERROR;
  3724. if (!_context->err.inBeginEnd)
  3725. _error = _next->call(&_next->glGetError)();
  3726. RegalAssert(_error==GL_NO_ERROR);
  3727. _next->call(&_next->glMatrixMode)(mode);
  3728. if (!_context->err.inBeginEnd) {
  3729. _error = _next->call(&_next->glGetError)();
  3730. if (_error!=GL_NO_ERROR) {
  3731. Error("glMatrixMode : ",Token::GLerrorToString(_error));
  3732. #if REGAL_BREAK
  3733. Break::ErrorCB(_error);
  3734. #endif
  3735. if (_context->err.callback)
  3736. _context->err.callback( _error );
  3737. }
  3738. }
  3739. }
  3740. static void REGAL_CALL error_glMultMatrixd(const GLdouble *m)
  3741. {
  3742. Internal("error_glMultMatrixd","()");
  3743. RegalContext *_context = REGAL_GET_CONTEXT();
  3744. RegalAssert(_context);
  3745. DispatchTableGL *_next = _context->dispatcher.error.next();
  3746. RegalAssert(_next);
  3747. GLenum _error = GL_NO_ERROR;
  3748. if (!_context->err.inBeginEnd)
  3749. _error = _next->call(&_next->glGetError)();
  3750. RegalAssert(_error==GL_NO_ERROR);
  3751. _next->call(&_next->glMultMatrixd)(m);
  3752. if (!_context->err.inBeginEnd) {
  3753. _error = _next->call(&_next->glGetError)();
  3754. if (_error!=GL_NO_ERROR) {
  3755. Error("glMultMatrixd : ",Token::GLerrorToString(_error));
  3756. #if REGAL_BREAK
  3757. Break::ErrorCB(_error);
  3758. #endif
  3759. if (_context->err.callback)
  3760. _context->err.callback( _error );
  3761. }
  3762. }
  3763. }
  3764. static void REGAL_CALL error_glMultMatrixf(const GLfloat *m)
  3765. {
  3766. Internal("error_glMultMatrixf","()");
  3767. RegalContext *_context = REGAL_GET_CONTEXT();
  3768. RegalAssert(_context);
  3769. DispatchTableGL *_next = _context->dispatcher.error.next();
  3770. RegalAssert(_next);
  3771. GLenum _error = GL_NO_ERROR;
  3772. if (!_context->err.inBeginEnd)
  3773. _error = _next->call(&_next->glGetError)();
  3774. RegalAssert(_error==GL_NO_ERROR);
  3775. _next->call(&_next->glMultMatrixf)(m);
  3776. if (!_context->err.inBeginEnd) {
  3777. _error = _next->call(&_next->glGetError)();
  3778. if (_error!=GL_NO_ERROR) {
  3779. Error("glMultMatrixf : ",Token::GLerrorToString(_error));
  3780. #if REGAL_BREAK
  3781. Break::ErrorCB(_error);
  3782. #endif
  3783. if (_context->err.callback)
  3784. _context->err.callback( _error );
  3785. }
  3786. }
  3787. }
  3788. static void REGAL_CALL error_glNewList(GLuint list, GLenum mode)
  3789. {
  3790. Internal("error_glNewList","()");
  3791. RegalContext *_context = REGAL_GET_CONTEXT();
  3792. RegalAssert(_context);
  3793. DispatchTableGL *_next = _context->dispatcher.error.next();
  3794. RegalAssert(_next);
  3795. GLenum _error = GL_NO_ERROR;
  3796. if (!_context->err.inBeginEnd)
  3797. _error = _next->call(&_next->glGetError)();
  3798. RegalAssert(_error==GL_NO_ERROR);
  3799. _next->call(&_next->glNewList)(list, mode);
  3800. if (!_context->err.inBeginEnd) {
  3801. _error = _next->call(&_next->glGetError)();
  3802. if (_error!=GL_NO_ERROR) {
  3803. Error("glNewList : ",Token::GLerrorToString(_error));
  3804. #if REGAL_BREAK
  3805. Break::ErrorCB(_error);
  3806. #endif
  3807. if (_context->err.callback)
  3808. _context->err.callback( _error );
  3809. }
  3810. }
  3811. }
  3812. static void REGAL_CALL error_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
  3813. {
  3814. Internal("error_glNormal3b","()");
  3815. RegalContext *_context = REGAL_GET_CONTEXT();
  3816. RegalAssert(_context);
  3817. DispatchTableGL *_next = _context->dispatcher.error.next();
  3818. RegalAssert(_next);
  3819. GLenum _error = GL_NO_ERROR;
  3820. if (!_context->err.inBeginEnd)
  3821. _error = _next->call(&_next->glGetError)();
  3822. RegalAssert(_error==GL_NO_ERROR);
  3823. _next->call(&_next->glNormal3b)(nx, ny, nz);
  3824. if (!_context->err.inBeginEnd) {
  3825. _error = _next->call(&_next->glGetError)();
  3826. if (_error!=GL_NO_ERROR) {
  3827. Error("glNormal3b : ",Token::GLerrorToString(_error));
  3828. #if REGAL_BREAK
  3829. Break::ErrorCB(_error);
  3830. #endif
  3831. if (_context->err.callback)
  3832. _context->err.callback( _error );
  3833. }
  3834. }
  3835. }
  3836. static void REGAL_CALL error_glNormal3bv(const GLbyte *v)
  3837. {
  3838. Internal("error_glNormal3bv","()");
  3839. RegalContext *_context = REGAL_GET_CONTEXT();
  3840. RegalAssert(_context);
  3841. DispatchTableGL *_next = _context->dispatcher.error.next();
  3842. RegalAssert(_next);
  3843. GLenum _error = GL_NO_ERROR;
  3844. if (!_context->err.inBeginEnd)
  3845. _error = _next->call(&_next->glGetError)();
  3846. RegalAssert(_error==GL_NO_ERROR);
  3847. _next->call(&_next->glNormal3bv)(v);
  3848. if (!_context->err.inBeginEnd) {
  3849. _error = _next->call(&_next->glGetError)();
  3850. if (_error!=GL_NO_ERROR) {
  3851. Error("glNormal3bv : ",Token::GLerrorToString(_error));
  3852. #if REGAL_BREAK
  3853. Break::ErrorCB(_error);
  3854. #endif
  3855. if (_context->err.callback)
  3856. _context->err.callback( _error );
  3857. }
  3858. }
  3859. }
  3860. static void REGAL_CALL error_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
  3861. {
  3862. Internal("error_glNormal3d","()");
  3863. RegalContext *_context = REGAL_GET_CONTEXT();
  3864. RegalAssert(_context);
  3865. DispatchTableGL *_next = _context->dispatcher.error.next();
  3866. RegalAssert(_next);
  3867. GLenum _error = GL_NO_ERROR;
  3868. if (!_context->err.inBeginEnd)
  3869. _error = _next->call(&_next->glGetError)();
  3870. RegalAssert(_error==GL_NO_ERROR);
  3871. _next->call(&_next->glNormal3d)(nx, ny, nz);
  3872. if (!_context->err.inBeginEnd) {
  3873. _error = _next->call(&_next->glGetError)();
  3874. if (_error!=GL_NO_ERROR) {
  3875. Error("glNormal3d : ",Token::GLerrorToString(_error));
  3876. #if REGAL_BREAK
  3877. Break::ErrorCB(_error);
  3878. #endif
  3879. if (_context->err.callback)
  3880. _context->err.callback( _error );
  3881. }
  3882. }
  3883. }
  3884. static void REGAL_CALL error_glNormal3dv(const GLdouble *v)
  3885. {
  3886. Internal("error_glNormal3dv","()");
  3887. RegalContext *_context = REGAL_GET_CONTEXT();
  3888. RegalAssert(_context);
  3889. DispatchTableGL *_next = _context->dispatcher.error.next();
  3890. RegalAssert(_next);
  3891. GLenum _error = GL_NO_ERROR;
  3892. if (!_context->err.inBeginEnd)
  3893. _error = _next->call(&_next->glGetError)();
  3894. RegalAssert(_error==GL_NO_ERROR);
  3895. _next->call(&_next->glNormal3dv)(v);
  3896. if (!_context->err.inBeginEnd) {
  3897. _error = _next->call(&_next->glGetError)();
  3898. if (_error!=GL_NO_ERROR) {
  3899. Error("glNormal3dv : ",Token::GLerrorToString(_error));
  3900. #if REGAL_BREAK
  3901. Break::ErrorCB(_error);
  3902. #endif
  3903. if (_context->err.callback)
  3904. _context->err.callback( _error );
  3905. }
  3906. }
  3907. }
  3908. static void REGAL_CALL error_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
  3909. {
  3910. Internal("error_glNormal3f","()");
  3911. RegalContext *_context = REGAL_GET_CONTEXT();
  3912. RegalAssert(_context);
  3913. DispatchTableGL *_next = _context->dispatcher.error.next();
  3914. RegalAssert(_next);
  3915. GLenum _error = GL_NO_ERROR;
  3916. if (!_context->err.inBeginEnd)
  3917. _error = _next->call(&_next->glGetError)();
  3918. RegalAssert(_error==GL_NO_ERROR);
  3919. _next->call(&_next->glNormal3f)(nx, ny, nz);
  3920. if (!_context->err.inBeginEnd) {
  3921. _error = _next->call(&_next->glGetError)();
  3922. if (_error!=GL_NO_ERROR) {
  3923. Error("glNormal3f : ",Token::GLerrorToString(_error));
  3924. #if REGAL_BREAK
  3925. Break::ErrorCB(_error);
  3926. #endif
  3927. if (_context->err.callback)
  3928. _context->err.callback( _error );
  3929. }
  3930. }
  3931. }
  3932. static void REGAL_CALL error_glNormal3fv(const GLfloat *v)
  3933. {
  3934. Internal("error_glNormal3fv","()");
  3935. RegalContext *_context = REGAL_GET_CONTEXT();
  3936. RegalAssert(_context);
  3937. DispatchTableGL *_next = _context->dispatcher.error.next();
  3938. RegalAssert(_next);
  3939. GLenum _error = GL_NO_ERROR;
  3940. if (!_context->err.inBeginEnd)
  3941. _error = _next->call(&_next->glGetError)();
  3942. RegalAssert(_error==GL_NO_ERROR);
  3943. _next->call(&_next->glNormal3fv)(v);
  3944. if (!_context->err.inBeginEnd) {
  3945. _error = _next->call(&_next->glGetError)();
  3946. if (_error!=GL_NO_ERROR) {
  3947. Error("glNormal3fv : ",Token::GLerrorToString(_error));
  3948. #if REGAL_BREAK
  3949. Break::ErrorCB(_error);
  3950. #endif
  3951. if (_context->err.callback)
  3952. _context->err.callback( _error );
  3953. }
  3954. }
  3955. }
  3956. static void REGAL_CALL error_glNormal3i(GLint nx, GLint ny, GLint nz)
  3957. {
  3958. Internal("error_glNormal3i","()");
  3959. RegalContext *_context = REGAL_GET_CONTEXT();
  3960. RegalAssert(_context);
  3961. DispatchTableGL *_next = _context->dispatcher.error.next();
  3962. RegalAssert(_next);
  3963. GLenum _error = GL_NO_ERROR;
  3964. if (!_context->err.inBeginEnd)
  3965. _error = _next->call(&_next->glGetError)();
  3966. RegalAssert(_error==GL_NO_ERROR);
  3967. _next->call(&_next->glNormal3i)(nx, ny, nz);
  3968. if (!_context->err.inBeginEnd) {
  3969. _error = _next->call(&_next->glGetError)();
  3970. if (_error!=GL_NO_ERROR) {
  3971. Error("glNormal3i : ",Token::GLerrorToString(_error));
  3972. #if REGAL_BREAK
  3973. Break::ErrorCB(_error);
  3974. #endif
  3975. if (_context->err.callback)
  3976. _context->err.callback( _error );
  3977. }
  3978. }
  3979. }
  3980. static void REGAL_CALL error_glNormal3iv(const GLint *v)
  3981. {
  3982. Internal("error_glNormal3iv","()");
  3983. RegalContext *_context = REGAL_GET_CONTEXT();
  3984. RegalAssert(_context);
  3985. DispatchTableGL *_next = _context->dispatcher.error.next();
  3986. RegalAssert(_next);
  3987. GLenum _error = GL_NO_ERROR;
  3988. if (!_context->err.inBeginEnd)
  3989. _error = _next->call(&_next->glGetError)();
  3990. RegalAssert(_error==GL_NO_ERROR);
  3991. _next->call(&_next->glNormal3iv)(v);
  3992. if (!_context->err.inBeginEnd) {
  3993. _error = _next->call(&_next->glGetError)();
  3994. if (_error!=GL_NO_ERROR) {
  3995. Error("glNormal3iv : ",Token::GLerrorToString(_error));
  3996. #if REGAL_BREAK
  3997. Break::ErrorCB(_error);
  3998. #endif
  3999. if (_context->err.callback)
  4000. _context->err.callback( _error );
  4001. }
  4002. }
  4003. }
  4004. static void REGAL_CALL error_glNormal3s(GLshort nx, GLshort ny, GLshort nz)
  4005. {
  4006. Internal("error_glNormal3s","()");
  4007. RegalContext *_context = REGAL_GET_CONTEXT();
  4008. RegalAssert(_context);
  4009. DispatchTableGL *_next = _context->dispatcher.error.next();
  4010. RegalAssert(_next);
  4011. GLenum _error = GL_NO_ERROR;
  4012. if (!_context->err.inBeginEnd)
  4013. _error = _next->call(&_next->glGetError)();
  4014. RegalAssert(_error==GL_NO_ERROR);
  4015. _next->call(&_next->glNormal3s)(nx, ny, nz);
  4016. if (!_context->err.inBeginEnd) {
  4017. _error = _next->call(&_next->glGetError)();
  4018. if (_error!=GL_NO_ERROR) {
  4019. Error("glNormal3s : ",Token::GLerrorToString(_error));
  4020. #if REGAL_BREAK
  4021. Break::ErrorCB(_error);
  4022. #endif
  4023. if (_context->err.callback)
  4024. _context->err.callback( _error );
  4025. }
  4026. }
  4027. }
  4028. static void REGAL_CALL error_glNormal3sv(const GLshort *v)
  4029. {
  4030. Internal("error_glNormal3sv","()");
  4031. RegalContext *_context = REGAL_GET_CONTEXT();
  4032. RegalAssert(_context);
  4033. DispatchTableGL *_next = _context->dispatcher.error.next();
  4034. RegalAssert(_next);
  4035. GLenum _error = GL_NO_ERROR;
  4036. if (!_context->err.inBeginEnd)
  4037. _error = _next->call(&_next->glGetError)();
  4038. RegalAssert(_error==GL_NO_ERROR);
  4039. _next->call(&_next->glNormal3sv)(v);
  4040. if (!_context->err.inBeginEnd) {
  4041. _error = _next->call(&_next->glGetError)();
  4042. if (_error!=GL_NO_ERROR) {
  4043. Error("glNormal3sv : ",Token::GLerrorToString(_error));
  4044. #if REGAL_BREAK
  4045. Break::ErrorCB(_error);
  4046. #endif
  4047. if (_context->err.callback)
  4048. _context->err.callback( _error );
  4049. }
  4050. }
  4051. }
  4052. static void REGAL_CALL error_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
  4053. {
  4054. Internal("error_glOrtho","()");
  4055. RegalContext *_context = REGAL_GET_CONTEXT();
  4056. RegalAssert(_context);
  4057. DispatchTableGL *_next = _context->dispatcher.error.next();
  4058. RegalAssert(_next);
  4059. GLenum _error = GL_NO_ERROR;
  4060. if (!_context->err.inBeginEnd)
  4061. _error = _next->call(&_next->glGetError)();
  4062. RegalAssert(_error==GL_NO_ERROR);
  4063. _next->call(&_next->glOrtho)(left, right, bottom, top, zNear, zFar);
  4064. if (!_context->err.inBeginEnd) {
  4065. _error = _next->call(&_next->glGetError)();
  4066. if (_error!=GL_NO_ERROR) {
  4067. Error("glOrtho : ",Token::GLerrorToString(_error));
  4068. #if REGAL_BREAK
  4069. Break::ErrorCB(_error);
  4070. #endif
  4071. if (_context->err.callback)
  4072. _context->err.callback( _error );
  4073. }
  4074. }
  4075. }
  4076. static void REGAL_CALL error_glPassThrough(GLfloat token)
  4077. {
  4078. Internal("error_glPassThrough","()");
  4079. RegalContext *_context = REGAL_GET_CONTEXT();
  4080. RegalAssert(_context);
  4081. DispatchTableGL *_next = _context->dispatcher.error.next();
  4082. RegalAssert(_next);
  4083. GLenum _error = GL_NO_ERROR;
  4084. if (!_context->err.inBeginEnd)
  4085. _error = _next->call(&_next->glGetError)();
  4086. RegalAssert(_error==GL_NO_ERROR);
  4087. _next->call(&_next->glPassThrough)(token);
  4088. if (!_context->err.inBeginEnd) {
  4089. _error = _next->call(&_next->glGetError)();
  4090. if (_error!=GL_NO_ERROR) {
  4091. Error("glPassThrough : ",Token::GLerrorToString(_error));
  4092. #if REGAL_BREAK
  4093. Break::ErrorCB(_error);
  4094. #endif
  4095. if (_context->err.callback)
  4096. _context->err.callback( _error );
  4097. }
  4098. }
  4099. }
  4100. static void REGAL_CALL error_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values)
  4101. {
  4102. Internal("error_glPixelMapfv","()");
  4103. RegalContext *_context = REGAL_GET_CONTEXT();
  4104. RegalAssert(_context);
  4105. DispatchTableGL *_next = _context->dispatcher.error.next();
  4106. RegalAssert(_next);
  4107. GLenum _error = GL_NO_ERROR;
  4108. if (!_context->err.inBeginEnd)
  4109. _error = _next->call(&_next->glGetError)();
  4110. RegalAssert(_error==GL_NO_ERROR);
  4111. _next->call(&_next->glPixelMapfv)(map, mapsize, values);
  4112. if (!_context->err.inBeginEnd) {
  4113. _error = _next->call(&_next->glGetError)();
  4114. if (_error!=GL_NO_ERROR) {
  4115. Error("glPixelMapfv : ",Token::GLerrorToString(_error));
  4116. #if REGAL_BREAK
  4117. Break::ErrorCB(_error);
  4118. #endif
  4119. if (_context->err.callback)
  4120. _context->err.callback( _error );
  4121. }
  4122. }
  4123. }
  4124. static void REGAL_CALL error_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values)
  4125. {
  4126. Internal("error_glPixelMapuiv","()");
  4127. RegalContext *_context = REGAL_GET_CONTEXT();
  4128. RegalAssert(_context);
  4129. DispatchTableGL *_next = _context->dispatcher.error.next();
  4130. RegalAssert(_next);
  4131. GLenum _error = GL_NO_ERROR;
  4132. if (!_context->err.inBeginEnd)
  4133. _error = _next->call(&_next->glGetError)();
  4134. RegalAssert(_error==GL_NO_ERROR);
  4135. _next->call(&_next->glPixelMapuiv)(map, mapsize, values);
  4136. if (!_context->err.inBeginEnd) {
  4137. _error = _next->call(&_next->glGetError)();
  4138. if (_error!=GL_NO_ERROR) {
  4139. Error("glPixelMapuiv : ",Token::GLerrorToString(_error));
  4140. #if REGAL_BREAK
  4141. Break::ErrorCB(_error);
  4142. #endif
  4143. if (_context->err.callback)
  4144. _context->err.callback( _error );
  4145. }
  4146. }
  4147. }
  4148. static void REGAL_CALL error_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values)
  4149. {
  4150. Internal("error_glPixelMapusv","()");
  4151. RegalContext *_context = REGAL_GET_CONTEXT();
  4152. RegalAssert(_context);
  4153. DispatchTableGL *_next = _context->dispatcher.error.next();
  4154. RegalAssert(_next);
  4155. GLenum _error = GL_NO_ERROR;
  4156. if (!_context->err.inBeginEnd)
  4157. _error = _next->call(&_next->glGetError)();
  4158. RegalAssert(_error==GL_NO_ERROR);
  4159. _next->call(&_next->glPixelMapusv)(map, mapsize, values);
  4160. if (!_context->err.inBeginEnd) {
  4161. _error = _next->call(&_next->glGetError)();
  4162. if (_error!=GL_NO_ERROR) {
  4163. Error("glPixelMapusv : ",Token::GLerrorToString(_error));
  4164. #if REGAL_BREAK
  4165. Break::ErrorCB(_error);
  4166. #endif
  4167. if (_context->err.callback)
  4168. _context->err.callback( _error );
  4169. }
  4170. }
  4171. }
  4172. static void REGAL_CALL error_glPixelStoref(GLenum pname, GLfloat param)
  4173. {
  4174. Internal("error_glPixelStoref","()");
  4175. RegalContext *_context = REGAL_GET_CONTEXT();
  4176. RegalAssert(_context);
  4177. DispatchTableGL *_next = _context->dispatcher.error.next();
  4178. RegalAssert(_next);
  4179. GLenum _error = GL_NO_ERROR;
  4180. if (!_context->err.inBeginEnd)
  4181. _error = _next->call(&_next->glGetError)();
  4182. RegalAssert(_error==GL_NO_ERROR);
  4183. _next->call(&_next->glPixelStoref)(pname, param);
  4184. if (!_context->err.inBeginEnd) {
  4185. _error = _next->call(&_next->glGetError)();
  4186. if (_error!=GL_NO_ERROR) {
  4187. Error("glPixelStoref : ",Token::GLerrorToString(_error));
  4188. #if REGAL_BREAK
  4189. Break::ErrorCB(_error);
  4190. #endif
  4191. if (_context->err.callback)
  4192. _context->err.callback( _error );
  4193. }
  4194. }
  4195. }
  4196. static void REGAL_CALL error_glPixelStorei(GLenum pname, GLint param)
  4197. {
  4198. Internal("error_glPixelStorei","()");
  4199. RegalContext *_context = REGAL_GET_CONTEXT();
  4200. RegalAssert(_context);
  4201. DispatchTableGL *_next = _context->dispatcher.error.next();
  4202. RegalAssert(_next);
  4203. GLenum _error = GL_NO_ERROR;
  4204. if (!_context->err.inBeginEnd)
  4205. _error = _next->call(&_next->glGetError)();
  4206. RegalAssert(_error==GL_NO_ERROR);
  4207. _next->call(&_next->glPixelStorei)(pname, param);
  4208. if (!_context->err.inBeginEnd) {
  4209. _error = _next->call(&_next->glGetError)();
  4210. if (_error!=GL_NO_ERROR) {
  4211. Error("glPixelStorei : ",Token::GLerrorToString(_error));
  4212. #if REGAL_BREAK
  4213. Break::ErrorCB(_error);
  4214. #endif
  4215. if (_context->err.callback)
  4216. _context->err.callback( _error );
  4217. }
  4218. }
  4219. }
  4220. static void REGAL_CALL error_glPixelTransferf(GLenum pname, GLfloat param)
  4221. {
  4222. Internal("error_glPixelTransferf","()");
  4223. RegalContext *_context = REGAL_GET_CONTEXT();
  4224. RegalAssert(_context);
  4225. DispatchTableGL *_next = _context->dispatcher.error.next();
  4226. RegalAssert(_next);
  4227. GLenum _error = GL_NO_ERROR;
  4228. if (!_context->err.inBeginEnd)
  4229. _error = _next->call(&_next->glGetError)();
  4230. RegalAssert(_error==GL_NO_ERROR);
  4231. _next->call(&_next->glPixelTransferf)(pname, param);
  4232. if (!_context->err.inBeginEnd) {
  4233. _error = _next->call(&_next->glGetError)();
  4234. if (_error!=GL_NO_ERROR) {
  4235. Error("glPixelTransferf : ",Token::GLerrorToString(_error));
  4236. #if REGAL_BREAK
  4237. Break::ErrorCB(_error);
  4238. #endif
  4239. if (_context->err.callback)
  4240. _context->err.callback( _error );
  4241. }
  4242. }
  4243. }
  4244. static void REGAL_CALL error_glPixelTransferi(GLenum pname, GLint param)
  4245. {
  4246. Internal("error_glPixelTransferi","()");
  4247. RegalContext *_context = REGAL_GET_CONTEXT();
  4248. RegalAssert(_context);
  4249. DispatchTableGL *_next = _context->dispatcher.error.next();
  4250. RegalAssert(_next);
  4251. GLenum _error = GL_NO_ERROR;
  4252. if (!_context->err.inBeginEnd)
  4253. _error = _next->call(&_next->glGetError)();
  4254. RegalAssert(_error==GL_NO_ERROR);
  4255. _next->call(&_next->glPixelTransferi)(pname, param);
  4256. if (!_context->err.inBeginEnd) {
  4257. _error = _next->call(&_next->glGetError)();
  4258. if (_error!=GL_NO_ERROR) {
  4259. Error("glPixelTransferi : ",Token::GLerrorToString(_error));
  4260. #if REGAL_BREAK
  4261. Break::ErrorCB(_error);
  4262. #endif
  4263. if (_context->err.callback)
  4264. _context->err.callback( _error );
  4265. }
  4266. }
  4267. }
  4268. static void REGAL_CALL error_glPixelZoom(GLfloat xfactor, GLfloat yfactor)
  4269. {
  4270. Internal("error_glPixelZoom","()");
  4271. RegalContext *_context = REGAL_GET_CONTEXT();
  4272. RegalAssert(_context);
  4273. DispatchTableGL *_next = _context->dispatcher.error.next();
  4274. RegalAssert(_next);
  4275. GLenum _error = GL_NO_ERROR;
  4276. if (!_context->err.inBeginEnd)
  4277. _error = _next->call(&_next->glGetError)();
  4278. RegalAssert(_error==GL_NO_ERROR);
  4279. _next->call(&_next->glPixelZoom)(xfactor, yfactor);
  4280. if (!_context->err.inBeginEnd) {
  4281. _error = _next->call(&_next->glGetError)();
  4282. if (_error!=GL_NO_ERROR) {
  4283. Error("glPixelZoom : ",Token::GLerrorToString(_error));
  4284. #if REGAL_BREAK
  4285. Break::ErrorCB(_error);
  4286. #endif
  4287. if (_context->err.callback)
  4288. _context->err.callback( _error );
  4289. }
  4290. }
  4291. }
  4292. static void REGAL_CALL error_glPointSize(GLfloat size)
  4293. {
  4294. Internal("error_glPointSize","()");
  4295. RegalContext *_context = REGAL_GET_CONTEXT();
  4296. RegalAssert(_context);
  4297. DispatchTableGL *_next = _context->dispatcher.error.next();
  4298. RegalAssert(_next);
  4299. GLenum _error = GL_NO_ERROR;
  4300. if (!_context->err.inBeginEnd)
  4301. _error = _next->call(&_next->glGetError)();
  4302. RegalAssert(_error==GL_NO_ERROR);
  4303. _next->call(&_next->glPointSize)(size);
  4304. if (!_context->err.inBeginEnd) {
  4305. _error = _next->call(&_next->glGetError)();
  4306. if (_error!=GL_NO_ERROR) {
  4307. Error("glPointSize : ",Token::GLerrorToString(_error));
  4308. #if REGAL_BREAK
  4309. Break::ErrorCB(_error);
  4310. #endif
  4311. if (_context->err.callback)
  4312. _context->err.callback( _error );
  4313. }
  4314. }
  4315. }
  4316. static void REGAL_CALL error_glPolygonMode(GLenum face, GLenum mode)
  4317. {
  4318. Internal("error_glPolygonMode","()");
  4319. RegalContext *_context = REGAL_GET_CONTEXT();
  4320. RegalAssert(_context);
  4321. DispatchTableGL *_next = _context->dispatcher.error.next();
  4322. RegalAssert(_next);
  4323. GLenum _error = GL_NO_ERROR;
  4324. if (!_context->err.inBeginEnd)
  4325. _error = _next->call(&_next->glGetError)();
  4326. RegalAssert(_error==GL_NO_ERROR);
  4327. _next->call(&_next->glPolygonMode)(face, mode);
  4328. if (!_context->err.inBeginEnd) {
  4329. _error = _next->call(&_next->glGetError)();
  4330. if (_error!=GL_NO_ERROR) {
  4331. Error("glPolygonMode : ",Token::GLerrorToString(_error));
  4332. #if REGAL_BREAK
  4333. Break::ErrorCB(_error);
  4334. #endif
  4335. if (_context->err.callback)
  4336. _context->err.callback( _error );
  4337. }
  4338. }
  4339. }
  4340. static void REGAL_CALL error_glPolygonStipple(const GLubyte *mask)
  4341. {
  4342. Internal("error_glPolygonStipple","()");
  4343. RegalContext *_context = REGAL_GET_CONTEXT();
  4344. RegalAssert(_context);
  4345. DispatchTableGL *_next = _context->dispatcher.error.next();
  4346. RegalAssert(_next);
  4347. GLenum _error = GL_NO_ERROR;
  4348. if (!_context->err.inBeginEnd)
  4349. _error = _next->call(&_next->glGetError)();
  4350. RegalAssert(_error==GL_NO_ERROR);
  4351. _next->call(&_next->glPolygonStipple)(mask);
  4352. if (!_context->err.inBeginEnd) {
  4353. _error = _next->call(&_next->glGetError)();
  4354. if (_error!=GL_NO_ERROR) {
  4355. Error("glPolygonStipple : ",Token::GLerrorToString(_error));
  4356. #if REGAL_BREAK
  4357. Break::ErrorCB(_error);
  4358. #endif
  4359. if (_context->err.callback)
  4360. _context->err.callback( _error );
  4361. }
  4362. }
  4363. }
  4364. static void REGAL_CALL error_glPopAttrib(void)
  4365. {
  4366. Internal("error_glPopAttrib","()");
  4367. RegalContext *_context = REGAL_GET_CONTEXT();
  4368. RegalAssert(_context);
  4369. DispatchTableGL *_next = _context->dispatcher.error.next();
  4370. RegalAssert(_next);
  4371. GLenum _error = GL_NO_ERROR;
  4372. if (!_context->err.inBeginEnd)
  4373. _error = _next->call(&_next->glGetError)();
  4374. RegalAssert(_error==GL_NO_ERROR);
  4375. _next->call(&_next->glPopAttrib)();
  4376. if (!_context->err.inBeginEnd) {
  4377. _error = _next->call(&_next->glGetError)();
  4378. if (_error!=GL_NO_ERROR) {
  4379. Error("glPopAttrib : ",Token::GLerrorToString(_error));
  4380. #if REGAL_BREAK
  4381. Break::ErrorCB(_error);
  4382. #endif
  4383. if (_context->err.callback)
  4384. _context->err.callback( _error );
  4385. }
  4386. }
  4387. }
  4388. static void REGAL_CALL error_glPopMatrix(void)
  4389. {
  4390. Internal("error_glPopMatrix","()");
  4391. RegalContext *_context = REGAL_GET_CONTEXT();
  4392. RegalAssert(_context);
  4393. DispatchTableGL *_next = _context->dispatcher.error.next();
  4394. RegalAssert(_next);
  4395. GLenum _error = GL_NO_ERROR;
  4396. if (!_context->err.inBeginEnd)
  4397. _error = _next->call(&_next->glGetError)();
  4398. RegalAssert(_error==GL_NO_ERROR);
  4399. _next->call(&_next->glPopMatrix)();
  4400. if (!_context->err.inBeginEnd) {
  4401. _error = _next->call(&_next->glGetError)();
  4402. if (_error!=GL_NO_ERROR) {
  4403. Error("glPopMatrix : ",Token::GLerrorToString(_error));
  4404. #if REGAL_BREAK
  4405. Break::ErrorCB(_error);
  4406. #endif
  4407. if (_context->err.callback)
  4408. _context->err.callback( _error );
  4409. }
  4410. }
  4411. }
  4412. static void REGAL_CALL error_glPopName(void)
  4413. {
  4414. Internal("error_glPopName","()");
  4415. RegalContext *_context = REGAL_GET_CONTEXT();
  4416. RegalAssert(_context);
  4417. DispatchTableGL *_next = _context->dispatcher.error.next();
  4418. RegalAssert(_next);
  4419. GLenum _error = GL_NO_ERROR;
  4420. if (!_context->err.inBeginEnd)
  4421. _error = _next->call(&_next->glGetError)();
  4422. RegalAssert(_error==GL_NO_ERROR);
  4423. _next->call(&_next->glPopName)();
  4424. if (!_context->err.inBeginEnd) {
  4425. _error = _next->call(&_next->glGetError)();
  4426. if (_error!=GL_NO_ERROR) {
  4427. Error("glPopName : ",Token::GLerrorToString(_error));
  4428. #if REGAL_BREAK
  4429. Break::ErrorCB(_error);
  4430. #endif
  4431. if (_context->err.callback)
  4432. _context->err.callback( _error );
  4433. }
  4434. }
  4435. }
  4436. static void REGAL_CALL error_glPushAttrib(GLbitfield mask)
  4437. {
  4438. Internal("error_glPushAttrib","()");
  4439. RegalContext *_context = REGAL_GET_CONTEXT();
  4440. RegalAssert(_context);
  4441. DispatchTableGL *_next = _context->dispatcher.error.next();
  4442. RegalAssert(_next);
  4443. GLenum _error = GL_NO_ERROR;
  4444. if (!_context->err.inBeginEnd)
  4445. _error = _next->call(&_next->glGetError)();
  4446. RegalAssert(_error==GL_NO_ERROR);
  4447. _next->call(&_next->glPushAttrib)(mask);
  4448. if (!_context->err.inBeginEnd) {
  4449. _error = _next->call(&_next->glGetError)();
  4450. if (_error!=GL_NO_ERROR) {
  4451. Error("glPushAttrib : ",Token::GLerrorToString(_error));
  4452. #if REGAL_BREAK
  4453. Break::ErrorCB(_error);
  4454. #endif
  4455. if (_context->err.callback)
  4456. _context->err.callback( _error );
  4457. }
  4458. }
  4459. }
  4460. static void REGAL_CALL error_glPushMatrix(void)
  4461. {
  4462. Internal("error_glPushMatrix","()");
  4463. RegalContext *_context = REGAL_GET_CONTEXT();
  4464. RegalAssert(_context);
  4465. DispatchTableGL *_next = _context->dispatcher.error.next();
  4466. RegalAssert(_next);
  4467. GLenum _error = GL_NO_ERROR;
  4468. if (!_context->err.inBeginEnd)
  4469. _error = _next->call(&_next->glGetError)();
  4470. RegalAssert(_error==GL_NO_ERROR);
  4471. _next->call(&_next->glPushMatrix)();
  4472. if (!_context->err.inBeginEnd) {
  4473. _error = _next->call(&_next->glGetError)();
  4474. if (_error!=GL_NO_ERROR) {
  4475. Error("glPushMatrix : ",Token::GLerrorToString(_error));
  4476. #if REGAL_BREAK
  4477. Break::ErrorCB(_error);
  4478. #endif
  4479. if (_context->err.callback)
  4480. _context->err.callback( _error );
  4481. }
  4482. }
  4483. }
  4484. static void REGAL_CALL error_glPushName(GLuint name)
  4485. {
  4486. Internal("error_glPushName","()");
  4487. RegalContext *_context = REGAL_GET_CONTEXT();
  4488. RegalAssert(_context);
  4489. DispatchTableGL *_next = _context->dispatcher.error.next();
  4490. RegalAssert(_next);
  4491. GLenum _error = GL_NO_ERROR;
  4492. if (!_context->err.inBeginEnd)
  4493. _error = _next->call(&_next->glGetError)();
  4494. RegalAssert(_error==GL_NO_ERROR);
  4495. _next->call(&_next->glPushName)(name);
  4496. if (!_context->err.inBeginEnd) {
  4497. _error = _next->call(&_next->glGetError)();
  4498. if (_error!=GL_NO_ERROR) {
  4499. Error("glPushName : ",Token::GLerrorToString(_error));
  4500. #if REGAL_BREAK
  4501. Break::ErrorCB(_error);
  4502. #endif
  4503. if (_context->err.callback)
  4504. _context->err.callback( _error );
  4505. }
  4506. }
  4507. }
  4508. static void REGAL_CALL error_glRasterPos2d(GLdouble x, GLdouble y)
  4509. {
  4510. Internal("error_glRasterPos2d","()");
  4511. RegalContext *_context = REGAL_GET_CONTEXT();
  4512. RegalAssert(_context);
  4513. DispatchTableGL *_next = _context->dispatcher.error.next();
  4514. RegalAssert(_next);
  4515. GLenum _error = GL_NO_ERROR;
  4516. if (!_context->err.inBeginEnd)
  4517. _error = _next->call(&_next->glGetError)();
  4518. RegalAssert(_error==GL_NO_ERROR);
  4519. _next->call(&_next->glRasterPos2d)(x, y);
  4520. if (!_context->err.inBeginEnd) {
  4521. _error = _next->call(&_next->glGetError)();
  4522. if (_error!=GL_NO_ERROR) {
  4523. Error("glRasterPos2d : ",Token::GLerrorToString(_error));
  4524. #if REGAL_BREAK
  4525. Break::ErrorCB(_error);
  4526. #endif
  4527. if (_context->err.callback)
  4528. _context->err.callback( _error );
  4529. }
  4530. }
  4531. }
  4532. static void REGAL_CALL error_glRasterPos2dv(const GLdouble *v)
  4533. {
  4534. Internal("error_glRasterPos2dv","()");
  4535. RegalContext *_context = REGAL_GET_CONTEXT();
  4536. RegalAssert(_context);
  4537. DispatchTableGL *_next = _context->dispatcher.error.next();
  4538. RegalAssert(_next);
  4539. GLenum _error = GL_NO_ERROR;
  4540. if (!_context->err.inBeginEnd)
  4541. _error = _next->call(&_next->glGetError)();
  4542. RegalAssert(_error==GL_NO_ERROR);
  4543. _next->call(&_next->glRasterPos2dv)(v);
  4544. if (!_context->err.inBeginEnd) {
  4545. _error = _next->call(&_next->glGetError)();
  4546. if (_error!=GL_NO_ERROR) {
  4547. Error("glRasterPos2dv : ",Token::GLerrorToString(_error));
  4548. #if REGAL_BREAK
  4549. Break::ErrorCB(_error);
  4550. #endif
  4551. if (_context->err.callback)
  4552. _context->err.callback( _error );
  4553. }
  4554. }
  4555. }
  4556. static void REGAL_CALL error_glRasterPos2f(GLfloat x, GLfloat y)
  4557. {
  4558. Internal("error_glRasterPos2f","()");
  4559. RegalContext *_context = REGAL_GET_CONTEXT();
  4560. RegalAssert(_context);
  4561. DispatchTableGL *_next = _context->dispatcher.error.next();
  4562. RegalAssert(_next);
  4563. GLenum _error = GL_NO_ERROR;
  4564. if (!_context->err.inBeginEnd)
  4565. _error = _next->call(&_next->glGetError)();
  4566. RegalAssert(_error==GL_NO_ERROR);
  4567. _next->call(&_next->glRasterPos2f)(x, y);
  4568. if (!_context->err.inBeginEnd) {
  4569. _error = _next->call(&_next->glGetError)();
  4570. if (_error!=GL_NO_ERROR) {
  4571. Error("glRasterPos2f : ",Token::GLerrorToString(_error));
  4572. #if REGAL_BREAK
  4573. Break::ErrorCB(_error);
  4574. #endif
  4575. if (_context->err.callback)
  4576. _context->err.callback( _error );
  4577. }
  4578. }
  4579. }
  4580. static void REGAL_CALL error_glRasterPos2fv(const GLfloat *v)
  4581. {
  4582. Internal("error_glRasterPos2fv","()");
  4583. RegalContext *_context = REGAL_GET_CONTEXT();
  4584. RegalAssert(_context);
  4585. DispatchTableGL *_next = _context->dispatcher.error.next();
  4586. RegalAssert(_next);
  4587. GLenum _error = GL_NO_ERROR;
  4588. if (!_context->err.inBeginEnd)
  4589. _error = _next->call(&_next->glGetError)();
  4590. RegalAssert(_error==GL_NO_ERROR);
  4591. _next->call(&_next->glRasterPos2fv)(v);
  4592. if (!_context->err.inBeginEnd) {
  4593. _error = _next->call(&_next->glGetError)();
  4594. if (_error!=GL_NO_ERROR) {
  4595. Error("glRasterPos2fv : ",Token::GLerrorToString(_error));
  4596. #if REGAL_BREAK
  4597. Break::ErrorCB(_error);
  4598. #endif
  4599. if (_context->err.callback)
  4600. _context->err.callback( _error );
  4601. }
  4602. }
  4603. }
  4604. static void REGAL_CALL error_glRasterPos2i(GLint x, GLint y)
  4605. {
  4606. Internal("error_glRasterPos2i","()");
  4607. RegalContext *_context = REGAL_GET_CONTEXT();
  4608. RegalAssert(_context);
  4609. DispatchTableGL *_next = _context->dispatcher.error.next();
  4610. RegalAssert(_next);
  4611. GLenum _error = GL_NO_ERROR;
  4612. if (!_context->err.inBeginEnd)
  4613. _error = _next->call(&_next->glGetError)();
  4614. RegalAssert(_error==GL_NO_ERROR);
  4615. _next->call(&_next->glRasterPos2i)(x, y);
  4616. if (!_context->err.inBeginEnd) {
  4617. _error = _next->call(&_next->glGetError)();
  4618. if (_error!=GL_NO_ERROR) {
  4619. Error("glRasterPos2i : ",Token::GLerrorToString(_error));
  4620. #if REGAL_BREAK
  4621. Break::ErrorCB(_error);
  4622. #endif
  4623. if (_context->err.callback)
  4624. _context->err.callback( _error );
  4625. }
  4626. }
  4627. }
  4628. static void REGAL_CALL error_glRasterPos2iv(const GLint *v)
  4629. {
  4630. Internal("error_glRasterPos2iv","()");
  4631. RegalContext *_context = REGAL_GET_CONTEXT();
  4632. RegalAssert(_context);
  4633. DispatchTableGL *_next = _context->dispatcher.error.next();
  4634. RegalAssert(_next);
  4635. GLenum _error = GL_NO_ERROR;
  4636. if (!_context->err.inBeginEnd)
  4637. _error = _next->call(&_next->glGetError)();
  4638. RegalAssert(_error==GL_NO_ERROR);
  4639. _next->call(&_next->glRasterPos2iv)(v);
  4640. if (!_context->err.inBeginEnd) {
  4641. _error = _next->call(&_next->glGetError)();
  4642. if (_error!=GL_NO_ERROR) {
  4643. Error("glRasterPos2iv : ",Token::GLerrorToString(_error));
  4644. #if REGAL_BREAK
  4645. Break::ErrorCB(_error);
  4646. #endif
  4647. if (_context->err.callback)
  4648. _context->err.callback( _error );
  4649. }
  4650. }
  4651. }
  4652. static void REGAL_CALL error_glRasterPos2s(GLshort x, GLshort y)
  4653. {
  4654. Internal("error_glRasterPos2s","()");
  4655. RegalContext *_context = REGAL_GET_CONTEXT();
  4656. RegalAssert(_context);
  4657. DispatchTableGL *_next = _context->dispatcher.error.next();
  4658. RegalAssert(_next);
  4659. GLenum _error = GL_NO_ERROR;
  4660. if (!_context->err.inBeginEnd)
  4661. _error = _next->call(&_next->glGetError)();
  4662. RegalAssert(_error==GL_NO_ERROR);
  4663. _next->call(&_next->glRasterPos2s)(x, y);
  4664. if (!_context->err.inBeginEnd) {
  4665. _error = _next->call(&_next->glGetError)();
  4666. if (_error!=GL_NO_ERROR) {
  4667. Error("glRasterPos2s : ",Token::GLerrorToString(_error));
  4668. #if REGAL_BREAK
  4669. Break::ErrorCB(_error);
  4670. #endif
  4671. if (_context->err.callback)
  4672. _context->err.callback( _error );
  4673. }
  4674. }
  4675. }
  4676. static void REGAL_CALL error_glRasterPos2sv(const GLshort *v)
  4677. {
  4678. Internal("error_glRasterPos2sv","()");
  4679. RegalContext *_context = REGAL_GET_CONTEXT();
  4680. RegalAssert(_context);
  4681. DispatchTableGL *_next = _context->dispatcher.error.next();
  4682. RegalAssert(_next);
  4683. GLenum _error = GL_NO_ERROR;
  4684. if (!_context->err.inBeginEnd)
  4685. _error = _next->call(&_next->glGetError)();
  4686. RegalAssert(_error==GL_NO_ERROR);
  4687. _next->call(&_next->glRasterPos2sv)(v);
  4688. if (!_context->err.inBeginEnd) {
  4689. _error = _next->call(&_next->glGetError)();
  4690. if (_error!=GL_NO_ERROR) {
  4691. Error("glRasterPos2sv : ",Token::GLerrorToString(_error));
  4692. #if REGAL_BREAK
  4693. Break::ErrorCB(_error);
  4694. #endif
  4695. if (_context->err.callback)
  4696. _context->err.callback( _error );
  4697. }
  4698. }
  4699. }
  4700. static void REGAL_CALL error_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
  4701. {
  4702. Internal("error_glRasterPos3d","()");
  4703. RegalContext *_context = REGAL_GET_CONTEXT();
  4704. RegalAssert(_context);
  4705. DispatchTableGL *_next = _context->dispatcher.error.next();
  4706. RegalAssert(_next);
  4707. GLenum _error = GL_NO_ERROR;
  4708. if (!_context->err.inBeginEnd)
  4709. _error = _next->call(&_next->glGetError)();
  4710. RegalAssert(_error==GL_NO_ERROR);
  4711. _next->call(&_next->glRasterPos3d)(x, y, z);
  4712. if (!_context->err.inBeginEnd) {
  4713. _error = _next->call(&_next->glGetError)();
  4714. if (_error!=GL_NO_ERROR) {
  4715. Error("glRasterPos3d : ",Token::GLerrorToString(_error));
  4716. #if REGAL_BREAK
  4717. Break::ErrorCB(_error);
  4718. #endif
  4719. if (_context->err.callback)
  4720. _context->err.callback( _error );
  4721. }
  4722. }
  4723. }
  4724. static void REGAL_CALL error_glRasterPos3dv(const GLdouble *v)
  4725. {
  4726. Internal("error_glRasterPos3dv","()");
  4727. RegalContext *_context = REGAL_GET_CONTEXT();
  4728. RegalAssert(_context);
  4729. DispatchTableGL *_next = _context->dispatcher.error.next();
  4730. RegalAssert(_next);
  4731. GLenum _error = GL_NO_ERROR;
  4732. if (!_context->err.inBeginEnd)
  4733. _error = _next->call(&_next->glGetError)();
  4734. RegalAssert(_error==GL_NO_ERROR);
  4735. _next->call(&_next->glRasterPos3dv)(v);
  4736. if (!_context->err.inBeginEnd) {
  4737. _error = _next->call(&_next->glGetError)();
  4738. if (_error!=GL_NO_ERROR) {
  4739. Error("glRasterPos3dv : ",Token::GLerrorToString(_error));
  4740. #if REGAL_BREAK
  4741. Break::ErrorCB(_error);
  4742. #endif
  4743. if (_context->err.callback)
  4744. _context->err.callback( _error );
  4745. }
  4746. }
  4747. }
  4748. static void REGAL_CALL error_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
  4749. {
  4750. Internal("error_glRasterPos3f","()");
  4751. RegalContext *_context = REGAL_GET_CONTEXT();
  4752. RegalAssert(_context);
  4753. DispatchTableGL *_next = _context->dispatcher.error.next();
  4754. RegalAssert(_next);
  4755. GLenum _error = GL_NO_ERROR;
  4756. if (!_context->err.inBeginEnd)
  4757. _error = _next->call(&_next->glGetError)();
  4758. RegalAssert(_error==GL_NO_ERROR);
  4759. _next->call(&_next->glRasterPos3f)(x, y, z);
  4760. if (!_context->err.inBeginEnd) {
  4761. _error = _next->call(&_next->glGetError)();
  4762. if (_error!=GL_NO_ERROR) {
  4763. Error("glRasterPos3f : ",Token::GLerrorToString(_error));
  4764. #if REGAL_BREAK
  4765. Break::ErrorCB(_error);
  4766. #endif
  4767. if (_context->err.callback)
  4768. _context->err.callback( _error );
  4769. }
  4770. }
  4771. }
  4772. static void REGAL_CALL error_glRasterPos3fv(const GLfloat *v)
  4773. {
  4774. Internal("error_glRasterPos3fv","()");
  4775. RegalContext *_context = REGAL_GET_CONTEXT();
  4776. RegalAssert(_context);
  4777. DispatchTableGL *_next = _context->dispatcher.error.next();
  4778. RegalAssert(_next);
  4779. GLenum _error = GL_NO_ERROR;
  4780. if (!_context->err.inBeginEnd)
  4781. _error = _next->call(&_next->glGetError)();
  4782. RegalAssert(_error==GL_NO_ERROR);
  4783. _next->call(&_next->glRasterPos3fv)(v);
  4784. if (!_context->err.inBeginEnd) {
  4785. _error = _next->call(&_next->glGetError)();
  4786. if (_error!=GL_NO_ERROR) {
  4787. Error("glRasterPos3fv : ",Token::GLerrorToString(_error));
  4788. #if REGAL_BREAK
  4789. Break::ErrorCB(_error);
  4790. #endif
  4791. if (_context->err.callback)
  4792. _context->err.callback( _error );
  4793. }
  4794. }
  4795. }
  4796. static void REGAL_CALL error_glRasterPos3i(GLint x, GLint y, GLint z)
  4797. {
  4798. Internal("error_glRasterPos3i","()");
  4799. RegalContext *_context = REGAL_GET_CONTEXT();
  4800. RegalAssert(_context);
  4801. DispatchTableGL *_next = _context->dispatcher.error.next();
  4802. RegalAssert(_next);
  4803. GLenum _error = GL_NO_ERROR;
  4804. if (!_context->err.inBeginEnd)
  4805. _error = _next->call(&_next->glGetError)();
  4806. RegalAssert(_error==GL_NO_ERROR);
  4807. _next->call(&_next->glRasterPos3i)(x, y, z);
  4808. if (!_context->err.inBeginEnd) {
  4809. _error = _next->call(&_next->glGetError)();
  4810. if (_error!=GL_NO_ERROR) {
  4811. Error("glRasterPos3i : ",Token::GLerrorToString(_error));
  4812. #if REGAL_BREAK
  4813. Break::ErrorCB(_error);
  4814. #endif
  4815. if (_context->err.callback)
  4816. _context->err.callback( _error );
  4817. }
  4818. }
  4819. }
  4820. static void REGAL_CALL error_glRasterPos3iv(const GLint *v)
  4821. {
  4822. Internal("error_glRasterPos3iv","()");
  4823. RegalContext *_context = REGAL_GET_CONTEXT();
  4824. RegalAssert(_context);
  4825. DispatchTableGL *_next = _context->dispatcher.error.next();
  4826. RegalAssert(_next);
  4827. GLenum _error = GL_NO_ERROR;
  4828. if (!_context->err.inBeginEnd)
  4829. _error = _next->call(&_next->glGetError)();
  4830. RegalAssert(_error==GL_NO_ERROR);
  4831. _next->call(&_next->glRasterPos3iv)(v);
  4832. if (!_context->err.inBeginEnd) {
  4833. _error = _next->call(&_next->glGetError)();
  4834. if (_error!=GL_NO_ERROR) {
  4835. Error("glRasterPos3iv : ",Token::GLerrorToString(_error));
  4836. #if REGAL_BREAK
  4837. Break::ErrorCB(_error);
  4838. #endif
  4839. if (_context->err.callback)
  4840. _context->err.callback( _error );
  4841. }
  4842. }
  4843. }
  4844. static void REGAL_CALL error_glRasterPos3s(GLshort x, GLshort y, GLshort z)
  4845. {
  4846. Internal("error_glRasterPos3s","()");
  4847. RegalContext *_context = REGAL_GET_CONTEXT();
  4848. RegalAssert(_context);
  4849. DispatchTableGL *_next = _context->dispatcher.error.next();
  4850. RegalAssert(_next);
  4851. GLenum _error = GL_NO_ERROR;
  4852. if (!_context->err.inBeginEnd)
  4853. _error = _next->call(&_next->glGetError)();
  4854. RegalAssert(_error==GL_NO_ERROR);
  4855. _next->call(&_next->glRasterPos3s)(x, y, z);
  4856. if (!_context->err.inBeginEnd) {
  4857. _error = _next->call(&_next->glGetError)();
  4858. if (_error!=GL_NO_ERROR) {
  4859. Error("glRasterPos3s : ",Token::GLerrorToString(_error));
  4860. #if REGAL_BREAK
  4861. Break::ErrorCB(_error);
  4862. #endif
  4863. if (_context->err.callback)
  4864. _context->err.callback( _error );
  4865. }
  4866. }
  4867. }
  4868. static void REGAL_CALL error_glRasterPos3sv(const GLshort *v)
  4869. {
  4870. Internal("error_glRasterPos3sv","()");
  4871. RegalContext *_context = REGAL_GET_CONTEXT();
  4872. RegalAssert(_context);
  4873. DispatchTableGL *_next = _context->dispatcher.error.next();
  4874. RegalAssert(_next);
  4875. GLenum _error = GL_NO_ERROR;
  4876. if (!_context->err.inBeginEnd)
  4877. _error = _next->call(&_next->glGetError)();
  4878. RegalAssert(_error==GL_NO_ERROR);
  4879. _next->call(&_next->glRasterPos3sv)(v);
  4880. if (!_context->err.inBeginEnd) {
  4881. _error = _next->call(&_next->glGetError)();
  4882. if (_error!=GL_NO_ERROR) {
  4883. Error("glRasterPos3sv : ",Token::GLerrorToString(_error));
  4884. #if REGAL_BREAK
  4885. Break::ErrorCB(_error);
  4886. #endif
  4887. if (_context->err.callback)
  4888. _context->err.callback( _error );
  4889. }
  4890. }
  4891. }
  4892. static void REGAL_CALL error_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  4893. {
  4894. Internal("error_glRasterPos4d","()");
  4895. RegalContext *_context = REGAL_GET_CONTEXT();
  4896. RegalAssert(_context);
  4897. DispatchTableGL *_next = _context->dispatcher.error.next();
  4898. RegalAssert(_next);
  4899. GLenum _error = GL_NO_ERROR;
  4900. if (!_context->err.inBeginEnd)
  4901. _error = _next->call(&_next->glGetError)();
  4902. RegalAssert(_error==GL_NO_ERROR);
  4903. _next->call(&_next->glRasterPos4d)(x, y, z, w);
  4904. if (!_context->err.inBeginEnd) {
  4905. _error = _next->call(&_next->glGetError)();
  4906. if (_error!=GL_NO_ERROR) {
  4907. Error("glRasterPos4d : ",Token::GLerrorToString(_error));
  4908. #if REGAL_BREAK
  4909. Break::ErrorCB(_error);
  4910. #endif
  4911. if (_context->err.callback)
  4912. _context->err.callback( _error );
  4913. }
  4914. }
  4915. }
  4916. static void REGAL_CALL error_glRasterPos4dv(const GLdouble *v)
  4917. {
  4918. Internal("error_glRasterPos4dv","()");
  4919. RegalContext *_context = REGAL_GET_CONTEXT();
  4920. RegalAssert(_context);
  4921. DispatchTableGL *_next = _context->dispatcher.error.next();
  4922. RegalAssert(_next);
  4923. GLenum _error = GL_NO_ERROR;
  4924. if (!_context->err.inBeginEnd)
  4925. _error = _next->call(&_next->glGetError)();
  4926. RegalAssert(_error==GL_NO_ERROR);
  4927. _next->call(&_next->glRasterPos4dv)(v);
  4928. if (!_context->err.inBeginEnd) {
  4929. _error = _next->call(&_next->glGetError)();
  4930. if (_error!=GL_NO_ERROR) {
  4931. Error("glRasterPos4dv : ",Token::GLerrorToString(_error));
  4932. #if REGAL_BREAK
  4933. Break::ErrorCB(_error);
  4934. #endif
  4935. if (_context->err.callback)
  4936. _context->err.callback( _error );
  4937. }
  4938. }
  4939. }
  4940. static void REGAL_CALL error_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  4941. {
  4942. Internal("error_glRasterPos4f","()");
  4943. RegalContext *_context = REGAL_GET_CONTEXT();
  4944. RegalAssert(_context);
  4945. DispatchTableGL *_next = _context->dispatcher.error.next();
  4946. RegalAssert(_next);
  4947. GLenum _error = GL_NO_ERROR;
  4948. if (!_context->err.inBeginEnd)
  4949. _error = _next->call(&_next->glGetError)();
  4950. RegalAssert(_error==GL_NO_ERROR);
  4951. _next->call(&_next->glRasterPos4f)(x, y, z, w);
  4952. if (!_context->err.inBeginEnd) {
  4953. _error = _next->call(&_next->glGetError)();
  4954. if (_error!=GL_NO_ERROR) {
  4955. Error("glRasterPos4f : ",Token::GLerrorToString(_error));
  4956. #if REGAL_BREAK
  4957. Break::ErrorCB(_error);
  4958. #endif
  4959. if (_context->err.callback)
  4960. _context->err.callback( _error );
  4961. }
  4962. }
  4963. }
  4964. static void REGAL_CALL error_glRasterPos4fv(const GLfloat *v)
  4965. {
  4966. Internal("error_glRasterPos4fv","()");
  4967. RegalContext *_context = REGAL_GET_CONTEXT();
  4968. RegalAssert(_context);
  4969. DispatchTableGL *_next = _context->dispatcher.error.next();
  4970. RegalAssert(_next);
  4971. GLenum _error = GL_NO_ERROR;
  4972. if (!_context->err.inBeginEnd)
  4973. _error = _next->call(&_next->glGetError)();
  4974. RegalAssert(_error==GL_NO_ERROR);
  4975. _next->call(&_next->glRasterPos4fv)(v);
  4976. if (!_context->err.inBeginEnd) {
  4977. _error = _next->call(&_next->glGetError)();
  4978. if (_error!=GL_NO_ERROR) {
  4979. Error("glRasterPos4fv : ",Token::GLerrorToString(_error));
  4980. #if REGAL_BREAK
  4981. Break::ErrorCB(_error);
  4982. #endif
  4983. if (_context->err.callback)
  4984. _context->err.callback( _error );
  4985. }
  4986. }
  4987. }
  4988. static void REGAL_CALL error_glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
  4989. {
  4990. Internal("error_glRasterPos4i","()");
  4991. RegalContext *_context = REGAL_GET_CONTEXT();
  4992. RegalAssert(_context);
  4993. DispatchTableGL *_next = _context->dispatcher.error.next();
  4994. RegalAssert(_next);
  4995. GLenum _error = GL_NO_ERROR;
  4996. if (!_context->err.inBeginEnd)
  4997. _error = _next->call(&_next->glGetError)();
  4998. RegalAssert(_error==GL_NO_ERROR);
  4999. _next->call(&_next->glRasterPos4i)(x, y, z, w);
  5000. if (!_context->err.inBeginEnd) {
  5001. _error = _next->call(&_next->glGetError)();
  5002. if (_error!=GL_NO_ERROR) {
  5003. Error("glRasterPos4i : ",Token::GLerrorToString(_error));
  5004. #if REGAL_BREAK
  5005. Break::ErrorCB(_error);
  5006. #endif
  5007. if (_context->err.callback)
  5008. _context->err.callback( _error );
  5009. }
  5010. }
  5011. }
  5012. static void REGAL_CALL error_glRasterPos4iv(const GLint *v)
  5013. {
  5014. Internal("error_glRasterPos4iv","()");
  5015. RegalContext *_context = REGAL_GET_CONTEXT();
  5016. RegalAssert(_context);
  5017. DispatchTableGL *_next = _context->dispatcher.error.next();
  5018. RegalAssert(_next);
  5019. GLenum _error = GL_NO_ERROR;
  5020. if (!_context->err.inBeginEnd)
  5021. _error = _next->call(&_next->glGetError)();
  5022. RegalAssert(_error==GL_NO_ERROR);
  5023. _next->call(&_next->glRasterPos4iv)(v);
  5024. if (!_context->err.inBeginEnd) {
  5025. _error = _next->call(&_next->glGetError)();
  5026. if (_error!=GL_NO_ERROR) {
  5027. Error("glRasterPos4iv : ",Token::GLerrorToString(_error));
  5028. #if REGAL_BREAK
  5029. Break::ErrorCB(_error);
  5030. #endif
  5031. if (_context->err.callback)
  5032. _context->err.callback( _error );
  5033. }
  5034. }
  5035. }
  5036. static void REGAL_CALL error_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
  5037. {
  5038. Internal("error_glRasterPos4s","()");
  5039. RegalContext *_context = REGAL_GET_CONTEXT();
  5040. RegalAssert(_context);
  5041. DispatchTableGL *_next = _context->dispatcher.error.next();
  5042. RegalAssert(_next);
  5043. GLenum _error = GL_NO_ERROR;
  5044. if (!_context->err.inBeginEnd)
  5045. _error = _next->call(&_next->glGetError)();
  5046. RegalAssert(_error==GL_NO_ERROR);
  5047. _next->call(&_next->glRasterPos4s)(x, y, z, w);
  5048. if (!_context->err.inBeginEnd) {
  5049. _error = _next->call(&_next->glGetError)();
  5050. if (_error!=GL_NO_ERROR) {
  5051. Error("glRasterPos4s : ",Token::GLerrorToString(_error));
  5052. #if REGAL_BREAK
  5053. Break::ErrorCB(_error);
  5054. #endif
  5055. if (_context->err.callback)
  5056. _context->err.callback( _error );
  5057. }
  5058. }
  5059. }
  5060. static void REGAL_CALL error_glRasterPos4sv(const GLshort *v)
  5061. {
  5062. Internal("error_glRasterPos4sv","()");
  5063. RegalContext *_context = REGAL_GET_CONTEXT();
  5064. RegalAssert(_context);
  5065. DispatchTableGL *_next = _context->dispatcher.error.next();
  5066. RegalAssert(_next);
  5067. GLenum _error = GL_NO_ERROR;
  5068. if (!_context->err.inBeginEnd)
  5069. _error = _next->call(&_next->glGetError)();
  5070. RegalAssert(_error==GL_NO_ERROR);
  5071. _next->call(&_next->glRasterPos4sv)(v);
  5072. if (!_context->err.inBeginEnd) {
  5073. _error = _next->call(&_next->glGetError)();
  5074. if (_error!=GL_NO_ERROR) {
  5075. Error("glRasterPos4sv : ",Token::GLerrorToString(_error));
  5076. #if REGAL_BREAK
  5077. Break::ErrorCB(_error);
  5078. #endif
  5079. if (_context->err.callback)
  5080. _context->err.callback( _error );
  5081. }
  5082. }
  5083. }
  5084. static void REGAL_CALL error_glReadBuffer(GLenum mode)
  5085. {
  5086. Internal("error_glReadBuffer","()");
  5087. RegalContext *_context = REGAL_GET_CONTEXT();
  5088. RegalAssert(_context);
  5089. DispatchTableGL *_next = _context->dispatcher.error.next();
  5090. RegalAssert(_next);
  5091. GLenum _error = GL_NO_ERROR;
  5092. if (!_context->err.inBeginEnd)
  5093. _error = _next->call(&_next->glGetError)();
  5094. RegalAssert(_error==GL_NO_ERROR);
  5095. _next->call(&_next->glReadBuffer)(mode);
  5096. if (!_context->err.inBeginEnd) {
  5097. _error = _next->call(&_next->glGetError)();
  5098. if (_error!=GL_NO_ERROR) {
  5099. Error("glReadBuffer : ",Token::GLerrorToString(_error));
  5100. #if REGAL_BREAK
  5101. Break::ErrorCB(_error);
  5102. #endif
  5103. if (_context->err.callback)
  5104. _context->err.callback( _error );
  5105. }
  5106. }
  5107. }
  5108. static void REGAL_CALL error_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
  5109. {
  5110. Internal("error_glReadPixels","()");
  5111. RegalContext *_context = REGAL_GET_CONTEXT();
  5112. RegalAssert(_context);
  5113. DispatchTableGL *_next = _context->dispatcher.error.next();
  5114. RegalAssert(_next);
  5115. GLenum _error = GL_NO_ERROR;
  5116. if (!_context->err.inBeginEnd)
  5117. _error = _next->call(&_next->glGetError)();
  5118. RegalAssert(_error==GL_NO_ERROR);
  5119. _next->call(&_next->glReadPixels)(x, y, width, height, format, type, pixels);
  5120. if (!_context->err.inBeginEnd) {
  5121. _error = _next->call(&_next->glGetError)();
  5122. if (_error!=GL_NO_ERROR) {
  5123. Error("glReadPixels : ",Token::GLerrorToString(_error));
  5124. #if REGAL_BREAK
  5125. Break::ErrorCB(_error);
  5126. #endif
  5127. if (_context->err.callback)
  5128. _context->err.callback( _error );
  5129. }
  5130. }
  5131. }
  5132. static void REGAL_CALL error_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
  5133. {
  5134. Internal("error_glRectd","()");
  5135. RegalContext *_context = REGAL_GET_CONTEXT();
  5136. RegalAssert(_context);
  5137. DispatchTableGL *_next = _context->dispatcher.error.next();
  5138. RegalAssert(_next);
  5139. GLenum _error = GL_NO_ERROR;
  5140. if (!_context->err.inBeginEnd)
  5141. _error = _next->call(&_next->glGetError)();
  5142. RegalAssert(_error==GL_NO_ERROR);
  5143. _next->call(&_next->glRectd)(x1, y1, x2, y2);
  5144. if (!_context->err.inBeginEnd) {
  5145. _error = _next->call(&_next->glGetError)();
  5146. if (_error!=GL_NO_ERROR) {
  5147. Error("glRectd : ",Token::GLerrorToString(_error));
  5148. #if REGAL_BREAK
  5149. Break::ErrorCB(_error);
  5150. #endif
  5151. if (_context->err.callback)
  5152. _context->err.callback( _error );
  5153. }
  5154. }
  5155. }
  5156. static void REGAL_CALL error_glRectdv(const GLdouble *v1, const GLdouble *v2)
  5157. {
  5158. Internal("error_glRectdv","()");
  5159. RegalContext *_context = REGAL_GET_CONTEXT();
  5160. RegalAssert(_context);
  5161. DispatchTableGL *_next = _context->dispatcher.error.next();
  5162. RegalAssert(_next);
  5163. GLenum _error = GL_NO_ERROR;
  5164. if (!_context->err.inBeginEnd)
  5165. _error = _next->call(&_next->glGetError)();
  5166. RegalAssert(_error==GL_NO_ERROR);
  5167. _next->call(&_next->glRectdv)(v1, v2);
  5168. if (!_context->err.inBeginEnd) {
  5169. _error = _next->call(&_next->glGetError)();
  5170. if (_error!=GL_NO_ERROR) {
  5171. Error("glRectdv : ",Token::GLerrorToString(_error));
  5172. #if REGAL_BREAK
  5173. Break::ErrorCB(_error);
  5174. #endif
  5175. if (_context->err.callback)
  5176. _context->err.callback( _error );
  5177. }
  5178. }
  5179. }
  5180. static void REGAL_CALL error_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
  5181. {
  5182. Internal("error_glRectf","()");
  5183. RegalContext *_context = REGAL_GET_CONTEXT();
  5184. RegalAssert(_context);
  5185. DispatchTableGL *_next = _context->dispatcher.error.next();
  5186. RegalAssert(_next);
  5187. GLenum _error = GL_NO_ERROR;
  5188. if (!_context->err.inBeginEnd)
  5189. _error = _next->call(&_next->glGetError)();
  5190. RegalAssert(_error==GL_NO_ERROR);
  5191. _next->call(&_next->glRectf)(x1, y1, x2, y2);
  5192. if (!_context->err.inBeginEnd) {
  5193. _error = _next->call(&_next->glGetError)();
  5194. if (_error!=GL_NO_ERROR) {
  5195. Error("glRectf : ",Token::GLerrorToString(_error));
  5196. #if REGAL_BREAK
  5197. Break::ErrorCB(_error);
  5198. #endif
  5199. if (_context->err.callback)
  5200. _context->err.callback( _error );
  5201. }
  5202. }
  5203. }
  5204. static void REGAL_CALL error_glRectfv(const GLfloat *v1, const GLfloat *v2)
  5205. {
  5206. Internal("error_glRectfv","()");
  5207. RegalContext *_context = REGAL_GET_CONTEXT();
  5208. RegalAssert(_context);
  5209. DispatchTableGL *_next = _context->dispatcher.error.next();
  5210. RegalAssert(_next);
  5211. GLenum _error = GL_NO_ERROR;
  5212. if (!_context->err.inBeginEnd)
  5213. _error = _next->call(&_next->glGetError)();
  5214. RegalAssert(_error==GL_NO_ERROR);
  5215. _next->call(&_next->glRectfv)(v1, v2);
  5216. if (!_context->err.inBeginEnd) {
  5217. _error = _next->call(&_next->glGetError)();
  5218. if (_error!=GL_NO_ERROR) {
  5219. Error("glRectfv : ",Token::GLerrorToString(_error));
  5220. #if REGAL_BREAK
  5221. Break::ErrorCB(_error);
  5222. #endif
  5223. if (_context->err.callback)
  5224. _context->err.callback( _error );
  5225. }
  5226. }
  5227. }
  5228. static void REGAL_CALL error_glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
  5229. {
  5230. Internal("error_glRecti","()");
  5231. RegalContext *_context = REGAL_GET_CONTEXT();
  5232. RegalAssert(_context);
  5233. DispatchTableGL *_next = _context->dispatcher.error.next();
  5234. RegalAssert(_next);
  5235. GLenum _error = GL_NO_ERROR;
  5236. if (!_context->err.inBeginEnd)
  5237. _error = _next->call(&_next->glGetError)();
  5238. RegalAssert(_error==GL_NO_ERROR);
  5239. _next->call(&_next->glRecti)(x1, y1, x2, y2);
  5240. if (!_context->err.inBeginEnd) {
  5241. _error = _next->call(&_next->glGetError)();
  5242. if (_error!=GL_NO_ERROR) {
  5243. Error("glRecti : ",Token::GLerrorToString(_error));
  5244. #if REGAL_BREAK
  5245. Break::ErrorCB(_error);
  5246. #endif
  5247. if (_context->err.callback)
  5248. _context->err.callback( _error );
  5249. }
  5250. }
  5251. }
  5252. static void REGAL_CALL error_glRectiv(const GLint *v1, const GLint *v2)
  5253. {
  5254. Internal("error_glRectiv","()");
  5255. RegalContext *_context = REGAL_GET_CONTEXT();
  5256. RegalAssert(_context);
  5257. DispatchTableGL *_next = _context->dispatcher.error.next();
  5258. RegalAssert(_next);
  5259. GLenum _error = GL_NO_ERROR;
  5260. if (!_context->err.inBeginEnd)
  5261. _error = _next->call(&_next->glGetError)();
  5262. RegalAssert(_error==GL_NO_ERROR);
  5263. _next->call(&_next->glRectiv)(v1, v2);
  5264. if (!_context->err.inBeginEnd) {
  5265. _error = _next->call(&_next->glGetError)();
  5266. if (_error!=GL_NO_ERROR) {
  5267. Error("glRectiv : ",Token::GLerrorToString(_error));
  5268. #if REGAL_BREAK
  5269. Break::ErrorCB(_error);
  5270. #endif
  5271. if (_context->err.callback)
  5272. _context->err.callback( _error );
  5273. }
  5274. }
  5275. }
  5276. static void REGAL_CALL error_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
  5277. {
  5278. Internal("error_glRects","()");
  5279. RegalContext *_context = REGAL_GET_CONTEXT();
  5280. RegalAssert(_context);
  5281. DispatchTableGL *_next = _context->dispatcher.error.next();
  5282. RegalAssert(_next);
  5283. GLenum _error = GL_NO_ERROR;
  5284. if (!_context->err.inBeginEnd)
  5285. _error = _next->call(&_next->glGetError)();
  5286. RegalAssert(_error==GL_NO_ERROR);
  5287. _next->call(&_next->glRects)(x1, y1, x2, y2);
  5288. if (!_context->err.inBeginEnd) {
  5289. _error = _next->call(&_next->glGetError)();
  5290. if (_error!=GL_NO_ERROR) {
  5291. Error("glRects : ",Token::GLerrorToString(_error));
  5292. #if REGAL_BREAK
  5293. Break::ErrorCB(_error);
  5294. #endif
  5295. if (_context->err.callback)
  5296. _context->err.callback( _error );
  5297. }
  5298. }
  5299. }
  5300. static void REGAL_CALL error_glRectsv(const GLshort *v1, const GLshort *v2)
  5301. {
  5302. Internal("error_glRectsv","()");
  5303. RegalContext *_context = REGAL_GET_CONTEXT();
  5304. RegalAssert(_context);
  5305. DispatchTableGL *_next = _context->dispatcher.error.next();
  5306. RegalAssert(_next);
  5307. GLenum _error = GL_NO_ERROR;
  5308. if (!_context->err.inBeginEnd)
  5309. _error = _next->call(&_next->glGetError)();
  5310. RegalAssert(_error==GL_NO_ERROR);
  5311. _next->call(&_next->glRectsv)(v1, v2);
  5312. if (!_context->err.inBeginEnd) {
  5313. _error = _next->call(&_next->glGetError)();
  5314. if (_error!=GL_NO_ERROR) {
  5315. Error("glRectsv : ",Token::GLerrorToString(_error));
  5316. #if REGAL_BREAK
  5317. Break::ErrorCB(_error);
  5318. #endif
  5319. if (_context->err.callback)
  5320. _context->err.callback( _error );
  5321. }
  5322. }
  5323. }
  5324. static GLint REGAL_CALL error_glRenderMode(GLenum mode)
  5325. {
  5326. Internal("error_glRenderMode","()");
  5327. RegalContext *_context = REGAL_GET_CONTEXT();
  5328. RegalAssert(_context);
  5329. DispatchTableGL *_next = _context->dispatcher.error.next();
  5330. RegalAssert(_next);
  5331. GLenum _error = GL_NO_ERROR;
  5332. if (!_context->err.inBeginEnd)
  5333. _error = _next->call(&_next->glGetError)();
  5334. RegalAssert(_error==GL_NO_ERROR);
  5335. GLint ret = _next->call(&_next->glRenderMode)(mode);
  5336. if (!_context->err.inBeginEnd) {
  5337. _error = _next->call(&_next->glGetError)();
  5338. if (_error!=GL_NO_ERROR) {
  5339. Error("glRenderMode : ",Token::GLerrorToString(_error));
  5340. #if REGAL_BREAK
  5341. Break::ErrorCB(_error);
  5342. #endif
  5343. if (_context->err.callback)
  5344. _context->err.callback( _error );
  5345. }
  5346. }
  5347. return ret;
  5348. }
  5349. static void REGAL_CALL error_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
  5350. {
  5351. Internal("error_glRotated","()");
  5352. RegalContext *_context = REGAL_GET_CONTEXT();
  5353. RegalAssert(_context);
  5354. DispatchTableGL *_next = _context->dispatcher.error.next();
  5355. RegalAssert(_next);
  5356. GLenum _error = GL_NO_ERROR;
  5357. if (!_context->err.inBeginEnd)
  5358. _error = _next->call(&_next->glGetError)();
  5359. RegalAssert(_error==GL_NO_ERROR);
  5360. _next->call(&_next->glRotated)(angle, x, y, z);
  5361. if (!_context->err.inBeginEnd) {
  5362. _error = _next->call(&_next->glGetError)();
  5363. if (_error!=GL_NO_ERROR) {
  5364. Error("glRotated : ",Token::GLerrorToString(_error));
  5365. #if REGAL_BREAK
  5366. Break::ErrorCB(_error);
  5367. #endif
  5368. if (_context->err.callback)
  5369. _context->err.callback( _error );
  5370. }
  5371. }
  5372. }
  5373. static void REGAL_CALL error_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
  5374. {
  5375. Internal("error_glRotatef","()");
  5376. RegalContext *_context = REGAL_GET_CONTEXT();
  5377. RegalAssert(_context);
  5378. DispatchTableGL *_next = _context->dispatcher.error.next();
  5379. RegalAssert(_next);
  5380. GLenum _error = GL_NO_ERROR;
  5381. if (!_context->err.inBeginEnd)
  5382. _error = _next->call(&_next->glGetError)();
  5383. RegalAssert(_error==GL_NO_ERROR);
  5384. _next->call(&_next->glRotatef)(angle, x, y, z);
  5385. if (!_context->err.inBeginEnd) {
  5386. _error = _next->call(&_next->glGetError)();
  5387. if (_error!=GL_NO_ERROR) {
  5388. Error("glRotatef : ",Token::GLerrorToString(_error));
  5389. #if REGAL_BREAK
  5390. Break::ErrorCB(_error);
  5391. #endif
  5392. if (_context->err.callback)
  5393. _context->err.callback( _error );
  5394. }
  5395. }
  5396. }
  5397. static void REGAL_CALL error_glScaled(GLdouble x, GLdouble y, GLdouble z)
  5398. {
  5399. Internal("error_glScaled","()");
  5400. RegalContext *_context = REGAL_GET_CONTEXT();
  5401. RegalAssert(_context);
  5402. DispatchTableGL *_next = _context->dispatcher.error.next();
  5403. RegalAssert(_next);
  5404. GLenum _error = GL_NO_ERROR;
  5405. if (!_context->err.inBeginEnd)
  5406. _error = _next->call(&_next->glGetError)();
  5407. RegalAssert(_error==GL_NO_ERROR);
  5408. _next->call(&_next->glScaled)(x, y, z);
  5409. if (!_context->err.inBeginEnd) {
  5410. _error = _next->call(&_next->glGetError)();
  5411. if (_error!=GL_NO_ERROR) {
  5412. Error("glScaled : ",Token::GLerrorToString(_error));
  5413. #if REGAL_BREAK
  5414. Break::ErrorCB(_error);
  5415. #endif
  5416. if (_context->err.callback)
  5417. _context->err.callback( _error );
  5418. }
  5419. }
  5420. }
  5421. static void REGAL_CALL error_glScalef(GLfloat x, GLfloat y, GLfloat z)
  5422. {
  5423. Internal("error_glScalef","()");
  5424. RegalContext *_context = REGAL_GET_CONTEXT();
  5425. RegalAssert(_context);
  5426. DispatchTableGL *_next = _context->dispatcher.error.next();
  5427. RegalAssert(_next);
  5428. GLenum _error = GL_NO_ERROR;
  5429. if (!_context->err.inBeginEnd)
  5430. _error = _next->call(&_next->glGetError)();
  5431. RegalAssert(_error==GL_NO_ERROR);
  5432. _next->call(&_next->glScalef)(x, y, z);
  5433. if (!_context->err.inBeginEnd) {
  5434. _error = _next->call(&_next->glGetError)();
  5435. if (_error!=GL_NO_ERROR) {
  5436. Error("glScalef : ",Token::GLerrorToString(_error));
  5437. #if REGAL_BREAK
  5438. Break::ErrorCB(_error);
  5439. #endif
  5440. if (_context->err.callback)
  5441. _context->err.callback( _error );
  5442. }
  5443. }
  5444. }
  5445. static void REGAL_CALL error_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
  5446. {
  5447. Internal("error_glScissor","()");
  5448. RegalContext *_context = REGAL_GET_CONTEXT();
  5449. RegalAssert(_context);
  5450. DispatchTableGL *_next = _context->dispatcher.error.next();
  5451. RegalAssert(_next);
  5452. GLenum _error = GL_NO_ERROR;
  5453. if (!_context->err.inBeginEnd)
  5454. _error = _next->call(&_next->glGetError)();
  5455. RegalAssert(_error==GL_NO_ERROR);
  5456. _next->call(&_next->glScissor)(x, y, width, height);
  5457. if (!_context->err.inBeginEnd) {
  5458. _error = _next->call(&_next->glGetError)();
  5459. if (_error!=GL_NO_ERROR) {
  5460. Error("glScissor : ",Token::GLerrorToString(_error));
  5461. #if REGAL_BREAK
  5462. Break::ErrorCB(_error);
  5463. #endif
  5464. if (_context->err.callback)
  5465. _context->err.callback( _error );
  5466. }
  5467. }
  5468. }
  5469. static void REGAL_CALL error_glSelectBuffer(GLsizei size, GLuint *buffer)
  5470. {
  5471. Internal("error_glSelectBuffer","()");
  5472. RegalContext *_context = REGAL_GET_CONTEXT();
  5473. RegalAssert(_context);
  5474. DispatchTableGL *_next = _context->dispatcher.error.next();
  5475. RegalAssert(_next);
  5476. GLenum _error = GL_NO_ERROR;
  5477. if (!_context->err.inBeginEnd)
  5478. _error = _next->call(&_next->glGetError)();
  5479. RegalAssert(_error==GL_NO_ERROR);
  5480. _next->call(&_next->glSelectBuffer)(size, buffer);
  5481. if (!_context->err.inBeginEnd) {
  5482. _error = _next->call(&_next->glGetError)();
  5483. if (_error!=GL_NO_ERROR) {
  5484. Error("glSelectBuffer : ",Token::GLerrorToString(_error));
  5485. #if REGAL_BREAK
  5486. Break::ErrorCB(_error);
  5487. #endif
  5488. if (_context->err.callback)
  5489. _context->err.callback( _error );
  5490. }
  5491. }
  5492. }
  5493. static void REGAL_CALL error_glShadeModel(GLenum mode)
  5494. {
  5495. Internal("error_glShadeModel","()");
  5496. RegalContext *_context = REGAL_GET_CONTEXT();
  5497. RegalAssert(_context);
  5498. DispatchTableGL *_next = _context->dispatcher.error.next();
  5499. RegalAssert(_next);
  5500. GLenum _error = GL_NO_ERROR;
  5501. if (!_context->err.inBeginEnd)
  5502. _error = _next->call(&_next->glGetError)();
  5503. RegalAssert(_error==GL_NO_ERROR);
  5504. _next->call(&_next->glShadeModel)(mode);
  5505. if (!_context->err.inBeginEnd) {
  5506. _error = _next->call(&_next->glGetError)();
  5507. if (_error!=GL_NO_ERROR) {
  5508. Error("glShadeModel : ",Token::GLerrorToString(_error));
  5509. #if REGAL_BREAK
  5510. Break::ErrorCB(_error);
  5511. #endif
  5512. if (_context->err.callback)
  5513. _context->err.callback( _error );
  5514. }
  5515. }
  5516. }
  5517. static void REGAL_CALL error_glStencilFunc(GLenum func, GLint ref, GLuint mask)
  5518. {
  5519. Internal("error_glStencilFunc","()");
  5520. RegalContext *_context = REGAL_GET_CONTEXT();
  5521. RegalAssert(_context);
  5522. DispatchTableGL *_next = _context->dispatcher.error.next();
  5523. RegalAssert(_next);
  5524. GLenum _error = GL_NO_ERROR;
  5525. if (!_context->err.inBeginEnd)
  5526. _error = _next->call(&_next->glGetError)();
  5527. RegalAssert(_error==GL_NO_ERROR);
  5528. _next->call(&_next->glStencilFunc)(func, ref, mask);
  5529. if (!_context->err.inBeginEnd) {
  5530. _error = _next->call(&_next->glGetError)();
  5531. if (_error!=GL_NO_ERROR) {
  5532. Error("glStencilFunc : ",Token::GLerrorToString(_error));
  5533. #if REGAL_BREAK
  5534. Break::ErrorCB(_error);
  5535. #endif
  5536. if (_context->err.callback)
  5537. _context->err.callback( _error );
  5538. }
  5539. }
  5540. }
  5541. static void REGAL_CALL error_glStencilMask(GLuint mask)
  5542. {
  5543. Internal("error_glStencilMask","()");
  5544. RegalContext *_context = REGAL_GET_CONTEXT();
  5545. RegalAssert(_context);
  5546. DispatchTableGL *_next = _context->dispatcher.error.next();
  5547. RegalAssert(_next);
  5548. GLenum _error = GL_NO_ERROR;
  5549. if (!_context->err.inBeginEnd)
  5550. _error = _next->call(&_next->glGetError)();
  5551. RegalAssert(_error==GL_NO_ERROR);
  5552. _next->call(&_next->glStencilMask)(mask);
  5553. if (!_context->err.inBeginEnd) {
  5554. _error = _next->call(&_next->glGetError)();
  5555. if (_error!=GL_NO_ERROR) {
  5556. Error("glStencilMask : ",Token::GLerrorToString(_error));
  5557. #if REGAL_BREAK
  5558. Break::ErrorCB(_error);
  5559. #endif
  5560. if (_context->err.callback)
  5561. _context->err.callback( _error );
  5562. }
  5563. }
  5564. }
  5565. static void REGAL_CALL error_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
  5566. {
  5567. Internal("error_glStencilOp","()");
  5568. RegalContext *_context = REGAL_GET_CONTEXT();
  5569. RegalAssert(_context);
  5570. DispatchTableGL *_next = _context->dispatcher.error.next();
  5571. RegalAssert(_next);
  5572. GLenum _error = GL_NO_ERROR;
  5573. if (!_context->err.inBeginEnd)
  5574. _error = _next->call(&_next->glGetError)();
  5575. RegalAssert(_error==GL_NO_ERROR);
  5576. _next->call(&_next->glStencilOp)(fail, zfail, zpass);
  5577. if (!_context->err.inBeginEnd) {
  5578. _error = _next->call(&_next->glGetError)();
  5579. if (_error!=GL_NO_ERROR) {
  5580. Error("glStencilOp : ",Token::GLerrorToString(_error));
  5581. #if REGAL_BREAK
  5582. Break::ErrorCB(_error);
  5583. #endif
  5584. if (_context->err.callback)
  5585. _context->err.callback( _error );
  5586. }
  5587. }
  5588. }
  5589. static void REGAL_CALL error_glTexCoord1d(GLdouble s)
  5590. {
  5591. Internal("error_glTexCoord1d","()");
  5592. RegalContext *_context = REGAL_GET_CONTEXT();
  5593. RegalAssert(_context);
  5594. DispatchTableGL *_next = _context->dispatcher.error.next();
  5595. RegalAssert(_next);
  5596. GLenum _error = GL_NO_ERROR;
  5597. if (!_context->err.inBeginEnd)
  5598. _error = _next->call(&_next->glGetError)();
  5599. RegalAssert(_error==GL_NO_ERROR);
  5600. _next->call(&_next->glTexCoord1d)(s);
  5601. if (!_context->err.inBeginEnd) {
  5602. _error = _next->call(&_next->glGetError)();
  5603. if (_error!=GL_NO_ERROR) {
  5604. Error("glTexCoord1d : ",Token::GLerrorToString(_error));
  5605. #if REGAL_BREAK
  5606. Break::ErrorCB(_error);
  5607. #endif
  5608. if (_context->err.callback)
  5609. _context->err.callback( _error );
  5610. }
  5611. }
  5612. }
  5613. static void REGAL_CALL error_glTexCoord1dv(const GLdouble *v)
  5614. {
  5615. Internal("error_glTexCoord1dv","()");
  5616. RegalContext *_context = REGAL_GET_CONTEXT();
  5617. RegalAssert(_context);
  5618. DispatchTableGL *_next = _context->dispatcher.error.next();
  5619. RegalAssert(_next);
  5620. GLenum _error = GL_NO_ERROR;
  5621. if (!_context->err.inBeginEnd)
  5622. _error = _next->call(&_next->glGetError)();
  5623. RegalAssert(_error==GL_NO_ERROR);
  5624. _next->call(&_next->glTexCoord1dv)(v);
  5625. if (!_context->err.inBeginEnd) {
  5626. _error = _next->call(&_next->glGetError)();
  5627. if (_error!=GL_NO_ERROR) {
  5628. Error("glTexCoord1dv : ",Token::GLerrorToString(_error));
  5629. #if REGAL_BREAK
  5630. Break::ErrorCB(_error);
  5631. #endif
  5632. if (_context->err.callback)
  5633. _context->err.callback( _error );
  5634. }
  5635. }
  5636. }
  5637. static void REGAL_CALL error_glTexCoord1f(GLfloat s)
  5638. {
  5639. Internal("error_glTexCoord1f","()");
  5640. RegalContext *_context = REGAL_GET_CONTEXT();
  5641. RegalAssert(_context);
  5642. DispatchTableGL *_next = _context->dispatcher.error.next();
  5643. RegalAssert(_next);
  5644. GLenum _error = GL_NO_ERROR;
  5645. if (!_context->err.inBeginEnd)
  5646. _error = _next->call(&_next->glGetError)();
  5647. RegalAssert(_error==GL_NO_ERROR);
  5648. _next->call(&_next->glTexCoord1f)(s);
  5649. if (!_context->err.inBeginEnd) {
  5650. _error = _next->call(&_next->glGetError)();
  5651. if (_error!=GL_NO_ERROR) {
  5652. Error("glTexCoord1f : ",Token::GLerrorToString(_error));
  5653. #if REGAL_BREAK
  5654. Break::ErrorCB(_error);
  5655. #endif
  5656. if (_context->err.callback)
  5657. _context->err.callback( _error );
  5658. }
  5659. }
  5660. }
  5661. static void REGAL_CALL error_glTexCoord1fv(const GLfloat *v)
  5662. {
  5663. Internal("error_glTexCoord1fv","()");
  5664. RegalContext *_context = REGAL_GET_CONTEXT();
  5665. RegalAssert(_context);
  5666. DispatchTableGL *_next = _context->dispatcher.error.next();
  5667. RegalAssert(_next);
  5668. GLenum _error = GL_NO_ERROR;
  5669. if (!_context->err.inBeginEnd)
  5670. _error = _next->call(&_next->glGetError)();
  5671. RegalAssert(_error==GL_NO_ERROR);
  5672. _next->call(&_next->glTexCoord1fv)(v);
  5673. if (!_context->err.inBeginEnd) {
  5674. _error = _next->call(&_next->glGetError)();
  5675. if (_error!=GL_NO_ERROR) {
  5676. Error("glTexCoord1fv : ",Token::GLerrorToString(_error));
  5677. #if REGAL_BREAK
  5678. Break::ErrorCB(_error);
  5679. #endif
  5680. if (_context->err.callback)
  5681. _context->err.callback( _error );
  5682. }
  5683. }
  5684. }
  5685. static void REGAL_CALL error_glTexCoord1i(GLint s)
  5686. {
  5687. Internal("error_glTexCoord1i","()");
  5688. RegalContext *_context = REGAL_GET_CONTEXT();
  5689. RegalAssert(_context);
  5690. DispatchTableGL *_next = _context->dispatcher.error.next();
  5691. RegalAssert(_next);
  5692. GLenum _error = GL_NO_ERROR;
  5693. if (!_context->err.inBeginEnd)
  5694. _error = _next->call(&_next->glGetError)();
  5695. RegalAssert(_error==GL_NO_ERROR);
  5696. _next->call(&_next->glTexCoord1i)(s);
  5697. if (!_context->err.inBeginEnd) {
  5698. _error = _next->call(&_next->glGetError)();
  5699. if (_error!=GL_NO_ERROR) {
  5700. Error("glTexCoord1i : ",Token::GLerrorToString(_error));
  5701. #if REGAL_BREAK
  5702. Break::ErrorCB(_error);
  5703. #endif
  5704. if (_context->err.callback)
  5705. _context->err.callback( _error );
  5706. }
  5707. }
  5708. }
  5709. static void REGAL_CALL error_glTexCoord1iv(const GLint *v)
  5710. {
  5711. Internal("error_glTexCoord1iv","()");
  5712. RegalContext *_context = REGAL_GET_CONTEXT();
  5713. RegalAssert(_context);
  5714. DispatchTableGL *_next = _context->dispatcher.error.next();
  5715. RegalAssert(_next);
  5716. GLenum _error = GL_NO_ERROR;
  5717. if (!_context->err.inBeginEnd)
  5718. _error = _next->call(&_next->glGetError)();
  5719. RegalAssert(_error==GL_NO_ERROR);
  5720. _next->call(&_next->glTexCoord1iv)(v);
  5721. if (!_context->err.inBeginEnd) {
  5722. _error = _next->call(&_next->glGetError)();
  5723. if (_error!=GL_NO_ERROR) {
  5724. Error("glTexCoord1iv : ",Token::GLerrorToString(_error));
  5725. #if REGAL_BREAK
  5726. Break::ErrorCB(_error);
  5727. #endif
  5728. if (_context->err.callback)
  5729. _context->err.callback( _error );
  5730. }
  5731. }
  5732. }
  5733. static void REGAL_CALL error_glTexCoord1s(GLshort s)
  5734. {
  5735. Internal("error_glTexCoord1s","()");
  5736. RegalContext *_context = REGAL_GET_CONTEXT();
  5737. RegalAssert(_context);
  5738. DispatchTableGL *_next = _context->dispatcher.error.next();
  5739. RegalAssert(_next);
  5740. GLenum _error = GL_NO_ERROR;
  5741. if (!_context->err.inBeginEnd)
  5742. _error = _next->call(&_next->glGetError)();
  5743. RegalAssert(_error==GL_NO_ERROR);
  5744. _next->call(&_next->glTexCoord1s)(s);
  5745. if (!_context->err.inBeginEnd) {
  5746. _error = _next->call(&_next->glGetError)();
  5747. if (_error!=GL_NO_ERROR) {
  5748. Error("glTexCoord1s : ",Token::GLerrorToString(_error));
  5749. #if REGAL_BREAK
  5750. Break::ErrorCB(_error);
  5751. #endif
  5752. if (_context->err.callback)
  5753. _context->err.callback( _error );
  5754. }
  5755. }
  5756. }
  5757. static void REGAL_CALL error_glTexCoord1sv(const GLshort *v)
  5758. {
  5759. Internal("error_glTexCoord1sv","()");
  5760. RegalContext *_context = REGAL_GET_CONTEXT();
  5761. RegalAssert(_context);
  5762. DispatchTableGL *_next = _context->dispatcher.error.next();
  5763. RegalAssert(_next);
  5764. GLenum _error = GL_NO_ERROR;
  5765. if (!_context->err.inBeginEnd)
  5766. _error = _next->call(&_next->glGetError)();
  5767. RegalAssert(_error==GL_NO_ERROR);
  5768. _next->call(&_next->glTexCoord1sv)(v);
  5769. if (!_context->err.inBeginEnd) {
  5770. _error = _next->call(&_next->glGetError)();
  5771. if (_error!=GL_NO_ERROR) {
  5772. Error("glTexCoord1sv : ",Token::GLerrorToString(_error));
  5773. #if REGAL_BREAK
  5774. Break::ErrorCB(_error);
  5775. #endif
  5776. if (_context->err.callback)
  5777. _context->err.callback( _error );
  5778. }
  5779. }
  5780. }
  5781. static void REGAL_CALL error_glTexCoord2d(GLdouble s, GLdouble t)
  5782. {
  5783. Internal("error_glTexCoord2d","()");
  5784. RegalContext *_context = REGAL_GET_CONTEXT();
  5785. RegalAssert(_context);
  5786. DispatchTableGL *_next = _context->dispatcher.error.next();
  5787. RegalAssert(_next);
  5788. GLenum _error = GL_NO_ERROR;
  5789. if (!_context->err.inBeginEnd)
  5790. _error = _next->call(&_next->glGetError)();
  5791. RegalAssert(_error==GL_NO_ERROR);
  5792. _next->call(&_next->glTexCoord2d)(s, t);
  5793. if (!_context->err.inBeginEnd) {
  5794. _error = _next->call(&_next->glGetError)();
  5795. if (_error!=GL_NO_ERROR) {
  5796. Error("glTexCoord2d : ",Token::GLerrorToString(_error));
  5797. #if REGAL_BREAK
  5798. Break::ErrorCB(_error);
  5799. #endif
  5800. if (_context->err.callback)
  5801. _context->err.callback( _error );
  5802. }
  5803. }
  5804. }
  5805. static void REGAL_CALL error_glTexCoord2dv(const GLdouble *v)
  5806. {
  5807. Internal("error_glTexCoord2dv","()");
  5808. RegalContext *_context = REGAL_GET_CONTEXT();
  5809. RegalAssert(_context);
  5810. DispatchTableGL *_next = _context->dispatcher.error.next();
  5811. RegalAssert(_next);
  5812. GLenum _error = GL_NO_ERROR;
  5813. if (!_context->err.inBeginEnd)
  5814. _error = _next->call(&_next->glGetError)();
  5815. RegalAssert(_error==GL_NO_ERROR);
  5816. _next->call(&_next->glTexCoord2dv)(v);
  5817. if (!_context->err.inBeginEnd) {
  5818. _error = _next->call(&_next->glGetError)();
  5819. if (_error!=GL_NO_ERROR) {
  5820. Error("glTexCoord2dv : ",Token::GLerrorToString(_error));
  5821. #if REGAL_BREAK
  5822. Break::ErrorCB(_error);
  5823. #endif
  5824. if (_context->err.callback)
  5825. _context->err.callback( _error );
  5826. }
  5827. }
  5828. }
  5829. static void REGAL_CALL error_glTexCoord2f(GLfloat s, GLfloat t)
  5830. {
  5831. Internal("error_glTexCoord2f","()");
  5832. RegalContext *_context = REGAL_GET_CONTEXT();
  5833. RegalAssert(_context);
  5834. DispatchTableGL *_next = _context->dispatcher.error.next();
  5835. RegalAssert(_next);
  5836. GLenum _error = GL_NO_ERROR;
  5837. if (!_context->err.inBeginEnd)
  5838. _error = _next->call(&_next->glGetError)();
  5839. RegalAssert(_error==GL_NO_ERROR);
  5840. _next->call(&_next->glTexCoord2f)(s, t);
  5841. if (!_context->err.inBeginEnd) {
  5842. _error = _next->call(&_next->glGetError)();
  5843. if (_error!=GL_NO_ERROR) {
  5844. Error("glTexCoord2f : ",Token::GLerrorToString(_error));
  5845. #if REGAL_BREAK
  5846. Break::ErrorCB(_error);
  5847. #endif
  5848. if (_context->err.callback)
  5849. _context->err.callback( _error );
  5850. }
  5851. }
  5852. }
  5853. static void REGAL_CALL error_glTexCoord2fv(const GLfloat *v)
  5854. {
  5855. Internal("error_glTexCoord2fv","()");
  5856. RegalContext *_context = REGAL_GET_CONTEXT();
  5857. RegalAssert(_context);
  5858. DispatchTableGL *_next = _context->dispatcher.error.next();
  5859. RegalAssert(_next);
  5860. GLenum _error = GL_NO_ERROR;
  5861. if (!_context->err.inBeginEnd)
  5862. _error = _next->call(&_next->glGetError)();
  5863. RegalAssert(_error==GL_NO_ERROR);
  5864. _next->call(&_next->glTexCoord2fv)(v);
  5865. if (!_context->err.inBeginEnd) {
  5866. _error = _next->call(&_next->glGetError)();
  5867. if (_error!=GL_NO_ERROR) {
  5868. Error("glTexCoord2fv : ",Token::GLerrorToString(_error));
  5869. #if REGAL_BREAK
  5870. Break::ErrorCB(_error);
  5871. #endif
  5872. if (_context->err.callback)
  5873. _context->err.callback( _error );
  5874. }
  5875. }
  5876. }
  5877. static void REGAL_CALL error_glTexCoord2i(GLint s, GLint t)
  5878. {
  5879. Internal("error_glTexCoord2i","()");
  5880. RegalContext *_context = REGAL_GET_CONTEXT();
  5881. RegalAssert(_context);
  5882. DispatchTableGL *_next = _context->dispatcher.error.next();
  5883. RegalAssert(_next);
  5884. GLenum _error = GL_NO_ERROR;
  5885. if (!_context->err.inBeginEnd)
  5886. _error = _next->call(&_next->glGetError)();
  5887. RegalAssert(_error==GL_NO_ERROR);
  5888. _next->call(&_next->glTexCoord2i)(s, t);
  5889. if (!_context->err.inBeginEnd) {
  5890. _error = _next->call(&_next->glGetError)();
  5891. if (_error!=GL_NO_ERROR) {
  5892. Error("glTexCoord2i : ",Token::GLerrorToString(_error));
  5893. #if REGAL_BREAK
  5894. Break::ErrorCB(_error);
  5895. #endif
  5896. if (_context->err.callback)
  5897. _context->err.callback( _error );
  5898. }
  5899. }
  5900. }
  5901. static void REGAL_CALL error_glTexCoord2iv(const GLint *v)
  5902. {
  5903. Internal("error_glTexCoord2iv","()");
  5904. RegalContext *_context = REGAL_GET_CONTEXT();
  5905. RegalAssert(_context);
  5906. DispatchTableGL *_next = _context->dispatcher.error.next();
  5907. RegalAssert(_next);
  5908. GLenum _error = GL_NO_ERROR;
  5909. if (!_context->err.inBeginEnd)
  5910. _error = _next->call(&_next->glGetError)();
  5911. RegalAssert(_error==GL_NO_ERROR);
  5912. _next->call(&_next->glTexCoord2iv)(v);
  5913. if (!_context->err.inBeginEnd) {
  5914. _error = _next->call(&_next->glGetError)();
  5915. if (_error!=GL_NO_ERROR) {
  5916. Error("glTexCoord2iv : ",Token::GLerrorToString(_error));
  5917. #if REGAL_BREAK
  5918. Break::ErrorCB(_error);
  5919. #endif
  5920. if (_context->err.callback)
  5921. _context->err.callback( _error );
  5922. }
  5923. }
  5924. }
  5925. static void REGAL_CALL error_glTexCoord2s(GLshort s, GLshort t)
  5926. {
  5927. Internal("error_glTexCoord2s","()");
  5928. RegalContext *_context = REGAL_GET_CONTEXT();
  5929. RegalAssert(_context);
  5930. DispatchTableGL *_next = _context->dispatcher.error.next();
  5931. RegalAssert(_next);
  5932. GLenum _error = GL_NO_ERROR;
  5933. if (!_context->err.inBeginEnd)
  5934. _error = _next->call(&_next->glGetError)();
  5935. RegalAssert(_error==GL_NO_ERROR);
  5936. _next->call(&_next->glTexCoord2s)(s, t);
  5937. if (!_context->err.inBeginEnd) {
  5938. _error = _next->call(&_next->glGetError)();
  5939. if (_error!=GL_NO_ERROR) {
  5940. Error("glTexCoord2s : ",Token::GLerrorToString(_error));
  5941. #if REGAL_BREAK
  5942. Break::ErrorCB(_error);
  5943. #endif
  5944. if (_context->err.callback)
  5945. _context->err.callback( _error );
  5946. }
  5947. }
  5948. }
  5949. static void REGAL_CALL error_glTexCoord2sv(const GLshort *v)
  5950. {
  5951. Internal("error_glTexCoord2sv","()");
  5952. RegalContext *_context = REGAL_GET_CONTEXT();
  5953. RegalAssert(_context);
  5954. DispatchTableGL *_next = _context->dispatcher.error.next();
  5955. RegalAssert(_next);
  5956. GLenum _error = GL_NO_ERROR;
  5957. if (!_context->err.inBeginEnd)
  5958. _error = _next->call(&_next->glGetError)();
  5959. RegalAssert(_error==GL_NO_ERROR);
  5960. _next->call(&_next->glTexCoord2sv)(v);
  5961. if (!_context->err.inBeginEnd) {
  5962. _error = _next->call(&_next->glGetError)();
  5963. if (_error!=GL_NO_ERROR) {
  5964. Error("glTexCoord2sv : ",Token::GLerrorToString(_error));
  5965. #if REGAL_BREAK
  5966. Break::ErrorCB(_error);
  5967. #endif
  5968. if (_context->err.callback)
  5969. _context->err.callback( _error );
  5970. }
  5971. }
  5972. }
  5973. static void REGAL_CALL error_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
  5974. {
  5975. Internal("error_glTexCoord3d","()");
  5976. RegalContext *_context = REGAL_GET_CONTEXT();
  5977. RegalAssert(_context);
  5978. DispatchTableGL *_next = _context->dispatcher.error.next();
  5979. RegalAssert(_next);
  5980. GLenum _error = GL_NO_ERROR;
  5981. if (!_context->err.inBeginEnd)
  5982. _error = _next->call(&_next->glGetError)();
  5983. RegalAssert(_error==GL_NO_ERROR);
  5984. _next->call(&_next->glTexCoord3d)(s, t, r);
  5985. if (!_context->err.inBeginEnd) {
  5986. _error = _next->call(&_next->glGetError)();
  5987. if (_error!=GL_NO_ERROR) {
  5988. Error("glTexCoord3d : ",Token::GLerrorToString(_error));
  5989. #if REGAL_BREAK
  5990. Break::ErrorCB(_error);
  5991. #endif
  5992. if (_context->err.callback)
  5993. _context->err.callback( _error );
  5994. }
  5995. }
  5996. }
  5997. static void REGAL_CALL error_glTexCoord3dv(const GLdouble *v)
  5998. {
  5999. Internal("error_glTexCoord3dv","()");
  6000. RegalContext *_context = REGAL_GET_CONTEXT();
  6001. RegalAssert(_context);
  6002. DispatchTableGL *_next = _context->dispatcher.error.next();
  6003. RegalAssert(_next);
  6004. GLenum _error = GL_NO_ERROR;
  6005. if (!_context->err.inBeginEnd)
  6006. _error = _next->call(&_next->glGetError)();
  6007. RegalAssert(_error==GL_NO_ERROR);
  6008. _next->call(&_next->glTexCoord3dv)(v);
  6009. if (!_context->err.inBeginEnd) {
  6010. _error = _next->call(&_next->glGetError)();
  6011. if (_error!=GL_NO_ERROR) {
  6012. Error("glTexCoord3dv : ",Token::GLerrorToString(_error));
  6013. #if REGAL_BREAK
  6014. Break::ErrorCB(_error);
  6015. #endif
  6016. if (_context->err.callback)
  6017. _context->err.callback( _error );
  6018. }
  6019. }
  6020. }
  6021. static void REGAL_CALL error_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
  6022. {
  6023. Internal("error_glTexCoord3f","()");
  6024. RegalContext *_context = REGAL_GET_CONTEXT();
  6025. RegalAssert(_context);
  6026. DispatchTableGL *_next = _context->dispatcher.error.next();
  6027. RegalAssert(_next);
  6028. GLenum _error = GL_NO_ERROR;
  6029. if (!_context->err.inBeginEnd)
  6030. _error = _next->call(&_next->glGetError)();
  6031. RegalAssert(_error==GL_NO_ERROR);
  6032. _next->call(&_next->glTexCoord3f)(s, t, r);
  6033. if (!_context->err.inBeginEnd) {
  6034. _error = _next->call(&_next->glGetError)();
  6035. if (_error!=GL_NO_ERROR) {
  6036. Error("glTexCoord3f : ",Token::GLerrorToString(_error));
  6037. #if REGAL_BREAK
  6038. Break::ErrorCB(_error);
  6039. #endif
  6040. if (_context->err.callback)
  6041. _context->err.callback( _error );
  6042. }
  6043. }
  6044. }
  6045. static void REGAL_CALL error_glTexCoord3fv(const GLfloat *v)
  6046. {
  6047. Internal("error_glTexCoord3fv","()");
  6048. RegalContext *_context = REGAL_GET_CONTEXT();
  6049. RegalAssert(_context);
  6050. DispatchTableGL *_next = _context->dispatcher.error.next();
  6051. RegalAssert(_next);
  6052. GLenum _error = GL_NO_ERROR;
  6053. if (!_context->err.inBeginEnd)
  6054. _error = _next->call(&_next->glGetError)();
  6055. RegalAssert(_error==GL_NO_ERROR);
  6056. _next->call(&_next->glTexCoord3fv)(v);
  6057. if (!_context->err.inBeginEnd) {
  6058. _error = _next->call(&_next->glGetError)();
  6059. if (_error!=GL_NO_ERROR) {
  6060. Error("glTexCoord3fv : ",Token::GLerrorToString(_error));
  6061. #if REGAL_BREAK
  6062. Break::ErrorCB(_error);
  6063. #endif
  6064. if (_context->err.callback)
  6065. _context->err.callback( _error );
  6066. }
  6067. }
  6068. }
  6069. static void REGAL_CALL error_glTexCoord3i(GLint s, GLint t, GLint r)
  6070. {
  6071. Internal("error_glTexCoord3i","()");
  6072. RegalContext *_context = REGAL_GET_CONTEXT();
  6073. RegalAssert(_context);
  6074. DispatchTableGL *_next = _context->dispatcher.error.next();
  6075. RegalAssert(_next);
  6076. GLenum _error = GL_NO_ERROR;
  6077. if (!_context->err.inBeginEnd)
  6078. _error = _next->call(&_next->glGetError)();
  6079. RegalAssert(_error==GL_NO_ERROR);
  6080. _next->call(&_next->glTexCoord3i)(s, t, r);
  6081. if (!_context->err.inBeginEnd) {
  6082. _error = _next->call(&_next->glGetError)();
  6083. if (_error!=GL_NO_ERROR) {
  6084. Error("glTexCoord3i : ",Token::GLerrorToString(_error));
  6085. #if REGAL_BREAK
  6086. Break::ErrorCB(_error);
  6087. #endif
  6088. if (_context->err.callback)
  6089. _context->err.callback( _error );
  6090. }
  6091. }
  6092. }
  6093. static void REGAL_CALL error_glTexCoord3iv(const GLint *v)
  6094. {
  6095. Internal("error_glTexCoord3iv","()");
  6096. RegalContext *_context = REGAL_GET_CONTEXT();
  6097. RegalAssert(_context);
  6098. DispatchTableGL *_next = _context->dispatcher.error.next();
  6099. RegalAssert(_next);
  6100. GLenum _error = GL_NO_ERROR;
  6101. if (!_context->err.inBeginEnd)
  6102. _error = _next->call(&_next->glGetError)();
  6103. RegalAssert(_error==GL_NO_ERROR);
  6104. _next->call(&_next->glTexCoord3iv)(v);
  6105. if (!_context->err.inBeginEnd) {
  6106. _error = _next->call(&_next->glGetError)();
  6107. if (_error!=GL_NO_ERROR) {
  6108. Error("glTexCoord3iv : ",Token::GLerrorToString(_error));
  6109. #if REGAL_BREAK
  6110. Break::ErrorCB(_error);
  6111. #endif
  6112. if (_context->err.callback)
  6113. _context->err.callback( _error );
  6114. }
  6115. }
  6116. }
  6117. static void REGAL_CALL error_glTexCoord3s(GLshort s, GLshort t, GLshort r)
  6118. {
  6119. Internal("error_glTexCoord3s","()");
  6120. RegalContext *_context = REGAL_GET_CONTEXT();
  6121. RegalAssert(_context);
  6122. DispatchTableGL *_next = _context->dispatcher.error.next();
  6123. RegalAssert(_next);
  6124. GLenum _error = GL_NO_ERROR;
  6125. if (!_context->err.inBeginEnd)
  6126. _error = _next->call(&_next->glGetError)();
  6127. RegalAssert(_error==GL_NO_ERROR);
  6128. _next->call(&_next->glTexCoord3s)(s, t, r);
  6129. if (!_context->err.inBeginEnd) {
  6130. _error = _next->call(&_next->glGetError)();
  6131. if (_error!=GL_NO_ERROR) {
  6132. Error("glTexCoord3s : ",Token::GLerrorToString(_error));
  6133. #if REGAL_BREAK
  6134. Break::ErrorCB(_error);
  6135. #endif
  6136. if (_context->err.callback)
  6137. _context->err.callback( _error );
  6138. }
  6139. }
  6140. }
  6141. static void REGAL_CALL error_glTexCoord3sv(const GLshort *v)
  6142. {
  6143. Internal("error_glTexCoord3sv","()");
  6144. RegalContext *_context = REGAL_GET_CONTEXT();
  6145. RegalAssert(_context);
  6146. DispatchTableGL *_next = _context->dispatcher.error.next();
  6147. RegalAssert(_next);
  6148. GLenum _error = GL_NO_ERROR;
  6149. if (!_context->err.inBeginEnd)
  6150. _error = _next->call(&_next->glGetError)();
  6151. RegalAssert(_error==GL_NO_ERROR);
  6152. _next->call(&_next->glTexCoord3sv)(v);
  6153. if (!_context->err.inBeginEnd) {
  6154. _error = _next->call(&_next->glGetError)();
  6155. if (_error!=GL_NO_ERROR) {
  6156. Error("glTexCoord3sv : ",Token::GLerrorToString(_error));
  6157. #if REGAL_BREAK
  6158. Break::ErrorCB(_error);
  6159. #endif
  6160. if (_context->err.callback)
  6161. _context->err.callback( _error );
  6162. }
  6163. }
  6164. }
  6165. static void REGAL_CALL error_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  6166. {
  6167. Internal("error_glTexCoord4d","()");
  6168. RegalContext *_context = REGAL_GET_CONTEXT();
  6169. RegalAssert(_context);
  6170. DispatchTableGL *_next = _context->dispatcher.error.next();
  6171. RegalAssert(_next);
  6172. GLenum _error = GL_NO_ERROR;
  6173. if (!_context->err.inBeginEnd)
  6174. _error = _next->call(&_next->glGetError)();
  6175. RegalAssert(_error==GL_NO_ERROR);
  6176. _next->call(&_next->glTexCoord4d)(s, t, r, q);
  6177. if (!_context->err.inBeginEnd) {
  6178. _error = _next->call(&_next->glGetError)();
  6179. if (_error!=GL_NO_ERROR) {
  6180. Error("glTexCoord4d : ",Token::GLerrorToString(_error));
  6181. #if REGAL_BREAK
  6182. Break::ErrorCB(_error);
  6183. #endif
  6184. if (_context->err.callback)
  6185. _context->err.callback( _error );
  6186. }
  6187. }
  6188. }
  6189. static void REGAL_CALL error_glTexCoord4dv(const GLdouble *v)
  6190. {
  6191. Internal("error_glTexCoord4dv","()");
  6192. RegalContext *_context = REGAL_GET_CONTEXT();
  6193. RegalAssert(_context);
  6194. DispatchTableGL *_next = _context->dispatcher.error.next();
  6195. RegalAssert(_next);
  6196. GLenum _error = GL_NO_ERROR;
  6197. if (!_context->err.inBeginEnd)
  6198. _error = _next->call(&_next->glGetError)();
  6199. RegalAssert(_error==GL_NO_ERROR);
  6200. _next->call(&_next->glTexCoord4dv)(v);
  6201. if (!_context->err.inBeginEnd) {
  6202. _error = _next->call(&_next->glGetError)();
  6203. if (_error!=GL_NO_ERROR) {
  6204. Error("glTexCoord4dv : ",Token::GLerrorToString(_error));
  6205. #if REGAL_BREAK
  6206. Break::ErrorCB(_error);
  6207. #endif
  6208. if (_context->err.callback)
  6209. _context->err.callback( _error );
  6210. }
  6211. }
  6212. }
  6213. static void REGAL_CALL error_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  6214. {
  6215. Internal("error_glTexCoord4f","()");
  6216. RegalContext *_context = REGAL_GET_CONTEXT();
  6217. RegalAssert(_context);
  6218. DispatchTableGL *_next = _context->dispatcher.error.next();
  6219. RegalAssert(_next);
  6220. GLenum _error = GL_NO_ERROR;
  6221. if (!_context->err.inBeginEnd)
  6222. _error = _next->call(&_next->glGetError)();
  6223. RegalAssert(_error==GL_NO_ERROR);
  6224. _next->call(&_next->glTexCoord4f)(s, t, r, q);
  6225. if (!_context->err.inBeginEnd) {
  6226. _error = _next->call(&_next->glGetError)();
  6227. if (_error!=GL_NO_ERROR) {
  6228. Error("glTexCoord4f : ",Token::GLerrorToString(_error));
  6229. #if REGAL_BREAK
  6230. Break::ErrorCB(_error);
  6231. #endif
  6232. if (_context->err.callback)
  6233. _context->err.callback( _error );
  6234. }
  6235. }
  6236. }
  6237. static void REGAL_CALL error_glTexCoord4fv(const GLfloat *v)
  6238. {
  6239. Internal("error_glTexCoord4fv","()");
  6240. RegalContext *_context = REGAL_GET_CONTEXT();
  6241. RegalAssert(_context);
  6242. DispatchTableGL *_next = _context->dispatcher.error.next();
  6243. RegalAssert(_next);
  6244. GLenum _error = GL_NO_ERROR;
  6245. if (!_context->err.inBeginEnd)
  6246. _error = _next->call(&_next->glGetError)();
  6247. RegalAssert(_error==GL_NO_ERROR);
  6248. _next->call(&_next->glTexCoord4fv)(v);
  6249. if (!_context->err.inBeginEnd) {
  6250. _error = _next->call(&_next->glGetError)();
  6251. if (_error!=GL_NO_ERROR) {
  6252. Error("glTexCoord4fv : ",Token::GLerrorToString(_error));
  6253. #if REGAL_BREAK
  6254. Break::ErrorCB(_error);
  6255. #endif
  6256. if (_context->err.callback)
  6257. _context->err.callback( _error );
  6258. }
  6259. }
  6260. }
  6261. static void REGAL_CALL error_glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
  6262. {
  6263. Internal("error_glTexCoord4i","()");
  6264. RegalContext *_context = REGAL_GET_CONTEXT();
  6265. RegalAssert(_context);
  6266. DispatchTableGL *_next = _context->dispatcher.error.next();
  6267. RegalAssert(_next);
  6268. GLenum _error = GL_NO_ERROR;
  6269. if (!_context->err.inBeginEnd)
  6270. _error = _next->call(&_next->glGetError)();
  6271. RegalAssert(_error==GL_NO_ERROR);
  6272. _next->call(&_next->glTexCoord4i)(s, t, r, q);
  6273. if (!_context->err.inBeginEnd) {
  6274. _error = _next->call(&_next->glGetError)();
  6275. if (_error!=GL_NO_ERROR) {
  6276. Error("glTexCoord4i : ",Token::GLerrorToString(_error));
  6277. #if REGAL_BREAK
  6278. Break::ErrorCB(_error);
  6279. #endif
  6280. if (_context->err.callback)
  6281. _context->err.callback( _error );
  6282. }
  6283. }
  6284. }
  6285. static void REGAL_CALL error_glTexCoord4iv(const GLint *v)
  6286. {
  6287. Internal("error_glTexCoord4iv","()");
  6288. RegalContext *_context = REGAL_GET_CONTEXT();
  6289. RegalAssert(_context);
  6290. DispatchTableGL *_next = _context->dispatcher.error.next();
  6291. RegalAssert(_next);
  6292. GLenum _error = GL_NO_ERROR;
  6293. if (!_context->err.inBeginEnd)
  6294. _error = _next->call(&_next->glGetError)();
  6295. RegalAssert(_error==GL_NO_ERROR);
  6296. _next->call(&_next->glTexCoord4iv)(v);
  6297. if (!_context->err.inBeginEnd) {
  6298. _error = _next->call(&_next->glGetError)();
  6299. if (_error!=GL_NO_ERROR) {
  6300. Error("glTexCoord4iv : ",Token::GLerrorToString(_error));
  6301. #if REGAL_BREAK
  6302. Break::ErrorCB(_error);
  6303. #endif
  6304. if (_context->err.callback)
  6305. _context->err.callback( _error );
  6306. }
  6307. }
  6308. }
  6309. static void REGAL_CALL error_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
  6310. {
  6311. Internal("error_glTexCoord4s","()");
  6312. RegalContext *_context = REGAL_GET_CONTEXT();
  6313. RegalAssert(_context);
  6314. DispatchTableGL *_next = _context->dispatcher.error.next();
  6315. RegalAssert(_next);
  6316. GLenum _error = GL_NO_ERROR;
  6317. if (!_context->err.inBeginEnd)
  6318. _error = _next->call(&_next->glGetError)();
  6319. RegalAssert(_error==GL_NO_ERROR);
  6320. _next->call(&_next->glTexCoord4s)(s, t, r, q);
  6321. if (!_context->err.inBeginEnd) {
  6322. _error = _next->call(&_next->glGetError)();
  6323. if (_error!=GL_NO_ERROR) {
  6324. Error("glTexCoord4s : ",Token::GLerrorToString(_error));
  6325. #if REGAL_BREAK
  6326. Break::ErrorCB(_error);
  6327. #endif
  6328. if (_context->err.callback)
  6329. _context->err.callback( _error );
  6330. }
  6331. }
  6332. }
  6333. static void REGAL_CALL error_glTexCoord4sv(const GLshort *v)
  6334. {
  6335. Internal("error_glTexCoord4sv","()");
  6336. RegalContext *_context = REGAL_GET_CONTEXT();
  6337. RegalAssert(_context);
  6338. DispatchTableGL *_next = _context->dispatcher.error.next();
  6339. RegalAssert(_next);
  6340. GLenum _error = GL_NO_ERROR;
  6341. if (!_context->err.inBeginEnd)
  6342. _error = _next->call(&_next->glGetError)();
  6343. RegalAssert(_error==GL_NO_ERROR);
  6344. _next->call(&_next->glTexCoord4sv)(v);
  6345. if (!_context->err.inBeginEnd) {
  6346. _error = _next->call(&_next->glGetError)();
  6347. if (_error!=GL_NO_ERROR) {
  6348. Error("glTexCoord4sv : ",Token::GLerrorToString(_error));
  6349. #if REGAL_BREAK
  6350. Break::ErrorCB(_error);
  6351. #endif
  6352. if (_context->err.callback)
  6353. _context->err.callback( _error );
  6354. }
  6355. }
  6356. }
  6357. static void REGAL_CALL error_glTexEnvf(GLenum target, GLenum pname, GLfloat param)
  6358. {
  6359. Internal("error_glTexEnvf","()");
  6360. RegalContext *_context = REGAL_GET_CONTEXT();
  6361. RegalAssert(_context);
  6362. DispatchTableGL *_next = _context->dispatcher.error.next();
  6363. RegalAssert(_next);
  6364. GLenum _error = GL_NO_ERROR;
  6365. if (!_context->err.inBeginEnd)
  6366. _error = _next->call(&_next->glGetError)();
  6367. RegalAssert(_error==GL_NO_ERROR);
  6368. _next->call(&_next->glTexEnvf)(target, pname, param);
  6369. if (!_context->err.inBeginEnd) {
  6370. _error = _next->call(&_next->glGetError)();
  6371. if (_error!=GL_NO_ERROR) {
  6372. Error("glTexEnvf : ",Token::GLerrorToString(_error));
  6373. #if REGAL_BREAK
  6374. Break::ErrorCB(_error);
  6375. #endif
  6376. if (_context->err.callback)
  6377. _context->err.callback( _error );
  6378. }
  6379. }
  6380. }
  6381. static void REGAL_CALL error_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
  6382. {
  6383. Internal("error_glTexEnvfv","()");
  6384. RegalContext *_context = REGAL_GET_CONTEXT();
  6385. RegalAssert(_context);
  6386. DispatchTableGL *_next = _context->dispatcher.error.next();
  6387. RegalAssert(_next);
  6388. GLenum _error = GL_NO_ERROR;
  6389. if (!_context->err.inBeginEnd)
  6390. _error = _next->call(&_next->glGetError)();
  6391. RegalAssert(_error==GL_NO_ERROR);
  6392. _next->call(&_next->glTexEnvfv)(target, pname, params);
  6393. if (!_context->err.inBeginEnd) {
  6394. _error = _next->call(&_next->glGetError)();
  6395. if (_error!=GL_NO_ERROR) {
  6396. Error("glTexEnvfv : ",Token::GLerrorToString(_error));
  6397. #if REGAL_BREAK
  6398. Break::ErrorCB(_error);
  6399. #endif
  6400. if (_context->err.callback)
  6401. _context->err.callback( _error );
  6402. }
  6403. }
  6404. }
  6405. static void REGAL_CALL error_glTexEnvi(GLenum target, GLenum pname, GLint param)
  6406. {
  6407. Internal("error_glTexEnvi","()");
  6408. RegalContext *_context = REGAL_GET_CONTEXT();
  6409. RegalAssert(_context);
  6410. DispatchTableGL *_next = _context->dispatcher.error.next();
  6411. RegalAssert(_next);
  6412. GLenum _error = GL_NO_ERROR;
  6413. if (!_context->err.inBeginEnd)
  6414. _error = _next->call(&_next->glGetError)();
  6415. RegalAssert(_error==GL_NO_ERROR);
  6416. _next->call(&_next->glTexEnvi)(target, pname, param);
  6417. if (!_context->err.inBeginEnd) {
  6418. _error = _next->call(&_next->glGetError)();
  6419. if (_error!=GL_NO_ERROR) {
  6420. Error("glTexEnvi : ",Token::GLerrorToString(_error));
  6421. #if REGAL_BREAK
  6422. Break::ErrorCB(_error);
  6423. #endif
  6424. if (_context->err.callback)
  6425. _context->err.callback( _error );
  6426. }
  6427. }
  6428. }
  6429. static void REGAL_CALL error_glTexEnviv(GLenum target, GLenum pname, const GLint *params)
  6430. {
  6431. Internal("error_glTexEnviv","()");
  6432. RegalContext *_context = REGAL_GET_CONTEXT();
  6433. RegalAssert(_context);
  6434. DispatchTableGL *_next = _context->dispatcher.error.next();
  6435. RegalAssert(_next);
  6436. GLenum _error = GL_NO_ERROR;
  6437. if (!_context->err.inBeginEnd)
  6438. _error = _next->call(&_next->glGetError)();
  6439. RegalAssert(_error==GL_NO_ERROR);
  6440. _next->call(&_next->glTexEnviv)(target, pname, params);
  6441. if (!_context->err.inBeginEnd) {
  6442. _error = _next->call(&_next->glGetError)();
  6443. if (_error!=GL_NO_ERROR) {
  6444. Error("glTexEnviv : ",Token::GLerrorToString(_error));
  6445. #if REGAL_BREAK
  6446. Break::ErrorCB(_error);
  6447. #endif
  6448. if (_context->err.callback)
  6449. _context->err.callback( _error );
  6450. }
  6451. }
  6452. }
  6453. static void REGAL_CALL error_glTexGend(GLenum coord, GLenum pname, GLdouble param)
  6454. {
  6455. Internal("error_glTexGend","()");
  6456. RegalContext *_context = REGAL_GET_CONTEXT();
  6457. RegalAssert(_context);
  6458. DispatchTableGL *_next = _context->dispatcher.error.next();
  6459. RegalAssert(_next);
  6460. GLenum _error = GL_NO_ERROR;
  6461. if (!_context->err.inBeginEnd)
  6462. _error = _next->call(&_next->glGetError)();
  6463. RegalAssert(_error==GL_NO_ERROR);
  6464. _next->call(&_next->glTexGend)(coord, pname, param);
  6465. if (!_context->err.inBeginEnd) {
  6466. _error = _next->call(&_next->glGetError)();
  6467. if (_error!=GL_NO_ERROR) {
  6468. Error("glTexGend : ",Token::GLerrorToString(_error));
  6469. #if REGAL_BREAK
  6470. Break::ErrorCB(_error);
  6471. #endif
  6472. if (_context->err.callback)
  6473. _context->err.callback( _error );
  6474. }
  6475. }
  6476. }
  6477. static void REGAL_CALL error_glTexGendv(GLenum coord, GLenum pname, const GLdouble *params)
  6478. {
  6479. Internal("error_glTexGendv","()");
  6480. RegalContext *_context = REGAL_GET_CONTEXT();
  6481. RegalAssert(_context);
  6482. DispatchTableGL *_next = _context->dispatcher.error.next();
  6483. RegalAssert(_next);
  6484. GLenum _error = GL_NO_ERROR;
  6485. if (!_context->err.inBeginEnd)
  6486. _error = _next->call(&_next->glGetError)();
  6487. RegalAssert(_error==GL_NO_ERROR);
  6488. _next->call(&_next->glTexGendv)(coord, pname, params);
  6489. if (!_context->err.inBeginEnd) {
  6490. _error = _next->call(&_next->glGetError)();
  6491. if (_error!=GL_NO_ERROR) {
  6492. Error("glTexGendv : ",Token::GLerrorToString(_error));
  6493. #if REGAL_BREAK
  6494. Break::ErrorCB(_error);
  6495. #endif
  6496. if (_context->err.callback)
  6497. _context->err.callback( _error );
  6498. }
  6499. }
  6500. }
  6501. static void REGAL_CALL error_glTexGenf(GLenum coord, GLenum pname, GLfloat param)
  6502. {
  6503. Internal("error_glTexGenf","()");
  6504. RegalContext *_context = REGAL_GET_CONTEXT();
  6505. RegalAssert(_context);
  6506. DispatchTableGL *_next = _context->dispatcher.error.next();
  6507. RegalAssert(_next);
  6508. GLenum _error = GL_NO_ERROR;
  6509. if (!_context->err.inBeginEnd)
  6510. _error = _next->call(&_next->glGetError)();
  6511. RegalAssert(_error==GL_NO_ERROR);
  6512. _next->call(&_next->glTexGenf)(coord, pname, param);
  6513. if (!_context->err.inBeginEnd) {
  6514. _error = _next->call(&_next->glGetError)();
  6515. if (_error!=GL_NO_ERROR) {
  6516. Error("glTexGenf : ",Token::GLerrorToString(_error));
  6517. #if REGAL_BREAK
  6518. Break::ErrorCB(_error);
  6519. #endif
  6520. if (_context->err.callback)
  6521. _context->err.callback( _error );
  6522. }
  6523. }
  6524. }
  6525. static void REGAL_CALL error_glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
  6526. {
  6527. Internal("error_glTexGenfv","()");
  6528. RegalContext *_context = REGAL_GET_CONTEXT();
  6529. RegalAssert(_context);
  6530. DispatchTableGL *_next = _context->dispatcher.error.next();
  6531. RegalAssert(_next);
  6532. GLenum _error = GL_NO_ERROR;
  6533. if (!_context->err.inBeginEnd)
  6534. _error = _next->call(&_next->glGetError)();
  6535. RegalAssert(_error==GL_NO_ERROR);
  6536. _next->call(&_next->glTexGenfv)(coord, pname, params);
  6537. if (!_context->err.inBeginEnd) {
  6538. _error = _next->call(&_next->glGetError)();
  6539. if (_error!=GL_NO_ERROR) {
  6540. Error("glTexGenfv : ",Token::GLerrorToString(_error));
  6541. #if REGAL_BREAK
  6542. Break::ErrorCB(_error);
  6543. #endif
  6544. if (_context->err.callback)
  6545. _context->err.callback( _error );
  6546. }
  6547. }
  6548. }
  6549. static void REGAL_CALL error_glTexGeni(GLenum coord, GLenum pname, GLint param)
  6550. {
  6551. Internal("error_glTexGeni","()");
  6552. RegalContext *_context = REGAL_GET_CONTEXT();
  6553. RegalAssert(_context);
  6554. DispatchTableGL *_next = _context->dispatcher.error.next();
  6555. RegalAssert(_next);
  6556. GLenum _error = GL_NO_ERROR;
  6557. if (!_context->err.inBeginEnd)
  6558. _error = _next->call(&_next->glGetError)();
  6559. RegalAssert(_error==GL_NO_ERROR);
  6560. _next->call(&_next->glTexGeni)(coord, pname, param);
  6561. if (!_context->err.inBeginEnd) {
  6562. _error = _next->call(&_next->glGetError)();
  6563. if (_error!=GL_NO_ERROR) {
  6564. Error("glTexGeni : ",Token::GLerrorToString(_error));
  6565. #if REGAL_BREAK
  6566. Break::ErrorCB(_error);
  6567. #endif
  6568. if (_context->err.callback)
  6569. _context->err.callback( _error );
  6570. }
  6571. }
  6572. }
  6573. static void REGAL_CALL error_glTexGeniv(GLenum coord, GLenum pname, const GLint *params)
  6574. {
  6575. Internal("error_glTexGeniv","()");
  6576. RegalContext *_context = REGAL_GET_CONTEXT();
  6577. RegalAssert(_context);
  6578. DispatchTableGL *_next = _context->dispatcher.error.next();
  6579. RegalAssert(_next);
  6580. GLenum _error = GL_NO_ERROR;
  6581. if (!_context->err.inBeginEnd)
  6582. _error = _next->call(&_next->glGetError)();
  6583. RegalAssert(_error==GL_NO_ERROR);
  6584. _next->call(&_next->glTexGeniv)(coord, pname, params);
  6585. if (!_context->err.inBeginEnd) {
  6586. _error = _next->call(&_next->glGetError)();
  6587. if (_error!=GL_NO_ERROR) {
  6588. Error("glTexGeniv : ",Token::GLerrorToString(_error));
  6589. #if REGAL_BREAK
  6590. Break::ErrorCB(_error);
  6591. #endif
  6592. if (_context->err.callback)
  6593. _context->err.callback( _error );
  6594. }
  6595. }
  6596. }
  6597. static void REGAL_CALL error_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
  6598. {
  6599. Internal("error_glTexImage1D","()");
  6600. RegalContext *_context = REGAL_GET_CONTEXT();
  6601. RegalAssert(_context);
  6602. DispatchTableGL *_next = _context->dispatcher.error.next();
  6603. RegalAssert(_next);
  6604. GLenum _error = GL_NO_ERROR;
  6605. if (!_context->err.inBeginEnd)
  6606. _error = _next->call(&_next->glGetError)();
  6607. RegalAssert(_error==GL_NO_ERROR);
  6608. _next->call(&_next->glTexImage1D)(target, level, internalformat, width, border, format, type, pixels);
  6609. if (!_context->err.inBeginEnd) {
  6610. _error = _next->call(&_next->glGetError)();
  6611. if (_error!=GL_NO_ERROR) {
  6612. Error("glTexImage1D : ",Token::GLerrorToString(_error));
  6613. #if REGAL_BREAK
  6614. Break::ErrorCB(_error);
  6615. #endif
  6616. if (_context->err.callback)
  6617. _context->err.callback( _error );
  6618. }
  6619. }
  6620. }
  6621. static void REGAL_CALL error_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
  6622. {
  6623. Internal("error_glTexImage2D","()");
  6624. RegalContext *_context = REGAL_GET_CONTEXT();
  6625. RegalAssert(_context);
  6626. DispatchTableGL *_next = _context->dispatcher.error.next();
  6627. RegalAssert(_next);
  6628. GLenum _error = GL_NO_ERROR;
  6629. if (!_context->err.inBeginEnd)
  6630. _error = _next->call(&_next->glGetError)();
  6631. RegalAssert(_error==GL_NO_ERROR);
  6632. _next->call(&_next->glTexImage2D)(target, level, internalformat, width, height, border, format, type, pixels);
  6633. if (!_context->err.inBeginEnd) {
  6634. _error = _next->call(&_next->glGetError)();
  6635. if (_error!=GL_NO_ERROR) {
  6636. Error("glTexImage2D : ",Token::GLerrorToString(_error));
  6637. #if REGAL_BREAK
  6638. Break::ErrorCB(_error);
  6639. #endif
  6640. if (_context->err.callback)
  6641. _context->err.callback( _error );
  6642. }
  6643. }
  6644. }
  6645. static void REGAL_CALL error_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
  6646. {
  6647. Internal("error_glTexParameterf","()");
  6648. RegalContext *_context = REGAL_GET_CONTEXT();
  6649. RegalAssert(_context);
  6650. DispatchTableGL *_next = _context->dispatcher.error.next();
  6651. RegalAssert(_next);
  6652. GLenum _error = GL_NO_ERROR;
  6653. if (!_context->err.inBeginEnd)
  6654. _error = _next->call(&_next->glGetError)();
  6655. RegalAssert(_error==GL_NO_ERROR);
  6656. _next->call(&_next->glTexParameterf)(target, pname, param);
  6657. if (!_context->err.inBeginEnd) {
  6658. _error = _next->call(&_next->glGetError)();
  6659. if (_error!=GL_NO_ERROR) {
  6660. Error("glTexParameterf : ",Token::GLerrorToString(_error));
  6661. #if REGAL_BREAK
  6662. Break::ErrorCB(_error);
  6663. #endif
  6664. if (_context->err.callback)
  6665. _context->err.callback( _error );
  6666. }
  6667. }
  6668. }
  6669. static void REGAL_CALL error_glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
  6670. {
  6671. Internal("error_glTexParameterfv","()");
  6672. RegalContext *_context = REGAL_GET_CONTEXT();
  6673. RegalAssert(_context);
  6674. DispatchTableGL *_next = _context->dispatcher.error.next();
  6675. RegalAssert(_next);
  6676. GLenum _error = GL_NO_ERROR;
  6677. if (!_context->err.inBeginEnd)
  6678. _error = _next->call(&_next->glGetError)();
  6679. RegalAssert(_error==GL_NO_ERROR);
  6680. _next->call(&_next->glTexParameterfv)(target, pname, params);
  6681. if (!_context->err.inBeginEnd) {
  6682. _error = _next->call(&_next->glGetError)();
  6683. if (_error!=GL_NO_ERROR) {
  6684. Error("glTexParameterfv : ",Token::GLerrorToString(_error));
  6685. #if REGAL_BREAK
  6686. Break::ErrorCB(_error);
  6687. #endif
  6688. if (_context->err.callback)
  6689. _context->err.callback( _error );
  6690. }
  6691. }
  6692. }
  6693. static void REGAL_CALL error_glTexParameteri(GLenum target, GLenum pname, GLint param)
  6694. {
  6695. Internal("error_glTexParameteri","()");
  6696. RegalContext *_context = REGAL_GET_CONTEXT();
  6697. RegalAssert(_context);
  6698. DispatchTableGL *_next = _context->dispatcher.error.next();
  6699. RegalAssert(_next);
  6700. GLenum _error = GL_NO_ERROR;
  6701. if (!_context->err.inBeginEnd)
  6702. _error = _next->call(&_next->glGetError)();
  6703. RegalAssert(_error==GL_NO_ERROR);
  6704. _next->call(&_next->glTexParameteri)(target, pname, param);
  6705. if (!_context->err.inBeginEnd) {
  6706. _error = _next->call(&_next->glGetError)();
  6707. if (_error!=GL_NO_ERROR) {
  6708. Error("glTexParameteri : ",Token::GLerrorToString(_error));
  6709. #if REGAL_BREAK
  6710. Break::ErrorCB(_error);
  6711. #endif
  6712. if (_context->err.callback)
  6713. _context->err.callback( _error );
  6714. }
  6715. }
  6716. }
  6717. static void REGAL_CALL error_glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
  6718. {
  6719. Internal("error_glTexParameteriv","()");
  6720. RegalContext *_context = REGAL_GET_CONTEXT();
  6721. RegalAssert(_context);
  6722. DispatchTableGL *_next = _context->dispatcher.error.next();
  6723. RegalAssert(_next);
  6724. GLenum _error = GL_NO_ERROR;
  6725. if (!_context->err.inBeginEnd)
  6726. _error = _next->call(&_next->glGetError)();
  6727. RegalAssert(_error==GL_NO_ERROR);
  6728. _next->call(&_next->glTexParameteriv)(target, pname, params);
  6729. if (!_context->err.inBeginEnd) {
  6730. _error = _next->call(&_next->glGetError)();
  6731. if (_error!=GL_NO_ERROR) {
  6732. Error("glTexParameteriv : ",Token::GLerrorToString(_error));
  6733. #if REGAL_BREAK
  6734. Break::ErrorCB(_error);
  6735. #endif
  6736. if (_context->err.callback)
  6737. _context->err.callback( _error );
  6738. }
  6739. }
  6740. }
  6741. static void REGAL_CALL error_glTranslated(GLdouble x, GLdouble y, GLdouble z)
  6742. {
  6743. Internal("error_glTranslated","()");
  6744. RegalContext *_context = REGAL_GET_CONTEXT();
  6745. RegalAssert(_context);
  6746. DispatchTableGL *_next = _context->dispatcher.error.next();
  6747. RegalAssert(_next);
  6748. GLenum _error = GL_NO_ERROR;
  6749. if (!_context->err.inBeginEnd)
  6750. _error = _next->call(&_next->glGetError)();
  6751. RegalAssert(_error==GL_NO_ERROR);
  6752. _next->call(&_next->glTranslated)(x, y, z);
  6753. if (!_context->err.inBeginEnd) {
  6754. _error = _next->call(&_next->glGetError)();
  6755. if (_error!=GL_NO_ERROR) {
  6756. Error("glTranslated : ",Token::GLerrorToString(_error));
  6757. #if REGAL_BREAK
  6758. Break::ErrorCB(_error);
  6759. #endif
  6760. if (_context->err.callback)
  6761. _context->err.callback( _error );
  6762. }
  6763. }
  6764. }
  6765. static void REGAL_CALL error_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
  6766. {
  6767. Internal("error_glTranslatef","()");
  6768. RegalContext *_context = REGAL_GET_CONTEXT();
  6769. RegalAssert(_context);
  6770. DispatchTableGL *_next = _context->dispatcher.error.next();
  6771. RegalAssert(_next);
  6772. GLenum _error = GL_NO_ERROR;
  6773. if (!_context->err.inBeginEnd)
  6774. _error = _next->call(&_next->glGetError)();
  6775. RegalAssert(_error==GL_NO_ERROR);
  6776. _next->call(&_next->glTranslatef)(x, y, z);
  6777. if (!_context->err.inBeginEnd) {
  6778. _error = _next->call(&_next->glGetError)();
  6779. if (_error!=GL_NO_ERROR) {
  6780. Error("glTranslatef : ",Token::GLerrorToString(_error));
  6781. #if REGAL_BREAK
  6782. Break::ErrorCB(_error);
  6783. #endif
  6784. if (_context->err.callback)
  6785. _context->err.callback( _error );
  6786. }
  6787. }
  6788. }
  6789. static void REGAL_CALL error_glVertex2d(GLdouble x, GLdouble y)
  6790. {
  6791. Internal("error_glVertex2d","()");
  6792. RegalContext *_context = REGAL_GET_CONTEXT();
  6793. RegalAssert(_context);
  6794. DispatchTableGL *_next = _context->dispatcher.error.next();
  6795. RegalAssert(_next);
  6796. GLenum _error = GL_NO_ERROR;
  6797. if (!_context->err.inBeginEnd)
  6798. _error = _next->call(&_next->glGetError)();
  6799. RegalAssert(_error==GL_NO_ERROR);
  6800. _next->call(&_next->glVertex2d)(x, y);
  6801. if (!_context->err.inBeginEnd) {
  6802. _error = _next->call(&_next->glGetError)();
  6803. if (_error!=GL_NO_ERROR) {
  6804. Error("glVertex2d : ",Token::GLerrorToString(_error));
  6805. #if REGAL_BREAK
  6806. Break::ErrorCB(_error);
  6807. #endif
  6808. if (_context->err.callback)
  6809. _context->err.callback( _error );
  6810. }
  6811. }
  6812. }
  6813. static void REGAL_CALL error_glVertex2dv(const GLdouble *v)
  6814. {
  6815. Internal("error_glVertex2dv","()");
  6816. RegalContext *_context = REGAL_GET_CONTEXT();
  6817. RegalAssert(_context);
  6818. DispatchTableGL *_next = _context->dispatcher.error.next();
  6819. RegalAssert(_next);
  6820. GLenum _error = GL_NO_ERROR;
  6821. if (!_context->err.inBeginEnd)
  6822. _error = _next->call(&_next->glGetError)();
  6823. RegalAssert(_error==GL_NO_ERROR);
  6824. _next->call(&_next->glVertex2dv)(v);
  6825. if (!_context->err.inBeginEnd) {
  6826. _error = _next->call(&_next->glGetError)();
  6827. if (_error!=GL_NO_ERROR) {
  6828. Error("glVertex2dv : ",Token::GLerrorToString(_error));
  6829. #if REGAL_BREAK
  6830. Break::ErrorCB(_error);
  6831. #endif
  6832. if (_context->err.callback)
  6833. _context->err.callback( _error );
  6834. }
  6835. }
  6836. }
  6837. static void REGAL_CALL error_glVertex2f(GLfloat x, GLfloat y)
  6838. {
  6839. Internal("error_glVertex2f","()");
  6840. RegalContext *_context = REGAL_GET_CONTEXT();
  6841. RegalAssert(_context);
  6842. DispatchTableGL *_next = _context->dispatcher.error.next();
  6843. RegalAssert(_next);
  6844. GLenum _error = GL_NO_ERROR;
  6845. if (!_context->err.inBeginEnd)
  6846. _error = _next->call(&_next->glGetError)();
  6847. RegalAssert(_error==GL_NO_ERROR);
  6848. _next->call(&_next->glVertex2f)(x, y);
  6849. if (!_context->err.inBeginEnd) {
  6850. _error = _next->call(&_next->glGetError)();
  6851. if (_error!=GL_NO_ERROR) {
  6852. Error("glVertex2f : ",Token::GLerrorToString(_error));
  6853. #if REGAL_BREAK
  6854. Break::ErrorCB(_error);
  6855. #endif
  6856. if (_context->err.callback)
  6857. _context->err.callback( _error );
  6858. }
  6859. }
  6860. }
  6861. static void REGAL_CALL error_glVertex2fv(const GLfloat *v)
  6862. {
  6863. Internal("error_glVertex2fv","()");
  6864. RegalContext *_context = REGAL_GET_CONTEXT();
  6865. RegalAssert(_context);
  6866. DispatchTableGL *_next = _context->dispatcher.error.next();
  6867. RegalAssert(_next);
  6868. GLenum _error = GL_NO_ERROR;
  6869. if (!_context->err.inBeginEnd)
  6870. _error = _next->call(&_next->glGetError)();
  6871. RegalAssert(_error==GL_NO_ERROR);
  6872. _next->call(&_next->glVertex2fv)(v);
  6873. if (!_context->err.inBeginEnd) {
  6874. _error = _next->call(&_next->glGetError)();
  6875. if (_error!=GL_NO_ERROR) {
  6876. Error("glVertex2fv : ",Token::GLerrorToString(_error));
  6877. #if REGAL_BREAK
  6878. Break::ErrorCB(_error);
  6879. #endif
  6880. if (_context->err.callback)
  6881. _context->err.callback( _error );
  6882. }
  6883. }
  6884. }
  6885. static void REGAL_CALL error_glVertex2i(GLint x, GLint y)
  6886. {
  6887. Internal("error_glVertex2i","()");
  6888. RegalContext *_context = REGAL_GET_CONTEXT();
  6889. RegalAssert(_context);
  6890. DispatchTableGL *_next = _context->dispatcher.error.next();
  6891. RegalAssert(_next);
  6892. GLenum _error = GL_NO_ERROR;
  6893. if (!_context->err.inBeginEnd)
  6894. _error = _next->call(&_next->glGetError)();
  6895. RegalAssert(_error==GL_NO_ERROR);
  6896. _next->call(&_next->glVertex2i)(x, y);
  6897. if (!_context->err.inBeginEnd) {
  6898. _error = _next->call(&_next->glGetError)();
  6899. if (_error!=GL_NO_ERROR) {
  6900. Error("glVertex2i : ",Token::GLerrorToString(_error));
  6901. #if REGAL_BREAK
  6902. Break::ErrorCB(_error);
  6903. #endif
  6904. if (_context->err.callback)
  6905. _context->err.callback( _error );
  6906. }
  6907. }
  6908. }
  6909. static void REGAL_CALL error_glVertex2iv(const GLint *v)
  6910. {
  6911. Internal("error_glVertex2iv","()");
  6912. RegalContext *_context = REGAL_GET_CONTEXT();
  6913. RegalAssert(_context);
  6914. DispatchTableGL *_next = _context->dispatcher.error.next();
  6915. RegalAssert(_next);
  6916. GLenum _error = GL_NO_ERROR;
  6917. if (!_context->err.inBeginEnd)
  6918. _error = _next->call(&_next->glGetError)();
  6919. RegalAssert(_error==GL_NO_ERROR);
  6920. _next->call(&_next->glVertex2iv)(v);
  6921. if (!_context->err.inBeginEnd) {
  6922. _error = _next->call(&_next->glGetError)();
  6923. if (_error!=GL_NO_ERROR) {
  6924. Error("glVertex2iv : ",Token::GLerrorToString(_error));
  6925. #if REGAL_BREAK
  6926. Break::ErrorCB(_error);
  6927. #endif
  6928. if (_context->err.callback)
  6929. _context->err.callback( _error );
  6930. }
  6931. }
  6932. }
  6933. static void REGAL_CALL error_glVertex2s(GLshort x, GLshort y)
  6934. {
  6935. Internal("error_glVertex2s","()");
  6936. RegalContext *_context = REGAL_GET_CONTEXT();
  6937. RegalAssert(_context);
  6938. DispatchTableGL *_next = _context->dispatcher.error.next();
  6939. RegalAssert(_next);
  6940. GLenum _error = GL_NO_ERROR;
  6941. if (!_context->err.inBeginEnd)
  6942. _error = _next->call(&_next->glGetError)();
  6943. RegalAssert(_error==GL_NO_ERROR);
  6944. _next->call(&_next->glVertex2s)(x, y);
  6945. if (!_context->err.inBeginEnd) {
  6946. _error = _next->call(&_next->glGetError)();
  6947. if (_error!=GL_NO_ERROR) {
  6948. Error("glVertex2s : ",Token::GLerrorToString(_error));
  6949. #if REGAL_BREAK
  6950. Break::ErrorCB(_error);
  6951. #endif
  6952. if (_context->err.callback)
  6953. _context->err.callback( _error );
  6954. }
  6955. }
  6956. }
  6957. static void REGAL_CALL error_glVertex2sv(const GLshort *v)
  6958. {
  6959. Internal("error_glVertex2sv","()");
  6960. RegalContext *_context = REGAL_GET_CONTEXT();
  6961. RegalAssert(_context);
  6962. DispatchTableGL *_next = _context->dispatcher.error.next();
  6963. RegalAssert(_next);
  6964. GLenum _error = GL_NO_ERROR;
  6965. if (!_context->err.inBeginEnd)
  6966. _error = _next->call(&_next->glGetError)();
  6967. RegalAssert(_error==GL_NO_ERROR);
  6968. _next->call(&_next->glVertex2sv)(v);
  6969. if (!_context->err.inBeginEnd) {
  6970. _error = _next->call(&_next->glGetError)();
  6971. if (_error!=GL_NO_ERROR) {
  6972. Error("glVertex2sv : ",Token::GLerrorToString(_error));
  6973. #if REGAL_BREAK
  6974. Break::ErrorCB(_error);
  6975. #endif
  6976. if (_context->err.callback)
  6977. _context->err.callback( _error );
  6978. }
  6979. }
  6980. }
  6981. static void REGAL_CALL error_glVertex3d(GLdouble x, GLdouble y, GLdouble z)
  6982. {
  6983. Internal("error_glVertex3d","()");
  6984. RegalContext *_context = REGAL_GET_CONTEXT();
  6985. RegalAssert(_context);
  6986. DispatchTableGL *_next = _context->dispatcher.error.next();
  6987. RegalAssert(_next);
  6988. GLenum _error = GL_NO_ERROR;
  6989. if (!_context->err.inBeginEnd)
  6990. _error = _next->call(&_next->glGetError)();
  6991. RegalAssert(_error==GL_NO_ERROR);
  6992. _next->call(&_next->glVertex3d)(x, y, z);
  6993. if (!_context->err.inBeginEnd) {
  6994. _error = _next->call(&_next->glGetError)();
  6995. if (_error!=GL_NO_ERROR) {
  6996. Error("glVertex3d : ",Token::GLerrorToString(_error));
  6997. #if REGAL_BREAK
  6998. Break::ErrorCB(_error);
  6999. #endif
  7000. if (_context->err.callback)
  7001. _context->err.callback( _error );
  7002. }
  7003. }
  7004. }
  7005. static void REGAL_CALL error_glVertex3dv(const GLdouble *v)
  7006. {
  7007. Internal("error_glVertex3dv","()");
  7008. RegalContext *_context = REGAL_GET_CONTEXT();
  7009. RegalAssert(_context);
  7010. DispatchTableGL *_next = _context->dispatcher.error.next();
  7011. RegalAssert(_next);
  7012. GLenum _error = GL_NO_ERROR;
  7013. if (!_context->err.inBeginEnd)
  7014. _error = _next->call(&_next->glGetError)();
  7015. RegalAssert(_error==GL_NO_ERROR);
  7016. _next->call(&_next->glVertex3dv)(v);
  7017. if (!_context->err.inBeginEnd) {
  7018. _error = _next->call(&_next->glGetError)();
  7019. if (_error!=GL_NO_ERROR) {
  7020. Error("glVertex3dv : ",Token::GLerrorToString(_error));
  7021. #if REGAL_BREAK
  7022. Break::ErrorCB(_error);
  7023. #endif
  7024. if (_context->err.callback)
  7025. _context->err.callback( _error );
  7026. }
  7027. }
  7028. }
  7029. static void REGAL_CALL error_glVertex3f(GLfloat x, GLfloat y, GLfloat z)
  7030. {
  7031. Internal("error_glVertex3f","()");
  7032. RegalContext *_context = REGAL_GET_CONTEXT();
  7033. RegalAssert(_context);
  7034. DispatchTableGL *_next = _context->dispatcher.error.next();
  7035. RegalAssert(_next);
  7036. GLenum _error = GL_NO_ERROR;
  7037. if (!_context->err.inBeginEnd)
  7038. _error = _next->call(&_next->glGetError)();
  7039. RegalAssert(_error==GL_NO_ERROR);
  7040. _next->call(&_next->glVertex3f)(x, y, z);
  7041. if (!_context->err.inBeginEnd) {
  7042. _error = _next->call(&_next->glGetError)();
  7043. if (_error!=GL_NO_ERROR) {
  7044. Error("glVertex3f : ",Token::GLerrorToString(_error));
  7045. #if REGAL_BREAK
  7046. Break::ErrorCB(_error);
  7047. #endif
  7048. if (_context->err.callback)
  7049. _context->err.callback( _error );
  7050. }
  7051. }
  7052. }
  7053. static void REGAL_CALL error_glVertex3fv(const GLfloat *v)
  7054. {
  7055. Internal("error_glVertex3fv","()");
  7056. RegalContext *_context = REGAL_GET_CONTEXT();
  7057. RegalAssert(_context);
  7058. DispatchTableGL *_next = _context->dispatcher.error.next();
  7059. RegalAssert(_next);
  7060. GLenum _error = GL_NO_ERROR;
  7061. if (!_context->err.inBeginEnd)
  7062. _error = _next->call(&_next->glGetError)();
  7063. RegalAssert(_error==GL_NO_ERROR);
  7064. _next->call(&_next->glVertex3fv)(v);
  7065. if (!_context->err.inBeginEnd) {
  7066. _error = _next->call(&_next->glGetError)();
  7067. if (_error!=GL_NO_ERROR) {
  7068. Error("glVertex3fv : ",Token::GLerrorToString(_error));
  7069. #if REGAL_BREAK
  7070. Break::ErrorCB(_error);
  7071. #endif
  7072. if (_context->err.callback)
  7073. _context->err.callback( _error );
  7074. }
  7075. }
  7076. }
  7077. static void REGAL_CALL error_glVertex3i(GLint x, GLint y, GLint z)
  7078. {
  7079. Internal("error_glVertex3i","()");
  7080. RegalContext *_context = REGAL_GET_CONTEXT();
  7081. RegalAssert(_context);
  7082. DispatchTableGL *_next = _context->dispatcher.error.next();
  7083. RegalAssert(_next);
  7084. GLenum _error = GL_NO_ERROR;
  7085. if (!_context->err.inBeginEnd)
  7086. _error = _next->call(&_next->glGetError)();
  7087. RegalAssert(_error==GL_NO_ERROR);
  7088. _next->call(&_next->glVertex3i)(x, y, z);
  7089. if (!_context->err.inBeginEnd) {
  7090. _error = _next->call(&_next->glGetError)();
  7091. if (_error!=GL_NO_ERROR) {
  7092. Error("glVertex3i : ",Token::GLerrorToString(_error));
  7093. #if REGAL_BREAK
  7094. Break::ErrorCB(_error);
  7095. #endif
  7096. if (_context->err.callback)
  7097. _context->err.callback( _error );
  7098. }
  7099. }
  7100. }
  7101. static void REGAL_CALL error_glVertex3iv(const GLint *v)
  7102. {
  7103. Internal("error_glVertex3iv","()");
  7104. RegalContext *_context = REGAL_GET_CONTEXT();
  7105. RegalAssert(_context);
  7106. DispatchTableGL *_next = _context->dispatcher.error.next();
  7107. RegalAssert(_next);
  7108. GLenum _error = GL_NO_ERROR;
  7109. if (!_context->err.inBeginEnd)
  7110. _error = _next->call(&_next->glGetError)();
  7111. RegalAssert(_error==GL_NO_ERROR);
  7112. _next->call(&_next->glVertex3iv)(v);
  7113. if (!_context->err.inBeginEnd) {
  7114. _error = _next->call(&_next->glGetError)();
  7115. if (_error!=GL_NO_ERROR) {
  7116. Error("glVertex3iv : ",Token::GLerrorToString(_error));
  7117. #if REGAL_BREAK
  7118. Break::ErrorCB(_error);
  7119. #endif
  7120. if (_context->err.callback)
  7121. _context->err.callback( _error );
  7122. }
  7123. }
  7124. }
  7125. static void REGAL_CALL error_glVertex3s(GLshort x, GLshort y, GLshort z)
  7126. {
  7127. Internal("error_glVertex3s","()");
  7128. RegalContext *_context = REGAL_GET_CONTEXT();
  7129. RegalAssert(_context);
  7130. DispatchTableGL *_next = _context->dispatcher.error.next();
  7131. RegalAssert(_next);
  7132. GLenum _error = GL_NO_ERROR;
  7133. if (!_context->err.inBeginEnd)
  7134. _error = _next->call(&_next->glGetError)();
  7135. RegalAssert(_error==GL_NO_ERROR);
  7136. _next->call(&_next->glVertex3s)(x, y, z);
  7137. if (!_context->err.inBeginEnd) {
  7138. _error = _next->call(&_next->glGetError)();
  7139. if (_error!=GL_NO_ERROR) {
  7140. Error("glVertex3s : ",Token::GLerrorToString(_error));
  7141. #if REGAL_BREAK
  7142. Break::ErrorCB(_error);
  7143. #endif
  7144. if (_context->err.callback)
  7145. _context->err.callback( _error );
  7146. }
  7147. }
  7148. }
  7149. static void REGAL_CALL error_glVertex3sv(const GLshort *v)
  7150. {
  7151. Internal("error_glVertex3sv","()");
  7152. RegalContext *_context = REGAL_GET_CONTEXT();
  7153. RegalAssert(_context);
  7154. DispatchTableGL *_next = _context->dispatcher.error.next();
  7155. RegalAssert(_next);
  7156. GLenum _error = GL_NO_ERROR;
  7157. if (!_context->err.inBeginEnd)
  7158. _error = _next->call(&_next->glGetError)();
  7159. RegalAssert(_error==GL_NO_ERROR);
  7160. _next->call(&_next->glVertex3sv)(v);
  7161. if (!_context->err.inBeginEnd) {
  7162. _error = _next->call(&_next->glGetError)();
  7163. if (_error!=GL_NO_ERROR) {
  7164. Error("glVertex3sv : ",Token::GLerrorToString(_error));
  7165. #if REGAL_BREAK
  7166. Break::ErrorCB(_error);
  7167. #endif
  7168. if (_context->err.callback)
  7169. _context->err.callback( _error );
  7170. }
  7171. }
  7172. }
  7173. static void REGAL_CALL error_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  7174. {
  7175. Internal("error_glVertex4d","()");
  7176. RegalContext *_context = REGAL_GET_CONTEXT();
  7177. RegalAssert(_context);
  7178. DispatchTableGL *_next = _context->dispatcher.error.next();
  7179. RegalAssert(_next);
  7180. GLenum _error = GL_NO_ERROR;
  7181. if (!_context->err.inBeginEnd)
  7182. _error = _next->call(&_next->glGetError)();
  7183. RegalAssert(_error==GL_NO_ERROR);
  7184. _next->call(&_next->glVertex4d)(x, y, z, w);
  7185. if (!_context->err.inBeginEnd) {
  7186. _error = _next->call(&_next->glGetError)();
  7187. if (_error!=GL_NO_ERROR) {
  7188. Error("glVertex4d : ",Token::GLerrorToString(_error));
  7189. #if REGAL_BREAK
  7190. Break::ErrorCB(_error);
  7191. #endif
  7192. if (_context->err.callback)
  7193. _context->err.callback( _error );
  7194. }
  7195. }
  7196. }
  7197. static void REGAL_CALL error_glVertex4dv(const GLdouble *v)
  7198. {
  7199. Internal("error_glVertex4dv","()");
  7200. RegalContext *_context = REGAL_GET_CONTEXT();
  7201. RegalAssert(_context);
  7202. DispatchTableGL *_next = _context->dispatcher.error.next();
  7203. RegalAssert(_next);
  7204. GLenum _error = GL_NO_ERROR;
  7205. if (!_context->err.inBeginEnd)
  7206. _error = _next->call(&_next->glGetError)();
  7207. RegalAssert(_error==GL_NO_ERROR);
  7208. _next->call(&_next->glVertex4dv)(v);
  7209. if (!_context->err.inBeginEnd) {
  7210. _error = _next->call(&_next->glGetError)();
  7211. if (_error!=GL_NO_ERROR) {
  7212. Error("glVertex4dv : ",Token::GLerrorToString(_error));
  7213. #if REGAL_BREAK
  7214. Break::ErrorCB(_error);
  7215. #endif
  7216. if (_context->err.callback)
  7217. _context->err.callback( _error );
  7218. }
  7219. }
  7220. }
  7221. static void REGAL_CALL error_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  7222. {
  7223. Internal("error_glVertex4f","()");
  7224. RegalContext *_context = REGAL_GET_CONTEXT();
  7225. RegalAssert(_context);
  7226. DispatchTableGL *_next = _context->dispatcher.error.next();
  7227. RegalAssert(_next);
  7228. GLenum _error = GL_NO_ERROR;
  7229. if (!_context->err.inBeginEnd)
  7230. _error = _next->call(&_next->glGetError)();
  7231. RegalAssert(_error==GL_NO_ERROR);
  7232. _next->call(&_next->glVertex4f)(x, y, z, w);
  7233. if (!_context->err.inBeginEnd) {
  7234. _error = _next->call(&_next->glGetError)();
  7235. if (_error!=GL_NO_ERROR) {
  7236. Error("glVertex4f : ",Token::GLerrorToString(_error));
  7237. #if REGAL_BREAK
  7238. Break::ErrorCB(_error);
  7239. #endif
  7240. if (_context->err.callback)
  7241. _context->err.callback( _error );
  7242. }
  7243. }
  7244. }
  7245. static void REGAL_CALL error_glVertex4fv(const GLfloat *v)
  7246. {
  7247. Internal("error_glVertex4fv","()");
  7248. RegalContext *_context = REGAL_GET_CONTEXT();
  7249. RegalAssert(_context);
  7250. DispatchTableGL *_next = _context->dispatcher.error.next();
  7251. RegalAssert(_next);
  7252. GLenum _error = GL_NO_ERROR;
  7253. if (!_context->err.inBeginEnd)
  7254. _error = _next->call(&_next->glGetError)();
  7255. RegalAssert(_error==GL_NO_ERROR);
  7256. _next->call(&_next->glVertex4fv)(v);
  7257. if (!_context->err.inBeginEnd) {
  7258. _error = _next->call(&_next->glGetError)();
  7259. if (_error!=GL_NO_ERROR) {
  7260. Error("glVertex4fv : ",Token::GLerrorToString(_error));
  7261. #if REGAL_BREAK
  7262. Break::ErrorCB(_error);
  7263. #endif
  7264. if (_context->err.callback)
  7265. _context->err.callback( _error );
  7266. }
  7267. }
  7268. }
  7269. static void REGAL_CALL error_glVertex4i(GLint x, GLint y, GLint z, GLint w)
  7270. {
  7271. Internal("error_glVertex4i","()");
  7272. RegalContext *_context = REGAL_GET_CONTEXT();
  7273. RegalAssert(_context);
  7274. DispatchTableGL *_next = _context->dispatcher.error.next();
  7275. RegalAssert(_next);
  7276. GLenum _error = GL_NO_ERROR;
  7277. if (!_context->err.inBeginEnd)
  7278. _error = _next->call(&_next->glGetError)();
  7279. RegalAssert(_error==GL_NO_ERROR);
  7280. _next->call(&_next->glVertex4i)(x, y, z, w);
  7281. if (!_context->err.inBeginEnd) {
  7282. _error = _next->call(&_next->glGetError)();
  7283. if (_error!=GL_NO_ERROR) {
  7284. Error("glVertex4i : ",Token::GLerrorToString(_error));
  7285. #if REGAL_BREAK
  7286. Break::ErrorCB(_error);
  7287. #endif
  7288. if (_context->err.callback)
  7289. _context->err.callback( _error );
  7290. }
  7291. }
  7292. }
  7293. static void REGAL_CALL error_glVertex4iv(const GLint *v)
  7294. {
  7295. Internal("error_glVertex4iv","()");
  7296. RegalContext *_context = REGAL_GET_CONTEXT();
  7297. RegalAssert(_context);
  7298. DispatchTableGL *_next = _context->dispatcher.error.next();
  7299. RegalAssert(_next);
  7300. GLenum _error = GL_NO_ERROR;
  7301. if (!_context->err.inBeginEnd)
  7302. _error = _next->call(&_next->glGetError)();
  7303. RegalAssert(_error==GL_NO_ERROR);
  7304. _next->call(&_next->glVertex4iv)(v);
  7305. if (!_context->err.inBeginEnd) {
  7306. _error = _next->call(&_next->glGetError)();
  7307. if (_error!=GL_NO_ERROR) {
  7308. Error("glVertex4iv : ",Token::GLerrorToString(_error));
  7309. #if REGAL_BREAK
  7310. Break::ErrorCB(_error);
  7311. #endif
  7312. if (_context->err.callback)
  7313. _context->err.callback( _error );
  7314. }
  7315. }
  7316. }
  7317. static void REGAL_CALL error_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
  7318. {
  7319. Internal("error_glVertex4s","()");
  7320. RegalContext *_context = REGAL_GET_CONTEXT();
  7321. RegalAssert(_context);
  7322. DispatchTableGL *_next = _context->dispatcher.error.next();
  7323. RegalAssert(_next);
  7324. GLenum _error = GL_NO_ERROR;
  7325. if (!_context->err.inBeginEnd)
  7326. _error = _next->call(&_next->glGetError)();
  7327. RegalAssert(_error==GL_NO_ERROR);
  7328. _next->call(&_next->glVertex4s)(x, y, z, w);
  7329. if (!_context->err.inBeginEnd) {
  7330. _error = _next->call(&_next->glGetError)();
  7331. if (_error!=GL_NO_ERROR) {
  7332. Error("glVertex4s : ",Token::GLerrorToString(_error));
  7333. #if REGAL_BREAK
  7334. Break::ErrorCB(_error);
  7335. #endif
  7336. if (_context->err.callback)
  7337. _context->err.callback( _error );
  7338. }
  7339. }
  7340. }
  7341. static void REGAL_CALL error_glVertex4sv(const GLshort *v)
  7342. {
  7343. Internal("error_glVertex4sv","()");
  7344. RegalContext *_context = REGAL_GET_CONTEXT();
  7345. RegalAssert(_context);
  7346. DispatchTableGL *_next = _context->dispatcher.error.next();
  7347. RegalAssert(_next);
  7348. GLenum _error = GL_NO_ERROR;
  7349. if (!_context->err.inBeginEnd)
  7350. _error = _next->call(&_next->glGetError)();
  7351. RegalAssert(_error==GL_NO_ERROR);
  7352. _next->call(&_next->glVertex4sv)(v);
  7353. if (!_context->err.inBeginEnd) {
  7354. _error = _next->call(&_next->glGetError)();
  7355. if (_error!=GL_NO_ERROR) {
  7356. Error("glVertex4sv : ",Token::GLerrorToString(_error));
  7357. #if REGAL_BREAK
  7358. Break::ErrorCB(_error);
  7359. #endif
  7360. if (_context->err.callback)
  7361. _context->err.callback( _error );
  7362. }
  7363. }
  7364. }
  7365. static void REGAL_CALL error_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
  7366. {
  7367. Internal("error_glViewport","()");
  7368. RegalContext *_context = REGAL_GET_CONTEXT();
  7369. RegalAssert(_context);
  7370. DispatchTableGL *_next = _context->dispatcher.error.next();
  7371. RegalAssert(_next);
  7372. GLenum _error = GL_NO_ERROR;
  7373. if (!_context->err.inBeginEnd)
  7374. _error = _next->call(&_next->glGetError)();
  7375. RegalAssert(_error==GL_NO_ERROR);
  7376. _next->call(&_next->glViewport)(x, y, width, height);
  7377. if (!_context->err.inBeginEnd) {
  7378. _error = _next->call(&_next->glGetError)();
  7379. if (_error!=GL_NO_ERROR) {
  7380. Error("glViewport : ",Token::GLerrorToString(_error));
  7381. #if REGAL_BREAK
  7382. Break::ErrorCB(_error);
  7383. #endif
  7384. if (_context->err.callback)
  7385. _context->err.callback( _error );
  7386. }
  7387. }
  7388. }
  7389. // GL_VERSION_1_1
  7390. static GLboolean REGAL_CALL error_glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
  7391. {
  7392. Internal("error_glAreTexturesResident","()");
  7393. RegalContext *_context = REGAL_GET_CONTEXT();
  7394. RegalAssert(_context);
  7395. DispatchTableGL *_next = _context->dispatcher.error.next();
  7396. RegalAssert(_next);
  7397. GLenum _error = GL_NO_ERROR;
  7398. if (!_context->err.inBeginEnd)
  7399. _error = _next->call(&_next->glGetError)();
  7400. RegalAssert(_error==GL_NO_ERROR);
  7401. GLboolean ret = _next->call(&_next->glAreTexturesResident)(n, textures, residences);
  7402. if (!_context->err.inBeginEnd) {
  7403. _error = _next->call(&_next->glGetError)();
  7404. if (_error!=GL_NO_ERROR) {
  7405. Error("glAreTexturesResident : ",Token::GLerrorToString(_error));
  7406. #if REGAL_BREAK
  7407. Break::ErrorCB(_error);
  7408. #endif
  7409. if (_context->err.callback)
  7410. _context->err.callback( _error );
  7411. }
  7412. }
  7413. return ret;
  7414. }
  7415. static void REGAL_CALL error_glArrayElement(GLint index)
  7416. {
  7417. Internal("error_glArrayElement","()");
  7418. RegalContext *_context = REGAL_GET_CONTEXT();
  7419. RegalAssert(_context);
  7420. DispatchTableGL *_next = _context->dispatcher.error.next();
  7421. RegalAssert(_next);
  7422. GLenum _error = GL_NO_ERROR;
  7423. if (!_context->err.inBeginEnd)
  7424. _error = _next->call(&_next->glGetError)();
  7425. RegalAssert(_error==GL_NO_ERROR);
  7426. _next->call(&_next->glArrayElement)(index);
  7427. if (!_context->err.inBeginEnd) {
  7428. _error = _next->call(&_next->glGetError)();
  7429. if (_error!=GL_NO_ERROR) {
  7430. Error("glArrayElement : ",Token::GLerrorToString(_error));
  7431. #if REGAL_BREAK
  7432. Break::ErrorCB(_error);
  7433. #endif
  7434. if (_context->err.callback)
  7435. _context->err.callback( _error );
  7436. }
  7437. }
  7438. }
  7439. static void REGAL_CALL error_glBindTexture(GLenum target, GLuint texture)
  7440. {
  7441. Internal("error_glBindTexture","()");
  7442. RegalContext *_context = REGAL_GET_CONTEXT();
  7443. RegalAssert(_context);
  7444. DispatchTableGL *_next = _context->dispatcher.error.next();
  7445. RegalAssert(_next);
  7446. GLenum _error = GL_NO_ERROR;
  7447. if (!_context->err.inBeginEnd)
  7448. _error = _next->call(&_next->glGetError)();
  7449. RegalAssert(_error==GL_NO_ERROR);
  7450. _next->call(&_next->glBindTexture)(target, texture);
  7451. if (!_context->err.inBeginEnd) {
  7452. _error = _next->call(&_next->glGetError)();
  7453. if (_error!=GL_NO_ERROR) {
  7454. Error("glBindTexture : ",Token::GLerrorToString(_error));
  7455. #if REGAL_BREAK
  7456. Break::ErrorCB(_error);
  7457. #endif
  7458. if (_context->err.callback)
  7459. _context->err.callback( _error );
  7460. }
  7461. }
  7462. }
  7463. static void REGAL_CALL error_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  7464. {
  7465. Internal("error_glColorPointer","()");
  7466. RegalContext *_context = REGAL_GET_CONTEXT();
  7467. RegalAssert(_context);
  7468. DispatchTableGL *_next = _context->dispatcher.error.next();
  7469. RegalAssert(_next);
  7470. GLenum _error = GL_NO_ERROR;
  7471. if (!_context->err.inBeginEnd)
  7472. _error = _next->call(&_next->glGetError)();
  7473. RegalAssert(_error==GL_NO_ERROR);
  7474. _next->call(&_next->glColorPointer)(size, type, stride, pointer);
  7475. if (!_context->err.inBeginEnd) {
  7476. _error = _next->call(&_next->glGetError)();
  7477. if (_error!=GL_NO_ERROR) {
  7478. Error("glColorPointer : ",Token::GLerrorToString(_error));
  7479. #if REGAL_BREAK
  7480. Break::ErrorCB(_error);
  7481. #endif
  7482. if (_context->err.callback)
  7483. _context->err.callback( _error );
  7484. }
  7485. }
  7486. }
  7487. static void REGAL_CALL error_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
  7488. {
  7489. Internal("error_glCopyTexImage1D","()");
  7490. RegalContext *_context = REGAL_GET_CONTEXT();
  7491. RegalAssert(_context);
  7492. DispatchTableGL *_next = _context->dispatcher.error.next();
  7493. RegalAssert(_next);
  7494. GLenum _error = GL_NO_ERROR;
  7495. if (!_context->err.inBeginEnd)
  7496. _error = _next->call(&_next->glGetError)();
  7497. RegalAssert(_error==GL_NO_ERROR);
  7498. _next->call(&_next->glCopyTexImage1D)(target, level, internalformat, x, y, width, border);
  7499. if (!_context->err.inBeginEnd) {
  7500. _error = _next->call(&_next->glGetError)();
  7501. if (_error!=GL_NO_ERROR) {
  7502. Error("glCopyTexImage1D : ",Token::GLerrorToString(_error));
  7503. #if REGAL_BREAK
  7504. Break::ErrorCB(_error);
  7505. #endif
  7506. if (_context->err.callback)
  7507. _context->err.callback( _error );
  7508. }
  7509. }
  7510. }
  7511. static void REGAL_CALL error_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
  7512. {
  7513. Internal("error_glCopyTexImage2D","()");
  7514. RegalContext *_context = REGAL_GET_CONTEXT();
  7515. RegalAssert(_context);
  7516. DispatchTableGL *_next = _context->dispatcher.error.next();
  7517. RegalAssert(_next);
  7518. GLenum _error = GL_NO_ERROR;
  7519. if (!_context->err.inBeginEnd)
  7520. _error = _next->call(&_next->glGetError)();
  7521. RegalAssert(_error==GL_NO_ERROR);
  7522. _next->call(&_next->glCopyTexImage2D)(target, level, internalformat, x, y, width, height, border);
  7523. if (!_context->err.inBeginEnd) {
  7524. _error = _next->call(&_next->glGetError)();
  7525. if (_error!=GL_NO_ERROR) {
  7526. Error("glCopyTexImage2D : ",Token::GLerrorToString(_error));
  7527. #if REGAL_BREAK
  7528. Break::ErrorCB(_error);
  7529. #endif
  7530. if (_context->err.callback)
  7531. _context->err.callback( _error );
  7532. }
  7533. }
  7534. }
  7535. static void REGAL_CALL error_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
  7536. {
  7537. Internal("error_glCopyTexSubImage1D","()");
  7538. RegalContext *_context = REGAL_GET_CONTEXT();
  7539. RegalAssert(_context);
  7540. DispatchTableGL *_next = _context->dispatcher.error.next();
  7541. RegalAssert(_next);
  7542. GLenum _error = GL_NO_ERROR;
  7543. if (!_context->err.inBeginEnd)
  7544. _error = _next->call(&_next->glGetError)();
  7545. RegalAssert(_error==GL_NO_ERROR);
  7546. _next->call(&_next->glCopyTexSubImage1D)(target, level, xoffset, x, y, width);
  7547. if (!_context->err.inBeginEnd) {
  7548. _error = _next->call(&_next->glGetError)();
  7549. if (_error!=GL_NO_ERROR) {
  7550. Error("glCopyTexSubImage1D : ",Token::GLerrorToString(_error));
  7551. #if REGAL_BREAK
  7552. Break::ErrorCB(_error);
  7553. #endif
  7554. if (_context->err.callback)
  7555. _context->err.callback( _error );
  7556. }
  7557. }
  7558. }
  7559. static void REGAL_CALL error_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  7560. {
  7561. Internal("error_glCopyTexSubImage2D","()");
  7562. RegalContext *_context = REGAL_GET_CONTEXT();
  7563. RegalAssert(_context);
  7564. DispatchTableGL *_next = _context->dispatcher.error.next();
  7565. RegalAssert(_next);
  7566. GLenum _error = GL_NO_ERROR;
  7567. if (!_context->err.inBeginEnd)
  7568. _error = _next->call(&_next->glGetError)();
  7569. RegalAssert(_error==GL_NO_ERROR);
  7570. _next->call(&_next->glCopyTexSubImage2D)(target, level, xoffset, yoffset, x, y, width, height);
  7571. if (!_context->err.inBeginEnd) {
  7572. _error = _next->call(&_next->glGetError)();
  7573. if (_error!=GL_NO_ERROR) {
  7574. Error("glCopyTexSubImage2D : ",Token::GLerrorToString(_error));
  7575. #if REGAL_BREAK
  7576. Break::ErrorCB(_error);
  7577. #endif
  7578. if (_context->err.callback)
  7579. _context->err.callback( _error );
  7580. }
  7581. }
  7582. }
  7583. static void REGAL_CALL error_glDeleteTextures(GLsizei n, const GLuint *textures)
  7584. {
  7585. Internal("error_glDeleteTextures","()");
  7586. RegalContext *_context = REGAL_GET_CONTEXT();
  7587. RegalAssert(_context);
  7588. DispatchTableGL *_next = _context->dispatcher.error.next();
  7589. RegalAssert(_next);
  7590. GLenum _error = GL_NO_ERROR;
  7591. if (!_context->err.inBeginEnd)
  7592. _error = _next->call(&_next->glGetError)();
  7593. RegalAssert(_error==GL_NO_ERROR);
  7594. _next->call(&_next->glDeleteTextures)(n, textures);
  7595. if (!_context->err.inBeginEnd) {
  7596. _error = _next->call(&_next->glGetError)();
  7597. if (_error!=GL_NO_ERROR) {
  7598. Error("glDeleteTextures : ",Token::GLerrorToString(_error));
  7599. #if REGAL_BREAK
  7600. Break::ErrorCB(_error);
  7601. #endif
  7602. if (_context->err.callback)
  7603. _context->err.callback( _error );
  7604. }
  7605. }
  7606. }
  7607. static void REGAL_CALL error_glDisableClientState(GLenum cap)
  7608. {
  7609. Internal("error_glDisableClientState","()");
  7610. RegalContext *_context = REGAL_GET_CONTEXT();
  7611. RegalAssert(_context);
  7612. DispatchTableGL *_next = _context->dispatcher.error.next();
  7613. RegalAssert(_next);
  7614. GLenum _error = GL_NO_ERROR;
  7615. if (!_context->err.inBeginEnd)
  7616. _error = _next->call(&_next->glGetError)();
  7617. RegalAssert(_error==GL_NO_ERROR);
  7618. _next->call(&_next->glDisableClientState)(cap);
  7619. if (!_context->err.inBeginEnd) {
  7620. _error = _next->call(&_next->glGetError)();
  7621. if (_error!=GL_NO_ERROR) {
  7622. Error("glDisableClientState : ",Token::GLerrorToString(_error));
  7623. #if REGAL_BREAK
  7624. Break::ErrorCB(_error);
  7625. #endif
  7626. if (_context->err.callback)
  7627. _context->err.callback( _error );
  7628. }
  7629. }
  7630. }
  7631. static void REGAL_CALL error_glDrawArrays(GLenum mode, GLint first, GLsizei count)
  7632. {
  7633. Internal("error_glDrawArrays","()");
  7634. RegalContext *_context = REGAL_GET_CONTEXT();
  7635. RegalAssert(_context);
  7636. DispatchTableGL *_next = _context->dispatcher.error.next();
  7637. RegalAssert(_next);
  7638. GLenum _error = GL_NO_ERROR;
  7639. if (!_context->err.inBeginEnd)
  7640. _error = _next->call(&_next->glGetError)();
  7641. RegalAssert(_error==GL_NO_ERROR);
  7642. _next->call(&_next->glDrawArrays)(mode, first, count);
  7643. if (!_context->err.inBeginEnd) {
  7644. _error = _next->call(&_next->glGetError)();
  7645. if (_error!=GL_NO_ERROR) {
  7646. Error("glDrawArrays : ",Token::GLerrorToString(_error));
  7647. #if REGAL_BREAK
  7648. Break::ErrorCB(_error);
  7649. #endif
  7650. if (_context->err.callback)
  7651. _context->err.callback( _error );
  7652. }
  7653. }
  7654. }
  7655. static void REGAL_CALL error_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
  7656. {
  7657. Internal("error_glDrawElements","()");
  7658. RegalContext *_context = REGAL_GET_CONTEXT();
  7659. RegalAssert(_context);
  7660. DispatchTableGL *_next = _context->dispatcher.error.next();
  7661. RegalAssert(_next);
  7662. GLenum _error = GL_NO_ERROR;
  7663. if (!_context->err.inBeginEnd)
  7664. _error = _next->call(&_next->glGetError)();
  7665. RegalAssert(_error==GL_NO_ERROR);
  7666. _next->call(&_next->glDrawElements)(mode, count, type, indices);
  7667. if (!_context->err.inBeginEnd) {
  7668. _error = _next->call(&_next->glGetError)();
  7669. if (_error!=GL_NO_ERROR) {
  7670. Error("glDrawElements : ",Token::GLerrorToString(_error));
  7671. #if REGAL_BREAK
  7672. Break::ErrorCB(_error);
  7673. #endif
  7674. if (_context->err.callback)
  7675. _context->err.callback( _error );
  7676. }
  7677. }
  7678. }
  7679. static void REGAL_CALL error_glEdgeFlagPointer(GLsizei stride, const GLvoid *pointer)
  7680. {
  7681. Internal("error_glEdgeFlagPointer","()");
  7682. RegalContext *_context = REGAL_GET_CONTEXT();
  7683. RegalAssert(_context);
  7684. DispatchTableGL *_next = _context->dispatcher.error.next();
  7685. RegalAssert(_next);
  7686. GLenum _error = GL_NO_ERROR;
  7687. if (!_context->err.inBeginEnd)
  7688. _error = _next->call(&_next->glGetError)();
  7689. RegalAssert(_error==GL_NO_ERROR);
  7690. _next->call(&_next->glEdgeFlagPointer)(stride, pointer);
  7691. if (!_context->err.inBeginEnd) {
  7692. _error = _next->call(&_next->glGetError)();
  7693. if (_error!=GL_NO_ERROR) {
  7694. Error("glEdgeFlagPointer : ",Token::GLerrorToString(_error));
  7695. #if REGAL_BREAK
  7696. Break::ErrorCB(_error);
  7697. #endif
  7698. if (_context->err.callback)
  7699. _context->err.callback( _error );
  7700. }
  7701. }
  7702. }
  7703. static void REGAL_CALL error_glEnableClientState(GLenum cap)
  7704. {
  7705. Internal("error_glEnableClientState","()");
  7706. RegalContext *_context = REGAL_GET_CONTEXT();
  7707. RegalAssert(_context);
  7708. DispatchTableGL *_next = _context->dispatcher.error.next();
  7709. RegalAssert(_next);
  7710. GLenum _error = GL_NO_ERROR;
  7711. if (!_context->err.inBeginEnd)
  7712. _error = _next->call(&_next->glGetError)();
  7713. RegalAssert(_error==GL_NO_ERROR);
  7714. _next->call(&_next->glEnableClientState)(cap);
  7715. if (!_context->err.inBeginEnd) {
  7716. _error = _next->call(&_next->glGetError)();
  7717. if (_error!=GL_NO_ERROR) {
  7718. Error("glEnableClientState : ",Token::GLerrorToString(_error));
  7719. #if REGAL_BREAK
  7720. Break::ErrorCB(_error);
  7721. #endif
  7722. if (_context->err.callback)
  7723. _context->err.callback( _error );
  7724. }
  7725. }
  7726. }
  7727. static void REGAL_CALL error_glGenTextures(GLsizei n, GLuint *textures)
  7728. {
  7729. Internal("error_glGenTextures","()");
  7730. RegalContext *_context = REGAL_GET_CONTEXT();
  7731. RegalAssert(_context);
  7732. DispatchTableGL *_next = _context->dispatcher.error.next();
  7733. RegalAssert(_next);
  7734. GLenum _error = GL_NO_ERROR;
  7735. if (!_context->err.inBeginEnd)
  7736. _error = _next->call(&_next->glGetError)();
  7737. RegalAssert(_error==GL_NO_ERROR);
  7738. _next->call(&_next->glGenTextures)(n, textures);
  7739. if (!_context->err.inBeginEnd) {
  7740. _error = _next->call(&_next->glGetError)();
  7741. if (_error!=GL_NO_ERROR) {
  7742. Error("glGenTextures : ",Token::GLerrorToString(_error));
  7743. #if REGAL_BREAK
  7744. Break::ErrorCB(_error);
  7745. #endif
  7746. if (_context->err.callback)
  7747. _context->err.callback( _error );
  7748. }
  7749. }
  7750. }
  7751. static void REGAL_CALL error_glGetPointerv(GLenum pname, GLvoid **params)
  7752. {
  7753. Internal("error_glGetPointerv","()");
  7754. RegalContext *_context = REGAL_GET_CONTEXT();
  7755. RegalAssert(_context);
  7756. DispatchTableGL *_next = _context->dispatcher.error.next();
  7757. RegalAssert(_next);
  7758. GLenum _error = GL_NO_ERROR;
  7759. if (!_context->err.inBeginEnd)
  7760. _error = _next->call(&_next->glGetError)();
  7761. RegalAssert(_error==GL_NO_ERROR);
  7762. _next->call(&_next->glGetPointerv)(pname, params);
  7763. if (!_context->err.inBeginEnd) {
  7764. _error = _next->call(&_next->glGetError)();
  7765. if (_error!=GL_NO_ERROR) {
  7766. Error("glGetPointerv : ",Token::GLerrorToString(_error));
  7767. #if REGAL_BREAK
  7768. Break::ErrorCB(_error);
  7769. #endif
  7770. if (_context->err.callback)
  7771. _context->err.callback( _error );
  7772. }
  7773. }
  7774. }
  7775. static void REGAL_CALL error_glIndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
  7776. {
  7777. Internal("error_glIndexPointer","()");
  7778. RegalContext *_context = REGAL_GET_CONTEXT();
  7779. RegalAssert(_context);
  7780. DispatchTableGL *_next = _context->dispatcher.error.next();
  7781. RegalAssert(_next);
  7782. GLenum _error = GL_NO_ERROR;
  7783. if (!_context->err.inBeginEnd)
  7784. _error = _next->call(&_next->glGetError)();
  7785. RegalAssert(_error==GL_NO_ERROR);
  7786. _next->call(&_next->glIndexPointer)(type, stride, pointer);
  7787. if (!_context->err.inBeginEnd) {
  7788. _error = _next->call(&_next->glGetError)();
  7789. if (_error!=GL_NO_ERROR) {
  7790. Error("glIndexPointer : ",Token::GLerrorToString(_error));
  7791. #if REGAL_BREAK
  7792. Break::ErrorCB(_error);
  7793. #endif
  7794. if (_context->err.callback)
  7795. _context->err.callback( _error );
  7796. }
  7797. }
  7798. }
  7799. static void REGAL_CALL error_glIndexub(GLubyte c)
  7800. {
  7801. Internal("error_glIndexub","()");
  7802. RegalContext *_context = REGAL_GET_CONTEXT();
  7803. RegalAssert(_context);
  7804. DispatchTableGL *_next = _context->dispatcher.error.next();
  7805. RegalAssert(_next);
  7806. GLenum _error = GL_NO_ERROR;
  7807. if (!_context->err.inBeginEnd)
  7808. _error = _next->call(&_next->glGetError)();
  7809. RegalAssert(_error==GL_NO_ERROR);
  7810. _next->call(&_next->glIndexub)(c);
  7811. if (!_context->err.inBeginEnd) {
  7812. _error = _next->call(&_next->glGetError)();
  7813. if (_error!=GL_NO_ERROR) {
  7814. Error("glIndexub : ",Token::GLerrorToString(_error));
  7815. #if REGAL_BREAK
  7816. Break::ErrorCB(_error);
  7817. #endif
  7818. if (_context->err.callback)
  7819. _context->err.callback( _error );
  7820. }
  7821. }
  7822. }
  7823. static void REGAL_CALL error_glIndexubv(const GLubyte *c)
  7824. {
  7825. Internal("error_glIndexubv","()");
  7826. RegalContext *_context = REGAL_GET_CONTEXT();
  7827. RegalAssert(_context);
  7828. DispatchTableGL *_next = _context->dispatcher.error.next();
  7829. RegalAssert(_next);
  7830. GLenum _error = GL_NO_ERROR;
  7831. if (!_context->err.inBeginEnd)
  7832. _error = _next->call(&_next->glGetError)();
  7833. RegalAssert(_error==GL_NO_ERROR);
  7834. _next->call(&_next->glIndexubv)(c);
  7835. if (!_context->err.inBeginEnd) {
  7836. _error = _next->call(&_next->glGetError)();
  7837. if (_error!=GL_NO_ERROR) {
  7838. Error("glIndexubv : ",Token::GLerrorToString(_error));
  7839. #if REGAL_BREAK
  7840. Break::ErrorCB(_error);
  7841. #endif
  7842. if (_context->err.callback)
  7843. _context->err.callback( _error );
  7844. }
  7845. }
  7846. }
  7847. static void REGAL_CALL error_glInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer)
  7848. {
  7849. Internal("error_glInterleavedArrays","()");
  7850. RegalContext *_context = REGAL_GET_CONTEXT();
  7851. RegalAssert(_context);
  7852. DispatchTableGL *_next = _context->dispatcher.error.next();
  7853. RegalAssert(_next);
  7854. GLenum _error = GL_NO_ERROR;
  7855. if (!_context->err.inBeginEnd)
  7856. _error = _next->call(&_next->glGetError)();
  7857. RegalAssert(_error==GL_NO_ERROR);
  7858. _next->call(&_next->glInterleavedArrays)(format, stride, pointer);
  7859. if (!_context->err.inBeginEnd) {
  7860. _error = _next->call(&_next->glGetError)();
  7861. if (_error!=GL_NO_ERROR) {
  7862. Error("glInterleavedArrays : ",Token::GLerrorToString(_error));
  7863. #if REGAL_BREAK
  7864. Break::ErrorCB(_error);
  7865. #endif
  7866. if (_context->err.callback)
  7867. _context->err.callback( _error );
  7868. }
  7869. }
  7870. }
  7871. static GLboolean REGAL_CALL error_glIsTexture(GLuint texture)
  7872. {
  7873. Internal("error_glIsTexture","()");
  7874. RegalContext *_context = REGAL_GET_CONTEXT();
  7875. RegalAssert(_context);
  7876. DispatchTableGL *_next = _context->dispatcher.error.next();
  7877. RegalAssert(_next);
  7878. GLenum _error = GL_NO_ERROR;
  7879. if (!_context->err.inBeginEnd)
  7880. _error = _next->call(&_next->glGetError)();
  7881. RegalAssert(_error==GL_NO_ERROR);
  7882. GLboolean ret = _next->call(&_next->glIsTexture)(texture);
  7883. if (!_context->err.inBeginEnd) {
  7884. _error = _next->call(&_next->glGetError)();
  7885. if (_error!=GL_NO_ERROR) {
  7886. Error("glIsTexture : ",Token::GLerrorToString(_error));
  7887. #if REGAL_BREAK
  7888. Break::ErrorCB(_error);
  7889. #endif
  7890. if (_context->err.callback)
  7891. _context->err.callback( _error );
  7892. }
  7893. }
  7894. return ret;
  7895. }
  7896. static void REGAL_CALL error_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
  7897. {
  7898. Internal("error_glNormalPointer","()");
  7899. RegalContext *_context = REGAL_GET_CONTEXT();
  7900. RegalAssert(_context);
  7901. DispatchTableGL *_next = _context->dispatcher.error.next();
  7902. RegalAssert(_next);
  7903. GLenum _error = GL_NO_ERROR;
  7904. if (!_context->err.inBeginEnd)
  7905. _error = _next->call(&_next->glGetError)();
  7906. RegalAssert(_error==GL_NO_ERROR);
  7907. _next->call(&_next->glNormalPointer)(type, stride, pointer);
  7908. if (!_context->err.inBeginEnd) {
  7909. _error = _next->call(&_next->glGetError)();
  7910. if (_error!=GL_NO_ERROR) {
  7911. Error("glNormalPointer : ",Token::GLerrorToString(_error));
  7912. #if REGAL_BREAK
  7913. Break::ErrorCB(_error);
  7914. #endif
  7915. if (_context->err.callback)
  7916. _context->err.callback( _error );
  7917. }
  7918. }
  7919. }
  7920. static void REGAL_CALL error_glPolygonOffset(GLfloat factor, GLfloat units)
  7921. {
  7922. Internal("error_glPolygonOffset","()");
  7923. RegalContext *_context = REGAL_GET_CONTEXT();
  7924. RegalAssert(_context);
  7925. DispatchTableGL *_next = _context->dispatcher.error.next();
  7926. RegalAssert(_next);
  7927. GLenum _error = GL_NO_ERROR;
  7928. if (!_context->err.inBeginEnd)
  7929. _error = _next->call(&_next->glGetError)();
  7930. RegalAssert(_error==GL_NO_ERROR);
  7931. _next->call(&_next->glPolygonOffset)(factor, units);
  7932. if (!_context->err.inBeginEnd) {
  7933. _error = _next->call(&_next->glGetError)();
  7934. if (_error!=GL_NO_ERROR) {
  7935. Error("glPolygonOffset : ",Token::GLerrorToString(_error));
  7936. #if REGAL_BREAK
  7937. Break::ErrorCB(_error);
  7938. #endif
  7939. if (_context->err.callback)
  7940. _context->err.callback( _error );
  7941. }
  7942. }
  7943. }
  7944. static void REGAL_CALL error_glPopClientAttrib(void)
  7945. {
  7946. Internal("error_glPopClientAttrib","()");
  7947. RegalContext *_context = REGAL_GET_CONTEXT();
  7948. RegalAssert(_context);
  7949. DispatchTableGL *_next = _context->dispatcher.error.next();
  7950. RegalAssert(_next);
  7951. GLenum _error = GL_NO_ERROR;
  7952. if (!_context->err.inBeginEnd)
  7953. _error = _next->call(&_next->glGetError)();
  7954. RegalAssert(_error==GL_NO_ERROR);
  7955. _next->call(&_next->glPopClientAttrib)();
  7956. if (!_context->err.inBeginEnd) {
  7957. _error = _next->call(&_next->glGetError)();
  7958. if (_error!=GL_NO_ERROR) {
  7959. Error("glPopClientAttrib : ",Token::GLerrorToString(_error));
  7960. #if REGAL_BREAK
  7961. Break::ErrorCB(_error);
  7962. #endif
  7963. if (_context->err.callback)
  7964. _context->err.callback( _error );
  7965. }
  7966. }
  7967. }
  7968. static void REGAL_CALL error_glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities)
  7969. {
  7970. Internal("error_glPrioritizeTextures","()");
  7971. RegalContext *_context = REGAL_GET_CONTEXT();
  7972. RegalAssert(_context);
  7973. DispatchTableGL *_next = _context->dispatcher.error.next();
  7974. RegalAssert(_next);
  7975. GLenum _error = GL_NO_ERROR;
  7976. if (!_context->err.inBeginEnd)
  7977. _error = _next->call(&_next->glGetError)();
  7978. RegalAssert(_error==GL_NO_ERROR);
  7979. _next->call(&_next->glPrioritizeTextures)(n, textures, priorities);
  7980. if (!_context->err.inBeginEnd) {
  7981. _error = _next->call(&_next->glGetError)();
  7982. if (_error!=GL_NO_ERROR) {
  7983. Error("glPrioritizeTextures : ",Token::GLerrorToString(_error));
  7984. #if REGAL_BREAK
  7985. Break::ErrorCB(_error);
  7986. #endif
  7987. if (_context->err.callback)
  7988. _context->err.callback( _error );
  7989. }
  7990. }
  7991. }
  7992. static void REGAL_CALL error_glPushClientAttrib(GLbitfield mask)
  7993. {
  7994. Internal("error_glPushClientAttrib","()");
  7995. RegalContext *_context = REGAL_GET_CONTEXT();
  7996. RegalAssert(_context);
  7997. DispatchTableGL *_next = _context->dispatcher.error.next();
  7998. RegalAssert(_next);
  7999. GLenum _error = GL_NO_ERROR;
  8000. if (!_context->err.inBeginEnd)
  8001. _error = _next->call(&_next->glGetError)();
  8002. RegalAssert(_error==GL_NO_ERROR);
  8003. _next->call(&_next->glPushClientAttrib)(mask);
  8004. if (!_context->err.inBeginEnd) {
  8005. _error = _next->call(&_next->glGetError)();
  8006. if (_error!=GL_NO_ERROR) {
  8007. Error("glPushClientAttrib : ",Token::GLerrorToString(_error));
  8008. #if REGAL_BREAK
  8009. Break::ErrorCB(_error);
  8010. #endif
  8011. if (_context->err.callback)
  8012. _context->err.callback( _error );
  8013. }
  8014. }
  8015. }
  8016. static void REGAL_CALL error_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  8017. {
  8018. Internal("error_glTexCoordPointer","()");
  8019. RegalContext *_context = REGAL_GET_CONTEXT();
  8020. RegalAssert(_context);
  8021. DispatchTableGL *_next = _context->dispatcher.error.next();
  8022. RegalAssert(_next);
  8023. GLenum _error = GL_NO_ERROR;
  8024. if (!_context->err.inBeginEnd)
  8025. _error = _next->call(&_next->glGetError)();
  8026. RegalAssert(_error==GL_NO_ERROR);
  8027. _next->call(&_next->glTexCoordPointer)(size, type, stride, pointer);
  8028. if (!_context->err.inBeginEnd) {
  8029. _error = _next->call(&_next->glGetError)();
  8030. if (_error!=GL_NO_ERROR) {
  8031. Error("glTexCoordPointer : ",Token::GLerrorToString(_error));
  8032. #if REGAL_BREAK
  8033. Break::ErrorCB(_error);
  8034. #endif
  8035. if (_context->err.callback)
  8036. _context->err.callback( _error );
  8037. }
  8038. }
  8039. }
  8040. static void REGAL_CALL error_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)
  8041. {
  8042. Internal("error_glTexSubImage1D","()");
  8043. RegalContext *_context = REGAL_GET_CONTEXT();
  8044. RegalAssert(_context);
  8045. DispatchTableGL *_next = _context->dispatcher.error.next();
  8046. RegalAssert(_next);
  8047. GLenum _error = GL_NO_ERROR;
  8048. if (!_context->err.inBeginEnd)
  8049. _error = _next->call(&_next->glGetError)();
  8050. RegalAssert(_error==GL_NO_ERROR);
  8051. _next->call(&_next->glTexSubImage1D)(target, level, xoffset, width, format, type, pixels);
  8052. if (!_context->err.inBeginEnd) {
  8053. _error = _next->call(&_next->glGetError)();
  8054. if (_error!=GL_NO_ERROR) {
  8055. Error("glTexSubImage1D : ",Token::GLerrorToString(_error));
  8056. #if REGAL_BREAK
  8057. Break::ErrorCB(_error);
  8058. #endif
  8059. if (_context->err.callback)
  8060. _context->err.callback( _error );
  8061. }
  8062. }
  8063. }
  8064. static void REGAL_CALL error_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
  8065. {
  8066. Internal("error_glTexSubImage2D","()");
  8067. RegalContext *_context = REGAL_GET_CONTEXT();
  8068. RegalAssert(_context);
  8069. DispatchTableGL *_next = _context->dispatcher.error.next();
  8070. RegalAssert(_next);
  8071. GLenum _error = GL_NO_ERROR;
  8072. if (!_context->err.inBeginEnd)
  8073. _error = _next->call(&_next->glGetError)();
  8074. RegalAssert(_error==GL_NO_ERROR);
  8075. _next->call(&_next->glTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, type, pixels);
  8076. if (!_context->err.inBeginEnd) {
  8077. _error = _next->call(&_next->glGetError)();
  8078. if (_error!=GL_NO_ERROR) {
  8079. Error("glTexSubImage2D : ",Token::GLerrorToString(_error));
  8080. #if REGAL_BREAK
  8081. Break::ErrorCB(_error);
  8082. #endif
  8083. if (_context->err.callback)
  8084. _context->err.callback( _error );
  8085. }
  8086. }
  8087. }
  8088. static void REGAL_CALL error_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  8089. {
  8090. Internal("error_glVertexPointer","()");
  8091. RegalContext *_context = REGAL_GET_CONTEXT();
  8092. RegalAssert(_context);
  8093. DispatchTableGL *_next = _context->dispatcher.error.next();
  8094. RegalAssert(_next);
  8095. GLenum _error = GL_NO_ERROR;
  8096. if (!_context->err.inBeginEnd)
  8097. _error = _next->call(&_next->glGetError)();
  8098. RegalAssert(_error==GL_NO_ERROR);
  8099. _next->call(&_next->glVertexPointer)(size, type, stride, pointer);
  8100. if (!_context->err.inBeginEnd) {
  8101. _error = _next->call(&_next->glGetError)();
  8102. if (_error!=GL_NO_ERROR) {
  8103. Error("glVertexPointer : ",Token::GLerrorToString(_error));
  8104. #if REGAL_BREAK
  8105. Break::ErrorCB(_error);
  8106. #endif
  8107. if (_context->err.callback)
  8108. _context->err.callback( _error );
  8109. }
  8110. }
  8111. }
  8112. // GL_VERSION_1_2
  8113. static void REGAL_CALL error_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  8114. {
  8115. Internal("error_glBlendColor","()");
  8116. RegalContext *_context = REGAL_GET_CONTEXT();
  8117. RegalAssert(_context);
  8118. DispatchTableGL *_next = _context->dispatcher.error.next();
  8119. RegalAssert(_next);
  8120. GLenum _error = GL_NO_ERROR;
  8121. if (!_context->err.inBeginEnd)
  8122. _error = _next->call(&_next->glGetError)();
  8123. RegalAssert(_error==GL_NO_ERROR);
  8124. _next->call(&_next->glBlendColor)(red, green, blue, alpha);
  8125. if (!_context->err.inBeginEnd) {
  8126. _error = _next->call(&_next->glGetError)();
  8127. if (_error!=GL_NO_ERROR) {
  8128. Error("glBlendColor : ",Token::GLerrorToString(_error));
  8129. #if REGAL_BREAK
  8130. Break::ErrorCB(_error);
  8131. #endif
  8132. if (_context->err.callback)
  8133. _context->err.callback( _error );
  8134. }
  8135. }
  8136. }
  8137. static void REGAL_CALL error_glBlendEquation(GLenum mode)
  8138. {
  8139. Internal("error_glBlendEquation","()");
  8140. RegalContext *_context = REGAL_GET_CONTEXT();
  8141. RegalAssert(_context);
  8142. DispatchTableGL *_next = _context->dispatcher.error.next();
  8143. RegalAssert(_next);
  8144. GLenum _error = GL_NO_ERROR;
  8145. if (!_context->err.inBeginEnd)
  8146. _error = _next->call(&_next->glGetError)();
  8147. RegalAssert(_error==GL_NO_ERROR);
  8148. _next->call(&_next->glBlendEquation)(mode);
  8149. if (!_context->err.inBeginEnd) {
  8150. _error = _next->call(&_next->glGetError)();
  8151. if (_error!=GL_NO_ERROR) {
  8152. Error("glBlendEquation : ",Token::GLerrorToString(_error));
  8153. #if REGAL_BREAK
  8154. Break::ErrorCB(_error);
  8155. #endif
  8156. if (_context->err.callback)
  8157. _context->err.callback( _error );
  8158. }
  8159. }
  8160. }
  8161. static void REGAL_CALL error_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  8162. {
  8163. Internal("error_glCopyTexSubImage3D","()");
  8164. RegalContext *_context = REGAL_GET_CONTEXT();
  8165. RegalAssert(_context);
  8166. DispatchTableGL *_next = _context->dispatcher.error.next();
  8167. RegalAssert(_next);
  8168. GLenum _error = GL_NO_ERROR;
  8169. if (!_context->err.inBeginEnd)
  8170. _error = _next->call(&_next->glGetError)();
  8171. RegalAssert(_error==GL_NO_ERROR);
  8172. _next->call(&_next->glCopyTexSubImage3D)(target, level, xoffset, yoffset, zoffset, x, y, width, height);
  8173. if (!_context->err.inBeginEnd) {
  8174. _error = _next->call(&_next->glGetError)();
  8175. if (_error!=GL_NO_ERROR) {
  8176. Error("glCopyTexSubImage3D : ",Token::GLerrorToString(_error));
  8177. #if REGAL_BREAK
  8178. Break::ErrorCB(_error);
  8179. #endif
  8180. if (_context->err.callback)
  8181. _context->err.callback( _error );
  8182. }
  8183. }
  8184. }
  8185. static void REGAL_CALL error_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
  8186. {
  8187. Internal("error_glDrawRangeElements","()");
  8188. RegalContext *_context = REGAL_GET_CONTEXT();
  8189. RegalAssert(_context);
  8190. DispatchTableGL *_next = _context->dispatcher.error.next();
  8191. RegalAssert(_next);
  8192. GLenum _error = GL_NO_ERROR;
  8193. if (!_context->err.inBeginEnd)
  8194. _error = _next->call(&_next->glGetError)();
  8195. RegalAssert(_error==GL_NO_ERROR);
  8196. _next->call(&_next->glDrawRangeElements)(mode, start, end, count, type, indices);
  8197. if (!_context->err.inBeginEnd) {
  8198. _error = _next->call(&_next->glGetError)();
  8199. if (_error!=GL_NO_ERROR) {
  8200. Error("glDrawRangeElements : ",Token::GLerrorToString(_error));
  8201. #if REGAL_BREAK
  8202. Break::ErrorCB(_error);
  8203. #endif
  8204. if (_context->err.callback)
  8205. _context->err.callback( _error );
  8206. }
  8207. }
  8208. }
  8209. static void REGAL_CALL error_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
  8210. {
  8211. Internal("error_glTexImage3D","()");
  8212. RegalContext *_context = REGAL_GET_CONTEXT();
  8213. RegalAssert(_context);
  8214. DispatchTableGL *_next = _context->dispatcher.error.next();
  8215. RegalAssert(_next);
  8216. GLenum _error = GL_NO_ERROR;
  8217. if (!_context->err.inBeginEnd)
  8218. _error = _next->call(&_next->glGetError)();
  8219. RegalAssert(_error==GL_NO_ERROR);
  8220. _next->call(&_next->glTexImage3D)(target, level, internalformat, width, height, depth, border, format, type, pixels);
  8221. if (!_context->err.inBeginEnd) {
  8222. _error = _next->call(&_next->glGetError)();
  8223. if (_error!=GL_NO_ERROR) {
  8224. Error("glTexImage3D : ",Token::GLerrorToString(_error));
  8225. #if REGAL_BREAK
  8226. Break::ErrorCB(_error);
  8227. #endif
  8228. if (_context->err.callback)
  8229. _context->err.callback( _error );
  8230. }
  8231. }
  8232. }
  8233. static void REGAL_CALL error_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
  8234. {
  8235. Internal("error_glTexSubImage3D","()");
  8236. RegalContext *_context = REGAL_GET_CONTEXT();
  8237. RegalAssert(_context);
  8238. DispatchTableGL *_next = _context->dispatcher.error.next();
  8239. RegalAssert(_next);
  8240. GLenum _error = GL_NO_ERROR;
  8241. if (!_context->err.inBeginEnd)
  8242. _error = _next->call(&_next->glGetError)();
  8243. RegalAssert(_error==GL_NO_ERROR);
  8244. _next->call(&_next->glTexSubImage3D)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
  8245. if (!_context->err.inBeginEnd) {
  8246. _error = _next->call(&_next->glGetError)();
  8247. if (_error!=GL_NO_ERROR) {
  8248. Error("glTexSubImage3D : ",Token::GLerrorToString(_error));
  8249. #if REGAL_BREAK
  8250. Break::ErrorCB(_error);
  8251. #endif
  8252. if (_context->err.callback)
  8253. _context->err.callback( _error );
  8254. }
  8255. }
  8256. }
  8257. // GL_VERSION_1_3
  8258. static void REGAL_CALL error_glActiveTexture(GLenum texture)
  8259. {
  8260. Internal("error_glActiveTexture","()");
  8261. RegalContext *_context = REGAL_GET_CONTEXT();
  8262. RegalAssert(_context);
  8263. DispatchTableGL *_next = _context->dispatcher.error.next();
  8264. RegalAssert(_next);
  8265. GLenum _error = GL_NO_ERROR;
  8266. if (!_context->err.inBeginEnd)
  8267. _error = _next->call(&_next->glGetError)();
  8268. RegalAssert(_error==GL_NO_ERROR);
  8269. _next->call(&_next->glActiveTexture)(texture);
  8270. if (!_context->err.inBeginEnd) {
  8271. _error = _next->call(&_next->glGetError)();
  8272. if (_error!=GL_NO_ERROR) {
  8273. Error("glActiveTexture : ",Token::GLerrorToString(_error));
  8274. #if REGAL_BREAK
  8275. Break::ErrorCB(_error);
  8276. #endif
  8277. if (_context->err.callback)
  8278. _context->err.callback( _error );
  8279. }
  8280. }
  8281. }
  8282. static void REGAL_CALL error_glClientActiveTexture(GLenum texture)
  8283. {
  8284. Internal("error_glClientActiveTexture","()");
  8285. RegalContext *_context = REGAL_GET_CONTEXT();
  8286. RegalAssert(_context);
  8287. DispatchTableGL *_next = _context->dispatcher.error.next();
  8288. RegalAssert(_next);
  8289. GLenum _error = GL_NO_ERROR;
  8290. if (!_context->err.inBeginEnd)
  8291. _error = _next->call(&_next->glGetError)();
  8292. RegalAssert(_error==GL_NO_ERROR);
  8293. _next->call(&_next->glClientActiveTexture)(texture);
  8294. if (!_context->err.inBeginEnd) {
  8295. _error = _next->call(&_next->glGetError)();
  8296. if (_error!=GL_NO_ERROR) {
  8297. Error("glClientActiveTexture : ",Token::GLerrorToString(_error));
  8298. #if REGAL_BREAK
  8299. Break::ErrorCB(_error);
  8300. #endif
  8301. if (_context->err.callback)
  8302. _context->err.callback( _error );
  8303. }
  8304. }
  8305. }
  8306. static void REGAL_CALL error_glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
  8307. {
  8308. Internal("error_glCompressedTexImage1D","()");
  8309. RegalContext *_context = REGAL_GET_CONTEXT();
  8310. RegalAssert(_context);
  8311. DispatchTableGL *_next = _context->dispatcher.error.next();
  8312. RegalAssert(_next);
  8313. GLenum _error = GL_NO_ERROR;
  8314. if (!_context->err.inBeginEnd)
  8315. _error = _next->call(&_next->glGetError)();
  8316. RegalAssert(_error==GL_NO_ERROR);
  8317. _next->call(&_next->glCompressedTexImage1D)(target, level, internalformat, width, border, imageSize, data);
  8318. if (!_context->err.inBeginEnd) {
  8319. _error = _next->call(&_next->glGetError)();
  8320. if (_error!=GL_NO_ERROR) {
  8321. Error("glCompressedTexImage1D : ",Token::GLerrorToString(_error));
  8322. #if REGAL_BREAK
  8323. Break::ErrorCB(_error);
  8324. #endif
  8325. if (_context->err.callback)
  8326. _context->err.callback( _error );
  8327. }
  8328. }
  8329. }
  8330. static void REGAL_CALL error_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
  8331. {
  8332. Internal("error_glCompressedTexImage2D","()");
  8333. RegalContext *_context = REGAL_GET_CONTEXT();
  8334. RegalAssert(_context);
  8335. DispatchTableGL *_next = _context->dispatcher.error.next();
  8336. RegalAssert(_next);
  8337. GLenum _error = GL_NO_ERROR;
  8338. if (!_context->err.inBeginEnd)
  8339. _error = _next->call(&_next->glGetError)();
  8340. RegalAssert(_error==GL_NO_ERROR);
  8341. _next->call(&_next->glCompressedTexImage2D)(target, level, internalformat, width, height, border, imageSize, data);
  8342. if (!_context->err.inBeginEnd) {
  8343. _error = _next->call(&_next->glGetError)();
  8344. if (_error!=GL_NO_ERROR) {
  8345. Error("glCompressedTexImage2D : ",Token::GLerrorToString(_error));
  8346. #if REGAL_BREAK
  8347. Break::ErrorCB(_error);
  8348. #endif
  8349. if (_context->err.callback)
  8350. _context->err.callback( _error );
  8351. }
  8352. }
  8353. }
  8354. static void REGAL_CALL error_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
  8355. {
  8356. Internal("error_glCompressedTexImage3D","()");
  8357. RegalContext *_context = REGAL_GET_CONTEXT();
  8358. RegalAssert(_context);
  8359. DispatchTableGL *_next = _context->dispatcher.error.next();
  8360. RegalAssert(_next);
  8361. GLenum _error = GL_NO_ERROR;
  8362. if (!_context->err.inBeginEnd)
  8363. _error = _next->call(&_next->glGetError)();
  8364. RegalAssert(_error==GL_NO_ERROR);
  8365. _next->call(&_next->glCompressedTexImage3D)(target, level, internalformat, width, height, depth, border, imageSize, data);
  8366. if (!_context->err.inBeginEnd) {
  8367. _error = _next->call(&_next->glGetError)();
  8368. if (_error!=GL_NO_ERROR) {
  8369. Error("glCompressedTexImage3D : ",Token::GLerrorToString(_error));
  8370. #if REGAL_BREAK
  8371. Break::ErrorCB(_error);
  8372. #endif
  8373. if (_context->err.callback)
  8374. _context->err.callback( _error );
  8375. }
  8376. }
  8377. }
  8378. static void REGAL_CALL error_glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
  8379. {
  8380. Internal("error_glCompressedTexSubImage1D","()");
  8381. RegalContext *_context = REGAL_GET_CONTEXT();
  8382. RegalAssert(_context);
  8383. DispatchTableGL *_next = _context->dispatcher.error.next();
  8384. RegalAssert(_next);
  8385. GLenum _error = GL_NO_ERROR;
  8386. if (!_context->err.inBeginEnd)
  8387. _error = _next->call(&_next->glGetError)();
  8388. RegalAssert(_error==GL_NO_ERROR);
  8389. _next->call(&_next->glCompressedTexSubImage1D)(target, level, xoffset, width, format, imageSize, data);
  8390. if (!_context->err.inBeginEnd) {
  8391. _error = _next->call(&_next->glGetError)();
  8392. if (_error!=GL_NO_ERROR) {
  8393. Error("glCompressedTexSubImage1D : ",Token::GLerrorToString(_error));
  8394. #if REGAL_BREAK
  8395. Break::ErrorCB(_error);
  8396. #endif
  8397. if (_context->err.callback)
  8398. _context->err.callback( _error );
  8399. }
  8400. }
  8401. }
  8402. static void REGAL_CALL error_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
  8403. {
  8404. Internal("error_glCompressedTexSubImage2D","()");
  8405. RegalContext *_context = REGAL_GET_CONTEXT();
  8406. RegalAssert(_context);
  8407. DispatchTableGL *_next = _context->dispatcher.error.next();
  8408. RegalAssert(_next);
  8409. GLenum _error = GL_NO_ERROR;
  8410. if (!_context->err.inBeginEnd)
  8411. _error = _next->call(&_next->glGetError)();
  8412. RegalAssert(_error==GL_NO_ERROR);
  8413. _next->call(&_next->glCompressedTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
  8414. if (!_context->err.inBeginEnd) {
  8415. _error = _next->call(&_next->glGetError)();
  8416. if (_error!=GL_NO_ERROR) {
  8417. Error("glCompressedTexSubImage2D : ",Token::GLerrorToString(_error));
  8418. #if REGAL_BREAK
  8419. Break::ErrorCB(_error);
  8420. #endif
  8421. if (_context->err.callback)
  8422. _context->err.callback( _error );
  8423. }
  8424. }
  8425. }
  8426. static void REGAL_CALL error_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
  8427. {
  8428. Internal("error_glCompressedTexSubImage3D","()");
  8429. RegalContext *_context = REGAL_GET_CONTEXT();
  8430. RegalAssert(_context);
  8431. DispatchTableGL *_next = _context->dispatcher.error.next();
  8432. RegalAssert(_next);
  8433. GLenum _error = GL_NO_ERROR;
  8434. if (!_context->err.inBeginEnd)
  8435. _error = _next->call(&_next->glGetError)();
  8436. RegalAssert(_error==GL_NO_ERROR);
  8437. _next->call(&_next->glCompressedTexSubImage3D)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
  8438. if (!_context->err.inBeginEnd) {
  8439. _error = _next->call(&_next->glGetError)();
  8440. if (_error!=GL_NO_ERROR) {
  8441. Error("glCompressedTexSubImage3D : ",Token::GLerrorToString(_error));
  8442. #if REGAL_BREAK
  8443. Break::ErrorCB(_error);
  8444. #endif
  8445. if (_context->err.callback)
  8446. _context->err.callback( _error );
  8447. }
  8448. }
  8449. }
  8450. static void REGAL_CALL error_glGetCompressedTexImage(GLenum target, GLint lod, GLvoid *img)
  8451. {
  8452. Internal("error_glGetCompressedTexImage","()");
  8453. RegalContext *_context = REGAL_GET_CONTEXT();
  8454. RegalAssert(_context);
  8455. DispatchTableGL *_next = _context->dispatcher.error.next();
  8456. RegalAssert(_next);
  8457. GLenum _error = GL_NO_ERROR;
  8458. if (!_context->err.inBeginEnd)
  8459. _error = _next->call(&_next->glGetError)();
  8460. RegalAssert(_error==GL_NO_ERROR);
  8461. _next->call(&_next->glGetCompressedTexImage)(target, lod, img);
  8462. if (!_context->err.inBeginEnd) {
  8463. _error = _next->call(&_next->glGetError)();
  8464. if (_error!=GL_NO_ERROR) {
  8465. Error("glGetCompressedTexImage : ",Token::GLerrorToString(_error));
  8466. #if REGAL_BREAK
  8467. Break::ErrorCB(_error);
  8468. #endif
  8469. if (_context->err.callback)
  8470. _context->err.callback( _error );
  8471. }
  8472. }
  8473. }
  8474. static void REGAL_CALL error_glLoadTransposeMatrixd(const GLdouble *m)
  8475. {
  8476. Internal("error_glLoadTransposeMatrixd","()");
  8477. RegalContext *_context = REGAL_GET_CONTEXT();
  8478. RegalAssert(_context);
  8479. DispatchTableGL *_next = _context->dispatcher.error.next();
  8480. RegalAssert(_next);
  8481. GLenum _error = GL_NO_ERROR;
  8482. if (!_context->err.inBeginEnd)
  8483. _error = _next->call(&_next->glGetError)();
  8484. RegalAssert(_error==GL_NO_ERROR);
  8485. _next->call(&_next->glLoadTransposeMatrixd)(m);
  8486. if (!_context->err.inBeginEnd) {
  8487. _error = _next->call(&_next->glGetError)();
  8488. if (_error!=GL_NO_ERROR) {
  8489. Error("glLoadTransposeMatrixd : ",Token::GLerrorToString(_error));
  8490. #if REGAL_BREAK
  8491. Break::ErrorCB(_error);
  8492. #endif
  8493. if (_context->err.callback)
  8494. _context->err.callback( _error );
  8495. }
  8496. }
  8497. }
  8498. static void REGAL_CALL error_glLoadTransposeMatrixf(const GLfloat *m)
  8499. {
  8500. Internal("error_glLoadTransposeMatrixf","()");
  8501. RegalContext *_context = REGAL_GET_CONTEXT();
  8502. RegalAssert(_context);
  8503. DispatchTableGL *_next = _context->dispatcher.error.next();
  8504. RegalAssert(_next);
  8505. GLenum _error = GL_NO_ERROR;
  8506. if (!_context->err.inBeginEnd)
  8507. _error = _next->call(&_next->glGetError)();
  8508. RegalAssert(_error==GL_NO_ERROR);
  8509. _next->call(&_next->glLoadTransposeMatrixf)(m);
  8510. if (!_context->err.inBeginEnd) {
  8511. _error = _next->call(&_next->glGetError)();
  8512. if (_error!=GL_NO_ERROR) {
  8513. Error("glLoadTransposeMatrixf : ",Token::GLerrorToString(_error));
  8514. #if REGAL_BREAK
  8515. Break::ErrorCB(_error);
  8516. #endif
  8517. if (_context->err.callback)
  8518. _context->err.callback( _error );
  8519. }
  8520. }
  8521. }
  8522. static void REGAL_CALL error_glMultTransposeMatrixd(const GLdouble *m)
  8523. {
  8524. Internal("error_glMultTransposeMatrixd","()");
  8525. RegalContext *_context = REGAL_GET_CONTEXT();
  8526. RegalAssert(_context);
  8527. DispatchTableGL *_next = _context->dispatcher.error.next();
  8528. RegalAssert(_next);
  8529. GLenum _error = GL_NO_ERROR;
  8530. if (!_context->err.inBeginEnd)
  8531. _error = _next->call(&_next->glGetError)();
  8532. RegalAssert(_error==GL_NO_ERROR);
  8533. _next->call(&_next->glMultTransposeMatrixd)(m);
  8534. if (!_context->err.inBeginEnd) {
  8535. _error = _next->call(&_next->glGetError)();
  8536. if (_error!=GL_NO_ERROR) {
  8537. Error("glMultTransposeMatrixd : ",Token::GLerrorToString(_error));
  8538. #if REGAL_BREAK
  8539. Break::ErrorCB(_error);
  8540. #endif
  8541. if (_context->err.callback)
  8542. _context->err.callback( _error );
  8543. }
  8544. }
  8545. }
  8546. static void REGAL_CALL error_glMultTransposeMatrixf(const GLfloat *m)
  8547. {
  8548. Internal("error_glMultTransposeMatrixf","()");
  8549. RegalContext *_context = REGAL_GET_CONTEXT();
  8550. RegalAssert(_context);
  8551. DispatchTableGL *_next = _context->dispatcher.error.next();
  8552. RegalAssert(_next);
  8553. GLenum _error = GL_NO_ERROR;
  8554. if (!_context->err.inBeginEnd)
  8555. _error = _next->call(&_next->glGetError)();
  8556. RegalAssert(_error==GL_NO_ERROR);
  8557. _next->call(&_next->glMultTransposeMatrixf)(m);
  8558. if (!_context->err.inBeginEnd) {
  8559. _error = _next->call(&_next->glGetError)();
  8560. if (_error!=GL_NO_ERROR) {
  8561. Error("glMultTransposeMatrixf : ",Token::GLerrorToString(_error));
  8562. #if REGAL_BREAK
  8563. Break::ErrorCB(_error);
  8564. #endif
  8565. if (_context->err.callback)
  8566. _context->err.callback( _error );
  8567. }
  8568. }
  8569. }
  8570. static void REGAL_CALL error_glMultiTexCoord1d(GLenum target, GLdouble s)
  8571. {
  8572. Internal("error_glMultiTexCoord1d","()");
  8573. RegalContext *_context = REGAL_GET_CONTEXT();
  8574. RegalAssert(_context);
  8575. DispatchTableGL *_next = _context->dispatcher.error.next();
  8576. RegalAssert(_next);
  8577. GLenum _error = GL_NO_ERROR;
  8578. if (!_context->err.inBeginEnd)
  8579. _error = _next->call(&_next->glGetError)();
  8580. RegalAssert(_error==GL_NO_ERROR);
  8581. _next->call(&_next->glMultiTexCoord1d)(target, s);
  8582. if (!_context->err.inBeginEnd) {
  8583. _error = _next->call(&_next->glGetError)();
  8584. if (_error!=GL_NO_ERROR) {
  8585. Error("glMultiTexCoord1d : ",Token::GLerrorToString(_error));
  8586. #if REGAL_BREAK
  8587. Break::ErrorCB(_error);
  8588. #endif
  8589. if (_context->err.callback)
  8590. _context->err.callback( _error );
  8591. }
  8592. }
  8593. }
  8594. static void REGAL_CALL error_glMultiTexCoord1dv(GLenum target, const GLdouble *v)
  8595. {
  8596. Internal("error_glMultiTexCoord1dv","()");
  8597. RegalContext *_context = REGAL_GET_CONTEXT();
  8598. RegalAssert(_context);
  8599. DispatchTableGL *_next = _context->dispatcher.error.next();
  8600. RegalAssert(_next);
  8601. GLenum _error = GL_NO_ERROR;
  8602. if (!_context->err.inBeginEnd)
  8603. _error = _next->call(&_next->glGetError)();
  8604. RegalAssert(_error==GL_NO_ERROR);
  8605. _next->call(&_next->glMultiTexCoord1dv)(target, v);
  8606. if (!_context->err.inBeginEnd) {
  8607. _error = _next->call(&_next->glGetError)();
  8608. if (_error!=GL_NO_ERROR) {
  8609. Error("glMultiTexCoord1dv : ",Token::GLerrorToString(_error));
  8610. #if REGAL_BREAK
  8611. Break::ErrorCB(_error);
  8612. #endif
  8613. if (_context->err.callback)
  8614. _context->err.callback( _error );
  8615. }
  8616. }
  8617. }
  8618. static void REGAL_CALL error_glMultiTexCoord1f(GLenum target, GLfloat s)
  8619. {
  8620. Internal("error_glMultiTexCoord1f","()");
  8621. RegalContext *_context = REGAL_GET_CONTEXT();
  8622. RegalAssert(_context);
  8623. DispatchTableGL *_next = _context->dispatcher.error.next();
  8624. RegalAssert(_next);
  8625. GLenum _error = GL_NO_ERROR;
  8626. if (!_context->err.inBeginEnd)
  8627. _error = _next->call(&_next->glGetError)();
  8628. RegalAssert(_error==GL_NO_ERROR);
  8629. _next->call(&_next->glMultiTexCoord1f)(target, s);
  8630. if (!_context->err.inBeginEnd) {
  8631. _error = _next->call(&_next->glGetError)();
  8632. if (_error!=GL_NO_ERROR) {
  8633. Error("glMultiTexCoord1f : ",Token::GLerrorToString(_error));
  8634. #if REGAL_BREAK
  8635. Break::ErrorCB(_error);
  8636. #endif
  8637. if (_context->err.callback)
  8638. _context->err.callback( _error );
  8639. }
  8640. }
  8641. }
  8642. static void REGAL_CALL error_glMultiTexCoord1fv(GLenum target, const GLfloat *v)
  8643. {
  8644. Internal("error_glMultiTexCoord1fv","()");
  8645. RegalContext *_context = REGAL_GET_CONTEXT();
  8646. RegalAssert(_context);
  8647. DispatchTableGL *_next = _context->dispatcher.error.next();
  8648. RegalAssert(_next);
  8649. GLenum _error = GL_NO_ERROR;
  8650. if (!_context->err.inBeginEnd)
  8651. _error = _next->call(&_next->glGetError)();
  8652. RegalAssert(_error==GL_NO_ERROR);
  8653. _next->call(&_next->glMultiTexCoord1fv)(target, v);
  8654. if (!_context->err.inBeginEnd) {
  8655. _error = _next->call(&_next->glGetError)();
  8656. if (_error!=GL_NO_ERROR) {
  8657. Error("glMultiTexCoord1fv : ",Token::GLerrorToString(_error));
  8658. #if REGAL_BREAK
  8659. Break::ErrorCB(_error);
  8660. #endif
  8661. if (_context->err.callback)
  8662. _context->err.callback( _error );
  8663. }
  8664. }
  8665. }
  8666. static void REGAL_CALL error_glMultiTexCoord1i(GLenum target, GLint s)
  8667. {
  8668. Internal("error_glMultiTexCoord1i","()");
  8669. RegalContext *_context = REGAL_GET_CONTEXT();
  8670. RegalAssert(_context);
  8671. DispatchTableGL *_next = _context->dispatcher.error.next();
  8672. RegalAssert(_next);
  8673. GLenum _error = GL_NO_ERROR;
  8674. if (!_context->err.inBeginEnd)
  8675. _error = _next->call(&_next->glGetError)();
  8676. RegalAssert(_error==GL_NO_ERROR);
  8677. _next->call(&_next->glMultiTexCoord1i)(target, s);
  8678. if (!_context->err.inBeginEnd) {
  8679. _error = _next->call(&_next->glGetError)();
  8680. if (_error!=GL_NO_ERROR) {
  8681. Error("glMultiTexCoord1i : ",Token::GLerrorToString(_error));
  8682. #if REGAL_BREAK
  8683. Break::ErrorCB(_error);
  8684. #endif
  8685. if (_context->err.callback)
  8686. _context->err.callback( _error );
  8687. }
  8688. }
  8689. }
  8690. static void REGAL_CALL error_glMultiTexCoord1iv(GLenum target, const GLint *v)
  8691. {
  8692. Internal("error_glMultiTexCoord1iv","()");
  8693. RegalContext *_context = REGAL_GET_CONTEXT();
  8694. RegalAssert(_context);
  8695. DispatchTableGL *_next = _context->dispatcher.error.next();
  8696. RegalAssert(_next);
  8697. GLenum _error = GL_NO_ERROR;
  8698. if (!_context->err.inBeginEnd)
  8699. _error = _next->call(&_next->glGetError)();
  8700. RegalAssert(_error==GL_NO_ERROR);
  8701. _next->call(&_next->glMultiTexCoord1iv)(target, v);
  8702. if (!_context->err.inBeginEnd) {
  8703. _error = _next->call(&_next->glGetError)();
  8704. if (_error!=GL_NO_ERROR) {
  8705. Error("glMultiTexCoord1iv : ",Token::GLerrorToString(_error));
  8706. #if REGAL_BREAK
  8707. Break::ErrorCB(_error);
  8708. #endif
  8709. if (_context->err.callback)
  8710. _context->err.callback( _error );
  8711. }
  8712. }
  8713. }
  8714. static void REGAL_CALL error_glMultiTexCoord1s(GLenum target, GLshort s)
  8715. {
  8716. Internal("error_glMultiTexCoord1s","()");
  8717. RegalContext *_context = REGAL_GET_CONTEXT();
  8718. RegalAssert(_context);
  8719. DispatchTableGL *_next = _context->dispatcher.error.next();
  8720. RegalAssert(_next);
  8721. GLenum _error = GL_NO_ERROR;
  8722. if (!_context->err.inBeginEnd)
  8723. _error = _next->call(&_next->glGetError)();
  8724. RegalAssert(_error==GL_NO_ERROR);
  8725. _next->call(&_next->glMultiTexCoord1s)(target, s);
  8726. if (!_context->err.inBeginEnd) {
  8727. _error = _next->call(&_next->glGetError)();
  8728. if (_error!=GL_NO_ERROR) {
  8729. Error("glMultiTexCoord1s : ",Token::GLerrorToString(_error));
  8730. #if REGAL_BREAK
  8731. Break::ErrorCB(_error);
  8732. #endif
  8733. if (_context->err.callback)
  8734. _context->err.callback( _error );
  8735. }
  8736. }
  8737. }
  8738. static void REGAL_CALL error_glMultiTexCoord1sv(GLenum target, const GLshort *v)
  8739. {
  8740. Internal("error_glMultiTexCoord1sv","()");
  8741. RegalContext *_context = REGAL_GET_CONTEXT();
  8742. RegalAssert(_context);
  8743. DispatchTableGL *_next = _context->dispatcher.error.next();
  8744. RegalAssert(_next);
  8745. GLenum _error = GL_NO_ERROR;
  8746. if (!_context->err.inBeginEnd)
  8747. _error = _next->call(&_next->glGetError)();
  8748. RegalAssert(_error==GL_NO_ERROR);
  8749. _next->call(&_next->glMultiTexCoord1sv)(target, v);
  8750. if (!_context->err.inBeginEnd) {
  8751. _error = _next->call(&_next->glGetError)();
  8752. if (_error!=GL_NO_ERROR) {
  8753. Error("glMultiTexCoord1sv : ",Token::GLerrorToString(_error));
  8754. #if REGAL_BREAK
  8755. Break::ErrorCB(_error);
  8756. #endif
  8757. if (_context->err.callback)
  8758. _context->err.callback( _error );
  8759. }
  8760. }
  8761. }
  8762. static void REGAL_CALL error_glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
  8763. {
  8764. Internal("error_glMultiTexCoord2d","()");
  8765. RegalContext *_context = REGAL_GET_CONTEXT();
  8766. RegalAssert(_context);
  8767. DispatchTableGL *_next = _context->dispatcher.error.next();
  8768. RegalAssert(_next);
  8769. GLenum _error = GL_NO_ERROR;
  8770. if (!_context->err.inBeginEnd)
  8771. _error = _next->call(&_next->glGetError)();
  8772. RegalAssert(_error==GL_NO_ERROR);
  8773. _next->call(&_next->glMultiTexCoord2d)(target, s, t);
  8774. if (!_context->err.inBeginEnd) {
  8775. _error = _next->call(&_next->glGetError)();
  8776. if (_error!=GL_NO_ERROR) {
  8777. Error("glMultiTexCoord2d : ",Token::GLerrorToString(_error));
  8778. #if REGAL_BREAK
  8779. Break::ErrorCB(_error);
  8780. #endif
  8781. if (_context->err.callback)
  8782. _context->err.callback( _error );
  8783. }
  8784. }
  8785. }
  8786. static void REGAL_CALL error_glMultiTexCoord2dv(GLenum target, const GLdouble *v)
  8787. {
  8788. Internal("error_glMultiTexCoord2dv","()");
  8789. RegalContext *_context = REGAL_GET_CONTEXT();
  8790. RegalAssert(_context);
  8791. DispatchTableGL *_next = _context->dispatcher.error.next();
  8792. RegalAssert(_next);
  8793. GLenum _error = GL_NO_ERROR;
  8794. if (!_context->err.inBeginEnd)
  8795. _error = _next->call(&_next->glGetError)();
  8796. RegalAssert(_error==GL_NO_ERROR);
  8797. _next->call(&_next->glMultiTexCoord2dv)(target, v);
  8798. if (!_context->err.inBeginEnd) {
  8799. _error = _next->call(&_next->glGetError)();
  8800. if (_error!=GL_NO_ERROR) {
  8801. Error("glMultiTexCoord2dv : ",Token::GLerrorToString(_error));
  8802. #if REGAL_BREAK
  8803. Break::ErrorCB(_error);
  8804. #endif
  8805. if (_context->err.callback)
  8806. _context->err.callback( _error );
  8807. }
  8808. }
  8809. }
  8810. static void REGAL_CALL error_glMultiTexCoord2f(GLenum target, GLfloat s, GLfloat t)
  8811. {
  8812. Internal("error_glMultiTexCoord2f","()");
  8813. RegalContext *_context = REGAL_GET_CONTEXT();
  8814. RegalAssert(_context);
  8815. DispatchTableGL *_next = _context->dispatcher.error.next();
  8816. RegalAssert(_next);
  8817. GLenum _error = GL_NO_ERROR;
  8818. if (!_context->err.inBeginEnd)
  8819. _error = _next->call(&_next->glGetError)();
  8820. RegalAssert(_error==GL_NO_ERROR);
  8821. _next->call(&_next->glMultiTexCoord2f)(target, s, t);
  8822. if (!_context->err.inBeginEnd) {
  8823. _error = _next->call(&_next->glGetError)();
  8824. if (_error!=GL_NO_ERROR) {
  8825. Error("glMultiTexCoord2f : ",Token::GLerrorToString(_error));
  8826. #if REGAL_BREAK
  8827. Break::ErrorCB(_error);
  8828. #endif
  8829. if (_context->err.callback)
  8830. _context->err.callback( _error );
  8831. }
  8832. }
  8833. }
  8834. static void REGAL_CALL error_glMultiTexCoord2fv(GLenum target, const GLfloat *v)
  8835. {
  8836. Internal("error_glMultiTexCoord2fv","()");
  8837. RegalContext *_context = REGAL_GET_CONTEXT();
  8838. RegalAssert(_context);
  8839. DispatchTableGL *_next = _context->dispatcher.error.next();
  8840. RegalAssert(_next);
  8841. GLenum _error = GL_NO_ERROR;
  8842. if (!_context->err.inBeginEnd)
  8843. _error = _next->call(&_next->glGetError)();
  8844. RegalAssert(_error==GL_NO_ERROR);
  8845. _next->call(&_next->glMultiTexCoord2fv)(target, v);
  8846. if (!_context->err.inBeginEnd) {
  8847. _error = _next->call(&_next->glGetError)();
  8848. if (_error!=GL_NO_ERROR) {
  8849. Error("glMultiTexCoord2fv : ",Token::GLerrorToString(_error));
  8850. #if REGAL_BREAK
  8851. Break::ErrorCB(_error);
  8852. #endif
  8853. if (_context->err.callback)
  8854. _context->err.callback( _error );
  8855. }
  8856. }
  8857. }
  8858. static void REGAL_CALL error_glMultiTexCoord2i(GLenum target, GLint s, GLint t)
  8859. {
  8860. Internal("error_glMultiTexCoord2i","()");
  8861. RegalContext *_context = REGAL_GET_CONTEXT();
  8862. RegalAssert(_context);
  8863. DispatchTableGL *_next = _context->dispatcher.error.next();
  8864. RegalAssert(_next);
  8865. GLenum _error = GL_NO_ERROR;
  8866. if (!_context->err.inBeginEnd)
  8867. _error = _next->call(&_next->glGetError)();
  8868. RegalAssert(_error==GL_NO_ERROR);
  8869. _next->call(&_next->glMultiTexCoord2i)(target, s, t);
  8870. if (!_context->err.inBeginEnd) {
  8871. _error = _next->call(&_next->glGetError)();
  8872. if (_error!=GL_NO_ERROR) {
  8873. Error("glMultiTexCoord2i : ",Token::GLerrorToString(_error));
  8874. #if REGAL_BREAK
  8875. Break::ErrorCB(_error);
  8876. #endif
  8877. if (_context->err.callback)
  8878. _context->err.callback( _error );
  8879. }
  8880. }
  8881. }
  8882. static void REGAL_CALL error_glMultiTexCoord2iv(GLenum target, const GLint *v)
  8883. {
  8884. Internal("error_glMultiTexCoord2iv","()");
  8885. RegalContext *_context = REGAL_GET_CONTEXT();
  8886. RegalAssert(_context);
  8887. DispatchTableGL *_next = _context->dispatcher.error.next();
  8888. RegalAssert(_next);
  8889. GLenum _error = GL_NO_ERROR;
  8890. if (!_context->err.inBeginEnd)
  8891. _error = _next->call(&_next->glGetError)();
  8892. RegalAssert(_error==GL_NO_ERROR);
  8893. _next->call(&_next->glMultiTexCoord2iv)(target, v);
  8894. if (!_context->err.inBeginEnd) {
  8895. _error = _next->call(&_next->glGetError)();
  8896. if (_error!=GL_NO_ERROR) {
  8897. Error("glMultiTexCoord2iv : ",Token::GLerrorToString(_error));
  8898. #if REGAL_BREAK
  8899. Break::ErrorCB(_error);
  8900. #endif
  8901. if (_context->err.callback)
  8902. _context->err.callback( _error );
  8903. }
  8904. }
  8905. }
  8906. static void REGAL_CALL error_glMultiTexCoord2s(GLenum target, GLshort s, GLshort t)
  8907. {
  8908. Internal("error_glMultiTexCoord2s","()");
  8909. RegalContext *_context = REGAL_GET_CONTEXT();
  8910. RegalAssert(_context);
  8911. DispatchTableGL *_next = _context->dispatcher.error.next();
  8912. RegalAssert(_next);
  8913. GLenum _error = GL_NO_ERROR;
  8914. if (!_context->err.inBeginEnd)
  8915. _error = _next->call(&_next->glGetError)();
  8916. RegalAssert(_error==GL_NO_ERROR);
  8917. _next->call(&_next->glMultiTexCoord2s)(target, s, t);
  8918. if (!_context->err.inBeginEnd) {
  8919. _error = _next->call(&_next->glGetError)();
  8920. if (_error!=GL_NO_ERROR) {
  8921. Error("glMultiTexCoord2s : ",Token::GLerrorToString(_error));
  8922. #if REGAL_BREAK
  8923. Break::ErrorCB(_error);
  8924. #endif
  8925. if (_context->err.callback)
  8926. _context->err.callback( _error );
  8927. }
  8928. }
  8929. }
  8930. static void REGAL_CALL error_glMultiTexCoord2sv(GLenum target, const GLshort *v)
  8931. {
  8932. Internal("error_glMultiTexCoord2sv","()");
  8933. RegalContext *_context = REGAL_GET_CONTEXT();
  8934. RegalAssert(_context);
  8935. DispatchTableGL *_next = _context->dispatcher.error.next();
  8936. RegalAssert(_next);
  8937. GLenum _error = GL_NO_ERROR;
  8938. if (!_context->err.inBeginEnd)
  8939. _error = _next->call(&_next->glGetError)();
  8940. RegalAssert(_error==GL_NO_ERROR);
  8941. _next->call(&_next->glMultiTexCoord2sv)(target, v);
  8942. if (!_context->err.inBeginEnd) {
  8943. _error = _next->call(&_next->glGetError)();
  8944. if (_error!=GL_NO_ERROR) {
  8945. Error("glMultiTexCoord2sv : ",Token::GLerrorToString(_error));
  8946. #if REGAL_BREAK
  8947. Break::ErrorCB(_error);
  8948. #endif
  8949. if (_context->err.callback)
  8950. _context->err.callback( _error );
  8951. }
  8952. }
  8953. }
  8954. static void REGAL_CALL error_glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
  8955. {
  8956. Internal("error_glMultiTexCoord3d","()");
  8957. RegalContext *_context = REGAL_GET_CONTEXT();
  8958. RegalAssert(_context);
  8959. DispatchTableGL *_next = _context->dispatcher.error.next();
  8960. RegalAssert(_next);
  8961. GLenum _error = GL_NO_ERROR;
  8962. if (!_context->err.inBeginEnd)
  8963. _error = _next->call(&_next->glGetError)();
  8964. RegalAssert(_error==GL_NO_ERROR);
  8965. _next->call(&_next->glMultiTexCoord3d)(target, s, t, r);
  8966. if (!_context->err.inBeginEnd) {
  8967. _error = _next->call(&_next->glGetError)();
  8968. if (_error!=GL_NO_ERROR) {
  8969. Error("glMultiTexCoord3d : ",Token::GLerrorToString(_error));
  8970. #if REGAL_BREAK
  8971. Break::ErrorCB(_error);
  8972. #endif
  8973. if (_context->err.callback)
  8974. _context->err.callback( _error );
  8975. }
  8976. }
  8977. }
  8978. static void REGAL_CALL error_glMultiTexCoord3dv(GLenum target, const GLdouble *v)
  8979. {
  8980. Internal("error_glMultiTexCoord3dv","()");
  8981. RegalContext *_context = REGAL_GET_CONTEXT();
  8982. RegalAssert(_context);
  8983. DispatchTableGL *_next = _context->dispatcher.error.next();
  8984. RegalAssert(_next);
  8985. GLenum _error = GL_NO_ERROR;
  8986. if (!_context->err.inBeginEnd)
  8987. _error = _next->call(&_next->glGetError)();
  8988. RegalAssert(_error==GL_NO_ERROR);
  8989. _next->call(&_next->glMultiTexCoord3dv)(target, v);
  8990. if (!_context->err.inBeginEnd) {
  8991. _error = _next->call(&_next->glGetError)();
  8992. if (_error!=GL_NO_ERROR) {
  8993. Error("glMultiTexCoord3dv : ",Token::GLerrorToString(_error));
  8994. #if REGAL_BREAK
  8995. Break::ErrorCB(_error);
  8996. #endif
  8997. if (_context->err.callback)
  8998. _context->err.callback( _error );
  8999. }
  9000. }
  9001. }
  9002. static void REGAL_CALL error_glMultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r)
  9003. {
  9004. Internal("error_glMultiTexCoord3f","()");
  9005. RegalContext *_context = REGAL_GET_CONTEXT();
  9006. RegalAssert(_context);
  9007. DispatchTableGL *_next = _context->dispatcher.error.next();
  9008. RegalAssert(_next);
  9009. GLenum _error = GL_NO_ERROR;
  9010. if (!_context->err.inBeginEnd)
  9011. _error = _next->call(&_next->glGetError)();
  9012. RegalAssert(_error==GL_NO_ERROR);
  9013. _next->call(&_next->glMultiTexCoord3f)(target, s, t, r);
  9014. if (!_context->err.inBeginEnd) {
  9015. _error = _next->call(&_next->glGetError)();
  9016. if (_error!=GL_NO_ERROR) {
  9017. Error("glMultiTexCoord3f : ",Token::GLerrorToString(_error));
  9018. #if REGAL_BREAK
  9019. Break::ErrorCB(_error);
  9020. #endif
  9021. if (_context->err.callback)
  9022. _context->err.callback( _error );
  9023. }
  9024. }
  9025. }
  9026. static void REGAL_CALL error_glMultiTexCoord3fv(GLenum target, const GLfloat *v)
  9027. {
  9028. Internal("error_glMultiTexCoord3fv","()");
  9029. RegalContext *_context = REGAL_GET_CONTEXT();
  9030. RegalAssert(_context);
  9031. DispatchTableGL *_next = _context->dispatcher.error.next();
  9032. RegalAssert(_next);
  9033. GLenum _error = GL_NO_ERROR;
  9034. if (!_context->err.inBeginEnd)
  9035. _error = _next->call(&_next->glGetError)();
  9036. RegalAssert(_error==GL_NO_ERROR);
  9037. _next->call(&_next->glMultiTexCoord3fv)(target, v);
  9038. if (!_context->err.inBeginEnd) {
  9039. _error = _next->call(&_next->glGetError)();
  9040. if (_error!=GL_NO_ERROR) {
  9041. Error("glMultiTexCoord3fv : ",Token::GLerrorToString(_error));
  9042. #if REGAL_BREAK
  9043. Break::ErrorCB(_error);
  9044. #endif
  9045. if (_context->err.callback)
  9046. _context->err.callback( _error );
  9047. }
  9048. }
  9049. }
  9050. static void REGAL_CALL error_glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
  9051. {
  9052. Internal("error_glMultiTexCoord3i","()");
  9053. RegalContext *_context = REGAL_GET_CONTEXT();
  9054. RegalAssert(_context);
  9055. DispatchTableGL *_next = _context->dispatcher.error.next();
  9056. RegalAssert(_next);
  9057. GLenum _error = GL_NO_ERROR;
  9058. if (!_context->err.inBeginEnd)
  9059. _error = _next->call(&_next->glGetError)();
  9060. RegalAssert(_error==GL_NO_ERROR);
  9061. _next->call(&_next->glMultiTexCoord3i)(target, s, t, r);
  9062. if (!_context->err.inBeginEnd) {
  9063. _error = _next->call(&_next->glGetError)();
  9064. if (_error!=GL_NO_ERROR) {
  9065. Error("glMultiTexCoord3i : ",Token::GLerrorToString(_error));
  9066. #if REGAL_BREAK
  9067. Break::ErrorCB(_error);
  9068. #endif
  9069. if (_context->err.callback)
  9070. _context->err.callback( _error );
  9071. }
  9072. }
  9073. }
  9074. static void REGAL_CALL error_glMultiTexCoord3iv(GLenum target, const GLint *v)
  9075. {
  9076. Internal("error_glMultiTexCoord3iv","()");
  9077. RegalContext *_context = REGAL_GET_CONTEXT();
  9078. RegalAssert(_context);
  9079. DispatchTableGL *_next = _context->dispatcher.error.next();
  9080. RegalAssert(_next);
  9081. GLenum _error = GL_NO_ERROR;
  9082. if (!_context->err.inBeginEnd)
  9083. _error = _next->call(&_next->glGetError)();
  9084. RegalAssert(_error==GL_NO_ERROR);
  9085. _next->call(&_next->glMultiTexCoord3iv)(target, v);
  9086. if (!_context->err.inBeginEnd) {
  9087. _error = _next->call(&_next->glGetError)();
  9088. if (_error!=GL_NO_ERROR) {
  9089. Error("glMultiTexCoord3iv : ",Token::GLerrorToString(_error));
  9090. #if REGAL_BREAK
  9091. Break::ErrorCB(_error);
  9092. #endif
  9093. if (_context->err.callback)
  9094. _context->err.callback( _error );
  9095. }
  9096. }
  9097. }
  9098. static void REGAL_CALL error_glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
  9099. {
  9100. Internal("error_glMultiTexCoord3s","()");
  9101. RegalContext *_context = REGAL_GET_CONTEXT();
  9102. RegalAssert(_context);
  9103. DispatchTableGL *_next = _context->dispatcher.error.next();
  9104. RegalAssert(_next);
  9105. GLenum _error = GL_NO_ERROR;
  9106. if (!_context->err.inBeginEnd)
  9107. _error = _next->call(&_next->glGetError)();
  9108. RegalAssert(_error==GL_NO_ERROR);
  9109. _next->call(&_next->glMultiTexCoord3s)(target, s, t, r);
  9110. if (!_context->err.inBeginEnd) {
  9111. _error = _next->call(&_next->glGetError)();
  9112. if (_error!=GL_NO_ERROR) {
  9113. Error("glMultiTexCoord3s : ",Token::GLerrorToString(_error));
  9114. #if REGAL_BREAK
  9115. Break::ErrorCB(_error);
  9116. #endif
  9117. if (_context->err.callback)
  9118. _context->err.callback( _error );
  9119. }
  9120. }
  9121. }
  9122. static void REGAL_CALL error_glMultiTexCoord3sv(GLenum target, const GLshort *v)
  9123. {
  9124. Internal("error_glMultiTexCoord3sv","()");
  9125. RegalContext *_context = REGAL_GET_CONTEXT();
  9126. RegalAssert(_context);
  9127. DispatchTableGL *_next = _context->dispatcher.error.next();
  9128. RegalAssert(_next);
  9129. GLenum _error = GL_NO_ERROR;
  9130. if (!_context->err.inBeginEnd)
  9131. _error = _next->call(&_next->glGetError)();
  9132. RegalAssert(_error==GL_NO_ERROR);
  9133. _next->call(&_next->glMultiTexCoord3sv)(target, v);
  9134. if (!_context->err.inBeginEnd) {
  9135. _error = _next->call(&_next->glGetError)();
  9136. if (_error!=GL_NO_ERROR) {
  9137. Error("glMultiTexCoord3sv : ",Token::GLerrorToString(_error));
  9138. #if REGAL_BREAK
  9139. Break::ErrorCB(_error);
  9140. #endif
  9141. if (_context->err.callback)
  9142. _context->err.callback( _error );
  9143. }
  9144. }
  9145. }
  9146. static void REGAL_CALL error_glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  9147. {
  9148. Internal("error_glMultiTexCoord4d","()");
  9149. RegalContext *_context = REGAL_GET_CONTEXT();
  9150. RegalAssert(_context);
  9151. DispatchTableGL *_next = _context->dispatcher.error.next();
  9152. RegalAssert(_next);
  9153. GLenum _error = GL_NO_ERROR;
  9154. if (!_context->err.inBeginEnd)
  9155. _error = _next->call(&_next->glGetError)();
  9156. RegalAssert(_error==GL_NO_ERROR);
  9157. _next->call(&_next->glMultiTexCoord4d)(target, s, t, r, q);
  9158. if (!_context->err.inBeginEnd) {
  9159. _error = _next->call(&_next->glGetError)();
  9160. if (_error!=GL_NO_ERROR) {
  9161. Error("glMultiTexCoord4d : ",Token::GLerrorToString(_error));
  9162. #if REGAL_BREAK
  9163. Break::ErrorCB(_error);
  9164. #endif
  9165. if (_context->err.callback)
  9166. _context->err.callback( _error );
  9167. }
  9168. }
  9169. }
  9170. static void REGAL_CALL error_glMultiTexCoord4dv(GLenum target, const GLdouble *v)
  9171. {
  9172. Internal("error_glMultiTexCoord4dv","()");
  9173. RegalContext *_context = REGAL_GET_CONTEXT();
  9174. RegalAssert(_context);
  9175. DispatchTableGL *_next = _context->dispatcher.error.next();
  9176. RegalAssert(_next);
  9177. GLenum _error = GL_NO_ERROR;
  9178. if (!_context->err.inBeginEnd)
  9179. _error = _next->call(&_next->glGetError)();
  9180. RegalAssert(_error==GL_NO_ERROR);
  9181. _next->call(&_next->glMultiTexCoord4dv)(target, v);
  9182. if (!_context->err.inBeginEnd) {
  9183. _error = _next->call(&_next->glGetError)();
  9184. if (_error!=GL_NO_ERROR) {
  9185. Error("glMultiTexCoord4dv : ",Token::GLerrorToString(_error));
  9186. #if REGAL_BREAK
  9187. Break::ErrorCB(_error);
  9188. #endif
  9189. if (_context->err.callback)
  9190. _context->err.callback( _error );
  9191. }
  9192. }
  9193. }
  9194. static void REGAL_CALL error_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  9195. {
  9196. Internal("error_glMultiTexCoord4f","()");
  9197. RegalContext *_context = REGAL_GET_CONTEXT();
  9198. RegalAssert(_context);
  9199. DispatchTableGL *_next = _context->dispatcher.error.next();
  9200. RegalAssert(_next);
  9201. GLenum _error = GL_NO_ERROR;
  9202. if (!_context->err.inBeginEnd)
  9203. _error = _next->call(&_next->glGetError)();
  9204. RegalAssert(_error==GL_NO_ERROR);
  9205. _next->call(&_next->glMultiTexCoord4f)(target, s, t, r, q);
  9206. if (!_context->err.inBeginEnd) {
  9207. _error = _next->call(&_next->glGetError)();
  9208. if (_error!=GL_NO_ERROR) {
  9209. Error("glMultiTexCoord4f : ",Token::GLerrorToString(_error));
  9210. #if REGAL_BREAK
  9211. Break::ErrorCB(_error);
  9212. #endif
  9213. if (_context->err.callback)
  9214. _context->err.callback( _error );
  9215. }
  9216. }
  9217. }
  9218. static void REGAL_CALL error_glMultiTexCoord4fv(GLenum target, const GLfloat *v)
  9219. {
  9220. Internal("error_glMultiTexCoord4fv","()");
  9221. RegalContext *_context = REGAL_GET_CONTEXT();
  9222. RegalAssert(_context);
  9223. DispatchTableGL *_next = _context->dispatcher.error.next();
  9224. RegalAssert(_next);
  9225. GLenum _error = GL_NO_ERROR;
  9226. if (!_context->err.inBeginEnd)
  9227. _error = _next->call(&_next->glGetError)();
  9228. RegalAssert(_error==GL_NO_ERROR);
  9229. _next->call(&_next->glMultiTexCoord4fv)(target, v);
  9230. if (!_context->err.inBeginEnd) {
  9231. _error = _next->call(&_next->glGetError)();
  9232. if (_error!=GL_NO_ERROR) {
  9233. Error("glMultiTexCoord4fv : ",Token::GLerrorToString(_error));
  9234. #if REGAL_BREAK
  9235. Break::ErrorCB(_error);
  9236. #endif
  9237. if (_context->err.callback)
  9238. _context->err.callback( _error );
  9239. }
  9240. }
  9241. }
  9242. static void REGAL_CALL error_glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
  9243. {
  9244. Internal("error_glMultiTexCoord4i","()");
  9245. RegalContext *_context = REGAL_GET_CONTEXT();
  9246. RegalAssert(_context);
  9247. DispatchTableGL *_next = _context->dispatcher.error.next();
  9248. RegalAssert(_next);
  9249. GLenum _error = GL_NO_ERROR;
  9250. if (!_context->err.inBeginEnd)
  9251. _error = _next->call(&_next->glGetError)();
  9252. RegalAssert(_error==GL_NO_ERROR);
  9253. _next->call(&_next->glMultiTexCoord4i)(target, s, t, r, q);
  9254. if (!_context->err.inBeginEnd) {
  9255. _error = _next->call(&_next->glGetError)();
  9256. if (_error!=GL_NO_ERROR) {
  9257. Error("glMultiTexCoord4i : ",Token::GLerrorToString(_error));
  9258. #if REGAL_BREAK
  9259. Break::ErrorCB(_error);
  9260. #endif
  9261. if (_context->err.callback)
  9262. _context->err.callback( _error );
  9263. }
  9264. }
  9265. }
  9266. static void REGAL_CALL error_glMultiTexCoord4iv(GLenum target, const GLint *v)
  9267. {
  9268. Internal("error_glMultiTexCoord4iv","()");
  9269. RegalContext *_context = REGAL_GET_CONTEXT();
  9270. RegalAssert(_context);
  9271. DispatchTableGL *_next = _context->dispatcher.error.next();
  9272. RegalAssert(_next);
  9273. GLenum _error = GL_NO_ERROR;
  9274. if (!_context->err.inBeginEnd)
  9275. _error = _next->call(&_next->glGetError)();
  9276. RegalAssert(_error==GL_NO_ERROR);
  9277. _next->call(&_next->glMultiTexCoord4iv)(target, v);
  9278. if (!_context->err.inBeginEnd) {
  9279. _error = _next->call(&_next->glGetError)();
  9280. if (_error!=GL_NO_ERROR) {
  9281. Error("glMultiTexCoord4iv : ",Token::GLerrorToString(_error));
  9282. #if REGAL_BREAK
  9283. Break::ErrorCB(_error);
  9284. #endif
  9285. if (_context->err.callback)
  9286. _context->err.callback( _error );
  9287. }
  9288. }
  9289. }
  9290. static void REGAL_CALL error_glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
  9291. {
  9292. Internal("error_glMultiTexCoord4s","()");
  9293. RegalContext *_context = REGAL_GET_CONTEXT();
  9294. RegalAssert(_context);
  9295. DispatchTableGL *_next = _context->dispatcher.error.next();
  9296. RegalAssert(_next);
  9297. GLenum _error = GL_NO_ERROR;
  9298. if (!_context->err.inBeginEnd)
  9299. _error = _next->call(&_next->glGetError)();
  9300. RegalAssert(_error==GL_NO_ERROR);
  9301. _next->call(&_next->glMultiTexCoord4s)(target, s, t, r, q);
  9302. if (!_context->err.inBeginEnd) {
  9303. _error = _next->call(&_next->glGetError)();
  9304. if (_error!=GL_NO_ERROR) {
  9305. Error("glMultiTexCoord4s : ",Token::GLerrorToString(_error));
  9306. #if REGAL_BREAK
  9307. Break::ErrorCB(_error);
  9308. #endif
  9309. if (_context->err.callback)
  9310. _context->err.callback( _error );
  9311. }
  9312. }
  9313. }
  9314. static void REGAL_CALL error_glMultiTexCoord4sv(GLenum target, const GLshort *v)
  9315. {
  9316. Internal("error_glMultiTexCoord4sv","()");
  9317. RegalContext *_context = REGAL_GET_CONTEXT();
  9318. RegalAssert(_context);
  9319. DispatchTableGL *_next = _context->dispatcher.error.next();
  9320. RegalAssert(_next);
  9321. GLenum _error = GL_NO_ERROR;
  9322. if (!_context->err.inBeginEnd)
  9323. _error = _next->call(&_next->glGetError)();
  9324. RegalAssert(_error==GL_NO_ERROR);
  9325. _next->call(&_next->glMultiTexCoord4sv)(target, v);
  9326. if (!_context->err.inBeginEnd) {
  9327. _error = _next->call(&_next->glGetError)();
  9328. if (_error!=GL_NO_ERROR) {
  9329. Error("glMultiTexCoord4sv : ",Token::GLerrorToString(_error));
  9330. #if REGAL_BREAK
  9331. Break::ErrorCB(_error);
  9332. #endif
  9333. if (_context->err.callback)
  9334. _context->err.callback( _error );
  9335. }
  9336. }
  9337. }
  9338. static void REGAL_CALL error_glSampleCoverage(GLclampf value, GLboolean invert)
  9339. {
  9340. Internal("error_glSampleCoverage","()");
  9341. RegalContext *_context = REGAL_GET_CONTEXT();
  9342. RegalAssert(_context);
  9343. DispatchTableGL *_next = _context->dispatcher.error.next();
  9344. RegalAssert(_next);
  9345. GLenum _error = GL_NO_ERROR;
  9346. if (!_context->err.inBeginEnd)
  9347. _error = _next->call(&_next->glGetError)();
  9348. RegalAssert(_error==GL_NO_ERROR);
  9349. _next->call(&_next->glSampleCoverage)(value, invert);
  9350. if (!_context->err.inBeginEnd) {
  9351. _error = _next->call(&_next->glGetError)();
  9352. if (_error!=GL_NO_ERROR) {
  9353. Error("glSampleCoverage : ",Token::GLerrorToString(_error));
  9354. #if REGAL_BREAK
  9355. Break::ErrorCB(_error);
  9356. #endif
  9357. if (_context->err.callback)
  9358. _context->err.callback( _error );
  9359. }
  9360. }
  9361. }
  9362. // GL_VERSION_1_4
  9363. static void REGAL_CALL error_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
  9364. {
  9365. Internal("error_glBlendFuncSeparate","()");
  9366. RegalContext *_context = REGAL_GET_CONTEXT();
  9367. RegalAssert(_context);
  9368. DispatchTableGL *_next = _context->dispatcher.error.next();
  9369. RegalAssert(_next);
  9370. GLenum _error = GL_NO_ERROR;
  9371. if (!_context->err.inBeginEnd)
  9372. _error = _next->call(&_next->glGetError)();
  9373. RegalAssert(_error==GL_NO_ERROR);
  9374. _next->call(&_next->glBlendFuncSeparate)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
  9375. if (!_context->err.inBeginEnd) {
  9376. _error = _next->call(&_next->glGetError)();
  9377. if (_error!=GL_NO_ERROR) {
  9378. Error("glBlendFuncSeparate : ",Token::GLerrorToString(_error));
  9379. #if REGAL_BREAK
  9380. Break::ErrorCB(_error);
  9381. #endif
  9382. if (_context->err.callback)
  9383. _context->err.callback( _error );
  9384. }
  9385. }
  9386. }
  9387. static void REGAL_CALL error_glFogCoordPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
  9388. {
  9389. Internal("error_glFogCoordPointer","()");
  9390. RegalContext *_context = REGAL_GET_CONTEXT();
  9391. RegalAssert(_context);
  9392. DispatchTableGL *_next = _context->dispatcher.error.next();
  9393. RegalAssert(_next);
  9394. GLenum _error = GL_NO_ERROR;
  9395. if (!_context->err.inBeginEnd)
  9396. _error = _next->call(&_next->glGetError)();
  9397. RegalAssert(_error==GL_NO_ERROR);
  9398. _next->call(&_next->glFogCoordPointer)(type, stride, pointer);
  9399. if (!_context->err.inBeginEnd) {
  9400. _error = _next->call(&_next->glGetError)();
  9401. if (_error!=GL_NO_ERROR) {
  9402. Error("glFogCoordPointer : ",Token::GLerrorToString(_error));
  9403. #if REGAL_BREAK
  9404. Break::ErrorCB(_error);
  9405. #endif
  9406. if (_context->err.callback)
  9407. _context->err.callback( _error );
  9408. }
  9409. }
  9410. }
  9411. static void REGAL_CALL error_glFogCoordd(GLdouble coord)
  9412. {
  9413. Internal("error_glFogCoordd","()");
  9414. RegalContext *_context = REGAL_GET_CONTEXT();
  9415. RegalAssert(_context);
  9416. DispatchTableGL *_next = _context->dispatcher.error.next();
  9417. RegalAssert(_next);
  9418. GLenum _error = GL_NO_ERROR;
  9419. if (!_context->err.inBeginEnd)
  9420. _error = _next->call(&_next->glGetError)();
  9421. RegalAssert(_error==GL_NO_ERROR);
  9422. _next->call(&_next->glFogCoordd)(coord);
  9423. if (!_context->err.inBeginEnd) {
  9424. _error = _next->call(&_next->glGetError)();
  9425. if (_error!=GL_NO_ERROR) {
  9426. Error("glFogCoordd : ",Token::GLerrorToString(_error));
  9427. #if REGAL_BREAK
  9428. Break::ErrorCB(_error);
  9429. #endif
  9430. if (_context->err.callback)
  9431. _context->err.callback( _error );
  9432. }
  9433. }
  9434. }
  9435. static void REGAL_CALL error_glFogCoorddv(const GLdouble *coord)
  9436. {
  9437. Internal("error_glFogCoorddv","()");
  9438. RegalContext *_context = REGAL_GET_CONTEXT();
  9439. RegalAssert(_context);
  9440. DispatchTableGL *_next = _context->dispatcher.error.next();
  9441. RegalAssert(_next);
  9442. GLenum _error = GL_NO_ERROR;
  9443. if (!_context->err.inBeginEnd)
  9444. _error = _next->call(&_next->glGetError)();
  9445. RegalAssert(_error==GL_NO_ERROR);
  9446. _next->call(&_next->glFogCoorddv)(coord);
  9447. if (!_context->err.inBeginEnd) {
  9448. _error = _next->call(&_next->glGetError)();
  9449. if (_error!=GL_NO_ERROR) {
  9450. Error("glFogCoorddv : ",Token::GLerrorToString(_error));
  9451. #if REGAL_BREAK
  9452. Break::ErrorCB(_error);
  9453. #endif
  9454. if (_context->err.callback)
  9455. _context->err.callback( _error );
  9456. }
  9457. }
  9458. }
  9459. static void REGAL_CALL error_glFogCoordf(GLfloat coord)
  9460. {
  9461. Internal("error_glFogCoordf","()");
  9462. RegalContext *_context = REGAL_GET_CONTEXT();
  9463. RegalAssert(_context);
  9464. DispatchTableGL *_next = _context->dispatcher.error.next();
  9465. RegalAssert(_next);
  9466. GLenum _error = GL_NO_ERROR;
  9467. if (!_context->err.inBeginEnd)
  9468. _error = _next->call(&_next->glGetError)();
  9469. RegalAssert(_error==GL_NO_ERROR);
  9470. _next->call(&_next->glFogCoordf)(coord);
  9471. if (!_context->err.inBeginEnd) {
  9472. _error = _next->call(&_next->glGetError)();
  9473. if (_error!=GL_NO_ERROR) {
  9474. Error("glFogCoordf : ",Token::GLerrorToString(_error));
  9475. #if REGAL_BREAK
  9476. Break::ErrorCB(_error);
  9477. #endif
  9478. if (_context->err.callback)
  9479. _context->err.callback( _error );
  9480. }
  9481. }
  9482. }
  9483. static void REGAL_CALL error_glFogCoordfv(const GLfloat *coord)
  9484. {
  9485. Internal("error_glFogCoordfv","()");
  9486. RegalContext *_context = REGAL_GET_CONTEXT();
  9487. RegalAssert(_context);
  9488. DispatchTableGL *_next = _context->dispatcher.error.next();
  9489. RegalAssert(_next);
  9490. GLenum _error = GL_NO_ERROR;
  9491. if (!_context->err.inBeginEnd)
  9492. _error = _next->call(&_next->glGetError)();
  9493. RegalAssert(_error==GL_NO_ERROR);
  9494. _next->call(&_next->glFogCoordfv)(coord);
  9495. if (!_context->err.inBeginEnd) {
  9496. _error = _next->call(&_next->glGetError)();
  9497. if (_error!=GL_NO_ERROR) {
  9498. Error("glFogCoordfv : ",Token::GLerrorToString(_error));
  9499. #if REGAL_BREAK
  9500. Break::ErrorCB(_error);
  9501. #endif
  9502. if (_context->err.callback)
  9503. _context->err.callback( _error );
  9504. }
  9505. }
  9506. }
  9507. static void REGAL_CALL error_glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
  9508. {
  9509. Internal("error_glMultiDrawArrays","()");
  9510. RegalContext *_context = REGAL_GET_CONTEXT();
  9511. RegalAssert(_context);
  9512. DispatchTableGL *_next = _context->dispatcher.error.next();
  9513. RegalAssert(_next);
  9514. GLenum _error = GL_NO_ERROR;
  9515. if (!_context->err.inBeginEnd)
  9516. _error = _next->call(&_next->glGetError)();
  9517. RegalAssert(_error==GL_NO_ERROR);
  9518. _next->call(&_next->glMultiDrawArrays)(mode, first, count, primcount);
  9519. if (!_context->err.inBeginEnd) {
  9520. _error = _next->call(&_next->glGetError)();
  9521. if (_error!=GL_NO_ERROR) {
  9522. Error("glMultiDrawArrays : ",Token::GLerrorToString(_error));
  9523. #if REGAL_BREAK
  9524. Break::ErrorCB(_error);
  9525. #endif
  9526. if (_context->err.callback)
  9527. _context->err.callback( _error );
  9528. }
  9529. }
  9530. }
  9531. static void REGAL_CALL error_glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount)
  9532. {
  9533. Internal("error_glMultiDrawElements","()");
  9534. RegalContext *_context = REGAL_GET_CONTEXT();
  9535. RegalAssert(_context);
  9536. DispatchTableGL *_next = _context->dispatcher.error.next();
  9537. RegalAssert(_next);
  9538. GLenum _error = GL_NO_ERROR;
  9539. if (!_context->err.inBeginEnd)
  9540. _error = _next->call(&_next->glGetError)();
  9541. RegalAssert(_error==GL_NO_ERROR);
  9542. _next->call(&_next->glMultiDrawElements)(mode, count, type, indices, primcount);
  9543. if (!_context->err.inBeginEnd) {
  9544. _error = _next->call(&_next->glGetError)();
  9545. if (_error!=GL_NO_ERROR) {
  9546. Error("glMultiDrawElements : ",Token::GLerrorToString(_error));
  9547. #if REGAL_BREAK
  9548. Break::ErrorCB(_error);
  9549. #endif
  9550. if (_context->err.callback)
  9551. _context->err.callback( _error );
  9552. }
  9553. }
  9554. }
  9555. static void REGAL_CALL error_glPointParameterf(GLenum pname, GLfloat param)
  9556. {
  9557. Internal("error_glPointParameterf","()");
  9558. RegalContext *_context = REGAL_GET_CONTEXT();
  9559. RegalAssert(_context);
  9560. DispatchTableGL *_next = _context->dispatcher.error.next();
  9561. RegalAssert(_next);
  9562. GLenum _error = GL_NO_ERROR;
  9563. if (!_context->err.inBeginEnd)
  9564. _error = _next->call(&_next->glGetError)();
  9565. RegalAssert(_error==GL_NO_ERROR);
  9566. _next->call(&_next->glPointParameterf)(pname, param);
  9567. if (!_context->err.inBeginEnd) {
  9568. _error = _next->call(&_next->glGetError)();
  9569. if (_error!=GL_NO_ERROR) {
  9570. Error("glPointParameterf : ",Token::GLerrorToString(_error));
  9571. #if REGAL_BREAK
  9572. Break::ErrorCB(_error);
  9573. #endif
  9574. if (_context->err.callback)
  9575. _context->err.callback( _error );
  9576. }
  9577. }
  9578. }
  9579. static void REGAL_CALL error_glPointParameterfv(GLenum pname, const GLfloat *params)
  9580. {
  9581. Internal("error_glPointParameterfv","()");
  9582. RegalContext *_context = REGAL_GET_CONTEXT();
  9583. RegalAssert(_context);
  9584. DispatchTableGL *_next = _context->dispatcher.error.next();
  9585. RegalAssert(_next);
  9586. GLenum _error = GL_NO_ERROR;
  9587. if (!_context->err.inBeginEnd)
  9588. _error = _next->call(&_next->glGetError)();
  9589. RegalAssert(_error==GL_NO_ERROR);
  9590. _next->call(&_next->glPointParameterfv)(pname, params);
  9591. if (!_context->err.inBeginEnd) {
  9592. _error = _next->call(&_next->glGetError)();
  9593. if (_error!=GL_NO_ERROR) {
  9594. Error("glPointParameterfv : ",Token::GLerrorToString(_error));
  9595. #if REGAL_BREAK
  9596. Break::ErrorCB(_error);
  9597. #endif
  9598. if (_context->err.callback)
  9599. _context->err.callback( _error );
  9600. }
  9601. }
  9602. }
  9603. static void REGAL_CALL error_glPointParameteri(GLenum pname, GLint param)
  9604. {
  9605. Internal("error_glPointParameteri","()");
  9606. RegalContext *_context = REGAL_GET_CONTEXT();
  9607. RegalAssert(_context);
  9608. DispatchTableGL *_next = _context->dispatcher.error.next();
  9609. RegalAssert(_next);
  9610. GLenum _error = GL_NO_ERROR;
  9611. if (!_context->err.inBeginEnd)
  9612. _error = _next->call(&_next->glGetError)();
  9613. RegalAssert(_error==GL_NO_ERROR);
  9614. _next->call(&_next->glPointParameteri)(pname, param);
  9615. if (!_context->err.inBeginEnd) {
  9616. _error = _next->call(&_next->glGetError)();
  9617. if (_error!=GL_NO_ERROR) {
  9618. Error("glPointParameteri : ",Token::GLerrorToString(_error));
  9619. #if REGAL_BREAK
  9620. Break::ErrorCB(_error);
  9621. #endif
  9622. if (_context->err.callback)
  9623. _context->err.callback( _error );
  9624. }
  9625. }
  9626. }
  9627. static void REGAL_CALL error_glPointParameteriv(GLenum pname, const GLint *params)
  9628. {
  9629. Internal("error_glPointParameteriv","()");
  9630. RegalContext *_context = REGAL_GET_CONTEXT();
  9631. RegalAssert(_context);
  9632. DispatchTableGL *_next = _context->dispatcher.error.next();
  9633. RegalAssert(_next);
  9634. GLenum _error = GL_NO_ERROR;
  9635. if (!_context->err.inBeginEnd)
  9636. _error = _next->call(&_next->glGetError)();
  9637. RegalAssert(_error==GL_NO_ERROR);
  9638. _next->call(&_next->glPointParameteriv)(pname, params);
  9639. if (!_context->err.inBeginEnd) {
  9640. _error = _next->call(&_next->glGetError)();
  9641. if (_error!=GL_NO_ERROR) {
  9642. Error("glPointParameteriv : ",Token::GLerrorToString(_error));
  9643. #if REGAL_BREAK
  9644. Break::ErrorCB(_error);
  9645. #endif
  9646. if (_context->err.callback)
  9647. _context->err.callback( _error );
  9648. }
  9649. }
  9650. }
  9651. static void REGAL_CALL error_glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue)
  9652. {
  9653. Internal("error_glSecondaryColor3b","()");
  9654. RegalContext *_context = REGAL_GET_CONTEXT();
  9655. RegalAssert(_context);
  9656. DispatchTableGL *_next = _context->dispatcher.error.next();
  9657. RegalAssert(_next);
  9658. GLenum _error = GL_NO_ERROR;
  9659. if (!_context->err.inBeginEnd)
  9660. _error = _next->call(&_next->glGetError)();
  9661. RegalAssert(_error==GL_NO_ERROR);
  9662. _next->call(&_next->glSecondaryColor3b)(red, green, blue);
  9663. if (!_context->err.inBeginEnd) {
  9664. _error = _next->call(&_next->glGetError)();
  9665. if (_error!=GL_NO_ERROR) {
  9666. Error("glSecondaryColor3b : ",Token::GLerrorToString(_error));
  9667. #if REGAL_BREAK
  9668. Break::ErrorCB(_error);
  9669. #endif
  9670. if (_context->err.callback)
  9671. _context->err.callback( _error );
  9672. }
  9673. }
  9674. }
  9675. static void REGAL_CALL error_glSecondaryColor3bv(const GLbyte *v)
  9676. {
  9677. Internal("error_glSecondaryColor3bv","()");
  9678. RegalContext *_context = REGAL_GET_CONTEXT();
  9679. RegalAssert(_context);
  9680. DispatchTableGL *_next = _context->dispatcher.error.next();
  9681. RegalAssert(_next);
  9682. GLenum _error = GL_NO_ERROR;
  9683. if (!_context->err.inBeginEnd)
  9684. _error = _next->call(&_next->glGetError)();
  9685. RegalAssert(_error==GL_NO_ERROR);
  9686. _next->call(&_next->glSecondaryColor3bv)(v);
  9687. if (!_context->err.inBeginEnd) {
  9688. _error = _next->call(&_next->glGetError)();
  9689. if (_error!=GL_NO_ERROR) {
  9690. Error("glSecondaryColor3bv : ",Token::GLerrorToString(_error));
  9691. #if REGAL_BREAK
  9692. Break::ErrorCB(_error);
  9693. #endif
  9694. if (_context->err.callback)
  9695. _context->err.callback( _error );
  9696. }
  9697. }
  9698. }
  9699. static void REGAL_CALL error_glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue)
  9700. {
  9701. Internal("error_glSecondaryColor3d","()");
  9702. RegalContext *_context = REGAL_GET_CONTEXT();
  9703. RegalAssert(_context);
  9704. DispatchTableGL *_next = _context->dispatcher.error.next();
  9705. RegalAssert(_next);
  9706. GLenum _error = GL_NO_ERROR;
  9707. if (!_context->err.inBeginEnd)
  9708. _error = _next->call(&_next->glGetError)();
  9709. RegalAssert(_error==GL_NO_ERROR);
  9710. _next->call(&_next->glSecondaryColor3d)(red, green, blue);
  9711. if (!_context->err.inBeginEnd) {
  9712. _error = _next->call(&_next->glGetError)();
  9713. if (_error!=GL_NO_ERROR) {
  9714. Error("glSecondaryColor3d : ",Token::GLerrorToString(_error));
  9715. #if REGAL_BREAK
  9716. Break::ErrorCB(_error);
  9717. #endif
  9718. if (_context->err.callback)
  9719. _context->err.callback( _error );
  9720. }
  9721. }
  9722. }
  9723. static void REGAL_CALL error_glSecondaryColor3dv(const GLdouble *v)
  9724. {
  9725. Internal("error_glSecondaryColor3dv","()");
  9726. RegalContext *_context = REGAL_GET_CONTEXT();
  9727. RegalAssert(_context);
  9728. DispatchTableGL *_next = _context->dispatcher.error.next();
  9729. RegalAssert(_next);
  9730. GLenum _error = GL_NO_ERROR;
  9731. if (!_context->err.inBeginEnd)
  9732. _error = _next->call(&_next->glGetError)();
  9733. RegalAssert(_error==GL_NO_ERROR);
  9734. _next->call(&_next->glSecondaryColor3dv)(v);
  9735. if (!_context->err.inBeginEnd) {
  9736. _error = _next->call(&_next->glGetError)();
  9737. if (_error!=GL_NO_ERROR) {
  9738. Error("glSecondaryColor3dv : ",Token::GLerrorToString(_error));
  9739. #if REGAL_BREAK
  9740. Break::ErrorCB(_error);
  9741. #endif
  9742. if (_context->err.callback)
  9743. _context->err.callback( _error );
  9744. }
  9745. }
  9746. }
  9747. static void REGAL_CALL error_glSecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue)
  9748. {
  9749. Internal("error_glSecondaryColor3f","()");
  9750. RegalContext *_context = REGAL_GET_CONTEXT();
  9751. RegalAssert(_context);
  9752. DispatchTableGL *_next = _context->dispatcher.error.next();
  9753. RegalAssert(_next);
  9754. GLenum _error = GL_NO_ERROR;
  9755. if (!_context->err.inBeginEnd)
  9756. _error = _next->call(&_next->glGetError)();
  9757. RegalAssert(_error==GL_NO_ERROR);
  9758. _next->call(&_next->glSecondaryColor3f)(red, green, blue);
  9759. if (!_context->err.inBeginEnd) {
  9760. _error = _next->call(&_next->glGetError)();
  9761. if (_error!=GL_NO_ERROR) {
  9762. Error("glSecondaryColor3f : ",Token::GLerrorToString(_error));
  9763. #if REGAL_BREAK
  9764. Break::ErrorCB(_error);
  9765. #endif
  9766. if (_context->err.callback)
  9767. _context->err.callback( _error );
  9768. }
  9769. }
  9770. }
  9771. static void REGAL_CALL error_glSecondaryColor3fv(const GLfloat *v)
  9772. {
  9773. Internal("error_glSecondaryColor3fv","()");
  9774. RegalContext *_context = REGAL_GET_CONTEXT();
  9775. RegalAssert(_context);
  9776. DispatchTableGL *_next = _context->dispatcher.error.next();
  9777. RegalAssert(_next);
  9778. GLenum _error = GL_NO_ERROR;
  9779. if (!_context->err.inBeginEnd)
  9780. _error = _next->call(&_next->glGetError)();
  9781. RegalAssert(_error==GL_NO_ERROR);
  9782. _next->call(&_next->glSecondaryColor3fv)(v);
  9783. if (!_context->err.inBeginEnd) {
  9784. _error = _next->call(&_next->glGetError)();
  9785. if (_error!=GL_NO_ERROR) {
  9786. Error("glSecondaryColor3fv : ",Token::GLerrorToString(_error));
  9787. #if REGAL_BREAK
  9788. Break::ErrorCB(_error);
  9789. #endif
  9790. if (_context->err.callback)
  9791. _context->err.callback( _error );
  9792. }
  9793. }
  9794. }
  9795. static void REGAL_CALL error_glSecondaryColor3i(GLint red, GLint green, GLint blue)
  9796. {
  9797. Internal("error_glSecondaryColor3i","()");
  9798. RegalContext *_context = REGAL_GET_CONTEXT();
  9799. RegalAssert(_context);
  9800. DispatchTableGL *_next = _context->dispatcher.error.next();
  9801. RegalAssert(_next);
  9802. GLenum _error = GL_NO_ERROR;
  9803. if (!_context->err.inBeginEnd)
  9804. _error = _next->call(&_next->glGetError)();
  9805. RegalAssert(_error==GL_NO_ERROR);
  9806. _next->call(&_next->glSecondaryColor3i)(red, green, blue);
  9807. if (!_context->err.inBeginEnd) {
  9808. _error = _next->call(&_next->glGetError)();
  9809. if (_error!=GL_NO_ERROR) {
  9810. Error("glSecondaryColor3i : ",Token::GLerrorToString(_error));
  9811. #if REGAL_BREAK
  9812. Break::ErrorCB(_error);
  9813. #endif
  9814. if (_context->err.callback)
  9815. _context->err.callback( _error );
  9816. }
  9817. }
  9818. }
  9819. static void REGAL_CALL error_glSecondaryColor3iv(const GLint *v)
  9820. {
  9821. Internal("error_glSecondaryColor3iv","()");
  9822. RegalContext *_context = REGAL_GET_CONTEXT();
  9823. RegalAssert(_context);
  9824. DispatchTableGL *_next = _context->dispatcher.error.next();
  9825. RegalAssert(_next);
  9826. GLenum _error = GL_NO_ERROR;
  9827. if (!_context->err.inBeginEnd)
  9828. _error = _next->call(&_next->glGetError)();
  9829. RegalAssert(_error==GL_NO_ERROR);
  9830. _next->call(&_next->glSecondaryColor3iv)(v);
  9831. if (!_context->err.inBeginEnd) {
  9832. _error = _next->call(&_next->glGetError)();
  9833. if (_error!=GL_NO_ERROR) {
  9834. Error("glSecondaryColor3iv : ",Token::GLerrorToString(_error));
  9835. #if REGAL_BREAK
  9836. Break::ErrorCB(_error);
  9837. #endif
  9838. if (_context->err.callback)
  9839. _context->err.callback( _error );
  9840. }
  9841. }
  9842. }
  9843. static void REGAL_CALL error_glSecondaryColor3s(GLshort red, GLshort green, GLshort blue)
  9844. {
  9845. Internal("error_glSecondaryColor3s","()");
  9846. RegalContext *_context = REGAL_GET_CONTEXT();
  9847. RegalAssert(_context);
  9848. DispatchTableGL *_next = _context->dispatcher.error.next();
  9849. RegalAssert(_next);
  9850. GLenum _error = GL_NO_ERROR;
  9851. if (!_context->err.inBeginEnd)
  9852. _error = _next->call(&_next->glGetError)();
  9853. RegalAssert(_error==GL_NO_ERROR);
  9854. _next->call(&_next->glSecondaryColor3s)(red, green, blue);
  9855. if (!_context->err.inBeginEnd) {
  9856. _error = _next->call(&_next->glGetError)();
  9857. if (_error!=GL_NO_ERROR) {
  9858. Error("glSecondaryColor3s : ",Token::GLerrorToString(_error));
  9859. #if REGAL_BREAK
  9860. Break::ErrorCB(_error);
  9861. #endif
  9862. if (_context->err.callback)
  9863. _context->err.callback( _error );
  9864. }
  9865. }
  9866. }
  9867. static void REGAL_CALL error_glSecondaryColor3sv(const GLshort *v)
  9868. {
  9869. Internal("error_glSecondaryColor3sv","()");
  9870. RegalContext *_context = REGAL_GET_CONTEXT();
  9871. RegalAssert(_context);
  9872. DispatchTableGL *_next = _context->dispatcher.error.next();
  9873. RegalAssert(_next);
  9874. GLenum _error = GL_NO_ERROR;
  9875. if (!_context->err.inBeginEnd)
  9876. _error = _next->call(&_next->glGetError)();
  9877. RegalAssert(_error==GL_NO_ERROR);
  9878. _next->call(&_next->glSecondaryColor3sv)(v);
  9879. if (!_context->err.inBeginEnd) {
  9880. _error = _next->call(&_next->glGetError)();
  9881. if (_error!=GL_NO_ERROR) {
  9882. Error("glSecondaryColor3sv : ",Token::GLerrorToString(_error));
  9883. #if REGAL_BREAK
  9884. Break::ErrorCB(_error);
  9885. #endif
  9886. if (_context->err.callback)
  9887. _context->err.callback( _error );
  9888. }
  9889. }
  9890. }
  9891. static void REGAL_CALL error_glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue)
  9892. {
  9893. Internal("error_glSecondaryColor3ub","()");
  9894. RegalContext *_context = REGAL_GET_CONTEXT();
  9895. RegalAssert(_context);
  9896. DispatchTableGL *_next = _context->dispatcher.error.next();
  9897. RegalAssert(_next);
  9898. GLenum _error = GL_NO_ERROR;
  9899. if (!_context->err.inBeginEnd)
  9900. _error = _next->call(&_next->glGetError)();
  9901. RegalAssert(_error==GL_NO_ERROR);
  9902. _next->call(&_next->glSecondaryColor3ub)(red, green, blue);
  9903. if (!_context->err.inBeginEnd) {
  9904. _error = _next->call(&_next->glGetError)();
  9905. if (_error!=GL_NO_ERROR) {
  9906. Error("glSecondaryColor3ub : ",Token::GLerrorToString(_error));
  9907. #if REGAL_BREAK
  9908. Break::ErrorCB(_error);
  9909. #endif
  9910. if (_context->err.callback)
  9911. _context->err.callback( _error );
  9912. }
  9913. }
  9914. }
  9915. static void REGAL_CALL error_glSecondaryColor3ubv(const GLubyte *v)
  9916. {
  9917. Internal("error_glSecondaryColor3ubv","()");
  9918. RegalContext *_context = REGAL_GET_CONTEXT();
  9919. RegalAssert(_context);
  9920. DispatchTableGL *_next = _context->dispatcher.error.next();
  9921. RegalAssert(_next);
  9922. GLenum _error = GL_NO_ERROR;
  9923. if (!_context->err.inBeginEnd)
  9924. _error = _next->call(&_next->glGetError)();
  9925. RegalAssert(_error==GL_NO_ERROR);
  9926. _next->call(&_next->glSecondaryColor3ubv)(v);
  9927. if (!_context->err.inBeginEnd) {
  9928. _error = _next->call(&_next->glGetError)();
  9929. if (_error!=GL_NO_ERROR) {
  9930. Error("glSecondaryColor3ubv : ",Token::GLerrorToString(_error));
  9931. #if REGAL_BREAK
  9932. Break::ErrorCB(_error);
  9933. #endif
  9934. if (_context->err.callback)
  9935. _context->err.callback( _error );
  9936. }
  9937. }
  9938. }
  9939. static void REGAL_CALL error_glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue)
  9940. {
  9941. Internal("error_glSecondaryColor3ui","()");
  9942. RegalContext *_context = REGAL_GET_CONTEXT();
  9943. RegalAssert(_context);
  9944. DispatchTableGL *_next = _context->dispatcher.error.next();
  9945. RegalAssert(_next);
  9946. GLenum _error = GL_NO_ERROR;
  9947. if (!_context->err.inBeginEnd)
  9948. _error = _next->call(&_next->glGetError)();
  9949. RegalAssert(_error==GL_NO_ERROR);
  9950. _next->call(&_next->glSecondaryColor3ui)(red, green, blue);
  9951. if (!_context->err.inBeginEnd) {
  9952. _error = _next->call(&_next->glGetError)();
  9953. if (_error!=GL_NO_ERROR) {
  9954. Error("glSecondaryColor3ui : ",Token::GLerrorToString(_error));
  9955. #if REGAL_BREAK
  9956. Break::ErrorCB(_error);
  9957. #endif
  9958. if (_context->err.callback)
  9959. _context->err.callback( _error );
  9960. }
  9961. }
  9962. }
  9963. static void REGAL_CALL error_glSecondaryColor3uiv(const GLuint *v)
  9964. {
  9965. Internal("error_glSecondaryColor3uiv","()");
  9966. RegalContext *_context = REGAL_GET_CONTEXT();
  9967. RegalAssert(_context);
  9968. DispatchTableGL *_next = _context->dispatcher.error.next();
  9969. RegalAssert(_next);
  9970. GLenum _error = GL_NO_ERROR;
  9971. if (!_context->err.inBeginEnd)
  9972. _error = _next->call(&_next->glGetError)();
  9973. RegalAssert(_error==GL_NO_ERROR);
  9974. _next->call(&_next->glSecondaryColor3uiv)(v);
  9975. if (!_context->err.inBeginEnd) {
  9976. _error = _next->call(&_next->glGetError)();
  9977. if (_error!=GL_NO_ERROR) {
  9978. Error("glSecondaryColor3uiv : ",Token::GLerrorToString(_error));
  9979. #if REGAL_BREAK
  9980. Break::ErrorCB(_error);
  9981. #endif
  9982. if (_context->err.callback)
  9983. _context->err.callback( _error );
  9984. }
  9985. }
  9986. }
  9987. static void REGAL_CALL error_glSecondaryColor3us(GLushort red, GLushort green, GLushort blue)
  9988. {
  9989. Internal("error_glSecondaryColor3us","()");
  9990. RegalContext *_context = REGAL_GET_CONTEXT();
  9991. RegalAssert(_context);
  9992. DispatchTableGL *_next = _context->dispatcher.error.next();
  9993. RegalAssert(_next);
  9994. GLenum _error = GL_NO_ERROR;
  9995. if (!_context->err.inBeginEnd)
  9996. _error = _next->call(&_next->glGetError)();
  9997. RegalAssert(_error==GL_NO_ERROR);
  9998. _next->call(&_next->glSecondaryColor3us)(red, green, blue);
  9999. if (!_context->err.inBeginEnd) {
  10000. _error = _next->call(&_next->glGetError)();
  10001. if (_error!=GL_NO_ERROR) {
  10002. Error("glSecondaryColor3us : ",Token::GLerrorToString(_error));
  10003. #if REGAL_BREAK
  10004. Break::ErrorCB(_error);
  10005. #endif
  10006. if (_context->err.callback)
  10007. _context->err.callback( _error );
  10008. }
  10009. }
  10010. }
  10011. static void REGAL_CALL error_glSecondaryColor3usv(const GLushort *v)
  10012. {
  10013. Internal("error_glSecondaryColor3usv","()");
  10014. RegalContext *_context = REGAL_GET_CONTEXT();
  10015. RegalAssert(_context);
  10016. DispatchTableGL *_next = _context->dispatcher.error.next();
  10017. RegalAssert(_next);
  10018. GLenum _error = GL_NO_ERROR;
  10019. if (!_context->err.inBeginEnd)
  10020. _error = _next->call(&_next->glGetError)();
  10021. RegalAssert(_error==GL_NO_ERROR);
  10022. _next->call(&_next->glSecondaryColor3usv)(v);
  10023. if (!_context->err.inBeginEnd) {
  10024. _error = _next->call(&_next->glGetError)();
  10025. if (_error!=GL_NO_ERROR) {
  10026. Error("glSecondaryColor3usv : ",Token::GLerrorToString(_error));
  10027. #if REGAL_BREAK
  10028. Break::ErrorCB(_error);
  10029. #endif
  10030. if (_context->err.callback)
  10031. _context->err.callback( _error );
  10032. }
  10033. }
  10034. }
  10035. static void REGAL_CALL error_glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  10036. {
  10037. Internal("error_glSecondaryColorPointer","()");
  10038. RegalContext *_context = REGAL_GET_CONTEXT();
  10039. RegalAssert(_context);
  10040. DispatchTableGL *_next = _context->dispatcher.error.next();
  10041. RegalAssert(_next);
  10042. GLenum _error = GL_NO_ERROR;
  10043. if (!_context->err.inBeginEnd)
  10044. _error = _next->call(&_next->glGetError)();
  10045. RegalAssert(_error==GL_NO_ERROR);
  10046. _next->call(&_next->glSecondaryColorPointer)(size, type, stride, pointer);
  10047. if (!_context->err.inBeginEnd) {
  10048. _error = _next->call(&_next->glGetError)();
  10049. if (_error!=GL_NO_ERROR) {
  10050. Error("glSecondaryColorPointer : ",Token::GLerrorToString(_error));
  10051. #if REGAL_BREAK
  10052. Break::ErrorCB(_error);
  10053. #endif
  10054. if (_context->err.callback)
  10055. _context->err.callback( _error );
  10056. }
  10057. }
  10058. }
  10059. static void REGAL_CALL error_glWindowPos2d(GLdouble x, GLdouble y)
  10060. {
  10061. Internal("error_glWindowPos2d","()");
  10062. RegalContext *_context = REGAL_GET_CONTEXT();
  10063. RegalAssert(_context);
  10064. DispatchTableGL *_next = _context->dispatcher.error.next();
  10065. RegalAssert(_next);
  10066. GLenum _error = GL_NO_ERROR;
  10067. if (!_context->err.inBeginEnd)
  10068. _error = _next->call(&_next->glGetError)();
  10069. RegalAssert(_error==GL_NO_ERROR);
  10070. _next->call(&_next->glWindowPos2d)(x, y);
  10071. if (!_context->err.inBeginEnd) {
  10072. _error = _next->call(&_next->glGetError)();
  10073. if (_error!=GL_NO_ERROR) {
  10074. Error("glWindowPos2d : ",Token::GLerrorToString(_error));
  10075. #if REGAL_BREAK
  10076. Break::ErrorCB(_error);
  10077. #endif
  10078. if (_context->err.callback)
  10079. _context->err.callback( _error );
  10080. }
  10081. }
  10082. }
  10083. static void REGAL_CALL error_glWindowPos2dv(const GLdouble *p)
  10084. {
  10085. Internal("error_glWindowPos2dv","()");
  10086. RegalContext *_context = REGAL_GET_CONTEXT();
  10087. RegalAssert(_context);
  10088. DispatchTableGL *_next = _context->dispatcher.error.next();
  10089. RegalAssert(_next);
  10090. GLenum _error = GL_NO_ERROR;
  10091. if (!_context->err.inBeginEnd)
  10092. _error = _next->call(&_next->glGetError)();
  10093. RegalAssert(_error==GL_NO_ERROR);
  10094. _next->call(&_next->glWindowPos2dv)(p);
  10095. if (!_context->err.inBeginEnd) {
  10096. _error = _next->call(&_next->glGetError)();
  10097. if (_error!=GL_NO_ERROR) {
  10098. Error("glWindowPos2dv : ",Token::GLerrorToString(_error));
  10099. #if REGAL_BREAK
  10100. Break::ErrorCB(_error);
  10101. #endif
  10102. if (_context->err.callback)
  10103. _context->err.callback( _error );
  10104. }
  10105. }
  10106. }
  10107. static void REGAL_CALL error_glWindowPos2f(GLfloat x, GLfloat y)
  10108. {
  10109. Internal("error_glWindowPos2f","()");
  10110. RegalContext *_context = REGAL_GET_CONTEXT();
  10111. RegalAssert(_context);
  10112. DispatchTableGL *_next = _context->dispatcher.error.next();
  10113. RegalAssert(_next);
  10114. GLenum _error = GL_NO_ERROR;
  10115. if (!_context->err.inBeginEnd)
  10116. _error = _next->call(&_next->glGetError)();
  10117. RegalAssert(_error==GL_NO_ERROR);
  10118. _next->call(&_next->glWindowPos2f)(x, y);
  10119. if (!_context->err.inBeginEnd) {
  10120. _error = _next->call(&_next->glGetError)();
  10121. if (_error!=GL_NO_ERROR) {
  10122. Error("glWindowPos2f : ",Token::GLerrorToString(_error));
  10123. #if REGAL_BREAK
  10124. Break::ErrorCB(_error);
  10125. #endif
  10126. if (_context->err.callback)
  10127. _context->err.callback( _error );
  10128. }
  10129. }
  10130. }
  10131. static void REGAL_CALL error_glWindowPos2fv(const GLfloat *p)
  10132. {
  10133. Internal("error_glWindowPos2fv","()");
  10134. RegalContext *_context = REGAL_GET_CONTEXT();
  10135. RegalAssert(_context);
  10136. DispatchTableGL *_next = _context->dispatcher.error.next();
  10137. RegalAssert(_next);
  10138. GLenum _error = GL_NO_ERROR;
  10139. if (!_context->err.inBeginEnd)
  10140. _error = _next->call(&_next->glGetError)();
  10141. RegalAssert(_error==GL_NO_ERROR);
  10142. _next->call(&_next->glWindowPos2fv)(p);
  10143. if (!_context->err.inBeginEnd) {
  10144. _error = _next->call(&_next->glGetError)();
  10145. if (_error!=GL_NO_ERROR) {
  10146. Error("glWindowPos2fv : ",Token::GLerrorToString(_error));
  10147. #if REGAL_BREAK
  10148. Break::ErrorCB(_error);
  10149. #endif
  10150. if (_context->err.callback)
  10151. _context->err.callback( _error );
  10152. }
  10153. }
  10154. }
  10155. static void REGAL_CALL error_glWindowPos2i(GLint x, GLint y)
  10156. {
  10157. Internal("error_glWindowPos2i","()");
  10158. RegalContext *_context = REGAL_GET_CONTEXT();
  10159. RegalAssert(_context);
  10160. DispatchTableGL *_next = _context->dispatcher.error.next();
  10161. RegalAssert(_next);
  10162. GLenum _error = GL_NO_ERROR;
  10163. if (!_context->err.inBeginEnd)
  10164. _error = _next->call(&_next->glGetError)();
  10165. RegalAssert(_error==GL_NO_ERROR);
  10166. _next->call(&_next->glWindowPos2i)(x, y);
  10167. if (!_context->err.inBeginEnd) {
  10168. _error = _next->call(&_next->glGetError)();
  10169. if (_error!=GL_NO_ERROR) {
  10170. Error("glWindowPos2i : ",Token::GLerrorToString(_error));
  10171. #if REGAL_BREAK
  10172. Break::ErrorCB(_error);
  10173. #endif
  10174. if (_context->err.callback)
  10175. _context->err.callback( _error );
  10176. }
  10177. }
  10178. }
  10179. static void REGAL_CALL error_glWindowPos2iv(const GLint *p)
  10180. {
  10181. Internal("error_glWindowPos2iv","()");
  10182. RegalContext *_context = REGAL_GET_CONTEXT();
  10183. RegalAssert(_context);
  10184. DispatchTableGL *_next = _context->dispatcher.error.next();
  10185. RegalAssert(_next);
  10186. GLenum _error = GL_NO_ERROR;
  10187. if (!_context->err.inBeginEnd)
  10188. _error = _next->call(&_next->glGetError)();
  10189. RegalAssert(_error==GL_NO_ERROR);
  10190. _next->call(&_next->glWindowPos2iv)(p);
  10191. if (!_context->err.inBeginEnd) {
  10192. _error = _next->call(&_next->glGetError)();
  10193. if (_error!=GL_NO_ERROR) {
  10194. Error("glWindowPos2iv : ",Token::GLerrorToString(_error));
  10195. #if REGAL_BREAK
  10196. Break::ErrorCB(_error);
  10197. #endif
  10198. if (_context->err.callback)
  10199. _context->err.callback( _error );
  10200. }
  10201. }
  10202. }
  10203. static void REGAL_CALL error_glWindowPos2s(GLshort x, GLshort y)
  10204. {
  10205. Internal("error_glWindowPos2s","()");
  10206. RegalContext *_context = REGAL_GET_CONTEXT();
  10207. RegalAssert(_context);
  10208. DispatchTableGL *_next = _context->dispatcher.error.next();
  10209. RegalAssert(_next);
  10210. GLenum _error = GL_NO_ERROR;
  10211. if (!_context->err.inBeginEnd)
  10212. _error = _next->call(&_next->glGetError)();
  10213. RegalAssert(_error==GL_NO_ERROR);
  10214. _next->call(&_next->glWindowPos2s)(x, y);
  10215. if (!_context->err.inBeginEnd) {
  10216. _error = _next->call(&_next->glGetError)();
  10217. if (_error!=GL_NO_ERROR) {
  10218. Error("glWindowPos2s : ",Token::GLerrorToString(_error));
  10219. #if REGAL_BREAK
  10220. Break::ErrorCB(_error);
  10221. #endif
  10222. if (_context->err.callback)
  10223. _context->err.callback( _error );
  10224. }
  10225. }
  10226. }
  10227. static void REGAL_CALL error_glWindowPos2sv(const GLshort *p)
  10228. {
  10229. Internal("error_glWindowPos2sv","()");
  10230. RegalContext *_context = REGAL_GET_CONTEXT();
  10231. RegalAssert(_context);
  10232. DispatchTableGL *_next = _context->dispatcher.error.next();
  10233. RegalAssert(_next);
  10234. GLenum _error = GL_NO_ERROR;
  10235. if (!_context->err.inBeginEnd)
  10236. _error = _next->call(&_next->glGetError)();
  10237. RegalAssert(_error==GL_NO_ERROR);
  10238. _next->call(&_next->glWindowPos2sv)(p);
  10239. if (!_context->err.inBeginEnd) {
  10240. _error = _next->call(&_next->glGetError)();
  10241. if (_error!=GL_NO_ERROR) {
  10242. Error("glWindowPos2sv : ",Token::GLerrorToString(_error));
  10243. #if REGAL_BREAK
  10244. Break::ErrorCB(_error);
  10245. #endif
  10246. if (_context->err.callback)
  10247. _context->err.callback( _error );
  10248. }
  10249. }
  10250. }
  10251. static void REGAL_CALL error_glWindowPos3d(GLdouble x, GLdouble y, GLdouble z)
  10252. {
  10253. Internal("error_glWindowPos3d","()");
  10254. RegalContext *_context = REGAL_GET_CONTEXT();
  10255. RegalAssert(_context);
  10256. DispatchTableGL *_next = _context->dispatcher.error.next();
  10257. RegalAssert(_next);
  10258. GLenum _error = GL_NO_ERROR;
  10259. if (!_context->err.inBeginEnd)
  10260. _error = _next->call(&_next->glGetError)();
  10261. RegalAssert(_error==GL_NO_ERROR);
  10262. _next->call(&_next->glWindowPos3d)(x, y, z);
  10263. if (!_context->err.inBeginEnd) {
  10264. _error = _next->call(&_next->glGetError)();
  10265. if (_error!=GL_NO_ERROR) {
  10266. Error("glWindowPos3d : ",Token::GLerrorToString(_error));
  10267. #if REGAL_BREAK
  10268. Break::ErrorCB(_error);
  10269. #endif
  10270. if (_context->err.callback)
  10271. _context->err.callback( _error );
  10272. }
  10273. }
  10274. }
  10275. static void REGAL_CALL error_glWindowPos3dv(const GLdouble *p)
  10276. {
  10277. Internal("error_glWindowPos3dv","()");
  10278. RegalContext *_context = REGAL_GET_CONTEXT();
  10279. RegalAssert(_context);
  10280. DispatchTableGL *_next = _context->dispatcher.error.next();
  10281. RegalAssert(_next);
  10282. GLenum _error = GL_NO_ERROR;
  10283. if (!_context->err.inBeginEnd)
  10284. _error = _next->call(&_next->glGetError)();
  10285. RegalAssert(_error==GL_NO_ERROR);
  10286. _next->call(&_next->glWindowPos3dv)(p);
  10287. if (!_context->err.inBeginEnd) {
  10288. _error = _next->call(&_next->glGetError)();
  10289. if (_error!=GL_NO_ERROR) {
  10290. Error("glWindowPos3dv : ",Token::GLerrorToString(_error));
  10291. #if REGAL_BREAK
  10292. Break::ErrorCB(_error);
  10293. #endif
  10294. if (_context->err.callback)
  10295. _context->err.callback( _error );
  10296. }
  10297. }
  10298. }
  10299. static void REGAL_CALL error_glWindowPos3f(GLfloat x, GLfloat y, GLfloat z)
  10300. {
  10301. Internal("error_glWindowPos3f","()");
  10302. RegalContext *_context = REGAL_GET_CONTEXT();
  10303. RegalAssert(_context);
  10304. DispatchTableGL *_next = _context->dispatcher.error.next();
  10305. RegalAssert(_next);
  10306. GLenum _error = GL_NO_ERROR;
  10307. if (!_context->err.inBeginEnd)
  10308. _error = _next->call(&_next->glGetError)();
  10309. RegalAssert(_error==GL_NO_ERROR);
  10310. _next->call(&_next->glWindowPos3f)(x, y, z);
  10311. if (!_context->err.inBeginEnd) {
  10312. _error = _next->call(&_next->glGetError)();
  10313. if (_error!=GL_NO_ERROR) {
  10314. Error("glWindowPos3f : ",Token::GLerrorToString(_error));
  10315. #if REGAL_BREAK
  10316. Break::ErrorCB(_error);
  10317. #endif
  10318. if (_context->err.callback)
  10319. _context->err.callback( _error );
  10320. }
  10321. }
  10322. }
  10323. static void REGAL_CALL error_glWindowPos3fv(const GLfloat *p)
  10324. {
  10325. Internal("error_glWindowPos3fv","()");
  10326. RegalContext *_context = REGAL_GET_CONTEXT();
  10327. RegalAssert(_context);
  10328. DispatchTableGL *_next = _context->dispatcher.error.next();
  10329. RegalAssert(_next);
  10330. GLenum _error = GL_NO_ERROR;
  10331. if (!_context->err.inBeginEnd)
  10332. _error = _next->call(&_next->glGetError)();
  10333. RegalAssert(_error==GL_NO_ERROR);
  10334. _next->call(&_next->glWindowPos3fv)(p);
  10335. if (!_context->err.inBeginEnd) {
  10336. _error = _next->call(&_next->glGetError)();
  10337. if (_error!=GL_NO_ERROR) {
  10338. Error("glWindowPos3fv : ",Token::GLerrorToString(_error));
  10339. #if REGAL_BREAK
  10340. Break::ErrorCB(_error);
  10341. #endif
  10342. if (_context->err.callback)
  10343. _context->err.callback( _error );
  10344. }
  10345. }
  10346. }
  10347. static void REGAL_CALL error_glWindowPos3i(GLint x, GLint y, GLint z)
  10348. {
  10349. Internal("error_glWindowPos3i","()");
  10350. RegalContext *_context = REGAL_GET_CONTEXT();
  10351. RegalAssert(_context);
  10352. DispatchTableGL *_next = _context->dispatcher.error.next();
  10353. RegalAssert(_next);
  10354. GLenum _error = GL_NO_ERROR;
  10355. if (!_context->err.inBeginEnd)
  10356. _error = _next->call(&_next->glGetError)();
  10357. RegalAssert(_error==GL_NO_ERROR);
  10358. _next->call(&_next->glWindowPos3i)(x, y, z);
  10359. if (!_context->err.inBeginEnd) {
  10360. _error = _next->call(&_next->glGetError)();
  10361. if (_error!=GL_NO_ERROR) {
  10362. Error("glWindowPos3i : ",Token::GLerrorToString(_error));
  10363. #if REGAL_BREAK
  10364. Break::ErrorCB(_error);
  10365. #endif
  10366. if (_context->err.callback)
  10367. _context->err.callback( _error );
  10368. }
  10369. }
  10370. }
  10371. static void REGAL_CALL error_glWindowPos3iv(const GLint *p)
  10372. {
  10373. Internal("error_glWindowPos3iv","()");
  10374. RegalContext *_context = REGAL_GET_CONTEXT();
  10375. RegalAssert(_context);
  10376. DispatchTableGL *_next = _context->dispatcher.error.next();
  10377. RegalAssert(_next);
  10378. GLenum _error = GL_NO_ERROR;
  10379. if (!_context->err.inBeginEnd)
  10380. _error = _next->call(&_next->glGetError)();
  10381. RegalAssert(_error==GL_NO_ERROR);
  10382. _next->call(&_next->glWindowPos3iv)(p);
  10383. if (!_context->err.inBeginEnd) {
  10384. _error = _next->call(&_next->glGetError)();
  10385. if (_error!=GL_NO_ERROR) {
  10386. Error("glWindowPos3iv : ",Token::GLerrorToString(_error));
  10387. #if REGAL_BREAK
  10388. Break::ErrorCB(_error);
  10389. #endif
  10390. if (_context->err.callback)
  10391. _context->err.callback( _error );
  10392. }
  10393. }
  10394. }
  10395. static void REGAL_CALL error_glWindowPos3s(GLshort x, GLshort y, GLshort z)
  10396. {
  10397. Internal("error_glWindowPos3s","()");
  10398. RegalContext *_context = REGAL_GET_CONTEXT();
  10399. RegalAssert(_context);
  10400. DispatchTableGL *_next = _context->dispatcher.error.next();
  10401. RegalAssert(_next);
  10402. GLenum _error = GL_NO_ERROR;
  10403. if (!_context->err.inBeginEnd)
  10404. _error = _next->call(&_next->glGetError)();
  10405. RegalAssert(_error==GL_NO_ERROR);
  10406. _next->call(&_next->glWindowPos3s)(x, y, z);
  10407. if (!_context->err.inBeginEnd) {
  10408. _error = _next->call(&_next->glGetError)();
  10409. if (_error!=GL_NO_ERROR) {
  10410. Error("glWindowPos3s : ",Token::GLerrorToString(_error));
  10411. #if REGAL_BREAK
  10412. Break::ErrorCB(_error);
  10413. #endif
  10414. if (_context->err.callback)
  10415. _context->err.callback( _error );
  10416. }
  10417. }
  10418. }
  10419. static void REGAL_CALL error_glWindowPos3sv(const GLshort *p)
  10420. {
  10421. Internal("error_glWindowPos3sv","()");
  10422. RegalContext *_context = REGAL_GET_CONTEXT();
  10423. RegalAssert(_context);
  10424. DispatchTableGL *_next = _context->dispatcher.error.next();
  10425. RegalAssert(_next);
  10426. GLenum _error = GL_NO_ERROR;
  10427. if (!_context->err.inBeginEnd)
  10428. _error = _next->call(&_next->glGetError)();
  10429. RegalAssert(_error==GL_NO_ERROR);
  10430. _next->call(&_next->glWindowPos3sv)(p);
  10431. if (!_context->err.inBeginEnd) {
  10432. _error = _next->call(&_next->glGetError)();
  10433. if (_error!=GL_NO_ERROR) {
  10434. Error("glWindowPos3sv : ",Token::GLerrorToString(_error));
  10435. #if REGAL_BREAK
  10436. Break::ErrorCB(_error);
  10437. #endif
  10438. if (_context->err.callback)
  10439. _context->err.callback( _error );
  10440. }
  10441. }
  10442. }
  10443. // GL_VERSION_1_5
  10444. static void REGAL_CALL error_glBeginQuery(GLenum target, GLuint id)
  10445. {
  10446. Internal("error_glBeginQuery","()");
  10447. RegalContext *_context = REGAL_GET_CONTEXT();
  10448. RegalAssert(_context);
  10449. DispatchTableGL *_next = _context->dispatcher.error.next();
  10450. RegalAssert(_next);
  10451. GLenum _error = GL_NO_ERROR;
  10452. if (!_context->err.inBeginEnd)
  10453. _error = _next->call(&_next->glGetError)();
  10454. RegalAssert(_error==GL_NO_ERROR);
  10455. _next->call(&_next->glBeginQuery)(target, id);
  10456. if (!_context->err.inBeginEnd) {
  10457. _error = _next->call(&_next->glGetError)();
  10458. if (_error!=GL_NO_ERROR) {
  10459. Error("glBeginQuery : ",Token::GLerrorToString(_error));
  10460. #if REGAL_BREAK
  10461. Break::ErrorCB(_error);
  10462. #endif
  10463. if (_context->err.callback)
  10464. _context->err.callback( _error );
  10465. }
  10466. }
  10467. }
  10468. static void REGAL_CALL error_glBindBuffer(GLenum target, GLuint buffer)
  10469. {
  10470. Internal("error_glBindBuffer","()");
  10471. RegalContext *_context = REGAL_GET_CONTEXT();
  10472. RegalAssert(_context);
  10473. DispatchTableGL *_next = _context->dispatcher.error.next();
  10474. RegalAssert(_next);
  10475. GLenum _error = GL_NO_ERROR;
  10476. if (!_context->err.inBeginEnd)
  10477. _error = _next->call(&_next->glGetError)();
  10478. RegalAssert(_error==GL_NO_ERROR);
  10479. _next->call(&_next->glBindBuffer)(target, buffer);
  10480. if (!_context->err.inBeginEnd) {
  10481. _error = _next->call(&_next->glGetError)();
  10482. if (_error!=GL_NO_ERROR) {
  10483. Error("glBindBuffer : ",Token::GLerrorToString(_error));
  10484. #if REGAL_BREAK
  10485. Break::ErrorCB(_error);
  10486. #endif
  10487. if (_context->err.callback)
  10488. _context->err.callback( _error );
  10489. }
  10490. }
  10491. }
  10492. static void REGAL_CALL error_glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
  10493. {
  10494. Internal("error_glBufferData","()");
  10495. RegalContext *_context = REGAL_GET_CONTEXT();
  10496. RegalAssert(_context);
  10497. DispatchTableGL *_next = _context->dispatcher.error.next();
  10498. RegalAssert(_next);
  10499. GLenum _error = GL_NO_ERROR;
  10500. if (!_context->err.inBeginEnd)
  10501. _error = _next->call(&_next->glGetError)();
  10502. RegalAssert(_error==GL_NO_ERROR);
  10503. _next->call(&_next->glBufferData)(target, size, data, usage);
  10504. if (!_context->err.inBeginEnd) {
  10505. _error = _next->call(&_next->glGetError)();
  10506. if (_error!=GL_NO_ERROR) {
  10507. Error("glBufferData : ",Token::GLerrorToString(_error));
  10508. #if REGAL_BREAK
  10509. Break::ErrorCB(_error);
  10510. #endif
  10511. if (_context->err.callback)
  10512. _context->err.callback( _error );
  10513. }
  10514. }
  10515. }
  10516. static void REGAL_CALL error_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
  10517. {
  10518. Internal("error_glBufferSubData","()");
  10519. RegalContext *_context = REGAL_GET_CONTEXT();
  10520. RegalAssert(_context);
  10521. DispatchTableGL *_next = _context->dispatcher.error.next();
  10522. RegalAssert(_next);
  10523. GLenum _error = GL_NO_ERROR;
  10524. if (!_context->err.inBeginEnd)
  10525. _error = _next->call(&_next->glGetError)();
  10526. RegalAssert(_error==GL_NO_ERROR);
  10527. _next->call(&_next->glBufferSubData)(target, offset, size, data);
  10528. if (!_context->err.inBeginEnd) {
  10529. _error = _next->call(&_next->glGetError)();
  10530. if (_error!=GL_NO_ERROR) {
  10531. Error("glBufferSubData : ",Token::GLerrorToString(_error));
  10532. #if REGAL_BREAK
  10533. Break::ErrorCB(_error);
  10534. #endif
  10535. if (_context->err.callback)
  10536. _context->err.callback( _error );
  10537. }
  10538. }
  10539. }
  10540. static void REGAL_CALL error_glDeleteBuffers(GLsizei n, const GLuint *buffers)
  10541. {
  10542. Internal("error_glDeleteBuffers","()");
  10543. RegalContext *_context = REGAL_GET_CONTEXT();
  10544. RegalAssert(_context);
  10545. DispatchTableGL *_next = _context->dispatcher.error.next();
  10546. RegalAssert(_next);
  10547. GLenum _error = GL_NO_ERROR;
  10548. if (!_context->err.inBeginEnd)
  10549. _error = _next->call(&_next->glGetError)();
  10550. RegalAssert(_error==GL_NO_ERROR);
  10551. _next->call(&_next->glDeleteBuffers)(n, buffers);
  10552. if (!_context->err.inBeginEnd) {
  10553. _error = _next->call(&_next->glGetError)();
  10554. if (_error!=GL_NO_ERROR) {
  10555. Error("glDeleteBuffers : ",Token::GLerrorToString(_error));
  10556. #if REGAL_BREAK
  10557. Break::ErrorCB(_error);
  10558. #endif
  10559. if (_context->err.callback)
  10560. _context->err.callback( _error );
  10561. }
  10562. }
  10563. }
  10564. static void REGAL_CALL error_glDeleteQueries(GLsizei n, const GLuint *ids)
  10565. {
  10566. Internal("error_glDeleteQueries","()");
  10567. RegalContext *_context = REGAL_GET_CONTEXT();
  10568. RegalAssert(_context);
  10569. DispatchTableGL *_next = _context->dispatcher.error.next();
  10570. RegalAssert(_next);
  10571. GLenum _error = GL_NO_ERROR;
  10572. if (!_context->err.inBeginEnd)
  10573. _error = _next->call(&_next->glGetError)();
  10574. RegalAssert(_error==GL_NO_ERROR);
  10575. _next->call(&_next->glDeleteQueries)(n, ids);
  10576. if (!_context->err.inBeginEnd) {
  10577. _error = _next->call(&_next->glGetError)();
  10578. if (_error!=GL_NO_ERROR) {
  10579. Error("glDeleteQueries : ",Token::GLerrorToString(_error));
  10580. #if REGAL_BREAK
  10581. Break::ErrorCB(_error);
  10582. #endif
  10583. if (_context->err.callback)
  10584. _context->err.callback( _error );
  10585. }
  10586. }
  10587. }
  10588. static void REGAL_CALL error_glEndQuery(GLenum target)
  10589. {
  10590. Internal("error_glEndQuery","()");
  10591. RegalContext *_context = REGAL_GET_CONTEXT();
  10592. RegalAssert(_context);
  10593. DispatchTableGL *_next = _context->dispatcher.error.next();
  10594. RegalAssert(_next);
  10595. GLenum _error = GL_NO_ERROR;
  10596. if (!_context->err.inBeginEnd)
  10597. _error = _next->call(&_next->glGetError)();
  10598. RegalAssert(_error==GL_NO_ERROR);
  10599. _next->call(&_next->glEndQuery)(target);
  10600. if (!_context->err.inBeginEnd) {
  10601. _error = _next->call(&_next->glGetError)();
  10602. if (_error!=GL_NO_ERROR) {
  10603. Error("glEndQuery : ",Token::GLerrorToString(_error));
  10604. #if REGAL_BREAK
  10605. Break::ErrorCB(_error);
  10606. #endif
  10607. if (_context->err.callback)
  10608. _context->err.callback( _error );
  10609. }
  10610. }
  10611. }
  10612. static void REGAL_CALL error_glGenBuffers(GLsizei n, GLuint *buffers)
  10613. {
  10614. Internal("error_glGenBuffers","()");
  10615. RegalContext *_context = REGAL_GET_CONTEXT();
  10616. RegalAssert(_context);
  10617. DispatchTableGL *_next = _context->dispatcher.error.next();
  10618. RegalAssert(_next);
  10619. GLenum _error = GL_NO_ERROR;
  10620. if (!_context->err.inBeginEnd)
  10621. _error = _next->call(&_next->glGetError)();
  10622. RegalAssert(_error==GL_NO_ERROR);
  10623. _next->call(&_next->glGenBuffers)(n, buffers);
  10624. if (!_context->err.inBeginEnd) {
  10625. _error = _next->call(&_next->glGetError)();
  10626. if (_error!=GL_NO_ERROR) {
  10627. Error("glGenBuffers : ",Token::GLerrorToString(_error));
  10628. #if REGAL_BREAK
  10629. Break::ErrorCB(_error);
  10630. #endif
  10631. if (_context->err.callback)
  10632. _context->err.callback( _error );
  10633. }
  10634. }
  10635. }
  10636. static void REGAL_CALL error_glGenQueries(GLsizei n, GLuint *ids)
  10637. {
  10638. Internal("error_glGenQueries","()");
  10639. RegalContext *_context = REGAL_GET_CONTEXT();
  10640. RegalAssert(_context);
  10641. DispatchTableGL *_next = _context->dispatcher.error.next();
  10642. RegalAssert(_next);
  10643. GLenum _error = GL_NO_ERROR;
  10644. if (!_context->err.inBeginEnd)
  10645. _error = _next->call(&_next->glGetError)();
  10646. RegalAssert(_error==GL_NO_ERROR);
  10647. _next->call(&_next->glGenQueries)(n, ids);
  10648. if (!_context->err.inBeginEnd) {
  10649. _error = _next->call(&_next->glGetError)();
  10650. if (_error!=GL_NO_ERROR) {
  10651. Error("glGenQueries : ",Token::GLerrorToString(_error));
  10652. #if REGAL_BREAK
  10653. Break::ErrorCB(_error);
  10654. #endif
  10655. if (_context->err.callback)
  10656. _context->err.callback( _error );
  10657. }
  10658. }
  10659. }
  10660. static void REGAL_CALL error_glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
  10661. {
  10662. Internal("error_glGetBufferParameteriv","()");
  10663. RegalContext *_context = REGAL_GET_CONTEXT();
  10664. RegalAssert(_context);
  10665. DispatchTableGL *_next = _context->dispatcher.error.next();
  10666. RegalAssert(_next);
  10667. GLenum _error = GL_NO_ERROR;
  10668. if (!_context->err.inBeginEnd)
  10669. _error = _next->call(&_next->glGetError)();
  10670. RegalAssert(_error==GL_NO_ERROR);
  10671. _next->call(&_next->glGetBufferParameteriv)(target, pname, params);
  10672. if (!_context->err.inBeginEnd) {
  10673. _error = _next->call(&_next->glGetError)();
  10674. if (_error!=GL_NO_ERROR) {
  10675. Error("glGetBufferParameteriv : ",Token::GLerrorToString(_error));
  10676. #if REGAL_BREAK
  10677. Break::ErrorCB(_error);
  10678. #endif
  10679. if (_context->err.callback)
  10680. _context->err.callback( _error );
  10681. }
  10682. }
  10683. }
  10684. static void REGAL_CALL error_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid **params)
  10685. {
  10686. Internal("error_glGetBufferPointerv","()");
  10687. RegalContext *_context = REGAL_GET_CONTEXT();
  10688. RegalAssert(_context);
  10689. DispatchTableGL *_next = _context->dispatcher.error.next();
  10690. RegalAssert(_next);
  10691. GLenum _error = GL_NO_ERROR;
  10692. if (!_context->err.inBeginEnd)
  10693. _error = _next->call(&_next->glGetError)();
  10694. RegalAssert(_error==GL_NO_ERROR);
  10695. _next->call(&_next->glGetBufferPointerv)(target, pname, params);
  10696. if (!_context->err.inBeginEnd) {
  10697. _error = _next->call(&_next->glGetError)();
  10698. if (_error!=GL_NO_ERROR) {
  10699. Error("glGetBufferPointerv : ",Token::GLerrorToString(_error));
  10700. #if REGAL_BREAK
  10701. Break::ErrorCB(_error);
  10702. #endif
  10703. if (_context->err.callback)
  10704. _context->err.callback( _error );
  10705. }
  10706. }
  10707. }
  10708. static void REGAL_CALL error_glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)
  10709. {
  10710. Internal("error_glGetBufferSubData","()");
  10711. RegalContext *_context = REGAL_GET_CONTEXT();
  10712. RegalAssert(_context);
  10713. DispatchTableGL *_next = _context->dispatcher.error.next();
  10714. RegalAssert(_next);
  10715. GLenum _error = GL_NO_ERROR;
  10716. if (!_context->err.inBeginEnd)
  10717. _error = _next->call(&_next->glGetError)();
  10718. RegalAssert(_error==GL_NO_ERROR);
  10719. _next->call(&_next->glGetBufferSubData)(target, offset, size, data);
  10720. if (!_context->err.inBeginEnd) {
  10721. _error = _next->call(&_next->glGetError)();
  10722. if (_error!=GL_NO_ERROR) {
  10723. Error("glGetBufferSubData : ",Token::GLerrorToString(_error));
  10724. #if REGAL_BREAK
  10725. Break::ErrorCB(_error);
  10726. #endif
  10727. if (_context->err.callback)
  10728. _context->err.callback( _error );
  10729. }
  10730. }
  10731. }
  10732. static void REGAL_CALL error_glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
  10733. {
  10734. Internal("error_glGetQueryObjectiv","()");
  10735. RegalContext *_context = REGAL_GET_CONTEXT();
  10736. RegalAssert(_context);
  10737. DispatchTableGL *_next = _context->dispatcher.error.next();
  10738. RegalAssert(_next);
  10739. GLenum _error = GL_NO_ERROR;
  10740. if (!_context->err.inBeginEnd)
  10741. _error = _next->call(&_next->glGetError)();
  10742. RegalAssert(_error==GL_NO_ERROR);
  10743. _next->call(&_next->glGetQueryObjectiv)(id, pname, params);
  10744. if (!_context->err.inBeginEnd) {
  10745. _error = _next->call(&_next->glGetError)();
  10746. if (_error!=GL_NO_ERROR) {
  10747. Error("glGetQueryObjectiv : ",Token::GLerrorToString(_error));
  10748. #if REGAL_BREAK
  10749. Break::ErrorCB(_error);
  10750. #endif
  10751. if (_context->err.callback)
  10752. _context->err.callback( _error );
  10753. }
  10754. }
  10755. }
  10756. static void REGAL_CALL error_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
  10757. {
  10758. Internal("error_glGetQueryObjectuiv","()");
  10759. RegalContext *_context = REGAL_GET_CONTEXT();
  10760. RegalAssert(_context);
  10761. DispatchTableGL *_next = _context->dispatcher.error.next();
  10762. RegalAssert(_next);
  10763. GLenum _error = GL_NO_ERROR;
  10764. if (!_context->err.inBeginEnd)
  10765. _error = _next->call(&_next->glGetError)();
  10766. RegalAssert(_error==GL_NO_ERROR);
  10767. _next->call(&_next->glGetQueryObjectuiv)(id, pname, params);
  10768. if (!_context->err.inBeginEnd) {
  10769. _error = _next->call(&_next->glGetError)();
  10770. if (_error!=GL_NO_ERROR) {
  10771. Error("glGetQueryObjectuiv : ",Token::GLerrorToString(_error));
  10772. #if REGAL_BREAK
  10773. Break::ErrorCB(_error);
  10774. #endif
  10775. if (_context->err.callback)
  10776. _context->err.callback( _error );
  10777. }
  10778. }
  10779. }
  10780. static void REGAL_CALL error_glGetQueryiv(GLenum target, GLenum pname, GLint *params)
  10781. {
  10782. Internal("error_glGetQueryiv","()");
  10783. RegalContext *_context = REGAL_GET_CONTEXT();
  10784. RegalAssert(_context);
  10785. DispatchTableGL *_next = _context->dispatcher.error.next();
  10786. RegalAssert(_next);
  10787. GLenum _error = GL_NO_ERROR;
  10788. if (!_context->err.inBeginEnd)
  10789. _error = _next->call(&_next->glGetError)();
  10790. RegalAssert(_error==GL_NO_ERROR);
  10791. _next->call(&_next->glGetQueryiv)(target, pname, params);
  10792. if (!_context->err.inBeginEnd) {
  10793. _error = _next->call(&_next->glGetError)();
  10794. if (_error!=GL_NO_ERROR) {
  10795. Error("glGetQueryiv : ",Token::GLerrorToString(_error));
  10796. #if REGAL_BREAK
  10797. Break::ErrorCB(_error);
  10798. #endif
  10799. if (_context->err.callback)
  10800. _context->err.callback( _error );
  10801. }
  10802. }
  10803. }
  10804. static GLboolean REGAL_CALL error_glIsBuffer(GLuint buffer)
  10805. {
  10806. Internal("error_glIsBuffer","()");
  10807. RegalContext *_context = REGAL_GET_CONTEXT();
  10808. RegalAssert(_context);
  10809. DispatchTableGL *_next = _context->dispatcher.error.next();
  10810. RegalAssert(_next);
  10811. GLenum _error = GL_NO_ERROR;
  10812. if (!_context->err.inBeginEnd)
  10813. _error = _next->call(&_next->glGetError)();
  10814. RegalAssert(_error==GL_NO_ERROR);
  10815. GLboolean ret = _next->call(&_next->glIsBuffer)(buffer);
  10816. if (!_context->err.inBeginEnd) {
  10817. _error = _next->call(&_next->glGetError)();
  10818. if (_error!=GL_NO_ERROR) {
  10819. Error("glIsBuffer : ",Token::GLerrorToString(_error));
  10820. #if REGAL_BREAK
  10821. Break::ErrorCB(_error);
  10822. #endif
  10823. if (_context->err.callback)
  10824. _context->err.callback( _error );
  10825. }
  10826. }
  10827. return ret;
  10828. }
  10829. static GLboolean REGAL_CALL error_glIsQuery(GLuint id)
  10830. {
  10831. Internal("error_glIsQuery","()");
  10832. RegalContext *_context = REGAL_GET_CONTEXT();
  10833. RegalAssert(_context);
  10834. DispatchTableGL *_next = _context->dispatcher.error.next();
  10835. RegalAssert(_next);
  10836. GLenum _error = GL_NO_ERROR;
  10837. if (!_context->err.inBeginEnd)
  10838. _error = _next->call(&_next->glGetError)();
  10839. RegalAssert(_error==GL_NO_ERROR);
  10840. GLboolean ret = _next->call(&_next->glIsQuery)(id);
  10841. if (!_context->err.inBeginEnd) {
  10842. _error = _next->call(&_next->glGetError)();
  10843. if (_error!=GL_NO_ERROR) {
  10844. Error("glIsQuery : ",Token::GLerrorToString(_error));
  10845. #if REGAL_BREAK
  10846. Break::ErrorCB(_error);
  10847. #endif
  10848. if (_context->err.callback)
  10849. _context->err.callback( _error );
  10850. }
  10851. }
  10852. return ret;
  10853. }
  10854. static GLvoid *REGAL_CALL error_glMapBuffer(GLenum target, GLenum access)
  10855. {
  10856. Internal("error_glMapBuffer","()");
  10857. RegalContext *_context = REGAL_GET_CONTEXT();
  10858. RegalAssert(_context);
  10859. DispatchTableGL *_next = _context->dispatcher.error.next();
  10860. RegalAssert(_next);
  10861. GLenum _error = GL_NO_ERROR;
  10862. if (!_context->err.inBeginEnd)
  10863. _error = _next->call(&_next->glGetError)();
  10864. RegalAssert(_error==GL_NO_ERROR);
  10865. GLvoid * ret = _next->call(&_next->glMapBuffer)(target, access);
  10866. if (!_context->err.inBeginEnd) {
  10867. _error = _next->call(&_next->glGetError)();
  10868. if (_error!=GL_NO_ERROR) {
  10869. Error("glMapBuffer : ",Token::GLerrorToString(_error));
  10870. #if REGAL_BREAK
  10871. Break::ErrorCB(_error);
  10872. #endif
  10873. if (_context->err.callback)
  10874. _context->err.callback( _error );
  10875. }
  10876. }
  10877. return ret;
  10878. }
  10879. static GLboolean REGAL_CALL error_glUnmapBuffer(GLenum target)
  10880. {
  10881. Internal("error_glUnmapBuffer","()");
  10882. RegalContext *_context = REGAL_GET_CONTEXT();
  10883. RegalAssert(_context);
  10884. DispatchTableGL *_next = _context->dispatcher.error.next();
  10885. RegalAssert(_next);
  10886. GLenum _error = GL_NO_ERROR;
  10887. if (!_context->err.inBeginEnd)
  10888. _error = _next->call(&_next->glGetError)();
  10889. RegalAssert(_error==GL_NO_ERROR);
  10890. GLboolean ret = _next->call(&_next->glUnmapBuffer)(target);
  10891. if (!_context->err.inBeginEnd) {
  10892. _error = _next->call(&_next->glGetError)();
  10893. if (_error!=GL_NO_ERROR) {
  10894. Error("glUnmapBuffer : ",Token::GLerrorToString(_error));
  10895. #if REGAL_BREAK
  10896. Break::ErrorCB(_error);
  10897. #endif
  10898. if (_context->err.callback)
  10899. _context->err.callback( _error );
  10900. }
  10901. }
  10902. return ret;
  10903. }
  10904. // GL_VERSION_2_0
  10905. static void REGAL_CALL error_glAttachShader(GLuint program, GLuint shader)
  10906. {
  10907. Internal("error_glAttachShader","()");
  10908. RegalContext *_context = REGAL_GET_CONTEXT();
  10909. RegalAssert(_context);
  10910. DispatchTableGL *_next = _context->dispatcher.error.next();
  10911. RegalAssert(_next);
  10912. GLenum _error = GL_NO_ERROR;
  10913. if (!_context->err.inBeginEnd)
  10914. _error = _next->call(&_next->glGetError)();
  10915. RegalAssert(_error==GL_NO_ERROR);
  10916. _next->call(&_next->glAttachShader)(program, shader);
  10917. if (!_context->err.inBeginEnd) {
  10918. _error = _next->call(&_next->glGetError)();
  10919. if (_error!=GL_NO_ERROR) {
  10920. Error("glAttachShader : ",Token::GLerrorToString(_error));
  10921. #if REGAL_BREAK
  10922. Break::ErrorCB(_error);
  10923. #endif
  10924. if (_context->err.callback)
  10925. _context->err.callback( _error );
  10926. }
  10927. }
  10928. }
  10929. static void REGAL_CALL error_glBindAttribLocation(GLuint program, GLuint index, const GLchar *name)
  10930. {
  10931. Internal("error_glBindAttribLocation","()");
  10932. RegalContext *_context = REGAL_GET_CONTEXT();
  10933. RegalAssert(_context);
  10934. DispatchTableGL *_next = _context->dispatcher.error.next();
  10935. RegalAssert(_next);
  10936. GLenum _error = GL_NO_ERROR;
  10937. if (!_context->err.inBeginEnd)
  10938. _error = _next->call(&_next->glGetError)();
  10939. RegalAssert(_error==GL_NO_ERROR);
  10940. _next->call(&_next->glBindAttribLocation)(program, index, name);
  10941. if (!_context->err.inBeginEnd) {
  10942. _error = _next->call(&_next->glGetError)();
  10943. if (_error!=GL_NO_ERROR) {
  10944. Error("glBindAttribLocation : ",Token::GLerrorToString(_error));
  10945. #if REGAL_BREAK
  10946. Break::ErrorCB(_error);
  10947. #endif
  10948. if (_context->err.callback)
  10949. _context->err.callback( _error );
  10950. }
  10951. }
  10952. }
  10953. static void REGAL_CALL error_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
  10954. {
  10955. Internal("error_glBlendEquationSeparate","()");
  10956. RegalContext *_context = REGAL_GET_CONTEXT();
  10957. RegalAssert(_context);
  10958. DispatchTableGL *_next = _context->dispatcher.error.next();
  10959. RegalAssert(_next);
  10960. GLenum _error = GL_NO_ERROR;
  10961. if (!_context->err.inBeginEnd)
  10962. _error = _next->call(&_next->glGetError)();
  10963. RegalAssert(_error==GL_NO_ERROR);
  10964. _next->call(&_next->glBlendEquationSeparate)(modeRGB, modeAlpha);
  10965. if (!_context->err.inBeginEnd) {
  10966. _error = _next->call(&_next->glGetError)();
  10967. if (_error!=GL_NO_ERROR) {
  10968. Error("glBlendEquationSeparate : ",Token::GLerrorToString(_error));
  10969. #if REGAL_BREAK
  10970. Break::ErrorCB(_error);
  10971. #endif
  10972. if (_context->err.callback)
  10973. _context->err.callback( _error );
  10974. }
  10975. }
  10976. }
  10977. static void REGAL_CALL error_glCompileShader(GLuint shader)
  10978. {
  10979. Internal("error_glCompileShader","()");
  10980. RegalContext *_context = REGAL_GET_CONTEXT();
  10981. RegalAssert(_context);
  10982. DispatchTableGL *_next = _context->dispatcher.error.next();
  10983. RegalAssert(_next);
  10984. GLenum _error = GL_NO_ERROR;
  10985. if (!_context->err.inBeginEnd)
  10986. _error = _next->call(&_next->glGetError)();
  10987. RegalAssert(_error==GL_NO_ERROR);
  10988. _next->call(&_next->glCompileShader)(shader);
  10989. if (!_context->err.inBeginEnd) {
  10990. _error = _next->call(&_next->glGetError)();
  10991. if (_error!=GL_NO_ERROR) {
  10992. Error("glCompileShader : ",Token::GLerrorToString(_error));
  10993. #if REGAL_BREAK
  10994. Break::ErrorCB(_error);
  10995. #endif
  10996. if (_context->err.callback)
  10997. _context->err.callback( _error );
  10998. }
  10999. }
  11000. }
  11001. static GLuint REGAL_CALL error_glCreateProgram(void)
  11002. {
  11003. Internal("error_glCreateProgram","()");
  11004. RegalContext *_context = REGAL_GET_CONTEXT();
  11005. RegalAssert(_context);
  11006. DispatchTableGL *_next = _context->dispatcher.error.next();
  11007. RegalAssert(_next);
  11008. GLenum _error = GL_NO_ERROR;
  11009. if (!_context->err.inBeginEnd)
  11010. _error = _next->call(&_next->glGetError)();
  11011. RegalAssert(_error==GL_NO_ERROR);
  11012. GLuint ret = _next->call(&_next->glCreateProgram)();
  11013. if (!_context->err.inBeginEnd) {
  11014. _error = _next->call(&_next->glGetError)();
  11015. if (_error!=GL_NO_ERROR) {
  11016. Error("glCreateProgram : ",Token::GLerrorToString(_error));
  11017. #if REGAL_BREAK
  11018. Break::ErrorCB(_error);
  11019. #endif
  11020. if (_context->err.callback)
  11021. _context->err.callback( _error );
  11022. }
  11023. }
  11024. return ret;
  11025. }
  11026. static GLuint REGAL_CALL error_glCreateShader(GLenum type)
  11027. {
  11028. Internal("error_glCreateShader","()");
  11029. RegalContext *_context = REGAL_GET_CONTEXT();
  11030. RegalAssert(_context);
  11031. DispatchTableGL *_next = _context->dispatcher.error.next();
  11032. RegalAssert(_next);
  11033. GLenum _error = GL_NO_ERROR;
  11034. if (!_context->err.inBeginEnd)
  11035. _error = _next->call(&_next->glGetError)();
  11036. RegalAssert(_error==GL_NO_ERROR);
  11037. GLuint ret = _next->call(&_next->glCreateShader)(type);
  11038. if (!_context->err.inBeginEnd) {
  11039. _error = _next->call(&_next->glGetError)();
  11040. if (_error!=GL_NO_ERROR) {
  11041. Error("glCreateShader : ",Token::GLerrorToString(_error));
  11042. #if REGAL_BREAK
  11043. Break::ErrorCB(_error);
  11044. #endif
  11045. if (_context->err.callback)
  11046. _context->err.callback( _error );
  11047. }
  11048. }
  11049. return ret;
  11050. }
  11051. static void REGAL_CALL error_glDeleteProgram(GLuint program)
  11052. {
  11053. Internal("error_glDeleteProgram","()");
  11054. RegalContext *_context = REGAL_GET_CONTEXT();
  11055. RegalAssert(_context);
  11056. DispatchTableGL *_next = _context->dispatcher.error.next();
  11057. RegalAssert(_next);
  11058. GLenum _error = GL_NO_ERROR;
  11059. if (!_context->err.inBeginEnd)
  11060. _error = _next->call(&_next->glGetError)();
  11061. RegalAssert(_error==GL_NO_ERROR);
  11062. _next->call(&_next->glDeleteProgram)(program);
  11063. if (!_context->err.inBeginEnd) {
  11064. _error = _next->call(&_next->glGetError)();
  11065. if (_error!=GL_NO_ERROR) {
  11066. Error("glDeleteProgram : ",Token::GLerrorToString(_error));
  11067. #if REGAL_BREAK
  11068. Break::ErrorCB(_error);
  11069. #endif
  11070. if (_context->err.callback)
  11071. _context->err.callback( _error );
  11072. }
  11073. }
  11074. }
  11075. static void REGAL_CALL error_glDeleteShader(GLuint shader)
  11076. {
  11077. Internal("error_glDeleteShader","()");
  11078. RegalContext *_context = REGAL_GET_CONTEXT();
  11079. RegalAssert(_context);
  11080. DispatchTableGL *_next = _context->dispatcher.error.next();
  11081. RegalAssert(_next);
  11082. GLenum _error = GL_NO_ERROR;
  11083. if (!_context->err.inBeginEnd)
  11084. _error = _next->call(&_next->glGetError)();
  11085. RegalAssert(_error==GL_NO_ERROR);
  11086. _next->call(&_next->glDeleteShader)(shader);
  11087. if (!_context->err.inBeginEnd) {
  11088. _error = _next->call(&_next->glGetError)();
  11089. if (_error!=GL_NO_ERROR) {
  11090. Error("glDeleteShader : ",Token::GLerrorToString(_error));
  11091. #if REGAL_BREAK
  11092. Break::ErrorCB(_error);
  11093. #endif
  11094. if (_context->err.callback)
  11095. _context->err.callback( _error );
  11096. }
  11097. }
  11098. }
  11099. static void REGAL_CALL error_glDetachShader(GLuint program, GLuint shader)
  11100. {
  11101. Internal("error_glDetachShader","()");
  11102. RegalContext *_context = REGAL_GET_CONTEXT();
  11103. RegalAssert(_context);
  11104. DispatchTableGL *_next = _context->dispatcher.error.next();
  11105. RegalAssert(_next);
  11106. GLenum _error = GL_NO_ERROR;
  11107. if (!_context->err.inBeginEnd)
  11108. _error = _next->call(&_next->glGetError)();
  11109. RegalAssert(_error==GL_NO_ERROR);
  11110. _next->call(&_next->glDetachShader)(program, shader);
  11111. if (!_context->err.inBeginEnd) {
  11112. _error = _next->call(&_next->glGetError)();
  11113. if (_error!=GL_NO_ERROR) {
  11114. Error("glDetachShader : ",Token::GLerrorToString(_error));
  11115. #if REGAL_BREAK
  11116. Break::ErrorCB(_error);
  11117. #endif
  11118. if (_context->err.callback)
  11119. _context->err.callback( _error );
  11120. }
  11121. }
  11122. }
  11123. static void REGAL_CALL error_glDisableVertexAttribArray(GLuint index)
  11124. {
  11125. Internal("error_glDisableVertexAttribArray","()");
  11126. RegalContext *_context = REGAL_GET_CONTEXT();
  11127. RegalAssert(_context);
  11128. DispatchTableGL *_next = _context->dispatcher.error.next();
  11129. RegalAssert(_next);
  11130. GLenum _error = GL_NO_ERROR;
  11131. if (!_context->err.inBeginEnd)
  11132. _error = _next->call(&_next->glGetError)();
  11133. RegalAssert(_error==GL_NO_ERROR);
  11134. _next->call(&_next->glDisableVertexAttribArray)(index);
  11135. if (!_context->err.inBeginEnd) {
  11136. _error = _next->call(&_next->glGetError)();
  11137. if (_error!=GL_NO_ERROR) {
  11138. Error("glDisableVertexAttribArray : ",Token::GLerrorToString(_error));
  11139. #if REGAL_BREAK
  11140. Break::ErrorCB(_error);
  11141. #endif
  11142. if (_context->err.callback)
  11143. _context->err.callback( _error );
  11144. }
  11145. }
  11146. }
  11147. static void REGAL_CALL error_glDrawBuffers(GLsizei n, const GLenum *bufs)
  11148. {
  11149. Internal("error_glDrawBuffers","()");
  11150. RegalContext *_context = REGAL_GET_CONTEXT();
  11151. RegalAssert(_context);
  11152. DispatchTableGL *_next = _context->dispatcher.error.next();
  11153. RegalAssert(_next);
  11154. GLenum _error = GL_NO_ERROR;
  11155. if (!_context->err.inBeginEnd)
  11156. _error = _next->call(&_next->glGetError)();
  11157. RegalAssert(_error==GL_NO_ERROR);
  11158. _next->call(&_next->glDrawBuffers)(n, bufs);
  11159. if (!_context->err.inBeginEnd) {
  11160. _error = _next->call(&_next->glGetError)();
  11161. if (_error!=GL_NO_ERROR) {
  11162. Error("glDrawBuffers : ",Token::GLerrorToString(_error));
  11163. #if REGAL_BREAK
  11164. Break::ErrorCB(_error);
  11165. #endif
  11166. if (_context->err.callback)
  11167. _context->err.callback( _error );
  11168. }
  11169. }
  11170. }
  11171. static void REGAL_CALL error_glEnableVertexAttribArray(GLuint index)
  11172. {
  11173. Internal("error_glEnableVertexAttribArray","()");
  11174. RegalContext *_context = REGAL_GET_CONTEXT();
  11175. RegalAssert(_context);
  11176. DispatchTableGL *_next = _context->dispatcher.error.next();
  11177. RegalAssert(_next);
  11178. GLenum _error = GL_NO_ERROR;
  11179. if (!_context->err.inBeginEnd)
  11180. _error = _next->call(&_next->glGetError)();
  11181. RegalAssert(_error==GL_NO_ERROR);
  11182. _next->call(&_next->glEnableVertexAttribArray)(index);
  11183. if (!_context->err.inBeginEnd) {
  11184. _error = _next->call(&_next->glGetError)();
  11185. if (_error!=GL_NO_ERROR) {
  11186. Error("glEnableVertexAttribArray : ",Token::GLerrorToString(_error));
  11187. #if REGAL_BREAK
  11188. Break::ErrorCB(_error);
  11189. #endif
  11190. if (_context->err.callback)
  11191. _context->err.callback( _error );
  11192. }
  11193. }
  11194. }
  11195. static void REGAL_CALL error_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
  11196. {
  11197. Internal("error_glGetActiveAttrib","()");
  11198. RegalContext *_context = REGAL_GET_CONTEXT();
  11199. RegalAssert(_context);
  11200. DispatchTableGL *_next = _context->dispatcher.error.next();
  11201. RegalAssert(_next);
  11202. GLenum _error = GL_NO_ERROR;
  11203. if (!_context->err.inBeginEnd)
  11204. _error = _next->call(&_next->glGetError)();
  11205. RegalAssert(_error==GL_NO_ERROR);
  11206. _next->call(&_next->glGetActiveAttrib)(program, index, bufSize, length, size, type, name);
  11207. if (!_context->err.inBeginEnd) {
  11208. _error = _next->call(&_next->glGetError)();
  11209. if (_error!=GL_NO_ERROR) {
  11210. Error("glGetActiveAttrib : ",Token::GLerrorToString(_error));
  11211. #if REGAL_BREAK
  11212. Break::ErrorCB(_error);
  11213. #endif
  11214. if (_context->err.callback)
  11215. _context->err.callback( _error );
  11216. }
  11217. }
  11218. }
  11219. static void REGAL_CALL error_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
  11220. {
  11221. Internal("error_glGetActiveUniform","()");
  11222. RegalContext *_context = REGAL_GET_CONTEXT();
  11223. RegalAssert(_context);
  11224. DispatchTableGL *_next = _context->dispatcher.error.next();
  11225. RegalAssert(_next);
  11226. GLenum _error = GL_NO_ERROR;
  11227. if (!_context->err.inBeginEnd)
  11228. _error = _next->call(&_next->glGetError)();
  11229. RegalAssert(_error==GL_NO_ERROR);
  11230. _next->call(&_next->glGetActiveUniform)(program, index, bufSize, length, size, type, name);
  11231. if (!_context->err.inBeginEnd) {
  11232. _error = _next->call(&_next->glGetError)();
  11233. if (_error!=GL_NO_ERROR) {
  11234. Error("glGetActiveUniform : ",Token::GLerrorToString(_error));
  11235. #if REGAL_BREAK
  11236. Break::ErrorCB(_error);
  11237. #endif
  11238. if (_context->err.callback)
  11239. _context->err.callback( _error );
  11240. }
  11241. }
  11242. }
  11243. static void REGAL_CALL error_glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)
  11244. {
  11245. Internal("error_glGetAttachedShaders","()");
  11246. RegalContext *_context = REGAL_GET_CONTEXT();
  11247. RegalAssert(_context);
  11248. DispatchTableGL *_next = _context->dispatcher.error.next();
  11249. RegalAssert(_next);
  11250. GLenum _error = GL_NO_ERROR;
  11251. if (!_context->err.inBeginEnd)
  11252. _error = _next->call(&_next->glGetError)();
  11253. RegalAssert(_error==GL_NO_ERROR);
  11254. _next->call(&_next->glGetAttachedShaders)(program, maxCount, count, shaders);
  11255. if (!_context->err.inBeginEnd) {
  11256. _error = _next->call(&_next->glGetError)();
  11257. if (_error!=GL_NO_ERROR) {
  11258. Error("glGetAttachedShaders : ",Token::GLerrorToString(_error));
  11259. #if REGAL_BREAK
  11260. Break::ErrorCB(_error);
  11261. #endif
  11262. if (_context->err.callback)
  11263. _context->err.callback( _error );
  11264. }
  11265. }
  11266. }
  11267. static GLint REGAL_CALL error_glGetAttribLocation(GLuint program, const GLchar *name)
  11268. {
  11269. Internal("error_glGetAttribLocation","()");
  11270. RegalContext *_context = REGAL_GET_CONTEXT();
  11271. RegalAssert(_context);
  11272. DispatchTableGL *_next = _context->dispatcher.error.next();
  11273. RegalAssert(_next);
  11274. GLenum _error = GL_NO_ERROR;
  11275. if (!_context->err.inBeginEnd)
  11276. _error = _next->call(&_next->glGetError)();
  11277. RegalAssert(_error==GL_NO_ERROR);
  11278. GLint ret = _next->call(&_next->glGetAttribLocation)(program, name);
  11279. if (!_context->err.inBeginEnd) {
  11280. _error = _next->call(&_next->glGetError)();
  11281. if (_error!=GL_NO_ERROR) {
  11282. Error("glGetAttribLocation : ",Token::GLerrorToString(_error));
  11283. #if REGAL_BREAK
  11284. Break::ErrorCB(_error);
  11285. #endif
  11286. if (_context->err.callback)
  11287. _context->err.callback( _error );
  11288. }
  11289. }
  11290. return ret;
  11291. }
  11292. static void REGAL_CALL error_glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
  11293. {
  11294. Internal("error_glGetProgramInfoLog","()");
  11295. RegalContext *_context = REGAL_GET_CONTEXT();
  11296. RegalAssert(_context);
  11297. DispatchTableGL *_next = _context->dispatcher.error.next();
  11298. RegalAssert(_next);
  11299. GLenum _error = GL_NO_ERROR;
  11300. if (!_context->err.inBeginEnd)
  11301. _error = _next->call(&_next->glGetError)();
  11302. RegalAssert(_error==GL_NO_ERROR);
  11303. _next->call(&_next->glGetProgramInfoLog)(program, bufSize, length, infoLog);
  11304. if (!_context->err.inBeginEnd) {
  11305. _error = _next->call(&_next->glGetError)();
  11306. if (_error!=GL_NO_ERROR) {
  11307. Error("glGetProgramInfoLog : ",Token::GLerrorToString(_error));
  11308. #if REGAL_BREAK
  11309. Break::ErrorCB(_error);
  11310. #endif
  11311. if (_context->err.callback)
  11312. _context->err.callback( _error );
  11313. }
  11314. }
  11315. }
  11316. static void REGAL_CALL error_glGetProgramiv(GLuint program, GLenum pname, GLint *params)
  11317. {
  11318. Internal("error_glGetProgramiv","()");
  11319. RegalContext *_context = REGAL_GET_CONTEXT();
  11320. RegalAssert(_context);
  11321. DispatchTableGL *_next = _context->dispatcher.error.next();
  11322. RegalAssert(_next);
  11323. GLenum _error = GL_NO_ERROR;
  11324. if (!_context->err.inBeginEnd)
  11325. _error = _next->call(&_next->glGetError)();
  11326. RegalAssert(_error==GL_NO_ERROR);
  11327. _next->call(&_next->glGetProgramiv)(program, pname, params);
  11328. if (!_context->err.inBeginEnd) {
  11329. _error = _next->call(&_next->glGetError)();
  11330. if (_error!=GL_NO_ERROR) {
  11331. Error("glGetProgramiv : ",Token::GLerrorToString(_error));
  11332. #if REGAL_BREAK
  11333. Break::ErrorCB(_error);
  11334. #endif
  11335. if (_context->err.callback)
  11336. _context->err.callback( _error );
  11337. }
  11338. }
  11339. }
  11340. static void REGAL_CALL error_glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
  11341. {
  11342. Internal("error_glGetShaderInfoLog","()");
  11343. RegalContext *_context = REGAL_GET_CONTEXT();
  11344. RegalAssert(_context);
  11345. DispatchTableGL *_next = _context->dispatcher.error.next();
  11346. RegalAssert(_next);
  11347. GLenum _error = GL_NO_ERROR;
  11348. if (!_context->err.inBeginEnd)
  11349. _error = _next->call(&_next->glGetError)();
  11350. RegalAssert(_error==GL_NO_ERROR);
  11351. _next->call(&_next->glGetShaderInfoLog)(shader, bufSize, length, infoLog);
  11352. if (!_context->err.inBeginEnd) {
  11353. _error = _next->call(&_next->glGetError)();
  11354. if (_error!=GL_NO_ERROR) {
  11355. Error("glGetShaderInfoLog : ",Token::GLerrorToString(_error));
  11356. #if REGAL_BREAK
  11357. Break::ErrorCB(_error);
  11358. #endif
  11359. if (_context->err.callback)
  11360. _context->err.callback( _error );
  11361. }
  11362. }
  11363. }
  11364. static void REGAL_CALL error_glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
  11365. {
  11366. Internal("error_glGetShaderSource","()");
  11367. RegalContext *_context = REGAL_GET_CONTEXT();
  11368. RegalAssert(_context);
  11369. DispatchTableGL *_next = _context->dispatcher.error.next();
  11370. RegalAssert(_next);
  11371. GLenum _error = GL_NO_ERROR;
  11372. if (!_context->err.inBeginEnd)
  11373. _error = _next->call(&_next->glGetError)();
  11374. RegalAssert(_error==GL_NO_ERROR);
  11375. _next->call(&_next->glGetShaderSource)(shader, bufSize, length, source);
  11376. if (!_context->err.inBeginEnd) {
  11377. _error = _next->call(&_next->glGetError)();
  11378. if (_error!=GL_NO_ERROR) {
  11379. Error("glGetShaderSource : ",Token::GLerrorToString(_error));
  11380. #if REGAL_BREAK
  11381. Break::ErrorCB(_error);
  11382. #endif
  11383. if (_context->err.callback)
  11384. _context->err.callback( _error );
  11385. }
  11386. }
  11387. }
  11388. static void REGAL_CALL error_glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
  11389. {
  11390. Internal("error_glGetShaderiv","()");
  11391. RegalContext *_context = REGAL_GET_CONTEXT();
  11392. RegalAssert(_context);
  11393. DispatchTableGL *_next = _context->dispatcher.error.next();
  11394. RegalAssert(_next);
  11395. GLenum _error = GL_NO_ERROR;
  11396. if (!_context->err.inBeginEnd)
  11397. _error = _next->call(&_next->glGetError)();
  11398. RegalAssert(_error==GL_NO_ERROR);
  11399. _next->call(&_next->glGetShaderiv)(shader, pname, params);
  11400. if (!_context->err.inBeginEnd) {
  11401. _error = _next->call(&_next->glGetError)();
  11402. if (_error!=GL_NO_ERROR) {
  11403. Error("glGetShaderiv : ",Token::GLerrorToString(_error));
  11404. #if REGAL_BREAK
  11405. Break::ErrorCB(_error);
  11406. #endif
  11407. if (_context->err.callback)
  11408. _context->err.callback( _error );
  11409. }
  11410. }
  11411. }
  11412. static GLint REGAL_CALL error_glGetUniformLocation(GLuint program, const GLchar *name)
  11413. {
  11414. Internal("error_glGetUniformLocation","()");
  11415. RegalContext *_context = REGAL_GET_CONTEXT();
  11416. RegalAssert(_context);
  11417. DispatchTableGL *_next = _context->dispatcher.error.next();
  11418. RegalAssert(_next);
  11419. GLenum _error = GL_NO_ERROR;
  11420. if (!_context->err.inBeginEnd)
  11421. _error = _next->call(&_next->glGetError)();
  11422. RegalAssert(_error==GL_NO_ERROR);
  11423. GLint ret = _next->call(&_next->glGetUniformLocation)(program, name);
  11424. if (!_context->err.inBeginEnd) {
  11425. _error = _next->call(&_next->glGetError)();
  11426. if (_error!=GL_NO_ERROR) {
  11427. Error("glGetUniformLocation : ",Token::GLerrorToString(_error));
  11428. #if REGAL_BREAK
  11429. Break::ErrorCB(_error);
  11430. #endif
  11431. if (_context->err.callback)
  11432. _context->err.callback( _error );
  11433. }
  11434. }
  11435. return ret;
  11436. }
  11437. static void REGAL_CALL error_glGetUniformfv(GLuint program, GLint location, GLfloat *params)
  11438. {
  11439. Internal("error_glGetUniformfv","()");
  11440. RegalContext *_context = REGAL_GET_CONTEXT();
  11441. RegalAssert(_context);
  11442. DispatchTableGL *_next = _context->dispatcher.error.next();
  11443. RegalAssert(_next);
  11444. GLenum _error = GL_NO_ERROR;
  11445. if (!_context->err.inBeginEnd)
  11446. _error = _next->call(&_next->glGetError)();
  11447. RegalAssert(_error==GL_NO_ERROR);
  11448. _next->call(&_next->glGetUniformfv)(program, location, params);
  11449. if (!_context->err.inBeginEnd) {
  11450. _error = _next->call(&_next->glGetError)();
  11451. if (_error!=GL_NO_ERROR) {
  11452. Error("glGetUniformfv : ",Token::GLerrorToString(_error));
  11453. #if REGAL_BREAK
  11454. Break::ErrorCB(_error);
  11455. #endif
  11456. if (_context->err.callback)
  11457. _context->err.callback( _error );
  11458. }
  11459. }
  11460. }
  11461. static void REGAL_CALL error_glGetUniformiv(GLuint program, GLint location, GLint *params)
  11462. {
  11463. Internal("error_glGetUniformiv","()");
  11464. RegalContext *_context = REGAL_GET_CONTEXT();
  11465. RegalAssert(_context);
  11466. DispatchTableGL *_next = _context->dispatcher.error.next();
  11467. RegalAssert(_next);
  11468. GLenum _error = GL_NO_ERROR;
  11469. if (!_context->err.inBeginEnd)
  11470. _error = _next->call(&_next->glGetError)();
  11471. RegalAssert(_error==GL_NO_ERROR);
  11472. _next->call(&_next->glGetUniformiv)(program, location, params);
  11473. if (!_context->err.inBeginEnd) {
  11474. _error = _next->call(&_next->glGetError)();
  11475. if (_error!=GL_NO_ERROR) {
  11476. Error("glGetUniformiv : ",Token::GLerrorToString(_error));
  11477. #if REGAL_BREAK
  11478. Break::ErrorCB(_error);
  11479. #endif
  11480. if (_context->err.callback)
  11481. _context->err.callback( _error );
  11482. }
  11483. }
  11484. }
  11485. static void REGAL_CALL error_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid **pointer)
  11486. {
  11487. Internal("error_glGetVertexAttribPointerv","()");
  11488. RegalContext *_context = REGAL_GET_CONTEXT();
  11489. RegalAssert(_context);
  11490. DispatchTableGL *_next = _context->dispatcher.error.next();
  11491. RegalAssert(_next);
  11492. GLenum _error = GL_NO_ERROR;
  11493. if (!_context->err.inBeginEnd)
  11494. _error = _next->call(&_next->glGetError)();
  11495. RegalAssert(_error==GL_NO_ERROR);
  11496. _next->call(&_next->glGetVertexAttribPointerv)(index, pname, pointer);
  11497. if (!_context->err.inBeginEnd) {
  11498. _error = _next->call(&_next->glGetError)();
  11499. if (_error!=GL_NO_ERROR) {
  11500. Error("glGetVertexAttribPointerv : ",Token::GLerrorToString(_error));
  11501. #if REGAL_BREAK
  11502. Break::ErrorCB(_error);
  11503. #endif
  11504. if (_context->err.callback)
  11505. _context->err.callback( _error );
  11506. }
  11507. }
  11508. }
  11509. static void REGAL_CALL error_glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
  11510. {
  11511. Internal("error_glGetVertexAttribdv","()");
  11512. RegalContext *_context = REGAL_GET_CONTEXT();
  11513. RegalAssert(_context);
  11514. DispatchTableGL *_next = _context->dispatcher.error.next();
  11515. RegalAssert(_next);
  11516. GLenum _error = GL_NO_ERROR;
  11517. if (!_context->err.inBeginEnd)
  11518. _error = _next->call(&_next->glGetError)();
  11519. RegalAssert(_error==GL_NO_ERROR);
  11520. _next->call(&_next->glGetVertexAttribdv)(index, pname, params);
  11521. if (!_context->err.inBeginEnd) {
  11522. _error = _next->call(&_next->glGetError)();
  11523. if (_error!=GL_NO_ERROR) {
  11524. Error("glGetVertexAttribdv : ",Token::GLerrorToString(_error));
  11525. #if REGAL_BREAK
  11526. Break::ErrorCB(_error);
  11527. #endif
  11528. if (_context->err.callback)
  11529. _context->err.callback( _error );
  11530. }
  11531. }
  11532. }
  11533. static void REGAL_CALL error_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
  11534. {
  11535. Internal("error_glGetVertexAttribfv","()");
  11536. RegalContext *_context = REGAL_GET_CONTEXT();
  11537. RegalAssert(_context);
  11538. DispatchTableGL *_next = _context->dispatcher.error.next();
  11539. RegalAssert(_next);
  11540. GLenum _error = GL_NO_ERROR;
  11541. if (!_context->err.inBeginEnd)
  11542. _error = _next->call(&_next->glGetError)();
  11543. RegalAssert(_error==GL_NO_ERROR);
  11544. _next->call(&_next->glGetVertexAttribfv)(index, pname, params);
  11545. if (!_context->err.inBeginEnd) {
  11546. _error = _next->call(&_next->glGetError)();
  11547. if (_error!=GL_NO_ERROR) {
  11548. Error("glGetVertexAttribfv : ",Token::GLerrorToString(_error));
  11549. #if REGAL_BREAK
  11550. Break::ErrorCB(_error);
  11551. #endif
  11552. if (_context->err.callback)
  11553. _context->err.callback( _error );
  11554. }
  11555. }
  11556. }
  11557. static void REGAL_CALL error_glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
  11558. {
  11559. Internal("error_glGetVertexAttribiv","()");
  11560. RegalContext *_context = REGAL_GET_CONTEXT();
  11561. RegalAssert(_context);
  11562. DispatchTableGL *_next = _context->dispatcher.error.next();
  11563. RegalAssert(_next);
  11564. GLenum _error = GL_NO_ERROR;
  11565. if (!_context->err.inBeginEnd)
  11566. _error = _next->call(&_next->glGetError)();
  11567. RegalAssert(_error==GL_NO_ERROR);
  11568. _next->call(&_next->glGetVertexAttribiv)(index, pname, params);
  11569. if (!_context->err.inBeginEnd) {
  11570. _error = _next->call(&_next->glGetError)();
  11571. if (_error!=GL_NO_ERROR) {
  11572. Error("glGetVertexAttribiv : ",Token::GLerrorToString(_error));
  11573. #if REGAL_BREAK
  11574. Break::ErrorCB(_error);
  11575. #endif
  11576. if (_context->err.callback)
  11577. _context->err.callback( _error );
  11578. }
  11579. }
  11580. }
  11581. static GLboolean REGAL_CALL error_glIsProgram(GLuint program)
  11582. {
  11583. Internal("error_glIsProgram","()");
  11584. RegalContext *_context = REGAL_GET_CONTEXT();
  11585. RegalAssert(_context);
  11586. DispatchTableGL *_next = _context->dispatcher.error.next();
  11587. RegalAssert(_next);
  11588. GLenum _error = GL_NO_ERROR;
  11589. if (!_context->err.inBeginEnd)
  11590. _error = _next->call(&_next->glGetError)();
  11591. RegalAssert(_error==GL_NO_ERROR);
  11592. GLboolean ret = _next->call(&_next->glIsProgram)(program);
  11593. if (!_context->err.inBeginEnd) {
  11594. _error = _next->call(&_next->glGetError)();
  11595. if (_error!=GL_NO_ERROR) {
  11596. Error("glIsProgram : ",Token::GLerrorToString(_error));
  11597. #if REGAL_BREAK
  11598. Break::ErrorCB(_error);
  11599. #endif
  11600. if (_context->err.callback)
  11601. _context->err.callback( _error );
  11602. }
  11603. }
  11604. return ret;
  11605. }
  11606. static GLboolean REGAL_CALL error_glIsShader(GLuint shader)
  11607. {
  11608. Internal("error_glIsShader","()");
  11609. RegalContext *_context = REGAL_GET_CONTEXT();
  11610. RegalAssert(_context);
  11611. DispatchTableGL *_next = _context->dispatcher.error.next();
  11612. RegalAssert(_next);
  11613. GLenum _error = GL_NO_ERROR;
  11614. if (!_context->err.inBeginEnd)
  11615. _error = _next->call(&_next->glGetError)();
  11616. RegalAssert(_error==GL_NO_ERROR);
  11617. GLboolean ret = _next->call(&_next->glIsShader)(shader);
  11618. if (!_context->err.inBeginEnd) {
  11619. _error = _next->call(&_next->glGetError)();
  11620. if (_error!=GL_NO_ERROR) {
  11621. Error("glIsShader : ",Token::GLerrorToString(_error));
  11622. #if REGAL_BREAK
  11623. Break::ErrorCB(_error);
  11624. #endif
  11625. if (_context->err.callback)
  11626. _context->err.callback( _error );
  11627. }
  11628. }
  11629. return ret;
  11630. }
  11631. static void REGAL_CALL error_glLinkProgram(GLuint program)
  11632. {
  11633. Internal("error_glLinkProgram","()");
  11634. RegalContext *_context = REGAL_GET_CONTEXT();
  11635. RegalAssert(_context);
  11636. DispatchTableGL *_next = _context->dispatcher.error.next();
  11637. RegalAssert(_next);
  11638. GLenum _error = GL_NO_ERROR;
  11639. if (!_context->err.inBeginEnd)
  11640. _error = _next->call(&_next->glGetError)();
  11641. RegalAssert(_error==GL_NO_ERROR);
  11642. _next->call(&_next->glLinkProgram)(program);
  11643. if (!_context->err.inBeginEnd) {
  11644. _error = _next->call(&_next->glGetError)();
  11645. if (_error!=GL_NO_ERROR) {
  11646. Error("glLinkProgram : ",Token::GLerrorToString(_error));
  11647. #if REGAL_BREAK
  11648. Break::ErrorCB(_error);
  11649. #endif
  11650. if (_context->err.callback)
  11651. _context->err.callback( _error );
  11652. }
  11653. }
  11654. }
  11655. static void REGAL_CALL error_glShaderSource(GLuint shader, GLsizei count, const GLchar * const *string, const GLint *length)
  11656. {
  11657. Internal("error_glShaderSource","()");
  11658. RegalContext *_context = REGAL_GET_CONTEXT();
  11659. RegalAssert(_context);
  11660. DispatchTableGL *_next = _context->dispatcher.error.next();
  11661. RegalAssert(_next);
  11662. GLenum _error = GL_NO_ERROR;
  11663. if (!_context->err.inBeginEnd)
  11664. _error = _next->call(&_next->glGetError)();
  11665. RegalAssert(_error==GL_NO_ERROR);
  11666. _next->call(&_next->glShaderSource)(shader, count, string, length);
  11667. if (!_context->err.inBeginEnd) {
  11668. _error = _next->call(&_next->glGetError)();
  11669. if (_error!=GL_NO_ERROR) {
  11670. Error("glShaderSource : ",Token::GLerrorToString(_error));
  11671. #if REGAL_BREAK
  11672. Break::ErrorCB(_error);
  11673. #endif
  11674. if (_context->err.callback)
  11675. _context->err.callback( _error );
  11676. }
  11677. }
  11678. }
  11679. static void REGAL_CALL error_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
  11680. {
  11681. Internal("error_glStencilFuncSeparate","()");
  11682. RegalContext *_context = REGAL_GET_CONTEXT();
  11683. RegalAssert(_context);
  11684. DispatchTableGL *_next = _context->dispatcher.error.next();
  11685. RegalAssert(_next);
  11686. GLenum _error = GL_NO_ERROR;
  11687. if (!_context->err.inBeginEnd)
  11688. _error = _next->call(&_next->glGetError)();
  11689. RegalAssert(_error==GL_NO_ERROR);
  11690. _next->call(&_next->glStencilFuncSeparate)(face, func, ref, mask);
  11691. if (!_context->err.inBeginEnd) {
  11692. _error = _next->call(&_next->glGetError)();
  11693. if (_error!=GL_NO_ERROR) {
  11694. Error("glStencilFuncSeparate : ",Token::GLerrorToString(_error));
  11695. #if REGAL_BREAK
  11696. Break::ErrorCB(_error);
  11697. #endif
  11698. if (_context->err.callback)
  11699. _context->err.callback( _error );
  11700. }
  11701. }
  11702. }
  11703. static void REGAL_CALL error_glStencilMaskSeparate(GLenum face, GLuint mask)
  11704. {
  11705. Internal("error_glStencilMaskSeparate","()");
  11706. RegalContext *_context = REGAL_GET_CONTEXT();
  11707. RegalAssert(_context);
  11708. DispatchTableGL *_next = _context->dispatcher.error.next();
  11709. RegalAssert(_next);
  11710. GLenum _error = GL_NO_ERROR;
  11711. if (!_context->err.inBeginEnd)
  11712. _error = _next->call(&_next->glGetError)();
  11713. RegalAssert(_error==GL_NO_ERROR);
  11714. _next->call(&_next->glStencilMaskSeparate)(face, mask);
  11715. if (!_context->err.inBeginEnd) {
  11716. _error = _next->call(&_next->glGetError)();
  11717. if (_error!=GL_NO_ERROR) {
  11718. Error("glStencilMaskSeparate : ",Token::GLerrorToString(_error));
  11719. #if REGAL_BREAK
  11720. Break::ErrorCB(_error);
  11721. #endif
  11722. if (_context->err.callback)
  11723. _context->err.callback( _error );
  11724. }
  11725. }
  11726. }
  11727. static void REGAL_CALL error_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
  11728. {
  11729. Internal("error_glStencilOpSeparate","()");
  11730. RegalContext *_context = REGAL_GET_CONTEXT();
  11731. RegalAssert(_context);
  11732. DispatchTableGL *_next = _context->dispatcher.error.next();
  11733. RegalAssert(_next);
  11734. GLenum _error = GL_NO_ERROR;
  11735. if (!_context->err.inBeginEnd)
  11736. _error = _next->call(&_next->glGetError)();
  11737. RegalAssert(_error==GL_NO_ERROR);
  11738. _next->call(&_next->glStencilOpSeparate)(face, fail, zfail, zpass);
  11739. if (!_context->err.inBeginEnd) {
  11740. _error = _next->call(&_next->glGetError)();
  11741. if (_error!=GL_NO_ERROR) {
  11742. Error("glStencilOpSeparate : ",Token::GLerrorToString(_error));
  11743. #if REGAL_BREAK
  11744. Break::ErrorCB(_error);
  11745. #endif
  11746. if (_context->err.callback)
  11747. _context->err.callback( _error );
  11748. }
  11749. }
  11750. }
  11751. static void REGAL_CALL error_glUniform1f(GLint location, GLfloat v0)
  11752. {
  11753. Internal("error_glUniform1f","()");
  11754. RegalContext *_context = REGAL_GET_CONTEXT();
  11755. RegalAssert(_context);
  11756. DispatchTableGL *_next = _context->dispatcher.error.next();
  11757. RegalAssert(_next);
  11758. GLenum _error = GL_NO_ERROR;
  11759. if (!_context->err.inBeginEnd)
  11760. _error = _next->call(&_next->glGetError)();
  11761. RegalAssert(_error==GL_NO_ERROR);
  11762. _next->call(&_next->glUniform1f)(location, v0);
  11763. if (!_context->err.inBeginEnd) {
  11764. _error = _next->call(&_next->glGetError)();
  11765. if (_error!=GL_NO_ERROR) {
  11766. Error("glUniform1f : ",Token::GLerrorToString(_error));
  11767. #if REGAL_BREAK
  11768. Break::ErrorCB(_error);
  11769. #endif
  11770. if (_context->err.callback)
  11771. _context->err.callback( _error );
  11772. }
  11773. }
  11774. }
  11775. static void REGAL_CALL error_glUniform1fv(GLint location, GLsizei count, const GLfloat *value)
  11776. {
  11777. Internal("error_glUniform1fv","()");
  11778. RegalContext *_context = REGAL_GET_CONTEXT();
  11779. RegalAssert(_context);
  11780. DispatchTableGL *_next = _context->dispatcher.error.next();
  11781. RegalAssert(_next);
  11782. GLenum _error = GL_NO_ERROR;
  11783. if (!_context->err.inBeginEnd)
  11784. _error = _next->call(&_next->glGetError)();
  11785. RegalAssert(_error==GL_NO_ERROR);
  11786. _next->call(&_next->glUniform1fv)(location, count, value);
  11787. if (!_context->err.inBeginEnd) {
  11788. _error = _next->call(&_next->glGetError)();
  11789. if (_error!=GL_NO_ERROR) {
  11790. Error("glUniform1fv : ",Token::GLerrorToString(_error));
  11791. #if REGAL_BREAK
  11792. Break::ErrorCB(_error);
  11793. #endif
  11794. if (_context->err.callback)
  11795. _context->err.callback( _error );
  11796. }
  11797. }
  11798. }
  11799. static void REGAL_CALL error_glUniform1i(GLint location, GLint v0)
  11800. {
  11801. Internal("error_glUniform1i","()");
  11802. RegalContext *_context = REGAL_GET_CONTEXT();
  11803. RegalAssert(_context);
  11804. DispatchTableGL *_next = _context->dispatcher.error.next();
  11805. RegalAssert(_next);
  11806. GLenum _error = GL_NO_ERROR;
  11807. if (!_context->err.inBeginEnd)
  11808. _error = _next->call(&_next->glGetError)();
  11809. RegalAssert(_error==GL_NO_ERROR);
  11810. _next->call(&_next->glUniform1i)(location, v0);
  11811. if (!_context->err.inBeginEnd) {
  11812. _error = _next->call(&_next->glGetError)();
  11813. if (_error!=GL_NO_ERROR) {
  11814. Error("glUniform1i : ",Token::GLerrorToString(_error));
  11815. #if REGAL_BREAK
  11816. Break::ErrorCB(_error);
  11817. #endif
  11818. if (_context->err.callback)
  11819. _context->err.callback( _error );
  11820. }
  11821. }
  11822. }
  11823. static void REGAL_CALL error_glUniform1iv(GLint location, GLsizei count, const GLint *value)
  11824. {
  11825. Internal("error_glUniform1iv","()");
  11826. RegalContext *_context = REGAL_GET_CONTEXT();
  11827. RegalAssert(_context);
  11828. DispatchTableGL *_next = _context->dispatcher.error.next();
  11829. RegalAssert(_next);
  11830. GLenum _error = GL_NO_ERROR;
  11831. if (!_context->err.inBeginEnd)
  11832. _error = _next->call(&_next->glGetError)();
  11833. RegalAssert(_error==GL_NO_ERROR);
  11834. _next->call(&_next->glUniform1iv)(location, count, value);
  11835. if (!_context->err.inBeginEnd) {
  11836. _error = _next->call(&_next->glGetError)();
  11837. if (_error!=GL_NO_ERROR) {
  11838. Error("glUniform1iv : ",Token::GLerrorToString(_error));
  11839. #if REGAL_BREAK
  11840. Break::ErrorCB(_error);
  11841. #endif
  11842. if (_context->err.callback)
  11843. _context->err.callback( _error );
  11844. }
  11845. }
  11846. }
  11847. static void REGAL_CALL error_glUniform2f(GLint location, GLfloat v0, GLfloat v1)
  11848. {
  11849. Internal("error_glUniform2f","()");
  11850. RegalContext *_context = REGAL_GET_CONTEXT();
  11851. RegalAssert(_context);
  11852. DispatchTableGL *_next = _context->dispatcher.error.next();
  11853. RegalAssert(_next);
  11854. GLenum _error = GL_NO_ERROR;
  11855. if (!_context->err.inBeginEnd)
  11856. _error = _next->call(&_next->glGetError)();
  11857. RegalAssert(_error==GL_NO_ERROR);
  11858. _next->call(&_next->glUniform2f)(location, v0, v1);
  11859. if (!_context->err.inBeginEnd) {
  11860. _error = _next->call(&_next->glGetError)();
  11861. if (_error!=GL_NO_ERROR) {
  11862. Error("glUniform2f : ",Token::GLerrorToString(_error));
  11863. #if REGAL_BREAK
  11864. Break::ErrorCB(_error);
  11865. #endif
  11866. if (_context->err.callback)
  11867. _context->err.callback( _error );
  11868. }
  11869. }
  11870. }
  11871. static void REGAL_CALL error_glUniform2fv(GLint location, GLsizei count, const GLfloat *value)
  11872. {
  11873. Internal("error_glUniform2fv","()");
  11874. RegalContext *_context = REGAL_GET_CONTEXT();
  11875. RegalAssert(_context);
  11876. DispatchTableGL *_next = _context->dispatcher.error.next();
  11877. RegalAssert(_next);
  11878. GLenum _error = GL_NO_ERROR;
  11879. if (!_context->err.inBeginEnd)
  11880. _error = _next->call(&_next->glGetError)();
  11881. RegalAssert(_error==GL_NO_ERROR);
  11882. _next->call(&_next->glUniform2fv)(location, count, value);
  11883. if (!_context->err.inBeginEnd) {
  11884. _error = _next->call(&_next->glGetError)();
  11885. if (_error!=GL_NO_ERROR) {
  11886. Error("glUniform2fv : ",Token::GLerrorToString(_error));
  11887. #if REGAL_BREAK
  11888. Break::ErrorCB(_error);
  11889. #endif
  11890. if (_context->err.callback)
  11891. _context->err.callback( _error );
  11892. }
  11893. }
  11894. }
  11895. static void REGAL_CALL error_glUniform2i(GLint location, GLint v0, GLint v1)
  11896. {
  11897. Internal("error_glUniform2i","()");
  11898. RegalContext *_context = REGAL_GET_CONTEXT();
  11899. RegalAssert(_context);
  11900. DispatchTableGL *_next = _context->dispatcher.error.next();
  11901. RegalAssert(_next);
  11902. GLenum _error = GL_NO_ERROR;
  11903. if (!_context->err.inBeginEnd)
  11904. _error = _next->call(&_next->glGetError)();
  11905. RegalAssert(_error==GL_NO_ERROR);
  11906. _next->call(&_next->glUniform2i)(location, v0, v1);
  11907. if (!_context->err.inBeginEnd) {
  11908. _error = _next->call(&_next->glGetError)();
  11909. if (_error!=GL_NO_ERROR) {
  11910. Error("glUniform2i : ",Token::GLerrorToString(_error));
  11911. #if REGAL_BREAK
  11912. Break::ErrorCB(_error);
  11913. #endif
  11914. if (_context->err.callback)
  11915. _context->err.callback( _error );
  11916. }
  11917. }
  11918. }
  11919. static void REGAL_CALL error_glUniform2iv(GLint location, GLsizei count, const GLint *value)
  11920. {
  11921. Internal("error_glUniform2iv","()");
  11922. RegalContext *_context = REGAL_GET_CONTEXT();
  11923. RegalAssert(_context);
  11924. DispatchTableGL *_next = _context->dispatcher.error.next();
  11925. RegalAssert(_next);
  11926. GLenum _error = GL_NO_ERROR;
  11927. if (!_context->err.inBeginEnd)
  11928. _error = _next->call(&_next->glGetError)();
  11929. RegalAssert(_error==GL_NO_ERROR);
  11930. _next->call(&_next->glUniform2iv)(location, count, value);
  11931. if (!_context->err.inBeginEnd) {
  11932. _error = _next->call(&_next->glGetError)();
  11933. if (_error!=GL_NO_ERROR) {
  11934. Error("glUniform2iv : ",Token::GLerrorToString(_error));
  11935. #if REGAL_BREAK
  11936. Break::ErrorCB(_error);
  11937. #endif
  11938. if (_context->err.callback)
  11939. _context->err.callback( _error );
  11940. }
  11941. }
  11942. }
  11943. static void REGAL_CALL error_glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
  11944. {
  11945. Internal("error_glUniform3f","()");
  11946. RegalContext *_context = REGAL_GET_CONTEXT();
  11947. RegalAssert(_context);
  11948. DispatchTableGL *_next = _context->dispatcher.error.next();
  11949. RegalAssert(_next);
  11950. GLenum _error = GL_NO_ERROR;
  11951. if (!_context->err.inBeginEnd)
  11952. _error = _next->call(&_next->glGetError)();
  11953. RegalAssert(_error==GL_NO_ERROR);
  11954. _next->call(&_next->glUniform3f)(location, v0, v1, v2);
  11955. if (!_context->err.inBeginEnd) {
  11956. _error = _next->call(&_next->glGetError)();
  11957. if (_error!=GL_NO_ERROR) {
  11958. Error("glUniform3f : ",Token::GLerrorToString(_error));
  11959. #if REGAL_BREAK
  11960. Break::ErrorCB(_error);
  11961. #endif
  11962. if (_context->err.callback)
  11963. _context->err.callback( _error );
  11964. }
  11965. }
  11966. }
  11967. static void REGAL_CALL error_glUniform3fv(GLint location, GLsizei count, const GLfloat *value)
  11968. {
  11969. Internal("error_glUniform3fv","()");
  11970. RegalContext *_context = REGAL_GET_CONTEXT();
  11971. RegalAssert(_context);
  11972. DispatchTableGL *_next = _context->dispatcher.error.next();
  11973. RegalAssert(_next);
  11974. GLenum _error = GL_NO_ERROR;
  11975. if (!_context->err.inBeginEnd)
  11976. _error = _next->call(&_next->glGetError)();
  11977. RegalAssert(_error==GL_NO_ERROR);
  11978. _next->call(&_next->glUniform3fv)(location, count, value);
  11979. if (!_context->err.inBeginEnd) {
  11980. _error = _next->call(&_next->glGetError)();
  11981. if (_error!=GL_NO_ERROR) {
  11982. Error("glUniform3fv : ",Token::GLerrorToString(_error));
  11983. #if REGAL_BREAK
  11984. Break::ErrorCB(_error);
  11985. #endif
  11986. if (_context->err.callback)
  11987. _context->err.callback( _error );
  11988. }
  11989. }
  11990. }
  11991. static void REGAL_CALL error_glUniform3i(GLint location, GLint v0, GLint v1, GLint v2)
  11992. {
  11993. Internal("error_glUniform3i","()");
  11994. RegalContext *_context = REGAL_GET_CONTEXT();
  11995. RegalAssert(_context);
  11996. DispatchTableGL *_next = _context->dispatcher.error.next();
  11997. RegalAssert(_next);
  11998. GLenum _error = GL_NO_ERROR;
  11999. if (!_context->err.inBeginEnd)
  12000. _error = _next->call(&_next->glGetError)();
  12001. RegalAssert(_error==GL_NO_ERROR);
  12002. _next->call(&_next->glUniform3i)(location, v0, v1, v2);
  12003. if (!_context->err.inBeginEnd) {
  12004. _error = _next->call(&_next->glGetError)();
  12005. if (_error!=GL_NO_ERROR) {
  12006. Error("glUniform3i : ",Token::GLerrorToString(_error));
  12007. #if REGAL_BREAK
  12008. Break::ErrorCB(_error);
  12009. #endif
  12010. if (_context->err.callback)
  12011. _context->err.callback( _error );
  12012. }
  12013. }
  12014. }
  12015. static void REGAL_CALL error_glUniform3iv(GLint location, GLsizei count, const GLint *value)
  12016. {
  12017. Internal("error_glUniform3iv","()");
  12018. RegalContext *_context = REGAL_GET_CONTEXT();
  12019. RegalAssert(_context);
  12020. DispatchTableGL *_next = _context->dispatcher.error.next();
  12021. RegalAssert(_next);
  12022. GLenum _error = GL_NO_ERROR;
  12023. if (!_context->err.inBeginEnd)
  12024. _error = _next->call(&_next->glGetError)();
  12025. RegalAssert(_error==GL_NO_ERROR);
  12026. _next->call(&_next->glUniform3iv)(location, count, value);
  12027. if (!_context->err.inBeginEnd) {
  12028. _error = _next->call(&_next->glGetError)();
  12029. if (_error!=GL_NO_ERROR) {
  12030. Error("glUniform3iv : ",Token::GLerrorToString(_error));
  12031. #if REGAL_BREAK
  12032. Break::ErrorCB(_error);
  12033. #endif
  12034. if (_context->err.callback)
  12035. _context->err.callback( _error );
  12036. }
  12037. }
  12038. }
  12039. static void REGAL_CALL error_glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
  12040. {
  12041. Internal("error_glUniform4f","()");
  12042. RegalContext *_context = REGAL_GET_CONTEXT();
  12043. RegalAssert(_context);
  12044. DispatchTableGL *_next = _context->dispatcher.error.next();
  12045. RegalAssert(_next);
  12046. GLenum _error = GL_NO_ERROR;
  12047. if (!_context->err.inBeginEnd)
  12048. _error = _next->call(&_next->glGetError)();
  12049. RegalAssert(_error==GL_NO_ERROR);
  12050. _next->call(&_next->glUniform4f)(location, v0, v1, v2, v3);
  12051. if (!_context->err.inBeginEnd) {
  12052. _error = _next->call(&_next->glGetError)();
  12053. if (_error!=GL_NO_ERROR) {
  12054. Error("glUniform4f : ",Token::GLerrorToString(_error));
  12055. #if REGAL_BREAK
  12056. Break::ErrorCB(_error);
  12057. #endif
  12058. if (_context->err.callback)
  12059. _context->err.callback( _error );
  12060. }
  12061. }
  12062. }
  12063. static void REGAL_CALL error_glUniform4fv(GLint location, GLsizei count, const GLfloat *value)
  12064. {
  12065. Internal("error_glUniform4fv","()");
  12066. RegalContext *_context = REGAL_GET_CONTEXT();
  12067. RegalAssert(_context);
  12068. DispatchTableGL *_next = _context->dispatcher.error.next();
  12069. RegalAssert(_next);
  12070. GLenum _error = GL_NO_ERROR;
  12071. if (!_context->err.inBeginEnd)
  12072. _error = _next->call(&_next->glGetError)();
  12073. RegalAssert(_error==GL_NO_ERROR);
  12074. _next->call(&_next->glUniform4fv)(location, count, value);
  12075. if (!_context->err.inBeginEnd) {
  12076. _error = _next->call(&_next->glGetError)();
  12077. if (_error!=GL_NO_ERROR) {
  12078. Error("glUniform4fv : ",Token::GLerrorToString(_error));
  12079. #if REGAL_BREAK
  12080. Break::ErrorCB(_error);
  12081. #endif
  12082. if (_context->err.callback)
  12083. _context->err.callback( _error );
  12084. }
  12085. }
  12086. }
  12087. static void REGAL_CALL error_glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
  12088. {
  12089. Internal("error_glUniform4i","()");
  12090. RegalContext *_context = REGAL_GET_CONTEXT();
  12091. RegalAssert(_context);
  12092. DispatchTableGL *_next = _context->dispatcher.error.next();
  12093. RegalAssert(_next);
  12094. GLenum _error = GL_NO_ERROR;
  12095. if (!_context->err.inBeginEnd)
  12096. _error = _next->call(&_next->glGetError)();
  12097. RegalAssert(_error==GL_NO_ERROR);
  12098. _next->call(&_next->glUniform4i)(location, v0, v1, v2, v3);
  12099. if (!_context->err.inBeginEnd) {
  12100. _error = _next->call(&_next->glGetError)();
  12101. if (_error!=GL_NO_ERROR) {
  12102. Error("glUniform4i : ",Token::GLerrorToString(_error));
  12103. #if REGAL_BREAK
  12104. Break::ErrorCB(_error);
  12105. #endif
  12106. if (_context->err.callback)
  12107. _context->err.callback( _error );
  12108. }
  12109. }
  12110. }
  12111. static void REGAL_CALL error_glUniform4iv(GLint location, GLsizei count, const GLint *value)
  12112. {
  12113. Internal("error_glUniform4iv","()");
  12114. RegalContext *_context = REGAL_GET_CONTEXT();
  12115. RegalAssert(_context);
  12116. DispatchTableGL *_next = _context->dispatcher.error.next();
  12117. RegalAssert(_next);
  12118. GLenum _error = GL_NO_ERROR;
  12119. if (!_context->err.inBeginEnd)
  12120. _error = _next->call(&_next->glGetError)();
  12121. RegalAssert(_error==GL_NO_ERROR);
  12122. _next->call(&_next->glUniform4iv)(location, count, value);
  12123. if (!_context->err.inBeginEnd) {
  12124. _error = _next->call(&_next->glGetError)();
  12125. if (_error!=GL_NO_ERROR) {
  12126. Error("glUniform4iv : ",Token::GLerrorToString(_error));
  12127. #if REGAL_BREAK
  12128. Break::ErrorCB(_error);
  12129. #endif
  12130. if (_context->err.callback)
  12131. _context->err.callback( _error );
  12132. }
  12133. }
  12134. }
  12135. static void REGAL_CALL error_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  12136. {
  12137. Internal("error_glUniformMatrix2fv","()");
  12138. RegalContext *_context = REGAL_GET_CONTEXT();
  12139. RegalAssert(_context);
  12140. DispatchTableGL *_next = _context->dispatcher.error.next();
  12141. RegalAssert(_next);
  12142. GLenum _error = GL_NO_ERROR;
  12143. if (!_context->err.inBeginEnd)
  12144. _error = _next->call(&_next->glGetError)();
  12145. RegalAssert(_error==GL_NO_ERROR);
  12146. _next->call(&_next->glUniformMatrix2fv)(location, count, transpose, value);
  12147. if (!_context->err.inBeginEnd) {
  12148. _error = _next->call(&_next->glGetError)();
  12149. if (_error!=GL_NO_ERROR) {
  12150. Error("glUniformMatrix2fv : ",Token::GLerrorToString(_error));
  12151. #if REGAL_BREAK
  12152. Break::ErrorCB(_error);
  12153. #endif
  12154. if (_context->err.callback)
  12155. _context->err.callback( _error );
  12156. }
  12157. }
  12158. }
  12159. static void REGAL_CALL error_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  12160. {
  12161. Internal("error_glUniformMatrix3fv","()");
  12162. RegalContext *_context = REGAL_GET_CONTEXT();
  12163. RegalAssert(_context);
  12164. DispatchTableGL *_next = _context->dispatcher.error.next();
  12165. RegalAssert(_next);
  12166. GLenum _error = GL_NO_ERROR;
  12167. if (!_context->err.inBeginEnd)
  12168. _error = _next->call(&_next->glGetError)();
  12169. RegalAssert(_error==GL_NO_ERROR);
  12170. _next->call(&_next->glUniformMatrix3fv)(location, count, transpose, value);
  12171. if (!_context->err.inBeginEnd) {
  12172. _error = _next->call(&_next->glGetError)();
  12173. if (_error!=GL_NO_ERROR) {
  12174. Error("glUniformMatrix3fv : ",Token::GLerrorToString(_error));
  12175. #if REGAL_BREAK
  12176. Break::ErrorCB(_error);
  12177. #endif
  12178. if (_context->err.callback)
  12179. _context->err.callback( _error );
  12180. }
  12181. }
  12182. }
  12183. static void REGAL_CALL error_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  12184. {
  12185. Internal("error_glUniformMatrix4fv","()");
  12186. RegalContext *_context = REGAL_GET_CONTEXT();
  12187. RegalAssert(_context);
  12188. DispatchTableGL *_next = _context->dispatcher.error.next();
  12189. RegalAssert(_next);
  12190. GLenum _error = GL_NO_ERROR;
  12191. if (!_context->err.inBeginEnd)
  12192. _error = _next->call(&_next->glGetError)();
  12193. RegalAssert(_error==GL_NO_ERROR);
  12194. _next->call(&_next->glUniformMatrix4fv)(location, count, transpose, value);
  12195. if (!_context->err.inBeginEnd) {
  12196. _error = _next->call(&_next->glGetError)();
  12197. if (_error!=GL_NO_ERROR) {
  12198. Error("glUniformMatrix4fv : ",Token::GLerrorToString(_error));
  12199. #if REGAL_BREAK
  12200. Break::ErrorCB(_error);
  12201. #endif
  12202. if (_context->err.callback)
  12203. _context->err.callback( _error );
  12204. }
  12205. }
  12206. }
  12207. static void REGAL_CALL error_glUseProgram(GLuint program)
  12208. {
  12209. Internal("error_glUseProgram","()");
  12210. RegalContext *_context = REGAL_GET_CONTEXT();
  12211. RegalAssert(_context);
  12212. DispatchTableGL *_next = _context->dispatcher.error.next();
  12213. RegalAssert(_next);
  12214. GLenum _error = GL_NO_ERROR;
  12215. if (!_context->err.inBeginEnd)
  12216. _error = _next->call(&_next->glGetError)();
  12217. RegalAssert(_error==GL_NO_ERROR);
  12218. _next->call(&_next->glUseProgram)(program);
  12219. if (!_context->err.inBeginEnd) {
  12220. _error = _next->call(&_next->glGetError)();
  12221. if (_error!=GL_NO_ERROR) {
  12222. Error("glUseProgram : ",Token::GLerrorToString(_error));
  12223. #if REGAL_BREAK
  12224. Break::ErrorCB(_error);
  12225. #endif
  12226. if (_context->err.callback)
  12227. _context->err.callback( _error );
  12228. }
  12229. }
  12230. }
  12231. static void REGAL_CALL error_glValidateProgram(GLuint program)
  12232. {
  12233. Internal("error_glValidateProgram","()");
  12234. RegalContext *_context = REGAL_GET_CONTEXT();
  12235. RegalAssert(_context);
  12236. DispatchTableGL *_next = _context->dispatcher.error.next();
  12237. RegalAssert(_next);
  12238. GLenum _error = GL_NO_ERROR;
  12239. if (!_context->err.inBeginEnd)
  12240. _error = _next->call(&_next->glGetError)();
  12241. RegalAssert(_error==GL_NO_ERROR);
  12242. _next->call(&_next->glValidateProgram)(program);
  12243. if (!_context->err.inBeginEnd) {
  12244. _error = _next->call(&_next->glGetError)();
  12245. if (_error!=GL_NO_ERROR) {
  12246. Error("glValidateProgram : ",Token::GLerrorToString(_error));
  12247. #if REGAL_BREAK
  12248. Break::ErrorCB(_error);
  12249. #endif
  12250. if (_context->err.callback)
  12251. _context->err.callback( _error );
  12252. }
  12253. }
  12254. }
  12255. static void REGAL_CALL error_glVertexAttrib1d(GLuint index, GLdouble x)
  12256. {
  12257. Internal("error_glVertexAttrib1d","()");
  12258. RegalContext *_context = REGAL_GET_CONTEXT();
  12259. RegalAssert(_context);
  12260. DispatchTableGL *_next = _context->dispatcher.error.next();
  12261. RegalAssert(_next);
  12262. GLenum _error = GL_NO_ERROR;
  12263. if (!_context->err.inBeginEnd)
  12264. _error = _next->call(&_next->glGetError)();
  12265. RegalAssert(_error==GL_NO_ERROR);
  12266. _next->call(&_next->glVertexAttrib1d)(index, x);
  12267. if (!_context->err.inBeginEnd) {
  12268. _error = _next->call(&_next->glGetError)();
  12269. if (_error!=GL_NO_ERROR) {
  12270. Error("glVertexAttrib1d : ",Token::GLerrorToString(_error));
  12271. #if REGAL_BREAK
  12272. Break::ErrorCB(_error);
  12273. #endif
  12274. if (_context->err.callback)
  12275. _context->err.callback( _error );
  12276. }
  12277. }
  12278. }
  12279. static void REGAL_CALL error_glVertexAttrib1dv(GLuint index, const GLdouble *v)
  12280. {
  12281. Internal("error_glVertexAttrib1dv","()");
  12282. RegalContext *_context = REGAL_GET_CONTEXT();
  12283. RegalAssert(_context);
  12284. DispatchTableGL *_next = _context->dispatcher.error.next();
  12285. RegalAssert(_next);
  12286. GLenum _error = GL_NO_ERROR;
  12287. if (!_context->err.inBeginEnd)
  12288. _error = _next->call(&_next->glGetError)();
  12289. RegalAssert(_error==GL_NO_ERROR);
  12290. _next->call(&_next->glVertexAttrib1dv)(index, v);
  12291. if (!_context->err.inBeginEnd) {
  12292. _error = _next->call(&_next->glGetError)();
  12293. if (_error!=GL_NO_ERROR) {
  12294. Error("glVertexAttrib1dv : ",Token::GLerrorToString(_error));
  12295. #if REGAL_BREAK
  12296. Break::ErrorCB(_error);
  12297. #endif
  12298. if (_context->err.callback)
  12299. _context->err.callback( _error );
  12300. }
  12301. }
  12302. }
  12303. static void REGAL_CALL error_glVertexAttrib1f(GLuint index, GLfloat x)
  12304. {
  12305. Internal("error_glVertexAttrib1f","()");
  12306. RegalContext *_context = REGAL_GET_CONTEXT();
  12307. RegalAssert(_context);
  12308. DispatchTableGL *_next = _context->dispatcher.error.next();
  12309. RegalAssert(_next);
  12310. GLenum _error = GL_NO_ERROR;
  12311. if (!_context->err.inBeginEnd)
  12312. _error = _next->call(&_next->glGetError)();
  12313. RegalAssert(_error==GL_NO_ERROR);
  12314. _next->call(&_next->glVertexAttrib1f)(index, x);
  12315. if (!_context->err.inBeginEnd) {
  12316. _error = _next->call(&_next->glGetError)();
  12317. if (_error!=GL_NO_ERROR) {
  12318. Error("glVertexAttrib1f : ",Token::GLerrorToString(_error));
  12319. #if REGAL_BREAK
  12320. Break::ErrorCB(_error);
  12321. #endif
  12322. if (_context->err.callback)
  12323. _context->err.callback( _error );
  12324. }
  12325. }
  12326. }
  12327. static void REGAL_CALL error_glVertexAttrib1fv(GLuint index, const GLfloat *v)
  12328. {
  12329. Internal("error_glVertexAttrib1fv","()");
  12330. RegalContext *_context = REGAL_GET_CONTEXT();
  12331. RegalAssert(_context);
  12332. DispatchTableGL *_next = _context->dispatcher.error.next();
  12333. RegalAssert(_next);
  12334. GLenum _error = GL_NO_ERROR;
  12335. if (!_context->err.inBeginEnd)
  12336. _error = _next->call(&_next->glGetError)();
  12337. RegalAssert(_error==GL_NO_ERROR);
  12338. _next->call(&_next->glVertexAttrib1fv)(index, v);
  12339. if (!_context->err.inBeginEnd) {
  12340. _error = _next->call(&_next->glGetError)();
  12341. if (_error!=GL_NO_ERROR) {
  12342. Error("glVertexAttrib1fv : ",Token::GLerrorToString(_error));
  12343. #if REGAL_BREAK
  12344. Break::ErrorCB(_error);
  12345. #endif
  12346. if (_context->err.callback)
  12347. _context->err.callback( _error );
  12348. }
  12349. }
  12350. }
  12351. static void REGAL_CALL error_glVertexAttrib1s(GLuint index, GLshort x)
  12352. {
  12353. Internal("error_glVertexAttrib1s","()");
  12354. RegalContext *_context = REGAL_GET_CONTEXT();
  12355. RegalAssert(_context);
  12356. DispatchTableGL *_next = _context->dispatcher.error.next();
  12357. RegalAssert(_next);
  12358. GLenum _error = GL_NO_ERROR;
  12359. if (!_context->err.inBeginEnd)
  12360. _error = _next->call(&_next->glGetError)();
  12361. RegalAssert(_error==GL_NO_ERROR);
  12362. _next->call(&_next->glVertexAttrib1s)(index, x);
  12363. if (!_context->err.inBeginEnd) {
  12364. _error = _next->call(&_next->glGetError)();
  12365. if (_error!=GL_NO_ERROR) {
  12366. Error("glVertexAttrib1s : ",Token::GLerrorToString(_error));
  12367. #if REGAL_BREAK
  12368. Break::ErrorCB(_error);
  12369. #endif
  12370. if (_context->err.callback)
  12371. _context->err.callback( _error );
  12372. }
  12373. }
  12374. }
  12375. static void REGAL_CALL error_glVertexAttrib1sv(GLuint index, const GLshort *v)
  12376. {
  12377. Internal("error_glVertexAttrib1sv","()");
  12378. RegalContext *_context = REGAL_GET_CONTEXT();
  12379. RegalAssert(_context);
  12380. DispatchTableGL *_next = _context->dispatcher.error.next();
  12381. RegalAssert(_next);
  12382. GLenum _error = GL_NO_ERROR;
  12383. if (!_context->err.inBeginEnd)
  12384. _error = _next->call(&_next->glGetError)();
  12385. RegalAssert(_error==GL_NO_ERROR);
  12386. _next->call(&_next->glVertexAttrib1sv)(index, v);
  12387. if (!_context->err.inBeginEnd) {
  12388. _error = _next->call(&_next->glGetError)();
  12389. if (_error!=GL_NO_ERROR) {
  12390. Error("glVertexAttrib1sv : ",Token::GLerrorToString(_error));
  12391. #if REGAL_BREAK
  12392. Break::ErrorCB(_error);
  12393. #endif
  12394. if (_context->err.callback)
  12395. _context->err.callback( _error );
  12396. }
  12397. }
  12398. }
  12399. static void REGAL_CALL error_glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
  12400. {
  12401. Internal("error_glVertexAttrib2d","()");
  12402. RegalContext *_context = REGAL_GET_CONTEXT();
  12403. RegalAssert(_context);
  12404. DispatchTableGL *_next = _context->dispatcher.error.next();
  12405. RegalAssert(_next);
  12406. GLenum _error = GL_NO_ERROR;
  12407. if (!_context->err.inBeginEnd)
  12408. _error = _next->call(&_next->glGetError)();
  12409. RegalAssert(_error==GL_NO_ERROR);
  12410. _next->call(&_next->glVertexAttrib2d)(index, x, y);
  12411. if (!_context->err.inBeginEnd) {
  12412. _error = _next->call(&_next->glGetError)();
  12413. if (_error!=GL_NO_ERROR) {
  12414. Error("glVertexAttrib2d : ",Token::GLerrorToString(_error));
  12415. #if REGAL_BREAK
  12416. Break::ErrorCB(_error);
  12417. #endif
  12418. if (_context->err.callback)
  12419. _context->err.callback( _error );
  12420. }
  12421. }
  12422. }
  12423. static void REGAL_CALL error_glVertexAttrib2dv(GLuint index, const GLdouble *v)
  12424. {
  12425. Internal("error_glVertexAttrib2dv","()");
  12426. RegalContext *_context = REGAL_GET_CONTEXT();
  12427. RegalAssert(_context);
  12428. DispatchTableGL *_next = _context->dispatcher.error.next();
  12429. RegalAssert(_next);
  12430. GLenum _error = GL_NO_ERROR;
  12431. if (!_context->err.inBeginEnd)
  12432. _error = _next->call(&_next->glGetError)();
  12433. RegalAssert(_error==GL_NO_ERROR);
  12434. _next->call(&_next->glVertexAttrib2dv)(index, v);
  12435. if (!_context->err.inBeginEnd) {
  12436. _error = _next->call(&_next->glGetError)();
  12437. if (_error!=GL_NO_ERROR) {
  12438. Error("glVertexAttrib2dv : ",Token::GLerrorToString(_error));
  12439. #if REGAL_BREAK
  12440. Break::ErrorCB(_error);
  12441. #endif
  12442. if (_context->err.callback)
  12443. _context->err.callback( _error );
  12444. }
  12445. }
  12446. }
  12447. static void REGAL_CALL error_glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
  12448. {
  12449. Internal("error_glVertexAttrib2f","()");
  12450. RegalContext *_context = REGAL_GET_CONTEXT();
  12451. RegalAssert(_context);
  12452. DispatchTableGL *_next = _context->dispatcher.error.next();
  12453. RegalAssert(_next);
  12454. GLenum _error = GL_NO_ERROR;
  12455. if (!_context->err.inBeginEnd)
  12456. _error = _next->call(&_next->glGetError)();
  12457. RegalAssert(_error==GL_NO_ERROR);
  12458. _next->call(&_next->glVertexAttrib2f)(index, x, y);
  12459. if (!_context->err.inBeginEnd) {
  12460. _error = _next->call(&_next->glGetError)();
  12461. if (_error!=GL_NO_ERROR) {
  12462. Error("glVertexAttrib2f : ",Token::GLerrorToString(_error));
  12463. #if REGAL_BREAK
  12464. Break::ErrorCB(_error);
  12465. #endif
  12466. if (_context->err.callback)
  12467. _context->err.callback( _error );
  12468. }
  12469. }
  12470. }
  12471. static void REGAL_CALL error_glVertexAttrib2fv(GLuint index, const GLfloat *v)
  12472. {
  12473. Internal("error_glVertexAttrib2fv","()");
  12474. RegalContext *_context = REGAL_GET_CONTEXT();
  12475. RegalAssert(_context);
  12476. DispatchTableGL *_next = _context->dispatcher.error.next();
  12477. RegalAssert(_next);
  12478. GLenum _error = GL_NO_ERROR;
  12479. if (!_context->err.inBeginEnd)
  12480. _error = _next->call(&_next->glGetError)();
  12481. RegalAssert(_error==GL_NO_ERROR);
  12482. _next->call(&_next->glVertexAttrib2fv)(index, v);
  12483. if (!_context->err.inBeginEnd) {
  12484. _error = _next->call(&_next->glGetError)();
  12485. if (_error!=GL_NO_ERROR) {
  12486. Error("glVertexAttrib2fv : ",Token::GLerrorToString(_error));
  12487. #if REGAL_BREAK
  12488. Break::ErrorCB(_error);
  12489. #endif
  12490. if (_context->err.callback)
  12491. _context->err.callback( _error );
  12492. }
  12493. }
  12494. }
  12495. static void REGAL_CALL error_glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
  12496. {
  12497. Internal("error_glVertexAttrib2s","()");
  12498. RegalContext *_context = REGAL_GET_CONTEXT();
  12499. RegalAssert(_context);
  12500. DispatchTableGL *_next = _context->dispatcher.error.next();
  12501. RegalAssert(_next);
  12502. GLenum _error = GL_NO_ERROR;
  12503. if (!_context->err.inBeginEnd)
  12504. _error = _next->call(&_next->glGetError)();
  12505. RegalAssert(_error==GL_NO_ERROR);
  12506. _next->call(&_next->glVertexAttrib2s)(index, x, y);
  12507. if (!_context->err.inBeginEnd) {
  12508. _error = _next->call(&_next->glGetError)();
  12509. if (_error!=GL_NO_ERROR) {
  12510. Error("glVertexAttrib2s : ",Token::GLerrorToString(_error));
  12511. #if REGAL_BREAK
  12512. Break::ErrorCB(_error);
  12513. #endif
  12514. if (_context->err.callback)
  12515. _context->err.callback( _error );
  12516. }
  12517. }
  12518. }
  12519. static void REGAL_CALL error_glVertexAttrib2sv(GLuint index, const GLshort *v)
  12520. {
  12521. Internal("error_glVertexAttrib2sv","()");
  12522. RegalContext *_context = REGAL_GET_CONTEXT();
  12523. RegalAssert(_context);
  12524. DispatchTableGL *_next = _context->dispatcher.error.next();
  12525. RegalAssert(_next);
  12526. GLenum _error = GL_NO_ERROR;
  12527. if (!_context->err.inBeginEnd)
  12528. _error = _next->call(&_next->glGetError)();
  12529. RegalAssert(_error==GL_NO_ERROR);
  12530. _next->call(&_next->glVertexAttrib2sv)(index, v);
  12531. if (!_context->err.inBeginEnd) {
  12532. _error = _next->call(&_next->glGetError)();
  12533. if (_error!=GL_NO_ERROR) {
  12534. Error("glVertexAttrib2sv : ",Token::GLerrorToString(_error));
  12535. #if REGAL_BREAK
  12536. Break::ErrorCB(_error);
  12537. #endif
  12538. if (_context->err.callback)
  12539. _context->err.callback( _error );
  12540. }
  12541. }
  12542. }
  12543. static void REGAL_CALL error_glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
  12544. {
  12545. Internal("error_glVertexAttrib3d","()");
  12546. RegalContext *_context = REGAL_GET_CONTEXT();
  12547. RegalAssert(_context);
  12548. DispatchTableGL *_next = _context->dispatcher.error.next();
  12549. RegalAssert(_next);
  12550. GLenum _error = GL_NO_ERROR;
  12551. if (!_context->err.inBeginEnd)
  12552. _error = _next->call(&_next->glGetError)();
  12553. RegalAssert(_error==GL_NO_ERROR);
  12554. _next->call(&_next->glVertexAttrib3d)(index, x, y, z);
  12555. if (!_context->err.inBeginEnd) {
  12556. _error = _next->call(&_next->glGetError)();
  12557. if (_error!=GL_NO_ERROR) {
  12558. Error("glVertexAttrib3d : ",Token::GLerrorToString(_error));
  12559. #if REGAL_BREAK
  12560. Break::ErrorCB(_error);
  12561. #endif
  12562. if (_context->err.callback)
  12563. _context->err.callback( _error );
  12564. }
  12565. }
  12566. }
  12567. static void REGAL_CALL error_glVertexAttrib3dv(GLuint index, const GLdouble *v)
  12568. {
  12569. Internal("error_glVertexAttrib3dv","()");
  12570. RegalContext *_context = REGAL_GET_CONTEXT();
  12571. RegalAssert(_context);
  12572. DispatchTableGL *_next = _context->dispatcher.error.next();
  12573. RegalAssert(_next);
  12574. GLenum _error = GL_NO_ERROR;
  12575. if (!_context->err.inBeginEnd)
  12576. _error = _next->call(&_next->glGetError)();
  12577. RegalAssert(_error==GL_NO_ERROR);
  12578. _next->call(&_next->glVertexAttrib3dv)(index, v);
  12579. if (!_context->err.inBeginEnd) {
  12580. _error = _next->call(&_next->glGetError)();
  12581. if (_error!=GL_NO_ERROR) {
  12582. Error("glVertexAttrib3dv : ",Token::GLerrorToString(_error));
  12583. #if REGAL_BREAK
  12584. Break::ErrorCB(_error);
  12585. #endif
  12586. if (_context->err.callback)
  12587. _context->err.callback( _error );
  12588. }
  12589. }
  12590. }
  12591. static void REGAL_CALL error_glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
  12592. {
  12593. Internal("error_glVertexAttrib3f","()");
  12594. RegalContext *_context = REGAL_GET_CONTEXT();
  12595. RegalAssert(_context);
  12596. DispatchTableGL *_next = _context->dispatcher.error.next();
  12597. RegalAssert(_next);
  12598. GLenum _error = GL_NO_ERROR;
  12599. if (!_context->err.inBeginEnd)
  12600. _error = _next->call(&_next->glGetError)();
  12601. RegalAssert(_error==GL_NO_ERROR);
  12602. _next->call(&_next->glVertexAttrib3f)(index, x, y, z);
  12603. if (!_context->err.inBeginEnd) {
  12604. _error = _next->call(&_next->glGetError)();
  12605. if (_error!=GL_NO_ERROR) {
  12606. Error("glVertexAttrib3f : ",Token::GLerrorToString(_error));
  12607. #if REGAL_BREAK
  12608. Break::ErrorCB(_error);
  12609. #endif
  12610. if (_context->err.callback)
  12611. _context->err.callback( _error );
  12612. }
  12613. }
  12614. }
  12615. static void REGAL_CALL error_glVertexAttrib3fv(GLuint index, const GLfloat *v)
  12616. {
  12617. Internal("error_glVertexAttrib3fv","()");
  12618. RegalContext *_context = REGAL_GET_CONTEXT();
  12619. RegalAssert(_context);
  12620. DispatchTableGL *_next = _context->dispatcher.error.next();
  12621. RegalAssert(_next);
  12622. GLenum _error = GL_NO_ERROR;
  12623. if (!_context->err.inBeginEnd)
  12624. _error = _next->call(&_next->glGetError)();
  12625. RegalAssert(_error==GL_NO_ERROR);
  12626. _next->call(&_next->glVertexAttrib3fv)(index, v);
  12627. if (!_context->err.inBeginEnd) {
  12628. _error = _next->call(&_next->glGetError)();
  12629. if (_error!=GL_NO_ERROR) {
  12630. Error("glVertexAttrib3fv : ",Token::GLerrorToString(_error));
  12631. #if REGAL_BREAK
  12632. Break::ErrorCB(_error);
  12633. #endif
  12634. if (_context->err.callback)
  12635. _context->err.callback( _error );
  12636. }
  12637. }
  12638. }
  12639. static void REGAL_CALL error_glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
  12640. {
  12641. Internal("error_glVertexAttrib3s","()");
  12642. RegalContext *_context = REGAL_GET_CONTEXT();
  12643. RegalAssert(_context);
  12644. DispatchTableGL *_next = _context->dispatcher.error.next();
  12645. RegalAssert(_next);
  12646. GLenum _error = GL_NO_ERROR;
  12647. if (!_context->err.inBeginEnd)
  12648. _error = _next->call(&_next->glGetError)();
  12649. RegalAssert(_error==GL_NO_ERROR);
  12650. _next->call(&_next->glVertexAttrib3s)(index, x, y, z);
  12651. if (!_context->err.inBeginEnd) {
  12652. _error = _next->call(&_next->glGetError)();
  12653. if (_error!=GL_NO_ERROR) {
  12654. Error("glVertexAttrib3s : ",Token::GLerrorToString(_error));
  12655. #if REGAL_BREAK
  12656. Break::ErrorCB(_error);
  12657. #endif
  12658. if (_context->err.callback)
  12659. _context->err.callback( _error );
  12660. }
  12661. }
  12662. }
  12663. static void REGAL_CALL error_glVertexAttrib3sv(GLuint index, const GLshort *v)
  12664. {
  12665. Internal("error_glVertexAttrib3sv","()");
  12666. RegalContext *_context = REGAL_GET_CONTEXT();
  12667. RegalAssert(_context);
  12668. DispatchTableGL *_next = _context->dispatcher.error.next();
  12669. RegalAssert(_next);
  12670. GLenum _error = GL_NO_ERROR;
  12671. if (!_context->err.inBeginEnd)
  12672. _error = _next->call(&_next->glGetError)();
  12673. RegalAssert(_error==GL_NO_ERROR);
  12674. _next->call(&_next->glVertexAttrib3sv)(index, v);
  12675. if (!_context->err.inBeginEnd) {
  12676. _error = _next->call(&_next->glGetError)();
  12677. if (_error!=GL_NO_ERROR) {
  12678. Error("glVertexAttrib3sv : ",Token::GLerrorToString(_error));
  12679. #if REGAL_BREAK
  12680. Break::ErrorCB(_error);
  12681. #endif
  12682. if (_context->err.callback)
  12683. _context->err.callback( _error );
  12684. }
  12685. }
  12686. }
  12687. static void REGAL_CALL error_glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
  12688. {
  12689. Internal("error_glVertexAttrib4Nbv","()");
  12690. RegalContext *_context = REGAL_GET_CONTEXT();
  12691. RegalAssert(_context);
  12692. DispatchTableGL *_next = _context->dispatcher.error.next();
  12693. RegalAssert(_next);
  12694. GLenum _error = GL_NO_ERROR;
  12695. if (!_context->err.inBeginEnd)
  12696. _error = _next->call(&_next->glGetError)();
  12697. RegalAssert(_error==GL_NO_ERROR);
  12698. _next->call(&_next->glVertexAttrib4Nbv)(index, v);
  12699. if (!_context->err.inBeginEnd) {
  12700. _error = _next->call(&_next->glGetError)();
  12701. if (_error!=GL_NO_ERROR) {
  12702. Error("glVertexAttrib4Nbv : ",Token::GLerrorToString(_error));
  12703. #if REGAL_BREAK
  12704. Break::ErrorCB(_error);
  12705. #endif
  12706. if (_context->err.callback)
  12707. _context->err.callback( _error );
  12708. }
  12709. }
  12710. }
  12711. static void REGAL_CALL error_glVertexAttrib4Niv(GLuint index, const GLint *v)
  12712. {
  12713. Internal("error_glVertexAttrib4Niv","()");
  12714. RegalContext *_context = REGAL_GET_CONTEXT();
  12715. RegalAssert(_context);
  12716. DispatchTableGL *_next = _context->dispatcher.error.next();
  12717. RegalAssert(_next);
  12718. GLenum _error = GL_NO_ERROR;
  12719. if (!_context->err.inBeginEnd)
  12720. _error = _next->call(&_next->glGetError)();
  12721. RegalAssert(_error==GL_NO_ERROR);
  12722. _next->call(&_next->glVertexAttrib4Niv)(index, v);
  12723. if (!_context->err.inBeginEnd) {
  12724. _error = _next->call(&_next->glGetError)();
  12725. if (_error!=GL_NO_ERROR) {
  12726. Error("glVertexAttrib4Niv : ",Token::GLerrorToString(_error));
  12727. #if REGAL_BREAK
  12728. Break::ErrorCB(_error);
  12729. #endif
  12730. if (_context->err.callback)
  12731. _context->err.callback( _error );
  12732. }
  12733. }
  12734. }
  12735. static void REGAL_CALL error_glVertexAttrib4Nsv(GLuint index, const GLshort *v)
  12736. {
  12737. Internal("error_glVertexAttrib4Nsv","()");
  12738. RegalContext *_context = REGAL_GET_CONTEXT();
  12739. RegalAssert(_context);
  12740. DispatchTableGL *_next = _context->dispatcher.error.next();
  12741. RegalAssert(_next);
  12742. GLenum _error = GL_NO_ERROR;
  12743. if (!_context->err.inBeginEnd)
  12744. _error = _next->call(&_next->glGetError)();
  12745. RegalAssert(_error==GL_NO_ERROR);
  12746. _next->call(&_next->glVertexAttrib4Nsv)(index, v);
  12747. if (!_context->err.inBeginEnd) {
  12748. _error = _next->call(&_next->glGetError)();
  12749. if (_error!=GL_NO_ERROR) {
  12750. Error("glVertexAttrib4Nsv : ",Token::GLerrorToString(_error));
  12751. #if REGAL_BREAK
  12752. Break::ErrorCB(_error);
  12753. #endif
  12754. if (_context->err.callback)
  12755. _context->err.callback( _error );
  12756. }
  12757. }
  12758. }
  12759. static void REGAL_CALL error_glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
  12760. {
  12761. Internal("error_glVertexAttrib4Nub","()");
  12762. RegalContext *_context = REGAL_GET_CONTEXT();
  12763. RegalAssert(_context);
  12764. DispatchTableGL *_next = _context->dispatcher.error.next();
  12765. RegalAssert(_next);
  12766. GLenum _error = GL_NO_ERROR;
  12767. if (!_context->err.inBeginEnd)
  12768. _error = _next->call(&_next->glGetError)();
  12769. RegalAssert(_error==GL_NO_ERROR);
  12770. _next->call(&_next->glVertexAttrib4Nub)(index, x, y, z, w);
  12771. if (!_context->err.inBeginEnd) {
  12772. _error = _next->call(&_next->glGetError)();
  12773. if (_error!=GL_NO_ERROR) {
  12774. Error("glVertexAttrib4Nub : ",Token::GLerrorToString(_error));
  12775. #if REGAL_BREAK
  12776. Break::ErrorCB(_error);
  12777. #endif
  12778. if (_context->err.callback)
  12779. _context->err.callback( _error );
  12780. }
  12781. }
  12782. }
  12783. static void REGAL_CALL error_glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
  12784. {
  12785. Internal("error_glVertexAttrib4Nubv","()");
  12786. RegalContext *_context = REGAL_GET_CONTEXT();
  12787. RegalAssert(_context);
  12788. DispatchTableGL *_next = _context->dispatcher.error.next();
  12789. RegalAssert(_next);
  12790. GLenum _error = GL_NO_ERROR;
  12791. if (!_context->err.inBeginEnd)
  12792. _error = _next->call(&_next->glGetError)();
  12793. RegalAssert(_error==GL_NO_ERROR);
  12794. _next->call(&_next->glVertexAttrib4Nubv)(index, v);
  12795. if (!_context->err.inBeginEnd) {
  12796. _error = _next->call(&_next->glGetError)();
  12797. if (_error!=GL_NO_ERROR) {
  12798. Error("glVertexAttrib4Nubv : ",Token::GLerrorToString(_error));
  12799. #if REGAL_BREAK
  12800. Break::ErrorCB(_error);
  12801. #endif
  12802. if (_context->err.callback)
  12803. _context->err.callback( _error );
  12804. }
  12805. }
  12806. }
  12807. static void REGAL_CALL error_glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
  12808. {
  12809. Internal("error_glVertexAttrib4Nuiv","()");
  12810. RegalContext *_context = REGAL_GET_CONTEXT();
  12811. RegalAssert(_context);
  12812. DispatchTableGL *_next = _context->dispatcher.error.next();
  12813. RegalAssert(_next);
  12814. GLenum _error = GL_NO_ERROR;
  12815. if (!_context->err.inBeginEnd)
  12816. _error = _next->call(&_next->glGetError)();
  12817. RegalAssert(_error==GL_NO_ERROR);
  12818. _next->call(&_next->glVertexAttrib4Nuiv)(index, v);
  12819. if (!_context->err.inBeginEnd) {
  12820. _error = _next->call(&_next->glGetError)();
  12821. if (_error!=GL_NO_ERROR) {
  12822. Error("glVertexAttrib4Nuiv : ",Token::GLerrorToString(_error));
  12823. #if REGAL_BREAK
  12824. Break::ErrorCB(_error);
  12825. #endif
  12826. if (_context->err.callback)
  12827. _context->err.callback( _error );
  12828. }
  12829. }
  12830. }
  12831. static void REGAL_CALL error_glVertexAttrib4Nusv(GLuint index, const GLushort *v)
  12832. {
  12833. Internal("error_glVertexAttrib4Nusv","()");
  12834. RegalContext *_context = REGAL_GET_CONTEXT();
  12835. RegalAssert(_context);
  12836. DispatchTableGL *_next = _context->dispatcher.error.next();
  12837. RegalAssert(_next);
  12838. GLenum _error = GL_NO_ERROR;
  12839. if (!_context->err.inBeginEnd)
  12840. _error = _next->call(&_next->glGetError)();
  12841. RegalAssert(_error==GL_NO_ERROR);
  12842. _next->call(&_next->glVertexAttrib4Nusv)(index, v);
  12843. if (!_context->err.inBeginEnd) {
  12844. _error = _next->call(&_next->glGetError)();
  12845. if (_error!=GL_NO_ERROR) {
  12846. Error("glVertexAttrib4Nusv : ",Token::GLerrorToString(_error));
  12847. #if REGAL_BREAK
  12848. Break::ErrorCB(_error);
  12849. #endif
  12850. if (_context->err.callback)
  12851. _context->err.callback( _error );
  12852. }
  12853. }
  12854. }
  12855. static void REGAL_CALL error_glVertexAttrib4bv(GLuint index, const GLbyte *v)
  12856. {
  12857. Internal("error_glVertexAttrib4bv","()");
  12858. RegalContext *_context = REGAL_GET_CONTEXT();
  12859. RegalAssert(_context);
  12860. DispatchTableGL *_next = _context->dispatcher.error.next();
  12861. RegalAssert(_next);
  12862. GLenum _error = GL_NO_ERROR;
  12863. if (!_context->err.inBeginEnd)
  12864. _error = _next->call(&_next->glGetError)();
  12865. RegalAssert(_error==GL_NO_ERROR);
  12866. _next->call(&_next->glVertexAttrib4bv)(index, v);
  12867. if (!_context->err.inBeginEnd) {
  12868. _error = _next->call(&_next->glGetError)();
  12869. if (_error!=GL_NO_ERROR) {
  12870. Error("glVertexAttrib4bv : ",Token::GLerrorToString(_error));
  12871. #if REGAL_BREAK
  12872. Break::ErrorCB(_error);
  12873. #endif
  12874. if (_context->err.callback)
  12875. _context->err.callback( _error );
  12876. }
  12877. }
  12878. }
  12879. static void REGAL_CALL error_glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  12880. {
  12881. Internal("error_glVertexAttrib4d","()");
  12882. RegalContext *_context = REGAL_GET_CONTEXT();
  12883. RegalAssert(_context);
  12884. DispatchTableGL *_next = _context->dispatcher.error.next();
  12885. RegalAssert(_next);
  12886. GLenum _error = GL_NO_ERROR;
  12887. if (!_context->err.inBeginEnd)
  12888. _error = _next->call(&_next->glGetError)();
  12889. RegalAssert(_error==GL_NO_ERROR);
  12890. _next->call(&_next->glVertexAttrib4d)(index, x, y, z, w);
  12891. if (!_context->err.inBeginEnd) {
  12892. _error = _next->call(&_next->glGetError)();
  12893. if (_error!=GL_NO_ERROR) {
  12894. Error("glVertexAttrib4d : ",Token::GLerrorToString(_error));
  12895. #if REGAL_BREAK
  12896. Break::ErrorCB(_error);
  12897. #endif
  12898. if (_context->err.callback)
  12899. _context->err.callback( _error );
  12900. }
  12901. }
  12902. }
  12903. static void REGAL_CALL error_glVertexAttrib4dv(GLuint index, const GLdouble *v)
  12904. {
  12905. Internal("error_glVertexAttrib4dv","()");
  12906. RegalContext *_context = REGAL_GET_CONTEXT();
  12907. RegalAssert(_context);
  12908. DispatchTableGL *_next = _context->dispatcher.error.next();
  12909. RegalAssert(_next);
  12910. GLenum _error = GL_NO_ERROR;
  12911. if (!_context->err.inBeginEnd)
  12912. _error = _next->call(&_next->glGetError)();
  12913. RegalAssert(_error==GL_NO_ERROR);
  12914. _next->call(&_next->glVertexAttrib4dv)(index, v);
  12915. if (!_context->err.inBeginEnd) {
  12916. _error = _next->call(&_next->glGetError)();
  12917. if (_error!=GL_NO_ERROR) {
  12918. Error("glVertexAttrib4dv : ",Token::GLerrorToString(_error));
  12919. #if REGAL_BREAK
  12920. Break::ErrorCB(_error);
  12921. #endif
  12922. if (_context->err.callback)
  12923. _context->err.callback( _error );
  12924. }
  12925. }
  12926. }
  12927. static void REGAL_CALL error_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  12928. {
  12929. Internal("error_glVertexAttrib4f","()");
  12930. RegalContext *_context = REGAL_GET_CONTEXT();
  12931. RegalAssert(_context);
  12932. DispatchTableGL *_next = _context->dispatcher.error.next();
  12933. RegalAssert(_next);
  12934. GLenum _error = GL_NO_ERROR;
  12935. if (!_context->err.inBeginEnd)
  12936. _error = _next->call(&_next->glGetError)();
  12937. RegalAssert(_error==GL_NO_ERROR);
  12938. _next->call(&_next->glVertexAttrib4f)(index, x, y, z, w);
  12939. if (!_context->err.inBeginEnd) {
  12940. _error = _next->call(&_next->glGetError)();
  12941. if (_error!=GL_NO_ERROR) {
  12942. Error("glVertexAttrib4f : ",Token::GLerrorToString(_error));
  12943. #if REGAL_BREAK
  12944. Break::ErrorCB(_error);
  12945. #endif
  12946. if (_context->err.callback)
  12947. _context->err.callback( _error );
  12948. }
  12949. }
  12950. }
  12951. static void REGAL_CALL error_glVertexAttrib4fv(GLuint index, const GLfloat *v)
  12952. {
  12953. Internal("error_glVertexAttrib4fv","()");
  12954. RegalContext *_context = REGAL_GET_CONTEXT();
  12955. RegalAssert(_context);
  12956. DispatchTableGL *_next = _context->dispatcher.error.next();
  12957. RegalAssert(_next);
  12958. GLenum _error = GL_NO_ERROR;
  12959. if (!_context->err.inBeginEnd)
  12960. _error = _next->call(&_next->glGetError)();
  12961. RegalAssert(_error==GL_NO_ERROR);
  12962. _next->call(&_next->glVertexAttrib4fv)(index, v);
  12963. if (!_context->err.inBeginEnd) {
  12964. _error = _next->call(&_next->glGetError)();
  12965. if (_error!=GL_NO_ERROR) {
  12966. Error("glVertexAttrib4fv : ",Token::GLerrorToString(_error));
  12967. #if REGAL_BREAK
  12968. Break::ErrorCB(_error);
  12969. #endif
  12970. if (_context->err.callback)
  12971. _context->err.callback( _error );
  12972. }
  12973. }
  12974. }
  12975. static void REGAL_CALL error_glVertexAttrib4iv(GLuint index, const GLint *v)
  12976. {
  12977. Internal("error_glVertexAttrib4iv","()");
  12978. RegalContext *_context = REGAL_GET_CONTEXT();
  12979. RegalAssert(_context);
  12980. DispatchTableGL *_next = _context->dispatcher.error.next();
  12981. RegalAssert(_next);
  12982. GLenum _error = GL_NO_ERROR;
  12983. if (!_context->err.inBeginEnd)
  12984. _error = _next->call(&_next->glGetError)();
  12985. RegalAssert(_error==GL_NO_ERROR);
  12986. _next->call(&_next->glVertexAttrib4iv)(index, v);
  12987. if (!_context->err.inBeginEnd) {
  12988. _error = _next->call(&_next->glGetError)();
  12989. if (_error!=GL_NO_ERROR) {
  12990. Error("glVertexAttrib4iv : ",Token::GLerrorToString(_error));
  12991. #if REGAL_BREAK
  12992. Break::ErrorCB(_error);
  12993. #endif
  12994. if (_context->err.callback)
  12995. _context->err.callback( _error );
  12996. }
  12997. }
  12998. }
  12999. static void REGAL_CALL error_glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
  13000. {
  13001. Internal("error_glVertexAttrib4s","()");
  13002. RegalContext *_context = REGAL_GET_CONTEXT();
  13003. RegalAssert(_context);
  13004. DispatchTableGL *_next = _context->dispatcher.error.next();
  13005. RegalAssert(_next);
  13006. GLenum _error = GL_NO_ERROR;
  13007. if (!_context->err.inBeginEnd)
  13008. _error = _next->call(&_next->glGetError)();
  13009. RegalAssert(_error==GL_NO_ERROR);
  13010. _next->call(&_next->glVertexAttrib4s)(index, x, y, z, w);
  13011. if (!_context->err.inBeginEnd) {
  13012. _error = _next->call(&_next->glGetError)();
  13013. if (_error!=GL_NO_ERROR) {
  13014. Error("glVertexAttrib4s : ",Token::GLerrorToString(_error));
  13015. #if REGAL_BREAK
  13016. Break::ErrorCB(_error);
  13017. #endif
  13018. if (_context->err.callback)
  13019. _context->err.callback( _error );
  13020. }
  13021. }
  13022. }
  13023. static void REGAL_CALL error_glVertexAttrib4sv(GLuint index, const GLshort *v)
  13024. {
  13025. Internal("error_glVertexAttrib4sv","()");
  13026. RegalContext *_context = REGAL_GET_CONTEXT();
  13027. RegalAssert(_context);
  13028. DispatchTableGL *_next = _context->dispatcher.error.next();
  13029. RegalAssert(_next);
  13030. GLenum _error = GL_NO_ERROR;
  13031. if (!_context->err.inBeginEnd)
  13032. _error = _next->call(&_next->glGetError)();
  13033. RegalAssert(_error==GL_NO_ERROR);
  13034. _next->call(&_next->glVertexAttrib4sv)(index, v);
  13035. if (!_context->err.inBeginEnd) {
  13036. _error = _next->call(&_next->glGetError)();
  13037. if (_error!=GL_NO_ERROR) {
  13038. Error("glVertexAttrib4sv : ",Token::GLerrorToString(_error));
  13039. #if REGAL_BREAK
  13040. Break::ErrorCB(_error);
  13041. #endif
  13042. if (_context->err.callback)
  13043. _context->err.callback( _error );
  13044. }
  13045. }
  13046. }
  13047. static void REGAL_CALL error_glVertexAttrib4ubv(GLuint index, const GLubyte *v)
  13048. {
  13049. Internal("error_glVertexAttrib4ubv","()");
  13050. RegalContext *_context = REGAL_GET_CONTEXT();
  13051. RegalAssert(_context);
  13052. DispatchTableGL *_next = _context->dispatcher.error.next();
  13053. RegalAssert(_next);
  13054. GLenum _error = GL_NO_ERROR;
  13055. if (!_context->err.inBeginEnd)
  13056. _error = _next->call(&_next->glGetError)();
  13057. RegalAssert(_error==GL_NO_ERROR);
  13058. _next->call(&_next->glVertexAttrib4ubv)(index, v);
  13059. if (!_context->err.inBeginEnd) {
  13060. _error = _next->call(&_next->glGetError)();
  13061. if (_error!=GL_NO_ERROR) {
  13062. Error("glVertexAttrib4ubv : ",Token::GLerrorToString(_error));
  13063. #if REGAL_BREAK
  13064. Break::ErrorCB(_error);
  13065. #endif
  13066. if (_context->err.callback)
  13067. _context->err.callback( _error );
  13068. }
  13069. }
  13070. }
  13071. static void REGAL_CALL error_glVertexAttrib4uiv(GLuint index, const GLuint *v)
  13072. {
  13073. Internal("error_glVertexAttrib4uiv","()");
  13074. RegalContext *_context = REGAL_GET_CONTEXT();
  13075. RegalAssert(_context);
  13076. DispatchTableGL *_next = _context->dispatcher.error.next();
  13077. RegalAssert(_next);
  13078. GLenum _error = GL_NO_ERROR;
  13079. if (!_context->err.inBeginEnd)
  13080. _error = _next->call(&_next->glGetError)();
  13081. RegalAssert(_error==GL_NO_ERROR);
  13082. _next->call(&_next->glVertexAttrib4uiv)(index, v);
  13083. if (!_context->err.inBeginEnd) {
  13084. _error = _next->call(&_next->glGetError)();
  13085. if (_error!=GL_NO_ERROR) {
  13086. Error("glVertexAttrib4uiv : ",Token::GLerrorToString(_error));
  13087. #if REGAL_BREAK
  13088. Break::ErrorCB(_error);
  13089. #endif
  13090. if (_context->err.callback)
  13091. _context->err.callback( _error );
  13092. }
  13093. }
  13094. }
  13095. static void REGAL_CALL error_glVertexAttrib4usv(GLuint index, const GLushort *v)
  13096. {
  13097. Internal("error_glVertexAttrib4usv","()");
  13098. RegalContext *_context = REGAL_GET_CONTEXT();
  13099. RegalAssert(_context);
  13100. DispatchTableGL *_next = _context->dispatcher.error.next();
  13101. RegalAssert(_next);
  13102. GLenum _error = GL_NO_ERROR;
  13103. if (!_context->err.inBeginEnd)
  13104. _error = _next->call(&_next->glGetError)();
  13105. RegalAssert(_error==GL_NO_ERROR);
  13106. _next->call(&_next->glVertexAttrib4usv)(index, v);
  13107. if (!_context->err.inBeginEnd) {
  13108. _error = _next->call(&_next->glGetError)();
  13109. if (_error!=GL_NO_ERROR) {
  13110. Error("glVertexAttrib4usv : ",Token::GLerrorToString(_error));
  13111. #if REGAL_BREAK
  13112. Break::ErrorCB(_error);
  13113. #endif
  13114. if (_context->err.callback)
  13115. _context->err.callback( _error );
  13116. }
  13117. }
  13118. }
  13119. static void REGAL_CALL error_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
  13120. {
  13121. Internal("error_glVertexAttribPointer","()");
  13122. RegalContext *_context = REGAL_GET_CONTEXT();
  13123. RegalAssert(_context);
  13124. DispatchTableGL *_next = _context->dispatcher.error.next();
  13125. RegalAssert(_next);
  13126. GLenum _error = GL_NO_ERROR;
  13127. if (!_context->err.inBeginEnd)
  13128. _error = _next->call(&_next->glGetError)();
  13129. RegalAssert(_error==GL_NO_ERROR);
  13130. _next->call(&_next->glVertexAttribPointer)(index, size, type, normalized, stride, pointer);
  13131. if (!_context->err.inBeginEnd) {
  13132. _error = _next->call(&_next->glGetError)();
  13133. if (_error!=GL_NO_ERROR) {
  13134. Error("glVertexAttribPointer : ",Token::GLerrorToString(_error));
  13135. #if REGAL_BREAK
  13136. Break::ErrorCB(_error);
  13137. #endif
  13138. if (_context->err.callback)
  13139. _context->err.callback( _error );
  13140. }
  13141. }
  13142. }
  13143. // GL_VERSION_2_1
  13144. static void REGAL_CALL error_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  13145. {
  13146. Internal("error_glUniformMatrix2x3fv","()");
  13147. RegalContext *_context = REGAL_GET_CONTEXT();
  13148. RegalAssert(_context);
  13149. DispatchTableGL *_next = _context->dispatcher.error.next();
  13150. RegalAssert(_next);
  13151. GLenum _error = GL_NO_ERROR;
  13152. if (!_context->err.inBeginEnd)
  13153. _error = _next->call(&_next->glGetError)();
  13154. RegalAssert(_error==GL_NO_ERROR);
  13155. _next->call(&_next->glUniformMatrix2x3fv)(location, count, transpose, value);
  13156. if (!_context->err.inBeginEnd) {
  13157. _error = _next->call(&_next->glGetError)();
  13158. if (_error!=GL_NO_ERROR) {
  13159. Error("glUniformMatrix2x3fv : ",Token::GLerrorToString(_error));
  13160. #if REGAL_BREAK
  13161. Break::ErrorCB(_error);
  13162. #endif
  13163. if (_context->err.callback)
  13164. _context->err.callback( _error );
  13165. }
  13166. }
  13167. }
  13168. static void REGAL_CALL error_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  13169. {
  13170. Internal("error_glUniformMatrix2x4fv","()");
  13171. RegalContext *_context = REGAL_GET_CONTEXT();
  13172. RegalAssert(_context);
  13173. DispatchTableGL *_next = _context->dispatcher.error.next();
  13174. RegalAssert(_next);
  13175. GLenum _error = GL_NO_ERROR;
  13176. if (!_context->err.inBeginEnd)
  13177. _error = _next->call(&_next->glGetError)();
  13178. RegalAssert(_error==GL_NO_ERROR);
  13179. _next->call(&_next->glUniformMatrix2x4fv)(location, count, transpose, value);
  13180. if (!_context->err.inBeginEnd) {
  13181. _error = _next->call(&_next->glGetError)();
  13182. if (_error!=GL_NO_ERROR) {
  13183. Error("glUniformMatrix2x4fv : ",Token::GLerrorToString(_error));
  13184. #if REGAL_BREAK
  13185. Break::ErrorCB(_error);
  13186. #endif
  13187. if (_context->err.callback)
  13188. _context->err.callback( _error );
  13189. }
  13190. }
  13191. }
  13192. static void REGAL_CALL error_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  13193. {
  13194. Internal("error_glUniformMatrix3x2fv","()");
  13195. RegalContext *_context = REGAL_GET_CONTEXT();
  13196. RegalAssert(_context);
  13197. DispatchTableGL *_next = _context->dispatcher.error.next();
  13198. RegalAssert(_next);
  13199. GLenum _error = GL_NO_ERROR;
  13200. if (!_context->err.inBeginEnd)
  13201. _error = _next->call(&_next->glGetError)();
  13202. RegalAssert(_error==GL_NO_ERROR);
  13203. _next->call(&_next->glUniformMatrix3x2fv)(location, count, transpose, value);
  13204. if (!_context->err.inBeginEnd) {
  13205. _error = _next->call(&_next->glGetError)();
  13206. if (_error!=GL_NO_ERROR) {
  13207. Error("glUniformMatrix3x2fv : ",Token::GLerrorToString(_error));
  13208. #if REGAL_BREAK
  13209. Break::ErrorCB(_error);
  13210. #endif
  13211. if (_context->err.callback)
  13212. _context->err.callback( _error );
  13213. }
  13214. }
  13215. }
  13216. static void REGAL_CALL error_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  13217. {
  13218. Internal("error_glUniformMatrix3x4fv","()");
  13219. RegalContext *_context = REGAL_GET_CONTEXT();
  13220. RegalAssert(_context);
  13221. DispatchTableGL *_next = _context->dispatcher.error.next();
  13222. RegalAssert(_next);
  13223. GLenum _error = GL_NO_ERROR;
  13224. if (!_context->err.inBeginEnd)
  13225. _error = _next->call(&_next->glGetError)();
  13226. RegalAssert(_error==GL_NO_ERROR);
  13227. _next->call(&_next->glUniformMatrix3x4fv)(location, count, transpose, value);
  13228. if (!_context->err.inBeginEnd) {
  13229. _error = _next->call(&_next->glGetError)();
  13230. if (_error!=GL_NO_ERROR) {
  13231. Error("glUniformMatrix3x4fv : ",Token::GLerrorToString(_error));
  13232. #if REGAL_BREAK
  13233. Break::ErrorCB(_error);
  13234. #endif
  13235. if (_context->err.callback)
  13236. _context->err.callback( _error );
  13237. }
  13238. }
  13239. }
  13240. static void REGAL_CALL error_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  13241. {
  13242. Internal("error_glUniformMatrix4x2fv","()");
  13243. RegalContext *_context = REGAL_GET_CONTEXT();
  13244. RegalAssert(_context);
  13245. DispatchTableGL *_next = _context->dispatcher.error.next();
  13246. RegalAssert(_next);
  13247. GLenum _error = GL_NO_ERROR;
  13248. if (!_context->err.inBeginEnd)
  13249. _error = _next->call(&_next->glGetError)();
  13250. RegalAssert(_error==GL_NO_ERROR);
  13251. _next->call(&_next->glUniformMatrix4x2fv)(location, count, transpose, value);
  13252. if (!_context->err.inBeginEnd) {
  13253. _error = _next->call(&_next->glGetError)();
  13254. if (_error!=GL_NO_ERROR) {
  13255. Error("glUniformMatrix4x2fv : ",Token::GLerrorToString(_error));
  13256. #if REGAL_BREAK
  13257. Break::ErrorCB(_error);
  13258. #endif
  13259. if (_context->err.callback)
  13260. _context->err.callback( _error );
  13261. }
  13262. }
  13263. }
  13264. static void REGAL_CALL error_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  13265. {
  13266. Internal("error_glUniformMatrix4x3fv","()");
  13267. RegalContext *_context = REGAL_GET_CONTEXT();
  13268. RegalAssert(_context);
  13269. DispatchTableGL *_next = _context->dispatcher.error.next();
  13270. RegalAssert(_next);
  13271. GLenum _error = GL_NO_ERROR;
  13272. if (!_context->err.inBeginEnd)
  13273. _error = _next->call(&_next->glGetError)();
  13274. RegalAssert(_error==GL_NO_ERROR);
  13275. _next->call(&_next->glUniformMatrix4x3fv)(location, count, transpose, value);
  13276. if (!_context->err.inBeginEnd) {
  13277. _error = _next->call(&_next->glGetError)();
  13278. if (_error!=GL_NO_ERROR) {
  13279. Error("glUniformMatrix4x3fv : ",Token::GLerrorToString(_error));
  13280. #if REGAL_BREAK
  13281. Break::ErrorCB(_error);
  13282. #endif
  13283. if (_context->err.callback)
  13284. _context->err.callback( _error );
  13285. }
  13286. }
  13287. }
  13288. // GL_VERSION_3_0
  13289. static void REGAL_CALL error_glBeginConditionalRender(GLuint id, GLenum mode)
  13290. {
  13291. Internal("error_glBeginConditionalRender","()");
  13292. RegalContext *_context = REGAL_GET_CONTEXT();
  13293. RegalAssert(_context);
  13294. DispatchTableGL *_next = _context->dispatcher.error.next();
  13295. RegalAssert(_next);
  13296. GLenum _error = GL_NO_ERROR;
  13297. if (!_context->err.inBeginEnd)
  13298. _error = _next->call(&_next->glGetError)();
  13299. RegalAssert(_error==GL_NO_ERROR);
  13300. _next->call(&_next->glBeginConditionalRender)(id, mode);
  13301. if (!_context->err.inBeginEnd) {
  13302. _error = _next->call(&_next->glGetError)();
  13303. if (_error!=GL_NO_ERROR) {
  13304. Error("glBeginConditionalRender : ",Token::GLerrorToString(_error));
  13305. #if REGAL_BREAK
  13306. Break::ErrorCB(_error);
  13307. #endif
  13308. if (_context->err.callback)
  13309. _context->err.callback( _error );
  13310. }
  13311. }
  13312. }
  13313. static void REGAL_CALL error_glBeginTransformFeedback(GLenum primitiveMode)
  13314. {
  13315. Internal("error_glBeginTransformFeedback","()");
  13316. RegalContext *_context = REGAL_GET_CONTEXT();
  13317. RegalAssert(_context);
  13318. DispatchTableGL *_next = _context->dispatcher.error.next();
  13319. RegalAssert(_next);
  13320. GLenum _error = GL_NO_ERROR;
  13321. if (!_context->err.inBeginEnd)
  13322. _error = _next->call(&_next->glGetError)();
  13323. RegalAssert(_error==GL_NO_ERROR);
  13324. _next->call(&_next->glBeginTransformFeedback)(primitiveMode);
  13325. if (!_context->err.inBeginEnd) {
  13326. _error = _next->call(&_next->glGetError)();
  13327. if (_error!=GL_NO_ERROR) {
  13328. Error("glBeginTransformFeedback : ",Token::GLerrorToString(_error));
  13329. #if REGAL_BREAK
  13330. Break::ErrorCB(_error);
  13331. #endif
  13332. if (_context->err.callback)
  13333. _context->err.callback( _error );
  13334. }
  13335. }
  13336. }
  13337. static void REGAL_CALL error_glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name)
  13338. {
  13339. Internal("error_glBindFragDataLocation","()");
  13340. RegalContext *_context = REGAL_GET_CONTEXT();
  13341. RegalAssert(_context);
  13342. DispatchTableGL *_next = _context->dispatcher.error.next();
  13343. RegalAssert(_next);
  13344. GLenum _error = GL_NO_ERROR;
  13345. if (!_context->err.inBeginEnd)
  13346. _error = _next->call(&_next->glGetError)();
  13347. RegalAssert(_error==GL_NO_ERROR);
  13348. _next->call(&_next->glBindFragDataLocation)(program, color, name);
  13349. if (!_context->err.inBeginEnd) {
  13350. _error = _next->call(&_next->glGetError)();
  13351. if (_error!=GL_NO_ERROR) {
  13352. Error("glBindFragDataLocation : ",Token::GLerrorToString(_error));
  13353. #if REGAL_BREAK
  13354. Break::ErrorCB(_error);
  13355. #endif
  13356. if (_context->err.callback)
  13357. _context->err.callback( _error );
  13358. }
  13359. }
  13360. }
  13361. static void REGAL_CALL error_glClampColor(GLenum target, GLenum clamp)
  13362. {
  13363. Internal("error_glClampColor","()");
  13364. RegalContext *_context = REGAL_GET_CONTEXT();
  13365. RegalAssert(_context);
  13366. DispatchTableGL *_next = _context->dispatcher.error.next();
  13367. RegalAssert(_next);
  13368. GLenum _error = GL_NO_ERROR;
  13369. if (!_context->err.inBeginEnd)
  13370. _error = _next->call(&_next->glGetError)();
  13371. RegalAssert(_error==GL_NO_ERROR);
  13372. _next->call(&_next->glClampColor)(target, clamp);
  13373. if (!_context->err.inBeginEnd) {
  13374. _error = _next->call(&_next->glGetError)();
  13375. if (_error!=GL_NO_ERROR) {
  13376. Error("glClampColor : ",Token::GLerrorToString(_error));
  13377. #if REGAL_BREAK
  13378. Break::ErrorCB(_error);
  13379. #endif
  13380. if (_context->err.callback)
  13381. _context->err.callback( _error );
  13382. }
  13383. }
  13384. }
  13385. static void REGAL_CALL error_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
  13386. {
  13387. Internal("error_glClearBufferfi","()");
  13388. RegalContext *_context = REGAL_GET_CONTEXT();
  13389. RegalAssert(_context);
  13390. DispatchTableGL *_next = _context->dispatcher.error.next();
  13391. RegalAssert(_next);
  13392. GLenum _error = GL_NO_ERROR;
  13393. if (!_context->err.inBeginEnd)
  13394. _error = _next->call(&_next->glGetError)();
  13395. RegalAssert(_error==GL_NO_ERROR);
  13396. _next->call(&_next->glClearBufferfi)(buffer, drawbuffer, depth, stencil);
  13397. if (!_context->err.inBeginEnd) {
  13398. _error = _next->call(&_next->glGetError)();
  13399. if (_error!=GL_NO_ERROR) {
  13400. Error("glClearBufferfi : ",Token::GLerrorToString(_error));
  13401. #if REGAL_BREAK
  13402. Break::ErrorCB(_error);
  13403. #endif
  13404. if (_context->err.callback)
  13405. _context->err.callback( _error );
  13406. }
  13407. }
  13408. }
  13409. static void REGAL_CALL error_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
  13410. {
  13411. Internal("error_glClearBufferfv","()");
  13412. RegalContext *_context = REGAL_GET_CONTEXT();
  13413. RegalAssert(_context);
  13414. DispatchTableGL *_next = _context->dispatcher.error.next();
  13415. RegalAssert(_next);
  13416. GLenum _error = GL_NO_ERROR;
  13417. if (!_context->err.inBeginEnd)
  13418. _error = _next->call(&_next->glGetError)();
  13419. RegalAssert(_error==GL_NO_ERROR);
  13420. _next->call(&_next->glClearBufferfv)(buffer, drawbuffer, value);
  13421. if (!_context->err.inBeginEnd) {
  13422. _error = _next->call(&_next->glGetError)();
  13423. if (_error!=GL_NO_ERROR) {
  13424. Error("glClearBufferfv : ",Token::GLerrorToString(_error));
  13425. #if REGAL_BREAK
  13426. Break::ErrorCB(_error);
  13427. #endif
  13428. if (_context->err.callback)
  13429. _context->err.callback( _error );
  13430. }
  13431. }
  13432. }
  13433. static void REGAL_CALL error_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
  13434. {
  13435. Internal("error_glClearBufferiv","()");
  13436. RegalContext *_context = REGAL_GET_CONTEXT();
  13437. RegalAssert(_context);
  13438. DispatchTableGL *_next = _context->dispatcher.error.next();
  13439. RegalAssert(_next);
  13440. GLenum _error = GL_NO_ERROR;
  13441. if (!_context->err.inBeginEnd)
  13442. _error = _next->call(&_next->glGetError)();
  13443. RegalAssert(_error==GL_NO_ERROR);
  13444. _next->call(&_next->glClearBufferiv)(buffer, drawbuffer, value);
  13445. if (!_context->err.inBeginEnd) {
  13446. _error = _next->call(&_next->glGetError)();
  13447. if (_error!=GL_NO_ERROR) {
  13448. Error("glClearBufferiv : ",Token::GLerrorToString(_error));
  13449. #if REGAL_BREAK
  13450. Break::ErrorCB(_error);
  13451. #endif
  13452. if (_context->err.callback)
  13453. _context->err.callback( _error );
  13454. }
  13455. }
  13456. }
  13457. static void REGAL_CALL error_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
  13458. {
  13459. Internal("error_glClearBufferuiv","()");
  13460. RegalContext *_context = REGAL_GET_CONTEXT();
  13461. RegalAssert(_context);
  13462. DispatchTableGL *_next = _context->dispatcher.error.next();
  13463. RegalAssert(_next);
  13464. GLenum _error = GL_NO_ERROR;
  13465. if (!_context->err.inBeginEnd)
  13466. _error = _next->call(&_next->glGetError)();
  13467. RegalAssert(_error==GL_NO_ERROR);
  13468. _next->call(&_next->glClearBufferuiv)(buffer, drawbuffer, value);
  13469. if (!_context->err.inBeginEnd) {
  13470. _error = _next->call(&_next->glGetError)();
  13471. if (_error!=GL_NO_ERROR) {
  13472. Error("glClearBufferuiv : ",Token::GLerrorToString(_error));
  13473. #if REGAL_BREAK
  13474. Break::ErrorCB(_error);
  13475. #endif
  13476. if (_context->err.callback)
  13477. _context->err.callback( _error );
  13478. }
  13479. }
  13480. }
  13481. static void REGAL_CALL error_glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
  13482. {
  13483. Internal("error_glColorMaski","()");
  13484. RegalContext *_context = REGAL_GET_CONTEXT();
  13485. RegalAssert(_context);
  13486. DispatchTableGL *_next = _context->dispatcher.error.next();
  13487. RegalAssert(_next);
  13488. GLenum _error = GL_NO_ERROR;
  13489. if (!_context->err.inBeginEnd)
  13490. _error = _next->call(&_next->glGetError)();
  13491. RegalAssert(_error==GL_NO_ERROR);
  13492. _next->call(&_next->glColorMaski)(index, r, g, b, a);
  13493. if (!_context->err.inBeginEnd) {
  13494. _error = _next->call(&_next->glGetError)();
  13495. if (_error!=GL_NO_ERROR) {
  13496. Error("glColorMaski : ",Token::GLerrorToString(_error));
  13497. #if REGAL_BREAK
  13498. Break::ErrorCB(_error);
  13499. #endif
  13500. if (_context->err.callback)
  13501. _context->err.callback( _error );
  13502. }
  13503. }
  13504. }
  13505. static void REGAL_CALL error_glDisablei(GLenum cap, GLuint index)
  13506. {
  13507. Internal("error_glDisablei","()");
  13508. RegalContext *_context = REGAL_GET_CONTEXT();
  13509. RegalAssert(_context);
  13510. DispatchTableGL *_next = _context->dispatcher.error.next();
  13511. RegalAssert(_next);
  13512. GLenum _error = GL_NO_ERROR;
  13513. if (!_context->err.inBeginEnd)
  13514. _error = _next->call(&_next->glGetError)();
  13515. RegalAssert(_error==GL_NO_ERROR);
  13516. _next->call(&_next->glDisablei)(cap, index);
  13517. if (!_context->err.inBeginEnd) {
  13518. _error = _next->call(&_next->glGetError)();
  13519. if (_error!=GL_NO_ERROR) {
  13520. Error("glDisablei : ",Token::GLerrorToString(_error));
  13521. #if REGAL_BREAK
  13522. Break::ErrorCB(_error);
  13523. #endif
  13524. if (_context->err.callback)
  13525. _context->err.callback( _error );
  13526. }
  13527. }
  13528. }
  13529. static void REGAL_CALL error_glEnablei(GLenum cap, GLuint index)
  13530. {
  13531. Internal("error_glEnablei","()");
  13532. RegalContext *_context = REGAL_GET_CONTEXT();
  13533. RegalAssert(_context);
  13534. DispatchTableGL *_next = _context->dispatcher.error.next();
  13535. RegalAssert(_next);
  13536. GLenum _error = GL_NO_ERROR;
  13537. if (!_context->err.inBeginEnd)
  13538. _error = _next->call(&_next->glGetError)();
  13539. RegalAssert(_error==GL_NO_ERROR);
  13540. _next->call(&_next->glEnablei)(cap, index);
  13541. if (!_context->err.inBeginEnd) {
  13542. _error = _next->call(&_next->glGetError)();
  13543. if (_error!=GL_NO_ERROR) {
  13544. Error("glEnablei : ",Token::GLerrorToString(_error));
  13545. #if REGAL_BREAK
  13546. Break::ErrorCB(_error);
  13547. #endif
  13548. if (_context->err.callback)
  13549. _context->err.callback( _error );
  13550. }
  13551. }
  13552. }
  13553. static void REGAL_CALL error_glEndConditionalRender(void)
  13554. {
  13555. Internal("error_glEndConditionalRender","()");
  13556. RegalContext *_context = REGAL_GET_CONTEXT();
  13557. RegalAssert(_context);
  13558. DispatchTableGL *_next = _context->dispatcher.error.next();
  13559. RegalAssert(_next);
  13560. GLenum _error = GL_NO_ERROR;
  13561. if (!_context->err.inBeginEnd)
  13562. _error = _next->call(&_next->glGetError)();
  13563. RegalAssert(_error==GL_NO_ERROR);
  13564. _next->call(&_next->glEndConditionalRender)();
  13565. if (!_context->err.inBeginEnd) {
  13566. _error = _next->call(&_next->glGetError)();
  13567. if (_error!=GL_NO_ERROR) {
  13568. Error("glEndConditionalRender : ",Token::GLerrorToString(_error));
  13569. #if REGAL_BREAK
  13570. Break::ErrorCB(_error);
  13571. #endif
  13572. if (_context->err.callback)
  13573. _context->err.callback( _error );
  13574. }
  13575. }
  13576. }
  13577. static void REGAL_CALL error_glEndTransformFeedback(void)
  13578. {
  13579. Internal("error_glEndTransformFeedback","()");
  13580. RegalContext *_context = REGAL_GET_CONTEXT();
  13581. RegalAssert(_context);
  13582. DispatchTableGL *_next = _context->dispatcher.error.next();
  13583. RegalAssert(_next);
  13584. GLenum _error = GL_NO_ERROR;
  13585. if (!_context->err.inBeginEnd)
  13586. _error = _next->call(&_next->glGetError)();
  13587. RegalAssert(_error==GL_NO_ERROR);
  13588. _next->call(&_next->glEndTransformFeedback)();
  13589. if (!_context->err.inBeginEnd) {
  13590. _error = _next->call(&_next->glGetError)();
  13591. if (_error!=GL_NO_ERROR) {
  13592. Error("glEndTransformFeedback : ",Token::GLerrorToString(_error));
  13593. #if REGAL_BREAK
  13594. Break::ErrorCB(_error);
  13595. #endif
  13596. if (_context->err.callback)
  13597. _context->err.callback( _error );
  13598. }
  13599. }
  13600. }
  13601. static void REGAL_CALL error_glGetBooleani_v(GLenum target, GLuint index, GLboolean *data)
  13602. {
  13603. Internal("error_glGetBooleani_v","()");
  13604. RegalContext *_context = REGAL_GET_CONTEXT();
  13605. RegalAssert(_context);
  13606. DispatchTableGL *_next = _context->dispatcher.error.next();
  13607. RegalAssert(_next);
  13608. GLenum _error = GL_NO_ERROR;
  13609. if (!_context->err.inBeginEnd)
  13610. _error = _next->call(&_next->glGetError)();
  13611. RegalAssert(_error==GL_NO_ERROR);
  13612. _next->call(&_next->glGetBooleani_v)(target, index, data);
  13613. if (!_context->err.inBeginEnd) {
  13614. _error = _next->call(&_next->glGetError)();
  13615. if (_error!=GL_NO_ERROR) {
  13616. Error("glGetBooleani_v : ",Token::GLerrorToString(_error));
  13617. #if REGAL_BREAK
  13618. Break::ErrorCB(_error);
  13619. #endif
  13620. if (_context->err.callback)
  13621. _context->err.callback( _error );
  13622. }
  13623. }
  13624. }
  13625. static GLint REGAL_CALL error_glGetFragDataLocation(GLuint program, const GLchar *name)
  13626. {
  13627. Internal("error_glGetFragDataLocation","()");
  13628. RegalContext *_context = REGAL_GET_CONTEXT();
  13629. RegalAssert(_context);
  13630. DispatchTableGL *_next = _context->dispatcher.error.next();
  13631. RegalAssert(_next);
  13632. GLenum _error = GL_NO_ERROR;
  13633. if (!_context->err.inBeginEnd)
  13634. _error = _next->call(&_next->glGetError)();
  13635. RegalAssert(_error==GL_NO_ERROR);
  13636. GLint ret = _next->call(&_next->glGetFragDataLocation)(program, name);
  13637. if (!_context->err.inBeginEnd) {
  13638. _error = _next->call(&_next->glGetError)();
  13639. if (_error!=GL_NO_ERROR) {
  13640. Error("glGetFragDataLocation : ",Token::GLerrorToString(_error));
  13641. #if REGAL_BREAK
  13642. Break::ErrorCB(_error);
  13643. #endif
  13644. if (_context->err.callback)
  13645. _context->err.callback( _error );
  13646. }
  13647. }
  13648. return ret;
  13649. }
  13650. static const GLubyte *REGAL_CALL error_glGetStringi(GLenum name, GLuint index)
  13651. {
  13652. Internal("error_glGetStringi","()");
  13653. RegalContext *_context = REGAL_GET_CONTEXT();
  13654. RegalAssert(_context);
  13655. DispatchTableGL *_next = _context->dispatcher.error.next();
  13656. RegalAssert(_next);
  13657. GLenum _error = GL_NO_ERROR;
  13658. if (!_context->err.inBeginEnd)
  13659. _error = _next->call(&_next->glGetError)();
  13660. RegalAssert(_error==GL_NO_ERROR);
  13661. const GLubyte * ret = _next->call(&_next->glGetStringi)(name, index);
  13662. if (!_context->err.inBeginEnd) {
  13663. _error = _next->call(&_next->glGetError)();
  13664. if (_error!=GL_NO_ERROR) {
  13665. Error("glGetStringi : ",Token::GLerrorToString(_error));
  13666. #if REGAL_BREAK
  13667. Break::ErrorCB(_error);
  13668. #endif
  13669. if (_context->err.callback)
  13670. _context->err.callback( _error );
  13671. }
  13672. }
  13673. return ret;
  13674. }
  13675. static void REGAL_CALL error_glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params)
  13676. {
  13677. Internal("error_glGetTexParameterIiv","()");
  13678. RegalContext *_context = REGAL_GET_CONTEXT();
  13679. RegalAssert(_context);
  13680. DispatchTableGL *_next = _context->dispatcher.error.next();
  13681. RegalAssert(_next);
  13682. GLenum _error = GL_NO_ERROR;
  13683. if (!_context->err.inBeginEnd)
  13684. _error = _next->call(&_next->glGetError)();
  13685. RegalAssert(_error==GL_NO_ERROR);
  13686. _next->call(&_next->glGetTexParameterIiv)(target, pname, params);
  13687. if (!_context->err.inBeginEnd) {
  13688. _error = _next->call(&_next->glGetError)();
  13689. if (_error!=GL_NO_ERROR) {
  13690. Error("glGetTexParameterIiv : ",Token::GLerrorToString(_error));
  13691. #if REGAL_BREAK
  13692. Break::ErrorCB(_error);
  13693. #endif
  13694. if (_context->err.callback)
  13695. _context->err.callback( _error );
  13696. }
  13697. }
  13698. }
  13699. static void REGAL_CALL error_glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
  13700. {
  13701. Internal("error_glGetTexParameterIuiv","()");
  13702. RegalContext *_context = REGAL_GET_CONTEXT();
  13703. RegalAssert(_context);
  13704. DispatchTableGL *_next = _context->dispatcher.error.next();
  13705. RegalAssert(_next);
  13706. GLenum _error = GL_NO_ERROR;
  13707. if (!_context->err.inBeginEnd)
  13708. _error = _next->call(&_next->glGetError)();
  13709. RegalAssert(_error==GL_NO_ERROR);
  13710. _next->call(&_next->glGetTexParameterIuiv)(target, pname, params);
  13711. if (!_context->err.inBeginEnd) {
  13712. _error = _next->call(&_next->glGetError)();
  13713. if (_error!=GL_NO_ERROR) {
  13714. Error("glGetTexParameterIuiv : ",Token::GLerrorToString(_error));
  13715. #if REGAL_BREAK
  13716. Break::ErrorCB(_error);
  13717. #endif
  13718. if (_context->err.callback)
  13719. _context->err.callback( _error );
  13720. }
  13721. }
  13722. }
  13723. static void REGAL_CALL error_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
  13724. {
  13725. Internal("error_glGetTransformFeedbackVarying","()");
  13726. RegalContext *_context = REGAL_GET_CONTEXT();
  13727. RegalAssert(_context);
  13728. DispatchTableGL *_next = _context->dispatcher.error.next();
  13729. RegalAssert(_next);
  13730. GLenum _error = GL_NO_ERROR;
  13731. if (!_context->err.inBeginEnd)
  13732. _error = _next->call(&_next->glGetError)();
  13733. RegalAssert(_error==GL_NO_ERROR);
  13734. _next->call(&_next->glGetTransformFeedbackVarying)(program, index, bufSize, length, size, type, name);
  13735. if (!_context->err.inBeginEnd) {
  13736. _error = _next->call(&_next->glGetError)();
  13737. if (_error!=GL_NO_ERROR) {
  13738. Error("glGetTransformFeedbackVarying : ",Token::GLerrorToString(_error));
  13739. #if REGAL_BREAK
  13740. Break::ErrorCB(_error);
  13741. #endif
  13742. if (_context->err.callback)
  13743. _context->err.callback( _error );
  13744. }
  13745. }
  13746. }
  13747. static void REGAL_CALL error_glGetUniformuiv(GLuint program, GLint location, GLuint *params)
  13748. {
  13749. Internal("error_glGetUniformuiv","()");
  13750. RegalContext *_context = REGAL_GET_CONTEXT();
  13751. RegalAssert(_context);
  13752. DispatchTableGL *_next = _context->dispatcher.error.next();
  13753. RegalAssert(_next);
  13754. GLenum _error = GL_NO_ERROR;
  13755. if (!_context->err.inBeginEnd)
  13756. _error = _next->call(&_next->glGetError)();
  13757. RegalAssert(_error==GL_NO_ERROR);
  13758. _next->call(&_next->glGetUniformuiv)(program, location, params);
  13759. if (!_context->err.inBeginEnd) {
  13760. _error = _next->call(&_next->glGetError)();
  13761. if (_error!=GL_NO_ERROR) {
  13762. Error("glGetUniformuiv : ",Token::GLerrorToString(_error));
  13763. #if REGAL_BREAK
  13764. Break::ErrorCB(_error);
  13765. #endif
  13766. if (_context->err.callback)
  13767. _context->err.callback( _error );
  13768. }
  13769. }
  13770. }
  13771. static void REGAL_CALL error_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
  13772. {
  13773. Internal("error_glGetVertexAttribIiv","()");
  13774. RegalContext *_context = REGAL_GET_CONTEXT();
  13775. RegalAssert(_context);
  13776. DispatchTableGL *_next = _context->dispatcher.error.next();
  13777. RegalAssert(_next);
  13778. GLenum _error = GL_NO_ERROR;
  13779. if (!_context->err.inBeginEnd)
  13780. _error = _next->call(&_next->glGetError)();
  13781. RegalAssert(_error==GL_NO_ERROR);
  13782. _next->call(&_next->glGetVertexAttribIiv)(index, pname, params);
  13783. if (!_context->err.inBeginEnd) {
  13784. _error = _next->call(&_next->glGetError)();
  13785. if (_error!=GL_NO_ERROR) {
  13786. Error("glGetVertexAttribIiv : ",Token::GLerrorToString(_error));
  13787. #if REGAL_BREAK
  13788. Break::ErrorCB(_error);
  13789. #endif
  13790. if (_context->err.callback)
  13791. _context->err.callback( _error );
  13792. }
  13793. }
  13794. }
  13795. static void REGAL_CALL error_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
  13796. {
  13797. Internal("error_glGetVertexAttribIuiv","()");
  13798. RegalContext *_context = REGAL_GET_CONTEXT();
  13799. RegalAssert(_context);
  13800. DispatchTableGL *_next = _context->dispatcher.error.next();
  13801. RegalAssert(_next);
  13802. GLenum _error = GL_NO_ERROR;
  13803. if (!_context->err.inBeginEnd)
  13804. _error = _next->call(&_next->glGetError)();
  13805. RegalAssert(_error==GL_NO_ERROR);
  13806. _next->call(&_next->glGetVertexAttribIuiv)(index, pname, params);
  13807. if (!_context->err.inBeginEnd) {
  13808. _error = _next->call(&_next->glGetError)();
  13809. if (_error!=GL_NO_ERROR) {
  13810. Error("glGetVertexAttribIuiv : ",Token::GLerrorToString(_error));
  13811. #if REGAL_BREAK
  13812. Break::ErrorCB(_error);
  13813. #endif
  13814. if (_context->err.callback)
  13815. _context->err.callback( _error );
  13816. }
  13817. }
  13818. }
  13819. static GLboolean REGAL_CALL error_glIsEnabledi(GLenum target, GLuint index)
  13820. {
  13821. Internal("error_glIsEnabledi","()");
  13822. RegalContext *_context = REGAL_GET_CONTEXT();
  13823. RegalAssert(_context);
  13824. DispatchTableGL *_next = _context->dispatcher.error.next();
  13825. RegalAssert(_next);
  13826. GLenum _error = GL_NO_ERROR;
  13827. if (!_context->err.inBeginEnd)
  13828. _error = _next->call(&_next->glGetError)();
  13829. RegalAssert(_error==GL_NO_ERROR);
  13830. GLboolean ret = _next->call(&_next->glIsEnabledi)(target, index);
  13831. if (!_context->err.inBeginEnd) {
  13832. _error = _next->call(&_next->glGetError)();
  13833. if (_error!=GL_NO_ERROR) {
  13834. Error("glIsEnabledi : ",Token::GLerrorToString(_error));
  13835. #if REGAL_BREAK
  13836. Break::ErrorCB(_error);
  13837. #endif
  13838. if (_context->err.callback)
  13839. _context->err.callback( _error );
  13840. }
  13841. }
  13842. return ret;
  13843. }
  13844. static void REGAL_CALL error_glTexParameterIiv(GLenum target, GLenum pname, const GLint *params)
  13845. {
  13846. Internal("error_glTexParameterIiv","()");
  13847. RegalContext *_context = REGAL_GET_CONTEXT();
  13848. RegalAssert(_context);
  13849. DispatchTableGL *_next = _context->dispatcher.error.next();
  13850. RegalAssert(_next);
  13851. GLenum _error = GL_NO_ERROR;
  13852. if (!_context->err.inBeginEnd)
  13853. _error = _next->call(&_next->glGetError)();
  13854. RegalAssert(_error==GL_NO_ERROR);
  13855. _next->call(&_next->glTexParameterIiv)(target, pname, params);
  13856. if (!_context->err.inBeginEnd) {
  13857. _error = _next->call(&_next->glGetError)();
  13858. if (_error!=GL_NO_ERROR) {
  13859. Error("glTexParameterIiv : ",Token::GLerrorToString(_error));
  13860. #if REGAL_BREAK
  13861. Break::ErrorCB(_error);
  13862. #endif
  13863. if (_context->err.callback)
  13864. _context->err.callback( _error );
  13865. }
  13866. }
  13867. }
  13868. static void REGAL_CALL error_glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
  13869. {
  13870. Internal("error_glTexParameterIuiv","()");
  13871. RegalContext *_context = REGAL_GET_CONTEXT();
  13872. RegalAssert(_context);
  13873. DispatchTableGL *_next = _context->dispatcher.error.next();
  13874. RegalAssert(_next);
  13875. GLenum _error = GL_NO_ERROR;
  13876. if (!_context->err.inBeginEnd)
  13877. _error = _next->call(&_next->glGetError)();
  13878. RegalAssert(_error==GL_NO_ERROR);
  13879. _next->call(&_next->glTexParameterIuiv)(target, pname, params);
  13880. if (!_context->err.inBeginEnd) {
  13881. _error = _next->call(&_next->glGetError)();
  13882. if (_error!=GL_NO_ERROR) {
  13883. Error("glTexParameterIuiv : ",Token::GLerrorToString(_error));
  13884. #if REGAL_BREAK
  13885. Break::ErrorCB(_error);
  13886. #endif
  13887. if (_context->err.callback)
  13888. _context->err.callback( _error );
  13889. }
  13890. }
  13891. }
  13892. static void REGAL_CALL error_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar * const *varyings, GLenum bufferMode)
  13893. {
  13894. Internal("error_glTransformFeedbackVaryings","()");
  13895. RegalContext *_context = REGAL_GET_CONTEXT();
  13896. RegalAssert(_context);
  13897. DispatchTableGL *_next = _context->dispatcher.error.next();
  13898. RegalAssert(_next);
  13899. GLenum _error = GL_NO_ERROR;
  13900. if (!_context->err.inBeginEnd)
  13901. _error = _next->call(&_next->glGetError)();
  13902. RegalAssert(_error==GL_NO_ERROR);
  13903. _next->call(&_next->glTransformFeedbackVaryings)(program, count, varyings, bufferMode);
  13904. if (!_context->err.inBeginEnd) {
  13905. _error = _next->call(&_next->glGetError)();
  13906. if (_error!=GL_NO_ERROR) {
  13907. Error("glTransformFeedbackVaryings : ",Token::GLerrorToString(_error));
  13908. #if REGAL_BREAK
  13909. Break::ErrorCB(_error);
  13910. #endif
  13911. if (_context->err.callback)
  13912. _context->err.callback( _error );
  13913. }
  13914. }
  13915. }
  13916. static void REGAL_CALL error_glUniform1ui(GLint location, GLuint v0)
  13917. {
  13918. Internal("error_glUniform1ui","()");
  13919. RegalContext *_context = REGAL_GET_CONTEXT();
  13920. RegalAssert(_context);
  13921. DispatchTableGL *_next = _context->dispatcher.error.next();
  13922. RegalAssert(_next);
  13923. GLenum _error = GL_NO_ERROR;
  13924. if (!_context->err.inBeginEnd)
  13925. _error = _next->call(&_next->glGetError)();
  13926. RegalAssert(_error==GL_NO_ERROR);
  13927. _next->call(&_next->glUniform1ui)(location, v0);
  13928. if (!_context->err.inBeginEnd) {
  13929. _error = _next->call(&_next->glGetError)();
  13930. if (_error!=GL_NO_ERROR) {
  13931. Error("glUniform1ui : ",Token::GLerrorToString(_error));
  13932. #if REGAL_BREAK
  13933. Break::ErrorCB(_error);
  13934. #endif
  13935. if (_context->err.callback)
  13936. _context->err.callback( _error );
  13937. }
  13938. }
  13939. }
  13940. static void REGAL_CALL error_glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
  13941. {
  13942. Internal("error_glUniform1uiv","()");
  13943. RegalContext *_context = REGAL_GET_CONTEXT();
  13944. RegalAssert(_context);
  13945. DispatchTableGL *_next = _context->dispatcher.error.next();
  13946. RegalAssert(_next);
  13947. GLenum _error = GL_NO_ERROR;
  13948. if (!_context->err.inBeginEnd)
  13949. _error = _next->call(&_next->glGetError)();
  13950. RegalAssert(_error==GL_NO_ERROR);
  13951. _next->call(&_next->glUniform1uiv)(location, count, value);
  13952. if (!_context->err.inBeginEnd) {
  13953. _error = _next->call(&_next->glGetError)();
  13954. if (_error!=GL_NO_ERROR) {
  13955. Error("glUniform1uiv : ",Token::GLerrorToString(_error));
  13956. #if REGAL_BREAK
  13957. Break::ErrorCB(_error);
  13958. #endif
  13959. if (_context->err.callback)
  13960. _context->err.callback( _error );
  13961. }
  13962. }
  13963. }
  13964. static void REGAL_CALL error_glUniform2ui(GLint location, GLuint v0, GLuint v1)
  13965. {
  13966. Internal("error_glUniform2ui","()");
  13967. RegalContext *_context = REGAL_GET_CONTEXT();
  13968. RegalAssert(_context);
  13969. DispatchTableGL *_next = _context->dispatcher.error.next();
  13970. RegalAssert(_next);
  13971. GLenum _error = GL_NO_ERROR;
  13972. if (!_context->err.inBeginEnd)
  13973. _error = _next->call(&_next->glGetError)();
  13974. RegalAssert(_error==GL_NO_ERROR);
  13975. _next->call(&_next->glUniform2ui)(location, v0, v1);
  13976. if (!_context->err.inBeginEnd) {
  13977. _error = _next->call(&_next->glGetError)();
  13978. if (_error!=GL_NO_ERROR) {
  13979. Error("glUniform2ui : ",Token::GLerrorToString(_error));
  13980. #if REGAL_BREAK
  13981. Break::ErrorCB(_error);
  13982. #endif
  13983. if (_context->err.callback)
  13984. _context->err.callback( _error );
  13985. }
  13986. }
  13987. }
  13988. static void REGAL_CALL error_glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
  13989. {
  13990. Internal("error_glUniform2uiv","()");
  13991. RegalContext *_context = REGAL_GET_CONTEXT();
  13992. RegalAssert(_context);
  13993. DispatchTableGL *_next = _context->dispatcher.error.next();
  13994. RegalAssert(_next);
  13995. GLenum _error = GL_NO_ERROR;
  13996. if (!_context->err.inBeginEnd)
  13997. _error = _next->call(&_next->glGetError)();
  13998. RegalAssert(_error==GL_NO_ERROR);
  13999. _next->call(&_next->glUniform2uiv)(location, count, value);
  14000. if (!_context->err.inBeginEnd) {
  14001. _error = _next->call(&_next->glGetError)();
  14002. if (_error!=GL_NO_ERROR) {
  14003. Error("glUniform2uiv : ",Token::GLerrorToString(_error));
  14004. #if REGAL_BREAK
  14005. Break::ErrorCB(_error);
  14006. #endif
  14007. if (_context->err.callback)
  14008. _context->err.callback( _error );
  14009. }
  14010. }
  14011. }
  14012. static void REGAL_CALL error_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
  14013. {
  14014. Internal("error_glUniform3ui","()");
  14015. RegalContext *_context = REGAL_GET_CONTEXT();
  14016. RegalAssert(_context);
  14017. DispatchTableGL *_next = _context->dispatcher.error.next();
  14018. RegalAssert(_next);
  14019. GLenum _error = GL_NO_ERROR;
  14020. if (!_context->err.inBeginEnd)
  14021. _error = _next->call(&_next->glGetError)();
  14022. RegalAssert(_error==GL_NO_ERROR);
  14023. _next->call(&_next->glUniform3ui)(location, v0, v1, v2);
  14024. if (!_context->err.inBeginEnd) {
  14025. _error = _next->call(&_next->glGetError)();
  14026. if (_error!=GL_NO_ERROR) {
  14027. Error("glUniform3ui : ",Token::GLerrorToString(_error));
  14028. #if REGAL_BREAK
  14029. Break::ErrorCB(_error);
  14030. #endif
  14031. if (_context->err.callback)
  14032. _context->err.callback( _error );
  14033. }
  14034. }
  14035. }
  14036. static void REGAL_CALL error_glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
  14037. {
  14038. Internal("error_glUniform3uiv","()");
  14039. RegalContext *_context = REGAL_GET_CONTEXT();
  14040. RegalAssert(_context);
  14041. DispatchTableGL *_next = _context->dispatcher.error.next();
  14042. RegalAssert(_next);
  14043. GLenum _error = GL_NO_ERROR;
  14044. if (!_context->err.inBeginEnd)
  14045. _error = _next->call(&_next->glGetError)();
  14046. RegalAssert(_error==GL_NO_ERROR);
  14047. _next->call(&_next->glUniform3uiv)(location, count, value);
  14048. if (!_context->err.inBeginEnd) {
  14049. _error = _next->call(&_next->glGetError)();
  14050. if (_error!=GL_NO_ERROR) {
  14051. Error("glUniform3uiv : ",Token::GLerrorToString(_error));
  14052. #if REGAL_BREAK
  14053. Break::ErrorCB(_error);
  14054. #endif
  14055. if (_context->err.callback)
  14056. _context->err.callback( _error );
  14057. }
  14058. }
  14059. }
  14060. static void REGAL_CALL error_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
  14061. {
  14062. Internal("error_glUniform4ui","()");
  14063. RegalContext *_context = REGAL_GET_CONTEXT();
  14064. RegalAssert(_context);
  14065. DispatchTableGL *_next = _context->dispatcher.error.next();
  14066. RegalAssert(_next);
  14067. GLenum _error = GL_NO_ERROR;
  14068. if (!_context->err.inBeginEnd)
  14069. _error = _next->call(&_next->glGetError)();
  14070. RegalAssert(_error==GL_NO_ERROR);
  14071. _next->call(&_next->glUniform4ui)(location, v0, v1, v2, v3);
  14072. if (!_context->err.inBeginEnd) {
  14073. _error = _next->call(&_next->glGetError)();
  14074. if (_error!=GL_NO_ERROR) {
  14075. Error("glUniform4ui : ",Token::GLerrorToString(_error));
  14076. #if REGAL_BREAK
  14077. Break::ErrorCB(_error);
  14078. #endif
  14079. if (_context->err.callback)
  14080. _context->err.callback( _error );
  14081. }
  14082. }
  14083. }
  14084. static void REGAL_CALL error_glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
  14085. {
  14086. Internal("error_glUniform4uiv","()");
  14087. RegalContext *_context = REGAL_GET_CONTEXT();
  14088. RegalAssert(_context);
  14089. DispatchTableGL *_next = _context->dispatcher.error.next();
  14090. RegalAssert(_next);
  14091. GLenum _error = GL_NO_ERROR;
  14092. if (!_context->err.inBeginEnd)
  14093. _error = _next->call(&_next->glGetError)();
  14094. RegalAssert(_error==GL_NO_ERROR);
  14095. _next->call(&_next->glUniform4uiv)(location, count, value);
  14096. if (!_context->err.inBeginEnd) {
  14097. _error = _next->call(&_next->glGetError)();
  14098. if (_error!=GL_NO_ERROR) {
  14099. Error("glUniform4uiv : ",Token::GLerrorToString(_error));
  14100. #if REGAL_BREAK
  14101. Break::ErrorCB(_error);
  14102. #endif
  14103. if (_context->err.callback)
  14104. _context->err.callback( _error );
  14105. }
  14106. }
  14107. }
  14108. static void REGAL_CALL error_glVertexAttribI1i(GLuint index, GLint x)
  14109. {
  14110. Internal("error_glVertexAttribI1i","()");
  14111. RegalContext *_context = REGAL_GET_CONTEXT();
  14112. RegalAssert(_context);
  14113. DispatchTableGL *_next = _context->dispatcher.error.next();
  14114. RegalAssert(_next);
  14115. GLenum _error = GL_NO_ERROR;
  14116. if (!_context->err.inBeginEnd)
  14117. _error = _next->call(&_next->glGetError)();
  14118. RegalAssert(_error==GL_NO_ERROR);
  14119. _next->call(&_next->glVertexAttribI1i)(index, x);
  14120. if (!_context->err.inBeginEnd) {
  14121. _error = _next->call(&_next->glGetError)();
  14122. if (_error!=GL_NO_ERROR) {
  14123. Error("glVertexAttribI1i : ",Token::GLerrorToString(_error));
  14124. #if REGAL_BREAK
  14125. Break::ErrorCB(_error);
  14126. #endif
  14127. if (_context->err.callback)
  14128. _context->err.callback( _error );
  14129. }
  14130. }
  14131. }
  14132. static void REGAL_CALL error_glVertexAttribI1iv(GLuint index, const GLint *v)
  14133. {
  14134. Internal("error_glVertexAttribI1iv","()");
  14135. RegalContext *_context = REGAL_GET_CONTEXT();
  14136. RegalAssert(_context);
  14137. DispatchTableGL *_next = _context->dispatcher.error.next();
  14138. RegalAssert(_next);
  14139. GLenum _error = GL_NO_ERROR;
  14140. if (!_context->err.inBeginEnd)
  14141. _error = _next->call(&_next->glGetError)();
  14142. RegalAssert(_error==GL_NO_ERROR);
  14143. _next->call(&_next->glVertexAttribI1iv)(index, v);
  14144. if (!_context->err.inBeginEnd) {
  14145. _error = _next->call(&_next->glGetError)();
  14146. if (_error!=GL_NO_ERROR) {
  14147. Error("glVertexAttribI1iv : ",Token::GLerrorToString(_error));
  14148. #if REGAL_BREAK
  14149. Break::ErrorCB(_error);
  14150. #endif
  14151. if (_context->err.callback)
  14152. _context->err.callback( _error );
  14153. }
  14154. }
  14155. }
  14156. static void REGAL_CALL error_glVertexAttribI1ui(GLuint index, GLuint x)
  14157. {
  14158. Internal("error_glVertexAttribI1ui","()");
  14159. RegalContext *_context = REGAL_GET_CONTEXT();
  14160. RegalAssert(_context);
  14161. DispatchTableGL *_next = _context->dispatcher.error.next();
  14162. RegalAssert(_next);
  14163. GLenum _error = GL_NO_ERROR;
  14164. if (!_context->err.inBeginEnd)
  14165. _error = _next->call(&_next->glGetError)();
  14166. RegalAssert(_error==GL_NO_ERROR);
  14167. _next->call(&_next->glVertexAttribI1ui)(index, x);
  14168. if (!_context->err.inBeginEnd) {
  14169. _error = _next->call(&_next->glGetError)();
  14170. if (_error!=GL_NO_ERROR) {
  14171. Error("glVertexAttribI1ui : ",Token::GLerrorToString(_error));
  14172. #if REGAL_BREAK
  14173. Break::ErrorCB(_error);
  14174. #endif
  14175. if (_context->err.callback)
  14176. _context->err.callback( _error );
  14177. }
  14178. }
  14179. }
  14180. static void REGAL_CALL error_glVertexAttribI1uiv(GLuint index, const GLuint *v)
  14181. {
  14182. Internal("error_glVertexAttribI1uiv","()");
  14183. RegalContext *_context = REGAL_GET_CONTEXT();
  14184. RegalAssert(_context);
  14185. DispatchTableGL *_next = _context->dispatcher.error.next();
  14186. RegalAssert(_next);
  14187. GLenum _error = GL_NO_ERROR;
  14188. if (!_context->err.inBeginEnd)
  14189. _error = _next->call(&_next->glGetError)();
  14190. RegalAssert(_error==GL_NO_ERROR);
  14191. _next->call(&_next->glVertexAttribI1uiv)(index, v);
  14192. if (!_context->err.inBeginEnd) {
  14193. _error = _next->call(&_next->glGetError)();
  14194. if (_error!=GL_NO_ERROR) {
  14195. Error("glVertexAttribI1uiv : ",Token::GLerrorToString(_error));
  14196. #if REGAL_BREAK
  14197. Break::ErrorCB(_error);
  14198. #endif
  14199. if (_context->err.callback)
  14200. _context->err.callback( _error );
  14201. }
  14202. }
  14203. }
  14204. static void REGAL_CALL error_glVertexAttribI2i(GLuint index, GLint x, GLint y)
  14205. {
  14206. Internal("error_glVertexAttribI2i","()");
  14207. RegalContext *_context = REGAL_GET_CONTEXT();
  14208. RegalAssert(_context);
  14209. DispatchTableGL *_next = _context->dispatcher.error.next();
  14210. RegalAssert(_next);
  14211. GLenum _error = GL_NO_ERROR;
  14212. if (!_context->err.inBeginEnd)
  14213. _error = _next->call(&_next->glGetError)();
  14214. RegalAssert(_error==GL_NO_ERROR);
  14215. _next->call(&_next->glVertexAttribI2i)(index, x, y);
  14216. if (!_context->err.inBeginEnd) {
  14217. _error = _next->call(&_next->glGetError)();
  14218. if (_error!=GL_NO_ERROR) {
  14219. Error("glVertexAttribI2i : ",Token::GLerrorToString(_error));
  14220. #if REGAL_BREAK
  14221. Break::ErrorCB(_error);
  14222. #endif
  14223. if (_context->err.callback)
  14224. _context->err.callback( _error );
  14225. }
  14226. }
  14227. }
  14228. static void REGAL_CALL error_glVertexAttribI2iv(GLuint index, const GLint *v)
  14229. {
  14230. Internal("error_glVertexAttribI2iv","()");
  14231. RegalContext *_context = REGAL_GET_CONTEXT();
  14232. RegalAssert(_context);
  14233. DispatchTableGL *_next = _context->dispatcher.error.next();
  14234. RegalAssert(_next);
  14235. GLenum _error = GL_NO_ERROR;
  14236. if (!_context->err.inBeginEnd)
  14237. _error = _next->call(&_next->glGetError)();
  14238. RegalAssert(_error==GL_NO_ERROR);
  14239. _next->call(&_next->glVertexAttribI2iv)(index, v);
  14240. if (!_context->err.inBeginEnd) {
  14241. _error = _next->call(&_next->glGetError)();
  14242. if (_error!=GL_NO_ERROR) {
  14243. Error("glVertexAttribI2iv : ",Token::GLerrorToString(_error));
  14244. #if REGAL_BREAK
  14245. Break::ErrorCB(_error);
  14246. #endif
  14247. if (_context->err.callback)
  14248. _context->err.callback( _error );
  14249. }
  14250. }
  14251. }
  14252. static void REGAL_CALL error_glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
  14253. {
  14254. Internal("error_glVertexAttribI2ui","()");
  14255. RegalContext *_context = REGAL_GET_CONTEXT();
  14256. RegalAssert(_context);
  14257. DispatchTableGL *_next = _context->dispatcher.error.next();
  14258. RegalAssert(_next);
  14259. GLenum _error = GL_NO_ERROR;
  14260. if (!_context->err.inBeginEnd)
  14261. _error = _next->call(&_next->glGetError)();
  14262. RegalAssert(_error==GL_NO_ERROR);
  14263. _next->call(&_next->glVertexAttribI2ui)(index, x, y);
  14264. if (!_context->err.inBeginEnd) {
  14265. _error = _next->call(&_next->glGetError)();
  14266. if (_error!=GL_NO_ERROR) {
  14267. Error("glVertexAttribI2ui : ",Token::GLerrorToString(_error));
  14268. #if REGAL_BREAK
  14269. Break::ErrorCB(_error);
  14270. #endif
  14271. if (_context->err.callback)
  14272. _context->err.callback( _error );
  14273. }
  14274. }
  14275. }
  14276. static void REGAL_CALL error_glVertexAttribI2uiv(GLuint index, const GLuint *v)
  14277. {
  14278. Internal("error_glVertexAttribI2uiv","()");
  14279. RegalContext *_context = REGAL_GET_CONTEXT();
  14280. RegalAssert(_context);
  14281. DispatchTableGL *_next = _context->dispatcher.error.next();
  14282. RegalAssert(_next);
  14283. GLenum _error = GL_NO_ERROR;
  14284. if (!_context->err.inBeginEnd)
  14285. _error = _next->call(&_next->glGetError)();
  14286. RegalAssert(_error==GL_NO_ERROR);
  14287. _next->call(&_next->glVertexAttribI2uiv)(index, v);
  14288. if (!_context->err.inBeginEnd) {
  14289. _error = _next->call(&_next->glGetError)();
  14290. if (_error!=GL_NO_ERROR) {
  14291. Error("glVertexAttribI2uiv : ",Token::GLerrorToString(_error));
  14292. #if REGAL_BREAK
  14293. Break::ErrorCB(_error);
  14294. #endif
  14295. if (_context->err.callback)
  14296. _context->err.callback( _error );
  14297. }
  14298. }
  14299. }
  14300. static void REGAL_CALL error_glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
  14301. {
  14302. Internal("error_glVertexAttribI3i","()");
  14303. RegalContext *_context = REGAL_GET_CONTEXT();
  14304. RegalAssert(_context);
  14305. DispatchTableGL *_next = _context->dispatcher.error.next();
  14306. RegalAssert(_next);
  14307. GLenum _error = GL_NO_ERROR;
  14308. if (!_context->err.inBeginEnd)
  14309. _error = _next->call(&_next->glGetError)();
  14310. RegalAssert(_error==GL_NO_ERROR);
  14311. _next->call(&_next->glVertexAttribI3i)(index, x, y, z);
  14312. if (!_context->err.inBeginEnd) {
  14313. _error = _next->call(&_next->glGetError)();
  14314. if (_error!=GL_NO_ERROR) {
  14315. Error("glVertexAttribI3i : ",Token::GLerrorToString(_error));
  14316. #if REGAL_BREAK
  14317. Break::ErrorCB(_error);
  14318. #endif
  14319. if (_context->err.callback)
  14320. _context->err.callback( _error );
  14321. }
  14322. }
  14323. }
  14324. static void REGAL_CALL error_glVertexAttribI3iv(GLuint index, const GLint *v)
  14325. {
  14326. Internal("error_glVertexAttribI3iv","()");
  14327. RegalContext *_context = REGAL_GET_CONTEXT();
  14328. RegalAssert(_context);
  14329. DispatchTableGL *_next = _context->dispatcher.error.next();
  14330. RegalAssert(_next);
  14331. GLenum _error = GL_NO_ERROR;
  14332. if (!_context->err.inBeginEnd)
  14333. _error = _next->call(&_next->glGetError)();
  14334. RegalAssert(_error==GL_NO_ERROR);
  14335. _next->call(&_next->glVertexAttribI3iv)(index, v);
  14336. if (!_context->err.inBeginEnd) {
  14337. _error = _next->call(&_next->glGetError)();
  14338. if (_error!=GL_NO_ERROR) {
  14339. Error("glVertexAttribI3iv : ",Token::GLerrorToString(_error));
  14340. #if REGAL_BREAK
  14341. Break::ErrorCB(_error);
  14342. #endif
  14343. if (_context->err.callback)
  14344. _context->err.callback( _error );
  14345. }
  14346. }
  14347. }
  14348. static void REGAL_CALL error_glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
  14349. {
  14350. Internal("error_glVertexAttribI3ui","()");
  14351. RegalContext *_context = REGAL_GET_CONTEXT();
  14352. RegalAssert(_context);
  14353. DispatchTableGL *_next = _context->dispatcher.error.next();
  14354. RegalAssert(_next);
  14355. GLenum _error = GL_NO_ERROR;
  14356. if (!_context->err.inBeginEnd)
  14357. _error = _next->call(&_next->glGetError)();
  14358. RegalAssert(_error==GL_NO_ERROR);
  14359. _next->call(&_next->glVertexAttribI3ui)(index, x, y, z);
  14360. if (!_context->err.inBeginEnd) {
  14361. _error = _next->call(&_next->glGetError)();
  14362. if (_error!=GL_NO_ERROR) {
  14363. Error("glVertexAttribI3ui : ",Token::GLerrorToString(_error));
  14364. #if REGAL_BREAK
  14365. Break::ErrorCB(_error);
  14366. #endif
  14367. if (_context->err.callback)
  14368. _context->err.callback( _error );
  14369. }
  14370. }
  14371. }
  14372. static void REGAL_CALL error_glVertexAttribI3uiv(GLuint index, const GLuint *v)
  14373. {
  14374. Internal("error_glVertexAttribI3uiv","()");
  14375. RegalContext *_context = REGAL_GET_CONTEXT();
  14376. RegalAssert(_context);
  14377. DispatchTableGL *_next = _context->dispatcher.error.next();
  14378. RegalAssert(_next);
  14379. GLenum _error = GL_NO_ERROR;
  14380. if (!_context->err.inBeginEnd)
  14381. _error = _next->call(&_next->glGetError)();
  14382. RegalAssert(_error==GL_NO_ERROR);
  14383. _next->call(&_next->glVertexAttribI3uiv)(index, v);
  14384. if (!_context->err.inBeginEnd) {
  14385. _error = _next->call(&_next->glGetError)();
  14386. if (_error!=GL_NO_ERROR) {
  14387. Error("glVertexAttribI3uiv : ",Token::GLerrorToString(_error));
  14388. #if REGAL_BREAK
  14389. Break::ErrorCB(_error);
  14390. #endif
  14391. if (_context->err.callback)
  14392. _context->err.callback( _error );
  14393. }
  14394. }
  14395. }
  14396. static void REGAL_CALL error_glVertexAttribI4bv(GLuint index, const GLbyte *v)
  14397. {
  14398. Internal("error_glVertexAttribI4bv","()");
  14399. RegalContext *_context = REGAL_GET_CONTEXT();
  14400. RegalAssert(_context);
  14401. DispatchTableGL *_next = _context->dispatcher.error.next();
  14402. RegalAssert(_next);
  14403. GLenum _error = GL_NO_ERROR;
  14404. if (!_context->err.inBeginEnd)
  14405. _error = _next->call(&_next->glGetError)();
  14406. RegalAssert(_error==GL_NO_ERROR);
  14407. _next->call(&_next->glVertexAttribI4bv)(index, v);
  14408. if (!_context->err.inBeginEnd) {
  14409. _error = _next->call(&_next->glGetError)();
  14410. if (_error!=GL_NO_ERROR) {
  14411. Error("glVertexAttribI4bv : ",Token::GLerrorToString(_error));
  14412. #if REGAL_BREAK
  14413. Break::ErrorCB(_error);
  14414. #endif
  14415. if (_context->err.callback)
  14416. _context->err.callback( _error );
  14417. }
  14418. }
  14419. }
  14420. static void REGAL_CALL error_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
  14421. {
  14422. Internal("error_glVertexAttribI4i","()");
  14423. RegalContext *_context = REGAL_GET_CONTEXT();
  14424. RegalAssert(_context);
  14425. DispatchTableGL *_next = _context->dispatcher.error.next();
  14426. RegalAssert(_next);
  14427. GLenum _error = GL_NO_ERROR;
  14428. if (!_context->err.inBeginEnd)
  14429. _error = _next->call(&_next->glGetError)();
  14430. RegalAssert(_error==GL_NO_ERROR);
  14431. _next->call(&_next->glVertexAttribI4i)(index, x, y, z, w);
  14432. if (!_context->err.inBeginEnd) {
  14433. _error = _next->call(&_next->glGetError)();
  14434. if (_error!=GL_NO_ERROR) {
  14435. Error("glVertexAttribI4i : ",Token::GLerrorToString(_error));
  14436. #if REGAL_BREAK
  14437. Break::ErrorCB(_error);
  14438. #endif
  14439. if (_context->err.callback)
  14440. _context->err.callback( _error );
  14441. }
  14442. }
  14443. }
  14444. static void REGAL_CALL error_glVertexAttribI4iv(GLuint index, const GLint *v)
  14445. {
  14446. Internal("error_glVertexAttribI4iv","()");
  14447. RegalContext *_context = REGAL_GET_CONTEXT();
  14448. RegalAssert(_context);
  14449. DispatchTableGL *_next = _context->dispatcher.error.next();
  14450. RegalAssert(_next);
  14451. GLenum _error = GL_NO_ERROR;
  14452. if (!_context->err.inBeginEnd)
  14453. _error = _next->call(&_next->glGetError)();
  14454. RegalAssert(_error==GL_NO_ERROR);
  14455. _next->call(&_next->glVertexAttribI4iv)(index, v);
  14456. if (!_context->err.inBeginEnd) {
  14457. _error = _next->call(&_next->glGetError)();
  14458. if (_error!=GL_NO_ERROR) {
  14459. Error("glVertexAttribI4iv : ",Token::GLerrorToString(_error));
  14460. #if REGAL_BREAK
  14461. Break::ErrorCB(_error);
  14462. #endif
  14463. if (_context->err.callback)
  14464. _context->err.callback( _error );
  14465. }
  14466. }
  14467. }
  14468. static void REGAL_CALL error_glVertexAttribI4sv(GLuint index, const GLshort *v)
  14469. {
  14470. Internal("error_glVertexAttribI4sv","()");
  14471. RegalContext *_context = REGAL_GET_CONTEXT();
  14472. RegalAssert(_context);
  14473. DispatchTableGL *_next = _context->dispatcher.error.next();
  14474. RegalAssert(_next);
  14475. GLenum _error = GL_NO_ERROR;
  14476. if (!_context->err.inBeginEnd)
  14477. _error = _next->call(&_next->glGetError)();
  14478. RegalAssert(_error==GL_NO_ERROR);
  14479. _next->call(&_next->glVertexAttribI4sv)(index, v);
  14480. if (!_context->err.inBeginEnd) {
  14481. _error = _next->call(&_next->glGetError)();
  14482. if (_error!=GL_NO_ERROR) {
  14483. Error("glVertexAttribI4sv : ",Token::GLerrorToString(_error));
  14484. #if REGAL_BREAK
  14485. Break::ErrorCB(_error);
  14486. #endif
  14487. if (_context->err.callback)
  14488. _context->err.callback( _error );
  14489. }
  14490. }
  14491. }
  14492. static void REGAL_CALL error_glVertexAttribI4ubv(GLuint index, const GLubyte *v)
  14493. {
  14494. Internal("error_glVertexAttribI4ubv","()");
  14495. RegalContext *_context = REGAL_GET_CONTEXT();
  14496. RegalAssert(_context);
  14497. DispatchTableGL *_next = _context->dispatcher.error.next();
  14498. RegalAssert(_next);
  14499. GLenum _error = GL_NO_ERROR;
  14500. if (!_context->err.inBeginEnd)
  14501. _error = _next->call(&_next->glGetError)();
  14502. RegalAssert(_error==GL_NO_ERROR);
  14503. _next->call(&_next->glVertexAttribI4ubv)(index, v);
  14504. if (!_context->err.inBeginEnd) {
  14505. _error = _next->call(&_next->glGetError)();
  14506. if (_error!=GL_NO_ERROR) {
  14507. Error("glVertexAttribI4ubv : ",Token::GLerrorToString(_error));
  14508. #if REGAL_BREAK
  14509. Break::ErrorCB(_error);
  14510. #endif
  14511. if (_context->err.callback)
  14512. _context->err.callback( _error );
  14513. }
  14514. }
  14515. }
  14516. static void REGAL_CALL error_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
  14517. {
  14518. Internal("error_glVertexAttribI4ui","()");
  14519. RegalContext *_context = REGAL_GET_CONTEXT();
  14520. RegalAssert(_context);
  14521. DispatchTableGL *_next = _context->dispatcher.error.next();
  14522. RegalAssert(_next);
  14523. GLenum _error = GL_NO_ERROR;
  14524. if (!_context->err.inBeginEnd)
  14525. _error = _next->call(&_next->glGetError)();
  14526. RegalAssert(_error==GL_NO_ERROR);
  14527. _next->call(&_next->glVertexAttribI4ui)(index, x, y, z, w);
  14528. if (!_context->err.inBeginEnd) {
  14529. _error = _next->call(&_next->glGetError)();
  14530. if (_error!=GL_NO_ERROR) {
  14531. Error("glVertexAttribI4ui : ",Token::GLerrorToString(_error));
  14532. #if REGAL_BREAK
  14533. Break::ErrorCB(_error);
  14534. #endif
  14535. if (_context->err.callback)
  14536. _context->err.callback( _error );
  14537. }
  14538. }
  14539. }
  14540. static void REGAL_CALL error_glVertexAttribI4uiv(GLuint index, const GLuint *v)
  14541. {
  14542. Internal("error_glVertexAttribI4uiv","()");
  14543. RegalContext *_context = REGAL_GET_CONTEXT();
  14544. RegalAssert(_context);
  14545. DispatchTableGL *_next = _context->dispatcher.error.next();
  14546. RegalAssert(_next);
  14547. GLenum _error = GL_NO_ERROR;
  14548. if (!_context->err.inBeginEnd)
  14549. _error = _next->call(&_next->glGetError)();
  14550. RegalAssert(_error==GL_NO_ERROR);
  14551. _next->call(&_next->glVertexAttribI4uiv)(index, v);
  14552. if (!_context->err.inBeginEnd) {
  14553. _error = _next->call(&_next->glGetError)();
  14554. if (_error!=GL_NO_ERROR) {
  14555. Error("glVertexAttribI4uiv : ",Token::GLerrorToString(_error));
  14556. #if REGAL_BREAK
  14557. Break::ErrorCB(_error);
  14558. #endif
  14559. if (_context->err.callback)
  14560. _context->err.callback( _error );
  14561. }
  14562. }
  14563. }
  14564. static void REGAL_CALL error_glVertexAttribI4usv(GLuint index, const GLushort *v)
  14565. {
  14566. Internal("error_glVertexAttribI4usv","()");
  14567. RegalContext *_context = REGAL_GET_CONTEXT();
  14568. RegalAssert(_context);
  14569. DispatchTableGL *_next = _context->dispatcher.error.next();
  14570. RegalAssert(_next);
  14571. GLenum _error = GL_NO_ERROR;
  14572. if (!_context->err.inBeginEnd)
  14573. _error = _next->call(&_next->glGetError)();
  14574. RegalAssert(_error==GL_NO_ERROR);
  14575. _next->call(&_next->glVertexAttribI4usv)(index, v);
  14576. if (!_context->err.inBeginEnd) {
  14577. _error = _next->call(&_next->glGetError)();
  14578. if (_error!=GL_NO_ERROR) {
  14579. Error("glVertexAttribI4usv : ",Token::GLerrorToString(_error));
  14580. #if REGAL_BREAK
  14581. Break::ErrorCB(_error);
  14582. #endif
  14583. if (_context->err.callback)
  14584. _context->err.callback( _error );
  14585. }
  14586. }
  14587. }
  14588. static void REGAL_CALL error_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  14589. {
  14590. Internal("error_glVertexAttribIPointer","()");
  14591. RegalContext *_context = REGAL_GET_CONTEXT();
  14592. RegalAssert(_context);
  14593. DispatchTableGL *_next = _context->dispatcher.error.next();
  14594. RegalAssert(_next);
  14595. GLenum _error = GL_NO_ERROR;
  14596. if (!_context->err.inBeginEnd)
  14597. _error = _next->call(&_next->glGetError)();
  14598. RegalAssert(_error==GL_NO_ERROR);
  14599. _next->call(&_next->glVertexAttribIPointer)(index, size, type, stride, pointer);
  14600. if (!_context->err.inBeginEnd) {
  14601. _error = _next->call(&_next->glGetError)();
  14602. if (_error!=GL_NO_ERROR) {
  14603. Error("glVertexAttribIPointer : ",Token::GLerrorToString(_error));
  14604. #if REGAL_BREAK
  14605. Break::ErrorCB(_error);
  14606. #endif
  14607. if (_context->err.callback)
  14608. _context->err.callback( _error );
  14609. }
  14610. }
  14611. }
  14612. // GL_VERSION_3_1
  14613. static void REGAL_CALL error_glDrawArraysInstanced(GLenum mode, GLint start, GLsizei count, GLsizei primcount)
  14614. {
  14615. Internal("error_glDrawArraysInstanced","()");
  14616. RegalContext *_context = REGAL_GET_CONTEXT();
  14617. RegalAssert(_context);
  14618. DispatchTableGL *_next = _context->dispatcher.error.next();
  14619. RegalAssert(_next);
  14620. GLenum _error = GL_NO_ERROR;
  14621. if (!_context->err.inBeginEnd)
  14622. _error = _next->call(&_next->glGetError)();
  14623. RegalAssert(_error==GL_NO_ERROR);
  14624. _next->call(&_next->glDrawArraysInstanced)(mode, start, count, primcount);
  14625. if (!_context->err.inBeginEnd) {
  14626. _error = _next->call(&_next->glGetError)();
  14627. if (_error!=GL_NO_ERROR) {
  14628. Error("glDrawArraysInstanced : ",Token::GLerrorToString(_error));
  14629. #if REGAL_BREAK
  14630. Break::ErrorCB(_error);
  14631. #endif
  14632. if (_context->err.callback)
  14633. _context->err.callback( _error );
  14634. }
  14635. }
  14636. }
  14637. static void REGAL_CALL error_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
  14638. {
  14639. Internal("error_glDrawElementsInstanced","()");
  14640. RegalContext *_context = REGAL_GET_CONTEXT();
  14641. RegalAssert(_context);
  14642. DispatchTableGL *_next = _context->dispatcher.error.next();
  14643. RegalAssert(_next);
  14644. GLenum _error = GL_NO_ERROR;
  14645. if (!_context->err.inBeginEnd)
  14646. _error = _next->call(&_next->glGetError)();
  14647. RegalAssert(_error==GL_NO_ERROR);
  14648. _next->call(&_next->glDrawElementsInstanced)(mode, count, type, indices, primcount);
  14649. if (!_context->err.inBeginEnd) {
  14650. _error = _next->call(&_next->glGetError)();
  14651. if (_error!=GL_NO_ERROR) {
  14652. Error("glDrawElementsInstanced : ",Token::GLerrorToString(_error));
  14653. #if REGAL_BREAK
  14654. Break::ErrorCB(_error);
  14655. #endif
  14656. if (_context->err.callback)
  14657. _context->err.callback( _error );
  14658. }
  14659. }
  14660. }
  14661. static void REGAL_CALL error_glPrimitiveRestartIndex(GLuint index)
  14662. {
  14663. Internal("error_glPrimitiveRestartIndex","()");
  14664. RegalContext *_context = REGAL_GET_CONTEXT();
  14665. RegalAssert(_context);
  14666. DispatchTableGL *_next = _context->dispatcher.error.next();
  14667. RegalAssert(_next);
  14668. GLenum _error = GL_NO_ERROR;
  14669. if (!_context->err.inBeginEnd)
  14670. _error = _next->call(&_next->glGetError)();
  14671. RegalAssert(_error==GL_NO_ERROR);
  14672. _next->call(&_next->glPrimitiveRestartIndex)(index);
  14673. if (!_context->err.inBeginEnd) {
  14674. _error = _next->call(&_next->glGetError)();
  14675. if (_error!=GL_NO_ERROR) {
  14676. Error("glPrimitiveRestartIndex : ",Token::GLerrorToString(_error));
  14677. #if REGAL_BREAK
  14678. Break::ErrorCB(_error);
  14679. #endif
  14680. if (_context->err.callback)
  14681. _context->err.callback( _error );
  14682. }
  14683. }
  14684. }
  14685. static void REGAL_CALL error_glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer)
  14686. {
  14687. Internal("error_glTexBuffer","()");
  14688. RegalContext *_context = REGAL_GET_CONTEXT();
  14689. RegalAssert(_context);
  14690. DispatchTableGL *_next = _context->dispatcher.error.next();
  14691. RegalAssert(_next);
  14692. GLenum _error = GL_NO_ERROR;
  14693. if (!_context->err.inBeginEnd)
  14694. _error = _next->call(&_next->glGetError)();
  14695. RegalAssert(_error==GL_NO_ERROR);
  14696. _next->call(&_next->glTexBuffer)(target, internalformat, buffer);
  14697. if (!_context->err.inBeginEnd) {
  14698. _error = _next->call(&_next->glGetError)();
  14699. if (_error!=GL_NO_ERROR) {
  14700. Error("glTexBuffer : ",Token::GLerrorToString(_error));
  14701. #if REGAL_BREAK
  14702. Break::ErrorCB(_error);
  14703. #endif
  14704. if (_context->err.callback)
  14705. _context->err.callback( _error );
  14706. }
  14707. }
  14708. }
  14709. // GL_VERSION_3_2
  14710. static void REGAL_CALL error_glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level)
  14711. {
  14712. Internal("error_glFramebufferTexture","()");
  14713. RegalContext *_context = REGAL_GET_CONTEXT();
  14714. RegalAssert(_context);
  14715. DispatchTableGL *_next = _context->dispatcher.error.next();
  14716. RegalAssert(_next);
  14717. GLenum _error = GL_NO_ERROR;
  14718. if (!_context->err.inBeginEnd)
  14719. _error = _next->call(&_next->glGetError)();
  14720. RegalAssert(_error==GL_NO_ERROR);
  14721. _next->call(&_next->glFramebufferTexture)(target, attachment, texture, level);
  14722. if (!_context->err.inBeginEnd) {
  14723. _error = _next->call(&_next->glGetError)();
  14724. if (_error!=GL_NO_ERROR) {
  14725. Error("glFramebufferTexture : ",Token::GLerrorToString(_error));
  14726. #if REGAL_BREAK
  14727. Break::ErrorCB(_error);
  14728. #endif
  14729. if (_context->err.callback)
  14730. _context->err.callback( _error );
  14731. }
  14732. }
  14733. }
  14734. static void REGAL_CALL error_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
  14735. {
  14736. Internal("error_glGetBufferParameteri64v","()");
  14737. RegalContext *_context = REGAL_GET_CONTEXT();
  14738. RegalAssert(_context);
  14739. DispatchTableGL *_next = _context->dispatcher.error.next();
  14740. RegalAssert(_next);
  14741. GLenum _error = GL_NO_ERROR;
  14742. if (!_context->err.inBeginEnd)
  14743. _error = _next->call(&_next->glGetError)();
  14744. RegalAssert(_error==GL_NO_ERROR);
  14745. _next->call(&_next->glGetBufferParameteri64v)(target, pname, params);
  14746. if (!_context->err.inBeginEnd) {
  14747. _error = _next->call(&_next->glGetError)();
  14748. if (_error!=GL_NO_ERROR) {
  14749. Error("glGetBufferParameteri64v : ",Token::GLerrorToString(_error));
  14750. #if REGAL_BREAK
  14751. Break::ErrorCB(_error);
  14752. #endif
  14753. if (_context->err.callback)
  14754. _context->err.callback( _error );
  14755. }
  14756. }
  14757. }
  14758. static void REGAL_CALL error_glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
  14759. {
  14760. Internal("error_glGetInteger64i_v","()");
  14761. RegalContext *_context = REGAL_GET_CONTEXT();
  14762. RegalAssert(_context);
  14763. DispatchTableGL *_next = _context->dispatcher.error.next();
  14764. RegalAssert(_next);
  14765. GLenum _error = GL_NO_ERROR;
  14766. if (!_context->err.inBeginEnd)
  14767. _error = _next->call(&_next->glGetError)();
  14768. RegalAssert(_error==GL_NO_ERROR);
  14769. _next->call(&_next->glGetInteger64i_v)(target, index, data);
  14770. if (!_context->err.inBeginEnd) {
  14771. _error = _next->call(&_next->glGetError)();
  14772. if (_error!=GL_NO_ERROR) {
  14773. Error("glGetInteger64i_v : ",Token::GLerrorToString(_error));
  14774. #if REGAL_BREAK
  14775. Break::ErrorCB(_error);
  14776. #endif
  14777. if (_context->err.callback)
  14778. _context->err.callback( _error );
  14779. }
  14780. }
  14781. }
  14782. // GL_VERSION_3_3
  14783. static void REGAL_CALL error_glVertexAttribDivisor(GLuint index, GLuint divisor)
  14784. {
  14785. Internal("error_glVertexAttribDivisor","()");
  14786. RegalContext *_context = REGAL_GET_CONTEXT();
  14787. RegalAssert(_context);
  14788. DispatchTableGL *_next = _context->dispatcher.error.next();
  14789. RegalAssert(_next);
  14790. GLenum _error = GL_NO_ERROR;
  14791. if (!_context->err.inBeginEnd)
  14792. _error = _next->call(&_next->glGetError)();
  14793. RegalAssert(_error==GL_NO_ERROR);
  14794. _next->call(&_next->glVertexAttribDivisor)(index, divisor);
  14795. if (!_context->err.inBeginEnd) {
  14796. _error = _next->call(&_next->glGetError)();
  14797. if (_error!=GL_NO_ERROR) {
  14798. Error("glVertexAttribDivisor : ",Token::GLerrorToString(_error));
  14799. #if REGAL_BREAK
  14800. Break::ErrorCB(_error);
  14801. #endif
  14802. if (_context->err.callback)
  14803. _context->err.callback( _error );
  14804. }
  14805. }
  14806. }
  14807. // GL_VERSION_4_0
  14808. static void REGAL_CALL error_glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
  14809. {
  14810. Internal("error_glBlendEquationSeparatei","()");
  14811. RegalContext *_context = REGAL_GET_CONTEXT();
  14812. RegalAssert(_context);
  14813. DispatchTableGL *_next = _context->dispatcher.error.next();
  14814. RegalAssert(_next);
  14815. GLenum _error = GL_NO_ERROR;
  14816. if (!_context->err.inBeginEnd)
  14817. _error = _next->call(&_next->glGetError)();
  14818. RegalAssert(_error==GL_NO_ERROR);
  14819. _next->call(&_next->glBlendEquationSeparatei)(buf, modeRGB, modeAlpha);
  14820. if (!_context->err.inBeginEnd) {
  14821. _error = _next->call(&_next->glGetError)();
  14822. if (_error!=GL_NO_ERROR) {
  14823. Error("glBlendEquationSeparatei : ",Token::GLerrorToString(_error));
  14824. #if REGAL_BREAK
  14825. Break::ErrorCB(_error);
  14826. #endif
  14827. if (_context->err.callback)
  14828. _context->err.callback( _error );
  14829. }
  14830. }
  14831. }
  14832. static void REGAL_CALL error_glBlendEquationi(GLuint buf, GLenum mode)
  14833. {
  14834. Internal("error_glBlendEquationi","()");
  14835. RegalContext *_context = REGAL_GET_CONTEXT();
  14836. RegalAssert(_context);
  14837. DispatchTableGL *_next = _context->dispatcher.error.next();
  14838. RegalAssert(_next);
  14839. GLenum _error = GL_NO_ERROR;
  14840. if (!_context->err.inBeginEnd)
  14841. _error = _next->call(&_next->glGetError)();
  14842. RegalAssert(_error==GL_NO_ERROR);
  14843. _next->call(&_next->glBlendEquationi)(buf, mode);
  14844. if (!_context->err.inBeginEnd) {
  14845. _error = _next->call(&_next->glGetError)();
  14846. if (_error!=GL_NO_ERROR) {
  14847. Error("glBlendEquationi : ",Token::GLerrorToString(_error));
  14848. #if REGAL_BREAK
  14849. Break::ErrorCB(_error);
  14850. #endif
  14851. if (_context->err.callback)
  14852. _context->err.callback( _error );
  14853. }
  14854. }
  14855. }
  14856. static void REGAL_CALL error_glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
  14857. {
  14858. Internal("error_glBlendFuncSeparatei","()");
  14859. RegalContext *_context = REGAL_GET_CONTEXT();
  14860. RegalAssert(_context);
  14861. DispatchTableGL *_next = _context->dispatcher.error.next();
  14862. RegalAssert(_next);
  14863. GLenum _error = GL_NO_ERROR;
  14864. if (!_context->err.inBeginEnd)
  14865. _error = _next->call(&_next->glGetError)();
  14866. RegalAssert(_error==GL_NO_ERROR);
  14867. _next->call(&_next->glBlendFuncSeparatei)(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
  14868. if (!_context->err.inBeginEnd) {
  14869. _error = _next->call(&_next->glGetError)();
  14870. if (_error!=GL_NO_ERROR) {
  14871. Error("glBlendFuncSeparatei : ",Token::GLerrorToString(_error));
  14872. #if REGAL_BREAK
  14873. Break::ErrorCB(_error);
  14874. #endif
  14875. if (_context->err.callback)
  14876. _context->err.callback( _error );
  14877. }
  14878. }
  14879. }
  14880. static void REGAL_CALL error_glBlendFunci(GLuint buf, GLenum src, GLenum dst)
  14881. {
  14882. Internal("error_glBlendFunci","()");
  14883. RegalContext *_context = REGAL_GET_CONTEXT();
  14884. RegalAssert(_context);
  14885. DispatchTableGL *_next = _context->dispatcher.error.next();
  14886. RegalAssert(_next);
  14887. GLenum _error = GL_NO_ERROR;
  14888. if (!_context->err.inBeginEnd)
  14889. _error = _next->call(&_next->glGetError)();
  14890. RegalAssert(_error==GL_NO_ERROR);
  14891. _next->call(&_next->glBlendFunci)(buf, src, dst);
  14892. if (!_context->err.inBeginEnd) {
  14893. _error = _next->call(&_next->glGetError)();
  14894. if (_error!=GL_NO_ERROR) {
  14895. Error("glBlendFunci : ",Token::GLerrorToString(_error));
  14896. #if REGAL_BREAK
  14897. Break::ErrorCB(_error);
  14898. #endif
  14899. if (_context->err.callback)
  14900. _context->err.callback( _error );
  14901. }
  14902. }
  14903. }
  14904. // GL_3DFX_tbuffer
  14905. static void REGAL_CALL error_glTbufferMask3DFX(GLuint mask)
  14906. {
  14907. Internal("error_glTbufferMask3DFX","()");
  14908. RegalContext *_context = REGAL_GET_CONTEXT();
  14909. RegalAssert(_context);
  14910. DispatchTableGL *_next = _context->dispatcher.error.next();
  14911. RegalAssert(_next);
  14912. GLenum _error = GL_NO_ERROR;
  14913. if (!_context->err.inBeginEnd)
  14914. _error = _next->call(&_next->glGetError)();
  14915. RegalAssert(_error==GL_NO_ERROR);
  14916. _next->call(&_next->glTbufferMask3DFX)(mask);
  14917. if (!_context->err.inBeginEnd) {
  14918. _error = _next->call(&_next->glGetError)();
  14919. if (_error!=GL_NO_ERROR) {
  14920. Error("glTbufferMask3DFX : ",Token::GLerrorToString(_error));
  14921. #if REGAL_BREAK
  14922. Break::ErrorCB(_error);
  14923. #endif
  14924. if (_context->err.callback)
  14925. _context->err.callback( _error );
  14926. }
  14927. }
  14928. }
  14929. // GL_AMD_debug_output
  14930. static void REGAL_CALL error_glDebugMessageCallbackAMD(GLDEBUGPROCAMD callback, GLvoid *userParam)
  14931. {
  14932. Internal("error_glDebugMessageCallbackAMD","()");
  14933. RegalContext *_context = REGAL_GET_CONTEXT();
  14934. RegalAssert(_context);
  14935. DispatchTableGL *_next = _context->dispatcher.error.next();
  14936. RegalAssert(_next);
  14937. GLenum _error = GL_NO_ERROR;
  14938. if (!_context->err.inBeginEnd)
  14939. _error = _next->call(&_next->glGetError)();
  14940. RegalAssert(_error==GL_NO_ERROR);
  14941. _next->call(&_next->glDebugMessageCallbackAMD)(callback, userParam);
  14942. if (!_context->err.inBeginEnd) {
  14943. _error = _next->call(&_next->glGetError)();
  14944. if (_error!=GL_NO_ERROR) {
  14945. Error("glDebugMessageCallbackAMD : ",Token::GLerrorToString(_error));
  14946. #if REGAL_BREAK
  14947. Break::ErrorCB(_error);
  14948. #endif
  14949. if (_context->err.callback)
  14950. _context->err.callback( _error );
  14951. }
  14952. }
  14953. }
  14954. static void REGAL_CALL error_glDebugMessageEnableAMD(GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
  14955. {
  14956. Internal("error_glDebugMessageEnableAMD","()");
  14957. RegalContext *_context = REGAL_GET_CONTEXT();
  14958. RegalAssert(_context);
  14959. DispatchTableGL *_next = _context->dispatcher.error.next();
  14960. RegalAssert(_next);
  14961. GLenum _error = GL_NO_ERROR;
  14962. if (!_context->err.inBeginEnd)
  14963. _error = _next->call(&_next->glGetError)();
  14964. RegalAssert(_error==GL_NO_ERROR);
  14965. _next->call(&_next->glDebugMessageEnableAMD)(category, severity, count, ids, enabled);
  14966. if (!_context->err.inBeginEnd) {
  14967. _error = _next->call(&_next->glGetError)();
  14968. if (_error!=GL_NO_ERROR) {
  14969. Error("glDebugMessageEnableAMD : ",Token::GLerrorToString(_error));
  14970. #if REGAL_BREAK
  14971. Break::ErrorCB(_error);
  14972. #endif
  14973. if (_context->err.callback)
  14974. _context->err.callback( _error );
  14975. }
  14976. }
  14977. }
  14978. static void REGAL_CALL error_glDebugMessageInsertAMD(GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf)
  14979. {
  14980. Internal("error_glDebugMessageInsertAMD","()");
  14981. RegalContext *_context = REGAL_GET_CONTEXT();
  14982. RegalAssert(_context);
  14983. DispatchTableGL *_next = _context->dispatcher.error.next();
  14984. RegalAssert(_next);
  14985. GLenum _error = GL_NO_ERROR;
  14986. if (!_context->err.inBeginEnd)
  14987. _error = _next->call(&_next->glGetError)();
  14988. RegalAssert(_error==GL_NO_ERROR);
  14989. _next->call(&_next->glDebugMessageInsertAMD)(category, severity, id, length, buf);
  14990. if (!_context->err.inBeginEnd) {
  14991. _error = _next->call(&_next->glGetError)();
  14992. if (_error!=GL_NO_ERROR) {
  14993. Error("glDebugMessageInsertAMD : ",Token::GLerrorToString(_error));
  14994. #if REGAL_BREAK
  14995. Break::ErrorCB(_error);
  14996. #endif
  14997. if (_context->err.callback)
  14998. _context->err.callback( _error );
  14999. }
  15000. }
  15001. }
  15002. static GLuint REGAL_CALL error_glGetDebugMessageLogAMD(GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message)
  15003. {
  15004. Internal("error_glGetDebugMessageLogAMD","()");
  15005. RegalContext *_context = REGAL_GET_CONTEXT();
  15006. RegalAssert(_context);
  15007. DispatchTableGL *_next = _context->dispatcher.error.next();
  15008. RegalAssert(_next);
  15009. GLenum _error = GL_NO_ERROR;
  15010. if (!_context->err.inBeginEnd)
  15011. _error = _next->call(&_next->glGetError)();
  15012. RegalAssert(_error==GL_NO_ERROR);
  15013. GLuint ret = _next->call(&_next->glGetDebugMessageLogAMD)(count, bufsize, categories, severities, ids, lengths, message);
  15014. if (!_context->err.inBeginEnd) {
  15015. _error = _next->call(&_next->glGetError)();
  15016. if (_error!=GL_NO_ERROR) {
  15017. Error("glGetDebugMessageLogAMD : ",Token::GLerrorToString(_error));
  15018. #if REGAL_BREAK
  15019. Break::ErrorCB(_error);
  15020. #endif
  15021. if (_context->err.callback)
  15022. _context->err.callback( _error );
  15023. }
  15024. }
  15025. return ret;
  15026. }
  15027. // GL_AMD_draw_buffers_blend
  15028. static void REGAL_CALL error_glBlendEquationIndexedAMD(GLuint buf, GLenum mode)
  15029. {
  15030. Internal("error_glBlendEquationIndexedAMD","()");
  15031. RegalContext *_context = REGAL_GET_CONTEXT();
  15032. RegalAssert(_context);
  15033. DispatchTableGL *_next = _context->dispatcher.error.next();
  15034. RegalAssert(_next);
  15035. GLenum _error = GL_NO_ERROR;
  15036. if (!_context->err.inBeginEnd)
  15037. _error = _next->call(&_next->glGetError)();
  15038. RegalAssert(_error==GL_NO_ERROR);
  15039. _next->call(&_next->glBlendEquationIndexedAMD)(buf, mode);
  15040. if (!_context->err.inBeginEnd) {
  15041. _error = _next->call(&_next->glGetError)();
  15042. if (_error!=GL_NO_ERROR) {
  15043. Error("glBlendEquationIndexedAMD : ",Token::GLerrorToString(_error));
  15044. #if REGAL_BREAK
  15045. Break::ErrorCB(_error);
  15046. #endif
  15047. if (_context->err.callback)
  15048. _context->err.callback( _error );
  15049. }
  15050. }
  15051. }
  15052. static void REGAL_CALL error_glBlendEquationSeparateIndexedAMD(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
  15053. {
  15054. Internal("error_glBlendEquationSeparateIndexedAMD","()");
  15055. RegalContext *_context = REGAL_GET_CONTEXT();
  15056. RegalAssert(_context);
  15057. DispatchTableGL *_next = _context->dispatcher.error.next();
  15058. RegalAssert(_next);
  15059. GLenum _error = GL_NO_ERROR;
  15060. if (!_context->err.inBeginEnd)
  15061. _error = _next->call(&_next->glGetError)();
  15062. RegalAssert(_error==GL_NO_ERROR);
  15063. _next->call(&_next->glBlendEquationSeparateIndexedAMD)(buf, modeRGB, modeAlpha);
  15064. if (!_context->err.inBeginEnd) {
  15065. _error = _next->call(&_next->glGetError)();
  15066. if (_error!=GL_NO_ERROR) {
  15067. Error("glBlendEquationSeparateIndexedAMD : ",Token::GLerrorToString(_error));
  15068. #if REGAL_BREAK
  15069. Break::ErrorCB(_error);
  15070. #endif
  15071. if (_context->err.callback)
  15072. _context->err.callback( _error );
  15073. }
  15074. }
  15075. }
  15076. static void REGAL_CALL error_glBlendFuncIndexedAMD(GLuint buf, GLenum src, GLenum dst)
  15077. {
  15078. Internal("error_glBlendFuncIndexedAMD","()");
  15079. RegalContext *_context = REGAL_GET_CONTEXT();
  15080. RegalAssert(_context);
  15081. DispatchTableGL *_next = _context->dispatcher.error.next();
  15082. RegalAssert(_next);
  15083. GLenum _error = GL_NO_ERROR;
  15084. if (!_context->err.inBeginEnd)
  15085. _error = _next->call(&_next->glGetError)();
  15086. RegalAssert(_error==GL_NO_ERROR);
  15087. _next->call(&_next->glBlendFuncIndexedAMD)(buf, src, dst);
  15088. if (!_context->err.inBeginEnd) {
  15089. _error = _next->call(&_next->glGetError)();
  15090. if (_error!=GL_NO_ERROR) {
  15091. Error("glBlendFuncIndexedAMD : ",Token::GLerrorToString(_error));
  15092. #if REGAL_BREAK
  15093. Break::ErrorCB(_error);
  15094. #endif
  15095. if (_context->err.callback)
  15096. _context->err.callback( _error );
  15097. }
  15098. }
  15099. }
  15100. static void REGAL_CALL error_glBlendFuncSeparateIndexedAMD(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
  15101. {
  15102. Internal("error_glBlendFuncSeparateIndexedAMD","()");
  15103. RegalContext *_context = REGAL_GET_CONTEXT();
  15104. RegalAssert(_context);
  15105. DispatchTableGL *_next = _context->dispatcher.error.next();
  15106. RegalAssert(_next);
  15107. GLenum _error = GL_NO_ERROR;
  15108. if (!_context->err.inBeginEnd)
  15109. _error = _next->call(&_next->glGetError)();
  15110. RegalAssert(_error==GL_NO_ERROR);
  15111. _next->call(&_next->glBlendFuncSeparateIndexedAMD)(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
  15112. if (!_context->err.inBeginEnd) {
  15113. _error = _next->call(&_next->glGetError)();
  15114. if (_error!=GL_NO_ERROR) {
  15115. Error("glBlendFuncSeparateIndexedAMD : ",Token::GLerrorToString(_error));
  15116. #if REGAL_BREAK
  15117. Break::ErrorCB(_error);
  15118. #endif
  15119. if (_context->err.callback)
  15120. _context->err.callback( _error );
  15121. }
  15122. }
  15123. }
  15124. // GL_AMD_interleaved_elements
  15125. static void REGAL_CALL error_glVertexAttribParameteriAMD(GLuint index, GLenum pname, GLint param)
  15126. {
  15127. Internal("error_glVertexAttribParameteriAMD","()");
  15128. RegalContext *_context = REGAL_GET_CONTEXT();
  15129. RegalAssert(_context);
  15130. DispatchTableGL *_next = _context->dispatcher.error.next();
  15131. RegalAssert(_next);
  15132. GLenum _error = GL_NO_ERROR;
  15133. if (!_context->err.inBeginEnd)
  15134. _error = _next->call(&_next->glGetError)();
  15135. RegalAssert(_error==GL_NO_ERROR);
  15136. _next->call(&_next->glVertexAttribParameteriAMD)(index, pname, param);
  15137. if (!_context->err.inBeginEnd) {
  15138. _error = _next->call(&_next->glGetError)();
  15139. if (_error!=GL_NO_ERROR) {
  15140. Error("glVertexAttribParameteriAMD : ",Token::GLerrorToString(_error));
  15141. #if REGAL_BREAK
  15142. Break::ErrorCB(_error);
  15143. #endif
  15144. if (_context->err.callback)
  15145. _context->err.callback( _error );
  15146. }
  15147. }
  15148. }
  15149. // GL_AMD_multi_draw_indirect
  15150. static void REGAL_CALL error_glMultiDrawArraysIndirectAMD(GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride)
  15151. {
  15152. Internal("error_glMultiDrawArraysIndirectAMD","()");
  15153. RegalContext *_context = REGAL_GET_CONTEXT();
  15154. RegalAssert(_context);
  15155. DispatchTableGL *_next = _context->dispatcher.error.next();
  15156. RegalAssert(_next);
  15157. GLenum _error = GL_NO_ERROR;
  15158. if (!_context->err.inBeginEnd)
  15159. _error = _next->call(&_next->glGetError)();
  15160. RegalAssert(_error==GL_NO_ERROR);
  15161. _next->call(&_next->glMultiDrawArraysIndirectAMD)(mode, indirect, primcount, stride);
  15162. if (!_context->err.inBeginEnd) {
  15163. _error = _next->call(&_next->glGetError)();
  15164. if (_error!=GL_NO_ERROR) {
  15165. Error("glMultiDrawArraysIndirectAMD : ",Token::GLerrorToString(_error));
  15166. #if REGAL_BREAK
  15167. Break::ErrorCB(_error);
  15168. #endif
  15169. if (_context->err.callback)
  15170. _context->err.callback( _error );
  15171. }
  15172. }
  15173. }
  15174. static void REGAL_CALL error_glMultiDrawElementsIndirectAMD(GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride)
  15175. {
  15176. Internal("error_glMultiDrawElementsIndirectAMD","()");
  15177. RegalContext *_context = REGAL_GET_CONTEXT();
  15178. RegalAssert(_context);
  15179. DispatchTableGL *_next = _context->dispatcher.error.next();
  15180. RegalAssert(_next);
  15181. GLenum _error = GL_NO_ERROR;
  15182. if (!_context->err.inBeginEnd)
  15183. _error = _next->call(&_next->glGetError)();
  15184. RegalAssert(_error==GL_NO_ERROR);
  15185. _next->call(&_next->glMultiDrawElementsIndirectAMD)(mode, type, indirect, primcount, stride);
  15186. if (!_context->err.inBeginEnd) {
  15187. _error = _next->call(&_next->glGetError)();
  15188. if (_error!=GL_NO_ERROR) {
  15189. Error("glMultiDrawElementsIndirectAMD : ",Token::GLerrorToString(_error));
  15190. #if REGAL_BREAK
  15191. Break::ErrorCB(_error);
  15192. #endif
  15193. if (_context->err.callback)
  15194. _context->err.callback( _error );
  15195. }
  15196. }
  15197. }
  15198. // GL_AMD_name_gen_delete
  15199. static void REGAL_CALL error_glDeleteNamesAMD(GLenum identifier, GLuint num, const GLuint *names)
  15200. {
  15201. Internal("error_glDeleteNamesAMD","()");
  15202. RegalContext *_context = REGAL_GET_CONTEXT();
  15203. RegalAssert(_context);
  15204. DispatchTableGL *_next = _context->dispatcher.error.next();
  15205. RegalAssert(_next);
  15206. GLenum _error = GL_NO_ERROR;
  15207. if (!_context->err.inBeginEnd)
  15208. _error = _next->call(&_next->glGetError)();
  15209. RegalAssert(_error==GL_NO_ERROR);
  15210. _next->call(&_next->glDeleteNamesAMD)(identifier, num, names);
  15211. if (!_context->err.inBeginEnd) {
  15212. _error = _next->call(&_next->glGetError)();
  15213. if (_error!=GL_NO_ERROR) {
  15214. Error("glDeleteNamesAMD : ",Token::GLerrorToString(_error));
  15215. #if REGAL_BREAK
  15216. Break::ErrorCB(_error);
  15217. #endif
  15218. if (_context->err.callback)
  15219. _context->err.callback( _error );
  15220. }
  15221. }
  15222. }
  15223. static void REGAL_CALL error_glGenNamesAMD(GLenum identifier, GLuint num, GLuint *names)
  15224. {
  15225. Internal("error_glGenNamesAMD","()");
  15226. RegalContext *_context = REGAL_GET_CONTEXT();
  15227. RegalAssert(_context);
  15228. DispatchTableGL *_next = _context->dispatcher.error.next();
  15229. RegalAssert(_next);
  15230. GLenum _error = GL_NO_ERROR;
  15231. if (!_context->err.inBeginEnd)
  15232. _error = _next->call(&_next->glGetError)();
  15233. RegalAssert(_error==GL_NO_ERROR);
  15234. _next->call(&_next->glGenNamesAMD)(identifier, num, names);
  15235. if (!_context->err.inBeginEnd) {
  15236. _error = _next->call(&_next->glGetError)();
  15237. if (_error!=GL_NO_ERROR) {
  15238. Error("glGenNamesAMD : ",Token::GLerrorToString(_error));
  15239. #if REGAL_BREAK
  15240. Break::ErrorCB(_error);
  15241. #endif
  15242. if (_context->err.callback)
  15243. _context->err.callback( _error );
  15244. }
  15245. }
  15246. }
  15247. static GLboolean REGAL_CALL error_glIsNameAMD(GLenum identifier, GLuint name)
  15248. {
  15249. Internal("error_glIsNameAMD","()");
  15250. RegalContext *_context = REGAL_GET_CONTEXT();
  15251. RegalAssert(_context);
  15252. DispatchTableGL *_next = _context->dispatcher.error.next();
  15253. RegalAssert(_next);
  15254. GLenum _error = GL_NO_ERROR;
  15255. if (!_context->err.inBeginEnd)
  15256. _error = _next->call(&_next->glGetError)();
  15257. RegalAssert(_error==GL_NO_ERROR);
  15258. GLboolean ret = _next->call(&_next->glIsNameAMD)(identifier, name);
  15259. if (!_context->err.inBeginEnd) {
  15260. _error = _next->call(&_next->glGetError)();
  15261. if (_error!=GL_NO_ERROR) {
  15262. Error("glIsNameAMD : ",Token::GLerrorToString(_error));
  15263. #if REGAL_BREAK
  15264. Break::ErrorCB(_error);
  15265. #endif
  15266. if (_context->err.callback)
  15267. _context->err.callback( _error );
  15268. }
  15269. }
  15270. return ret;
  15271. }
  15272. // GL_AMD_performance_monitor
  15273. static void REGAL_CALL error_glBeginPerfMonitorAMD(GLuint monitor)
  15274. {
  15275. Internal("error_glBeginPerfMonitorAMD","()");
  15276. RegalContext *_context = REGAL_GET_CONTEXT();
  15277. RegalAssert(_context);
  15278. DispatchTableGL *_next = _context->dispatcher.error.next();
  15279. RegalAssert(_next);
  15280. GLenum _error = GL_NO_ERROR;
  15281. if (!_context->err.inBeginEnd)
  15282. _error = _next->call(&_next->glGetError)();
  15283. RegalAssert(_error==GL_NO_ERROR);
  15284. _next->call(&_next->glBeginPerfMonitorAMD)(monitor);
  15285. if (!_context->err.inBeginEnd) {
  15286. _error = _next->call(&_next->glGetError)();
  15287. if (_error!=GL_NO_ERROR) {
  15288. Error("glBeginPerfMonitorAMD : ",Token::GLerrorToString(_error));
  15289. #if REGAL_BREAK
  15290. Break::ErrorCB(_error);
  15291. #endif
  15292. if (_context->err.callback)
  15293. _context->err.callback( _error );
  15294. }
  15295. }
  15296. }
  15297. static void REGAL_CALL error_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors)
  15298. {
  15299. Internal("error_glDeletePerfMonitorsAMD","()");
  15300. RegalContext *_context = REGAL_GET_CONTEXT();
  15301. RegalAssert(_context);
  15302. DispatchTableGL *_next = _context->dispatcher.error.next();
  15303. RegalAssert(_next);
  15304. GLenum _error = GL_NO_ERROR;
  15305. if (!_context->err.inBeginEnd)
  15306. _error = _next->call(&_next->glGetError)();
  15307. RegalAssert(_error==GL_NO_ERROR);
  15308. _next->call(&_next->glDeletePerfMonitorsAMD)(n, monitors);
  15309. if (!_context->err.inBeginEnd) {
  15310. _error = _next->call(&_next->glGetError)();
  15311. if (_error!=GL_NO_ERROR) {
  15312. Error("glDeletePerfMonitorsAMD : ",Token::GLerrorToString(_error));
  15313. #if REGAL_BREAK
  15314. Break::ErrorCB(_error);
  15315. #endif
  15316. if (_context->err.callback)
  15317. _context->err.callback( _error );
  15318. }
  15319. }
  15320. }
  15321. static void REGAL_CALL error_glEndPerfMonitorAMD(GLuint monitor)
  15322. {
  15323. Internal("error_glEndPerfMonitorAMD","()");
  15324. RegalContext *_context = REGAL_GET_CONTEXT();
  15325. RegalAssert(_context);
  15326. DispatchTableGL *_next = _context->dispatcher.error.next();
  15327. RegalAssert(_next);
  15328. GLenum _error = GL_NO_ERROR;
  15329. if (!_context->err.inBeginEnd)
  15330. _error = _next->call(&_next->glGetError)();
  15331. RegalAssert(_error==GL_NO_ERROR);
  15332. _next->call(&_next->glEndPerfMonitorAMD)(monitor);
  15333. if (!_context->err.inBeginEnd) {
  15334. _error = _next->call(&_next->glGetError)();
  15335. if (_error!=GL_NO_ERROR) {
  15336. Error("glEndPerfMonitorAMD : ",Token::GLerrorToString(_error));
  15337. #if REGAL_BREAK
  15338. Break::ErrorCB(_error);
  15339. #endif
  15340. if (_context->err.callback)
  15341. _context->err.callback( _error );
  15342. }
  15343. }
  15344. }
  15345. static void REGAL_CALL error_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors)
  15346. {
  15347. Internal("error_glGenPerfMonitorsAMD","()");
  15348. RegalContext *_context = REGAL_GET_CONTEXT();
  15349. RegalAssert(_context);
  15350. DispatchTableGL *_next = _context->dispatcher.error.next();
  15351. RegalAssert(_next);
  15352. GLenum _error = GL_NO_ERROR;
  15353. if (!_context->err.inBeginEnd)
  15354. _error = _next->call(&_next->glGetError)();
  15355. RegalAssert(_error==GL_NO_ERROR);
  15356. _next->call(&_next->glGenPerfMonitorsAMD)(n, monitors);
  15357. if (!_context->err.inBeginEnd) {
  15358. _error = _next->call(&_next->glGetError)();
  15359. if (_error!=GL_NO_ERROR) {
  15360. Error("glGenPerfMonitorsAMD : ",Token::GLerrorToString(_error));
  15361. #if REGAL_BREAK
  15362. Break::ErrorCB(_error);
  15363. #endif
  15364. if (_context->err.callback)
  15365. _context->err.callback( _error );
  15366. }
  15367. }
  15368. }
  15369. static void REGAL_CALL error_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten)
  15370. {
  15371. Internal("error_glGetPerfMonitorCounterDataAMD","()");
  15372. RegalContext *_context = REGAL_GET_CONTEXT();
  15373. RegalAssert(_context);
  15374. DispatchTableGL *_next = _context->dispatcher.error.next();
  15375. RegalAssert(_next);
  15376. GLenum _error = GL_NO_ERROR;
  15377. if (!_context->err.inBeginEnd)
  15378. _error = _next->call(&_next->glGetError)();
  15379. RegalAssert(_error==GL_NO_ERROR);
  15380. _next->call(&_next->glGetPerfMonitorCounterDataAMD)(monitor, pname, dataSize, data, bytesWritten);
  15381. if (!_context->err.inBeginEnd) {
  15382. _error = _next->call(&_next->glGetError)();
  15383. if (_error!=GL_NO_ERROR) {
  15384. Error("glGetPerfMonitorCounterDataAMD : ",Token::GLerrorToString(_error));
  15385. #if REGAL_BREAK
  15386. Break::ErrorCB(_error);
  15387. #endif
  15388. if (_context->err.callback)
  15389. _context->err.callback( _error );
  15390. }
  15391. }
  15392. }
  15393. static void REGAL_CALL error_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data)
  15394. {
  15395. Internal("error_glGetPerfMonitorCounterInfoAMD","()");
  15396. RegalContext *_context = REGAL_GET_CONTEXT();
  15397. RegalAssert(_context);
  15398. DispatchTableGL *_next = _context->dispatcher.error.next();
  15399. RegalAssert(_next);
  15400. GLenum _error = GL_NO_ERROR;
  15401. if (!_context->err.inBeginEnd)
  15402. _error = _next->call(&_next->glGetError)();
  15403. RegalAssert(_error==GL_NO_ERROR);
  15404. _next->call(&_next->glGetPerfMonitorCounterInfoAMD)(group, counter, pname, data);
  15405. if (!_context->err.inBeginEnd) {
  15406. _error = _next->call(&_next->glGetError)();
  15407. if (_error!=GL_NO_ERROR) {
  15408. Error("glGetPerfMonitorCounterInfoAMD : ",Token::GLerrorToString(_error));
  15409. #if REGAL_BREAK
  15410. Break::ErrorCB(_error);
  15411. #endif
  15412. if (_context->err.callback)
  15413. _context->err.callback( _error );
  15414. }
  15415. }
  15416. }
  15417. static void REGAL_CALL error_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString)
  15418. {
  15419. Internal("error_glGetPerfMonitorCounterStringAMD","()");
  15420. RegalContext *_context = REGAL_GET_CONTEXT();
  15421. RegalAssert(_context);
  15422. DispatchTableGL *_next = _context->dispatcher.error.next();
  15423. RegalAssert(_next);
  15424. GLenum _error = GL_NO_ERROR;
  15425. if (!_context->err.inBeginEnd)
  15426. _error = _next->call(&_next->glGetError)();
  15427. RegalAssert(_error==GL_NO_ERROR);
  15428. _next->call(&_next->glGetPerfMonitorCounterStringAMD)(group, counter, bufSize, length, counterString);
  15429. if (!_context->err.inBeginEnd) {
  15430. _error = _next->call(&_next->glGetError)();
  15431. if (_error!=GL_NO_ERROR) {
  15432. Error("glGetPerfMonitorCounterStringAMD : ",Token::GLerrorToString(_error));
  15433. #if REGAL_BREAK
  15434. Break::ErrorCB(_error);
  15435. #endif
  15436. if (_context->err.callback)
  15437. _context->err.callback( _error );
  15438. }
  15439. }
  15440. }
  15441. static void REGAL_CALL error_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei countersSize, GLuint *counters)
  15442. {
  15443. Internal("error_glGetPerfMonitorCountersAMD","()");
  15444. RegalContext *_context = REGAL_GET_CONTEXT();
  15445. RegalAssert(_context);
  15446. DispatchTableGL *_next = _context->dispatcher.error.next();
  15447. RegalAssert(_next);
  15448. GLenum _error = GL_NO_ERROR;
  15449. if (!_context->err.inBeginEnd)
  15450. _error = _next->call(&_next->glGetError)();
  15451. RegalAssert(_error==GL_NO_ERROR);
  15452. _next->call(&_next->glGetPerfMonitorCountersAMD)(group, numCounters, maxActiveCounters, countersSize, counters);
  15453. if (!_context->err.inBeginEnd) {
  15454. _error = _next->call(&_next->glGetError)();
  15455. if (_error!=GL_NO_ERROR) {
  15456. Error("glGetPerfMonitorCountersAMD : ",Token::GLerrorToString(_error));
  15457. #if REGAL_BREAK
  15458. Break::ErrorCB(_error);
  15459. #endif
  15460. if (_context->err.callback)
  15461. _context->err.callback( _error );
  15462. }
  15463. }
  15464. }
  15465. static void REGAL_CALL error_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString)
  15466. {
  15467. Internal("error_glGetPerfMonitorGroupStringAMD","()");
  15468. RegalContext *_context = REGAL_GET_CONTEXT();
  15469. RegalAssert(_context);
  15470. DispatchTableGL *_next = _context->dispatcher.error.next();
  15471. RegalAssert(_next);
  15472. GLenum _error = GL_NO_ERROR;
  15473. if (!_context->err.inBeginEnd)
  15474. _error = _next->call(&_next->glGetError)();
  15475. RegalAssert(_error==GL_NO_ERROR);
  15476. _next->call(&_next->glGetPerfMonitorGroupStringAMD)(group, bufSize, length, groupString);
  15477. if (!_context->err.inBeginEnd) {
  15478. _error = _next->call(&_next->glGetError)();
  15479. if (_error!=GL_NO_ERROR) {
  15480. Error("glGetPerfMonitorGroupStringAMD : ",Token::GLerrorToString(_error));
  15481. #if REGAL_BREAK
  15482. Break::ErrorCB(_error);
  15483. #endif
  15484. if (_context->err.callback)
  15485. _context->err.callback( _error );
  15486. }
  15487. }
  15488. }
  15489. static void REGAL_CALL error_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups)
  15490. {
  15491. Internal("error_glGetPerfMonitorGroupsAMD","()");
  15492. RegalContext *_context = REGAL_GET_CONTEXT();
  15493. RegalAssert(_context);
  15494. DispatchTableGL *_next = _context->dispatcher.error.next();
  15495. RegalAssert(_next);
  15496. GLenum _error = GL_NO_ERROR;
  15497. if (!_context->err.inBeginEnd)
  15498. _error = _next->call(&_next->glGetError)();
  15499. RegalAssert(_error==GL_NO_ERROR);
  15500. _next->call(&_next->glGetPerfMonitorGroupsAMD)(numGroups, groupsSize, groups);
  15501. if (!_context->err.inBeginEnd) {
  15502. _error = _next->call(&_next->glGetError)();
  15503. if (_error!=GL_NO_ERROR) {
  15504. Error("glGetPerfMonitorGroupsAMD : ",Token::GLerrorToString(_error));
  15505. #if REGAL_BREAK
  15506. Break::ErrorCB(_error);
  15507. #endif
  15508. if (_context->err.callback)
  15509. _context->err.callback( _error );
  15510. }
  15511. }
  15512. }
  15513. static void REGAL_CALL error_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList)
  15514. {
  15515. Internal("error_glSelectPerfMonitorCountersAMD","()");
  15516. RegalContext *_context = REGAL_GET_CONTEXT();
  15517. RegalAssert(_context);
  15518. DispatchTableGL *_next = _context->dispatcher.error.next();
  15519. RegalAssert(_next);
  15520. GLenum _error = GL_NO_ERROR;
  15521. if (!_context->err.inBeginEnd)
  15522. _error = _next->call(&_next->glGetError)();
  15523. RegalAssert(_error==GL_NO_ERROR);
  15524. _next->call(&_next->glSelectPerfMonitorCountersAMD)(monitor, enable, group, numCounters, counterList);
  15525. if (!_context->err.inBeginEnd) {
  15526. _error = _next->call(&_next->glGetError)();
  15527. if (_error!=GL_NO_ERROR) {
  15528. Error("glSelectPerfMonitorCountersAMD : ",Token::GLerrorToString(_error));
  15529. #if REGAL_BREAK
  15530. Break::ErrorCB(_error);
  15531. #endif
  15532. if (_context->err.callback)
  15533. _context->err.callback( _error );
  15534. }
  15535. }
  15536. }
  15537. // GL_AMD_sample_positions
  15538. static void REGAL_CALL error_glSetMultisamplefvAMD(GLenum pname, GLuint index, const GLfloat *val)
  15539. {
  15540. Internal("error_glSetMultisamplefvAMD","()");
  15541. RegalContext *_context = REGAL_GET_CONTEXT();
  15542. RegalAssert(_context);
  15543. DispatchTableGL *_next = _context->dispatcher.error.next();
  15544. RegalAssert(_next);
  15545. GLenum _error = GL_NO_ERROR;
  15546. if (!_context->err.inBeginEnd)
  15547. _error = _next->call(&_next->glGetError)();
  15548. RegalAssert(_error==GL_NO_ERROR);
  15549. _next->call(&_next->glSetMultisamplefvAMD)(pname, index, val);
  15550. if (!_context->err.inBeginEnd) {
  15551. _error = _next->call(&_next->glGetError)();
  15552. if (_error!=GL_NO_ERROR) {
  15553. Error("glSetMultisamplefvAMD : ",Token::GLerrorToString(_error));
  15554. #if REGAL_BREAK
  15555. Break::ErrorCB(_error);
  15556. #endif
  15557. if (_context->err.callback)
  15558. _context->err.callback( _error );
  15559. }
  15560. }
  15561. }
  15562. // GL_AMD_sparse_texture
  15563. static void REGAL_CALL error_glTexStorageSparseAMD(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags)
  15564. {
  15565. Internal("error_glTexStorageSparseAMD","()");
  15566. RegalContext *_context = REGAL_GET_CONTEXT();
  15567. RegalAssert(_context);
  15568. DispatchTableGL *_next = _context->dispatcher.error.next();
  15569. RegalAssert(_next);
  15570. GLenum _error = GL_NO_ERROR;
  15571. if (!_context->err.inBeginEnd)
  15572. _error = _next->call(&_next->glGetError)();
  15573. RegalAssert(_error==GL_NO_ERROR);
  15574. _next->call(&_next->glTexStorageSparseAMD)(target, internalFormat, width, height, depth, layers, flags);
  15575. if (!_context->err.inBeginEnd) {
  15576. _error = _next->call(&_next->glGetError)();
  15577. if (_error!=GL_NO_ERROR) {
  15578. Error("glTexStorageSparseAMD : ",Token::GLerrorToString(_error));
  15579. #if REGAL_BREAK
  15580. Break::ErrorCB(_error);
  15581. #endif
  15582. if (_context->err.callback)
  15583. _context->err.callback( _error );
  15584. }
  15585. }
  15586. }
  15587. static void REGAL_CALL error_glTextureStorageSparseAMD(GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags)
  15588. {
  15589. Internal("error_glTextureStorageSparseAMD","()");
  15590. RegalContext *_context = REGAL_GET_CONTEXT();
  15591. RegalAssert(_context);
  15592. DispatchTableGL *_next = _context->dispatcher.error.next();
  15593. RegalAssert(_next);
  15594. GLenum _error = GL_NO_ERROR;
  15595. if (!_context->err.inBeginEnd)
  15596. _error = _next->call(&_next->glGetError)();
  15597. RegalAssert(_error==GL_NO_ERROR);
  15598. _next->call(&_next->glTextureStorageSparseAMD)(texture, target, internalFormat, width, height, depth, layers, flags);
  15599. if (!_context->err.inBeginEnd) {
  15600. _error = _next->call(&_next->glGetError)();
  15601. if (_error!=GL_NO_ERROR) {
  15602. Error("glTextureStorageSparseAMD : ",Token::GLerrorToString(_error));
  15603. #if REGAL_BREAK
  15604. Break::ErrorCB(_error);
  15605. #endif
  15606. if (_context->err.callback)
  15607. _context->err.callback( _error );
  15608. }
  15609. }
  15610. }
  15611. // GL_AMD_stencil_operation_extended
  15612. static void REGAL_CALL error_glStencilOpValueAMD(GLenum face, GLuint value)
  15613. {
  15614. Internal("error_glStencilOpValueAMD","()");
  15615. RegalContext *_context = REGAL_GET_CONTEXT();
  15616. RegalAssert(_context);
  15617. DispatchTableGL *_next = _context->dispatcher.error.next();
  15618. RegalAssert(_next);
  15619. GLenum _error = GL_NO_ERROR;
  15620. if (!_context->err.inBeginEnd)
  15621. _error = _next->call(&_next->glGetError)();
  15622. RegalAssert(_error==GL_NO_ERROR);
  15623. _next->call(&_next->glStencilOpValueAMD)(face, value);
  15624. if (!_context->err.inBeginEnd) {
  15625. _error = _next->call(&_next->glGetError)();
  15626. if (_error!=GL_NO_ERROR) {
  15627. Error("glStencilOpValueAMD : ",Token::GLerrorToString(_error));
  15628. #if REGAL_BREAK
  15629. Break::ErrorCB(_error);
  15630. #endif
  15631. if (_context->err.callback)
  15632. _context->err.callback( _error );
  15633. }
  15634. }
  15635. }
  15636. // GL_AMD_vertex_shader_tessellator
  15637. static void REGAL_CALL error_glTessellationFactorAMD(GLfloat factor)
  15638. {
  15639. Internal("error_glTessellationFactorAMD","()");
  15640. RegalContext *_context = REGAL_GET_CONTEXT();
  15641. RegalAssert(_context);
  15642. DispatchTableGL *_next = _context->dispatcher.error.next();
  15643. RegalAssert(_next);
  15644. GLenum _error = GL_NO_ERROR;
  15645. if (!_context->err.inBeginEnd)
  15646. _error = _next->call(&_next->glGetError)();
  15647. RegalAssert(_error==GL_NO_ERROR);
  15648. _next->call(&_next->glTessellationFactorAMD)(factor);
  15649. if (!_context->err.inBeginEnd) {
  15650. _error = _next->call(&_next->glGetError)();
  15651. if (_error!=GL_NO_ERROR) {
  15652. Error("glTessellationFactorAMD : ",Token::GLerrorToString(_error));
  15653. #if REGAL_BREAK
  15654. Break::ErrorCB(_error);
  15655. #endif
  15656. if (_context->err.callback)
  15657. _context->err.callback( _error );
  15658. }
  15659. }
  15660. }
  15661. static void REGAL_CALL error_glTessellationModeAMD(GLenum mode)
  15662. {
  15663. Internal("error_glTessellationModeAMD","()");
  15664. RegalContext *_context = REGAL_GET_CONTEXT();
  15665. RegalAssert(_context);
  15666. DispatchTableGL *_next = _context->dispatcher.error.next();
  15667. RegalAssert(_next);
  15668. GLenum _error = GL_NO_ERROR;
  15669. if (!_context->err.inBeginEnd)
  15670. _error = _next->call(&_next->glGetError)();
  15671. RegalAssert(_error==GL_NO_ERROR);
  15672. _next->call(&_next->glTessellationModeAMD)(mode);
  15673. if (!_context->err.inBeginEnd) {
  15674. _error = _next->call(&_next->glGetError)();
  15675. if (_error!=GL_NO_ERROR) {
  15676. Error("glTessellationModeAMD : ",Token::GLerrorToString(_error));
  15677. #if REGAL_BREAK
  15678. Break::ErrorCB(_error);
  15679. #endif
  15680. if (_context->err.callback)
  15681. _context->err.callback( _error );
  15682. }
  15683. }
  15684. }
  15685. // GL_ANGLE_framebuffer_blit
  15686. static void REGAL_CALL error_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
  15687. {
  15688. Internal("error_glBlitFramebufferANGLE","()");
  15689. RegalContext *_context = REGAL_GET_CONTEXT();
  15690. RegalAssert(_context);
  15691. DispatchTableGL *_next = _context->dispatcher.error.next();
  15692. RegalAssert(_next);
  15693. GLenum _error = GL_NO_ERROR;
  15694. if (!_context->err.inBeginEnd)
  15695. _error = _next->call(&_next->glGetError)();
  15696. RegalAssert(_error==GL_NO_ERROR);
  15697. _next->call(&_next->glBlitFramebufferANGLE)(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
  15698. if (!_context->err.inBeginEnd) {
  15699. _error = _next->call(&_next->glGetError)();
  15700. if (_error!=GL_NO_ERROR) {
  15701. Error("glBlitFramebufferANGLE : ",Token::GLerrorToString(_error));
  15702. #if REGAL_BREAK
  15703. Break::ErrorCB(_error);
  15704. #endif
  15705. if (_context->err.callback)
  15706. _context->err.callback( _error );
  15707. }
  15708. }
  15709. }
  15710. // GL_ANGLE_framebuffer_multisample
  15711. static void REGAL_CALL error_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
  15712. {
  15713. Internal("error_glRenderbufferStorageMultisampleANGLE","()");
  15714. RegalContext *_context = REGAL_GET_CONTEXT();
  15715. RegalAssert(_context);
  15716. DispatchTableGL *_next = _context->dispatcher.error.next();
  15717. RegalAssert(_next);
  15718. GLenum _error = GL_NO_ERROR;
  15719. if (!_context->err.inBeginEnd)
  15720. _error = _next->call(&_next->glGetError)();
  15721. RegalAssert(_error==GL_NO_ERROR);
  15722. _next->call(&_next->glRenderbufferStorageMultisampleANGLE)(target, samples, internalformat, width, height);
  15723. if (!_context->err.inBeginEnd) {
  15724. _error = _next->call(&_next->glGetError)();
  15725. if (_error!=GL_NO_ERROR) {
  15726. Error("glRenderbufferStorageMultisampleANGLE : ",Token::GLerrorToString(_error));
  15727. #if REGAL_BREAK
  15728. Break::ErrorCB(_error);
  15729. #endif
  15730. if (_context->err.callback)
  15731. _context->err.callback( _error );
  15732. }
  15733. }
  15734. }
  15735. // GL_ANGLE_instanced_arrays
  15736. static void REGAL_CALL error_glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
  15737. {
  15738. Internal("error_glDrawArraysInstancedANGLE","()");
  15739. RegalContext *_context = REGAL_GET_CONTEXT();
  15740. RegalAssert(_context);
  15741. DispatchTableGL *_next = _context->dispatcher.error.next();
  15742. RegalAssert(_next);
  15743. GLenum _error = GL_NO_ERROR;
  15744. if (!_context->err.inBeginEnd)
  15745. _error = _next->call(&_next->glGetError)();
  15746. RegalAssert(_error==GL_NO_ERROR);
  15747. _next->call(&_next->glDrawArraysInstancedANGLE)(mode, first, count, primcount);
  15748. if (!_context->err.inBeginEnd) {
  15749. _error = _next->call(&_next->glGetError)();
  15750. if (_error!=GL_NO_ERROR) {
  15751. Error("glDrawArraysInstancedANGLE : ",Token::GLerrorToString(_error));
  15752. #if REGAL_BREAK
  15753. Break::ErrorCB(_error);
  15754. #endif
  15755. if (_context->err.callback)
  15756. _context->err.callback( _error );
  15757. }
  15758. }
  15759. }
  15760. static void REGAL_CALL error_glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
  15761. {
  15762. Internal("error_glDrawElementsInstancedANGLE","()");
  15763. RegalContext *_context = REGAL_GET_CONTEXT();
  15764. RegalAssert(_context);
  15765. DispatchTableGL *_next = _context->dispatcher.error.next();
  15766. RegalAssert(_next);
  15767. GLenum _error = GL_NO_ERROR;
  15768. if (!_context->err.inBeginEnd)
  15769. _error = _next->call(&_next->glGetError)();
  15770. RegalAssert(_error==GL_NO_ERROR);
  15771. _next->call(&_next->glDrawElementsInstancedANGLE)(mode, count, type, indices, primcount);
  15772. if (!_context->err.inBeginEnd) {
  15773. _error = _next->call(&_next->glGetError)();
  15774. if (_error!=GL_NO_ERROR) {
  15775. Error("glDrawElementsInstancedANGLE : ",Token::GLerrorToString(_error));
  15776. #if REGAL_BREAK
  15777. Break::ErrorCB(_error);
  15778. #endif
  15779. if (_context->err.callback)
  15780. _context->err.callback( _error );
  15781. }
  15782. }
  15783. }
  15784. static void REGAL_CALL error_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor)
  15785. {
  15786. Internal("error_glVertexAttribDivisorANGLE","()");
  15787. RegalContext *_context = REGAL_GET_CONTEXT();
  15788. RegalAssert(_context);
  15789. DispatchTableGL *_next = _context->dispatcher.error.next();
  15790. RegalAssert(_next);
  15791. GLenum _error = GL_NO_ERROR;
  15792. if (!_context->err.inBeginEnd)
  15793. _error = _next->call(&_next->glGetError)();
  15794. RegalAssert(_error==GL_NO_ERROR);
  15795. _next->call(&_next->glVertexAttribDivisorANGLE)(index, divisor);
  15796. if (!_context->err.inBeginEnd) {
  15797. _error = _next->call(&_next->glGetError)();
  15798. if (_error!=GL_NO_ERROR) {
  15799. Error("glVertexAttribDivisorANGLE : ",Token::GLerrorToString(_error));
  15800. #if REGAL_BREAK
  15801. Break::ErrorCB(_error);
  15802. #endif
  15803. if (_context->err.callback)
  15804. _context->err.callback( _error );
  15805. }
  15806. }
  15807. }
  15808. // GL_ANGLE_timer_query
  15809. static void REGAL_CALL error_glBeginQueryANGLE(GLenum target, GLuint id)
  15810. {
  15811. Internal("error_glBeginQueryANGLE","()");
  15812. RegalContext *_context = REGAL_GET_CONTEXT();
  15813. RegalAssert(_context);
  15814. DispatchTableGL *_next = _context->dispatcher.error.next();
  15815. RegalAssert(_next);
  15816. GLenum _error = GL_NO_ERROR;
  15817. if (!_context->err.inBeginEnd)
  15818. _error = _next->call(&_next->glGetError)();
  15819. RegalAssert(_error==GL_NO_ERROR);
  15820. _next->call(&_next->glBeginQueryANGLE)(target, id);
  15821. if (!_context->err.inBeginEnd) {
  15822. _error = _next->call(&_next->glGetError)();
  15823. if (_error!=GL_NO_ERROR) {
  15824. Error("glBeginQueryANGLE : ",Token::GLerrorToString(_error));
  15825. #if REGAL_BREAK
  15826. Break::ErrorCB(_error);
  15827. #endif
  15828. if (_context->err.callback)
  15829. _context->err.callback( _error );
  15830. }
  15831. }
  15832. }
  15833. static void REGAL_CALL error_glDeleteQueriesANGLE(GLsizei n, const GLuint *ids)
  15834. {
  15835. Internal("error_glDeleteQueriesANGLE","()");
  15836. RegalContext *_context = REGAL_GET_CONTEXT();
  15837. RegalAssert(_context);
  15838. DispatchTableGL *_next = _context->dispatcher.error.next();
  15839. RegalAssert(_next);
  15840. GLenum _error = GL_NO_ERROR;
  15841. if (!_context->err.inBeginEnd)
  15842. _error = _next->call(&_next->glGetError)();
  15843. RegalAssert(_error==GL_NO_ERROR);
  15844. _next->call(&_next->glDeleteQueriesANGLE)(n, ids);
  15845. if (!_context->err.inBeginEnd) {
  15846. _error = _next->call(&_next->glGetError)();
  15847. if (_error!=GL_NO_ERROR) {
  15848. Error("glDeleteQueriesANGLE : ",Token::GLerrorToString(_error));
  15849. #if REGAL_BREAK
  15850. Break::ErrorCB(_error);
  15851. #endif
  15852. if (_context->err.callback)
  15853. _context->err.callback( _error );
  15854. }
  15855. }
  15856. }
  15857. static void REGAL_CALL error_glEndQueryANGLE(GLenum target)
  15858. {
  15859. Internal("error_glEndQueryANGLE","()");
  15860. RegalContext *_context = REGAL_GET_CONTEXT();
  15861. RegalAssert(_context);
  15862. DispatchTableGL *_next = _context->dispatcher.error.next();
  15863. RegalAssert(_next);
  15864. GLenum _error = GL_NO_ERROR;
  15865. if (!_context->err.inBeginEnd)
  15866. _error = _next->call(&_next->glGetError)();
  15867. RegalAssert(_error==GL_NO_ERROR);
  15868. _next->call(&_next->glEndQueryANGLE)(target);
  15869. if (!_context->err.inBeginEnd) {
  15870. _error = _next->call(&_next->glGetError)();
  15871. if (_error!=GL_NO_ERROR) {
  15872. Error("glEndQueryANGLE : ",Token::GLerrorToString(_error));
  15873. #if REGAL_BREAK
  15874. Break::ErrorCB(_error);
  15875. #endif
  15876. if (_context->err.callback)
  15877. _context->err.callback( _error );
  15878. }
  15879. }
  15880. }
  15881. static void REGAL_CALL error_glGenQueriesANGLE(GLsizei n, GLuint *ids)
  15882. {
  15883. Internal("error_glGenQueriesANGLE","()");
  15884. RegalContext *_context = REGAL_GET_CONTEXT();
  15885. RegalAssert(_context);
  15886. DispatchTableGL *_next = _context->dispatcher.error.next();
  15887. RegalAssert(_next);
  15888. GLenum _error = GL_NO_ERROR;
  15889. if (!_context->err.inBeginEnd)
  15890. _error = _next->call(&_next->glGetError)();
  15891. RegalAssert(_error==GL_NO_ERROR);
  15892. _next->call(&_next->glGenQueriesANGLE)(n, ids);
  15893. if (!_context->err.inBeginEnd) {
  15894. _error = _next->call(&_next->glGetError)();
  15895. if (_error!=GL_NO_ERROR) {
  15896. Error("glGenQueriesANGLE : ",Token::GLerrorToString(_error));
  15897. #if REGAL_BREAK
  15898. Break::ErrorCB(_error);
  15899. #endif
  15900. if (_context->err.callback)
  15901. _context->err.callback( _error );
  15902. }
  15903. }
  15904. }
  15905. static void REGAL_CALL error_glGetQueryObjecti64vANGLE(GLuint id, GLenum pname, GLint64 *params)
  15906. {
  15907. Internal("error_glGetQueryObjecti64vANGLE","()");
  15908. RegalContext *_context = REGAL_GET_CONTEXT();
  15909. RegalAssert(_context);
  15910. DispatchTableGL *_next = _context->dispatcher.error.next();
  15911. RegalAssert(_next);
  15912. GLenum _error = GL_NO_ERROR;
  15913. if (!_context->err.inBeginEnd)
  15914. _error = _next->call(&_next->glGetError)();
  15915. RegalAssert(_error==GL_NO_ERROR);
  15916. _next->call(&_next->glGetQueryObjecti64vANGLE)(id, pname, params);
  15917. if (!_context->err.inBeginEnd) {
  15918. _error = _next->call(&_next->glGetError)();
  15919. if (_error!=GL_NO_ERROR) {
  15920. Error("glGetQueryObjecti64vANGLE : ",Token::GLerrorToString(_error));
  15921. #if REGAL_BREAK
  15922. Break::ErrorCB(_error);
  15923. #endif
  15924. if (_context->err.callback)
  15925. _context->err.callback( _error );
  15926. }
  15927. }
  15928. }
  15929. static void REGAL_CALL error_glGetQueryObjectivANGLE(GLuint id, GLenum pname, GLint *params)
  15930. {
  15931. Internal("error_glGetQueryObjectivANGLE","()");
  15932. RegalContext *_context = REGAL_GET_CONTEXT();
  15933. RegalAssert(_context);
  15934. DispatchTableGL *_next = _context->dispatcher.error.next();
  15935. RegalAssert(_next);
  15936. GLenum _error = GL_NO_ERROR;
  15937. if (!_context->err.inBeginEnd)
  15938. _error = _next->call(&_next->glGetError)();
  15939. RegalAssert(_error==GL_NO_ERROR);
  15940. _next->call(&_next->glGetQueryObjectivANGLE)(id, pname, params);
  15941. if (!_context->err.inBeginEnd) {
  15942. _error = _next->call(&_next->glGetError)();
  15943. if (_error!=GL_NO_ERROR) {
  15944. Error("glGetQueryObjectivANGLE : ",Token::GLerrorToString(_error));
  15945. #if REGAL_BREAK
  15946. Break::ErrorCB(_error);
  15947. #endif
  15948. if (_context->err.callback)
  15949. _context->err.callback( _error );
  15950. }
  15951. }
  15952. }
  15953. static void REGAL_CALL error_glGetQueryObjectui64vANGLE(GLuint id, GLenum pname, GLuint64 *params)
  15954. {
  15955. Internal("error_glGetQueryObjectui64vANGLE","()");
  15956. RegalContext *_context = REGAL_GET_CONTEXT();
  15957. RegalAssert(_context);
  15958. DispatchTableGL *_next = _context->dispatcher.error.next();
  15959. RegalAssert(_next);
  15960. GLenum _error = GL_NO_ERROR;
  15961. if (!_context->err.inBeginEnd)
  15962. _error = _next->call(&_next->glGetError)();
  15963. RegalAssert(_error==GL_NO_ERROR);
  15964. _next->call(&_next->glGetQueryObjectui64vANGLE)(id, pname, params);
  15965. if (!_context->err.inBeginEnd) {
  15966. _error = _next->call(&_next->glGetError)();
  15967. if (_error!=GL_NO_ERROR) {
  15968. Error("glGetQueryObjectui64vANGLE : ",Token::GLerrorToString(_error));
  15969. #if REGAL_BREAK
  15970. Break::ErrorCB(_error);
  15971. #endif
  15972. if (_context->err.callback)
  15973. _context->err.callback( _error );
  15974. }
  15975. }
  15976. }
  15977. static void REGAL_CALL error_glGetQueryObjectuivANGLE(GLuint id, GLenum pname, GLuint *params)
  15978. {
  15979. Internal("error_glGetQueryObjectuivANGLE","()");
  15980. RegalContext *_context = REGAL_GET_CONTEXT();
  15981. RegalAssert(_context);
  15982. DispatchTableGL *_next = _context->dispatcher.error.next();
  15983. RegalAssert(_next);
  15984. GLenum _error = GL_NO_ERROR;
  15985. if (!_context->err.inBeginEnd)
  15986. _error = _next->call(&_next->glGetError)();
  15987. RegalAssert(_error==GL_NO_ERROR);
  15988. _next->call(&_next->glGetQueryObjectuivANGLE)(id, pname, params);
  15989. if (!_context->err.inBeginEnd) {
  15990. _error = _next->call(&_next->glGetError)();
  15991. if (_error!=GL_NO_ERROR) {
  15992. Error("glGetQueryObjectuivANGLE : ",Token::GLerrorToString(_error));
  15993. #if REGAL_BREAK
  15994. Break::ErrorCB(_error);
  15995. #endif
  15996. if (_context->err.callback)
  15997. _context->err.callback( _error );
  15998. }
  15999. }
  16000. }
  16001. static void REGAL_CALL error_glGetQueryivANGLE(GLenum target, GLenum pname, GLint *params)
  16002. {
  16003. Internal("error_glGetQueryivANGLE","()");
  16004. RegalContext *_context = REGAL_GET_CONTEXT();
  16005. RegalAssert(_context);
  16006. DispatchTableGL *_next = _context->dispatcher.error.next();
  16007. RegalAssert(_next);
  16008. GLenum _error = GL_NO_ERROR;
  16009. if (!_context->err.inBeginEnd)
  16010. _error = _next->call(&_next->glGetError)();
  16011. RegalAssert(_error==GL_NO_ERROR);
  16012. _next->call(&_next->glGetQueryivANGLE)(target, pname, params);
  16013. if (!_context->err.inBeginEnd) {
  16014. _error = _next->call(&_next->glGetError)();
  16015. if (_error!=GL_NO_ERROR) {
  16016. Error("glGetQueryivANGLE : ",Token::GLerrorToString(_error));
  16017. #if REGAL_BREAK
  16018. Break::ErrorCB(_error);
  16019. #endif
  16020. if (_context->err.callback)
  16021. _context->err.callback( _error );
  16022. }
  16023. }
  16024. }
  16025. static GLboolean REGAL_CALL error_glIsQueryANGLE(GLuint id)
  16026. {
  16027. Internal("error_glIsQueryANGLE","()");
  16028. RegalContext *_context = REGAL_GET_CONTEXT();
  16029. RegalAssert(_context);
  16030. DispatchTableGL *_next = _context->dispatcher.error.next();
  16031. RegalAssert(_next);
  16032. GLenum _error = GL_NO_ERROR;
  16033. if (!_context->err.inBeginEnd)
  16034. _error = _next->call(&_next->glGetError)();
  16035. RegalAssert(_error==GL_NO_ERROR);
  16036. GLboolean ret = _next->call(&_next->glIsQueryANGLE)(id);
  16037. if (!_context->err.inBeginEnd) {
  16038. _error = _next->call(&_next->glGetError)();
  16039. if (_error!=GL_NO_ERROR) {
  16040. Error("glIsQueryANGLE : ",Token::GLerrorToString(_error));
  16041. #if REGAL_BREAK
  16042. Break::ErrorCB(_error);
  16043. #endif
  16044. if (_context->err.callback)
  16045. _context->err.callback( _error );
  16046. }
  16047. }
  16048. return ret;
  16049. }
  16050. static void REGAL_CALL error_glQueryCounterANGLE(GLuint id, GLenum target)
  16051. {
  16052. Internal("error_glQueryCounterANGLE","()");
  16053. RegalContext *_context = REGAL_GET_CONTEXT();
  16054. RegalAssert(_context);
  16055. DispatchTableGL *_next = _context->dispatcher.error.next();
  16056. RegalAssert(_next);
  16057. GLenum _error = GL_NO_ERROR;
  16058. if (!_context->err.inBeginEnd)
  16059. _error = _next->call(&_next->glGetError)();
  16060. RegalAssert(_error==GL_NO_ERROR);
  16061. _next->call(&_next->glQueryCounterANGLE)(id, target);
  16062. if (!_context->err.inBeginEnd) {
  16063. _error = _next->call(&_next->glGetError)();
  16064. if (_error!=GL_NO_ERROR) {
  16065. Error("glQueryCounterANGLE : ",Token::GLerrorToString(_error));
  16066. #if REGAL_BREAK
  16067. Break::ErrorCB(_error);
  16068. #endif
  16069. if (_context->err.callback)
  16070. _context->err.callback( _error );
  16071. }
  16072. }
  16073. }
  16074. // GL_ANGLE_translated_shader_source
  16075. static void REGAL_CALL error_glGetTranslatedShaderSourceANGLE(GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source)
  16076. {
  16077. Internal("error_glGetTranslatedShaderSourceANGLE","()");
  16078. RegalContext *_context = REGAL_GET_CONTEXT();
  16079. RegalAssert(_context);
  16080. DispatchTableGL *_next = _context->dispatcher.error.next();
  16081. RegalAssert(_next);
  16082. GLenum _error = GL_NO_ERROR;
  16083. if (!_context->err.inBeginEnd)
  16084. _error = _next->call(&_next->glGetError)();
  16085. RegalAssert(_error==GL_NO_ERROR);
  16086. _next->call(&_next->glGetTranslatedShaderSourceANGLE)(shader, bufsize, length, source);
  16087. if (!_context->err.inBeginEnd) {
  16088. _error = _next->call(&_next->glGetError)();
  16089. if (_error!=GL_NO_ERROR) {
  16090. Error("glGetTranslatedShaderSourceANGLE : ",Token::GLerrorToString(_error));
  16091. #if REGAL_BREAK
  16092. Break::ErrorCB(_error);
  16093. #endif
  16094. if (_context->err.callback)
  16095. _context->err.callback( _error );
  16096. }
  16097. }
  16098. }
  16099. // GL_APPLE_copy_texture_levels
  16100. static void REGAL_CALL error_glCopyTextureLevelsAPPLE(GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount)
  16101. {
  16102. Internal("error_glCopyTextureLevelsAPPLE","()");
  16103. RegalContext *_context = REGAL_GET_CONTEXT();
  16104. RegalAssert(_context);
  16105. DispatchTableGL *_next = _context->dispatcher.error.next();
  16106. RegalAssert(_next);
  16107. GLenum _error = GL_NO_ERROR;
  16108. if (!_context->err.inBeginEnd)
  16109. _error = _next->call(&_next->glGetError)();
  16110. RegalAssert(_error==GL_NO_ERROR);
  16111. _next->call(&_next->glCopyTextureLevelsAPPLE)(destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount);
  16112. if (!_context->err.inBeginEnd) {
  16113. _error = _next->call(&_next->glGetError)();
  16114. if (_error!=GL_NO_ERROR) {
  16115. Error("glCopyTextureLevelsAPPLE : ",Token::GLerrorToString(_error));
  16116. #if REGAL_BREAK
  16117. Break::ErrorCB(_error);
  16118. #endif
  16119. if (_context->err.callback)
  16120. _context->err.callback( _error );
  16121. }
  16122. }
  16123. }
  16124. // GL_APPLE_element_array
  16125. static void REGAL_CALL error_glDrawElementArrayAPPLE(GLenum mode, GLint first, GLsizei count)
  16126. {
  16127. Internal("error_glDrawElementArrayAPPLE","()");
  16128. RegalContext *_context = REGAL_GET_CONTEXT();
  16129. RegalAssert(_context);
  16130. DispatchTableGL *_next = _context->dispatcher.error.next();
  16131. RegalAssert(_next);
  16132. GLenum _error = GL_NO_ERROR;
  16133. if (!_context->err.inBeginEnd)
  16134. _error = _next->call(&_next->glGetError)();
  16135. RegalAssert(_error==GL_NO_ERROR);
  16136. _next->call(&_next->glDrawElementArrayAPPLE)(mode, first, count);
  16137. if (!_context->err.inBeginEnd) {
  16138. _error = _next->call(&_next->glGetError)();
  16139. if (_error!=GL_NO_ERROR) {
  16140. Error("glDrawElementArrayAPPLE : ",Token::GLerrorToString(_error));
  16141. #if REGAL_BREAK
  16142. Break::ErrorCB(_error);
  16143. #endif
  16144. if (_context->err.callback)
  16145. _context->err.callback( _error );
  16146. }
  16147. }
  16148. }
  16149. static void REGAL_CALL error_glDrawRangeElementArrayAPPLE(GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count)
  16150. {
  16151. Internal("error_glDrawRangeElementArrayAPPLE","()");
  16152. RegalContext *_context = REGAL_GET_CONTEXT();
  16153. RegalAssert(_context);
  16154. DispatchTableGL *_next = _context->dispatcher.error.next();
  16155. RegalAssert(_next);
  16156. GLenum _error = GL_NO_ERROR;
  16157. if (!_context->err.inBeginEnd)
  16158. _error = _next->call(&_next->glGetError)();
  16159. RegalAssert(_error==GL_NO_ERROR);
  16160. _next->call(&_next->glDrawRangeElementArrayAPPLE)(mode, start, end, first, count);
  16161. if (!_context->err.inBeginEnd) {
  16162. _error = _next->call(&_next->glGetError)();
  16163. if (_error!=GL_NO_ERROR) {
  16164. Error("glDrawRangeElementArrayAPPLE : ",Token::GLerrorToString(_error));
  16165. #if REGAL_BREAK
  16166. Break::ErrorCB(_error);
  16167. #endif
  16168. if (_context->err.callback)
  16169. _context->err.callback( _error );
  16170. }
  16171. }
  16172. }
  16173. static void REGAL_CALL error_glElementPointerAPPLE(GLenum type, const GLvoid *pointer)
  16174. {
  16175. Internal("error_glElementPointerAPPLE","()");
  16176. RegalContext *_context = REGAL_GET_CONTEXT();
  16177. RegalAssert(_context);
  16178. DispatchTableGL *_next = _context->dispatcher.error.next();
  16179. RegalAssert(_next);
  16180. GLenum _error = GL_NO_ERROR;
  16181. if (!_context->err.inBeginEnd)
  16182. _error = _next->call(&_next->glGetError)();
  16183. RegalAssert(_error==GL_NO_ERROR);
  16184. _next->call(&_next->glElementPointerAPPLE)(type, pointer);
  16185. if (!_context->err.inBeginEnd) {
  16186. _error = _next->call(&_next->glGetError)();
  16187. if (_error!=GL_NO_ERROR) {
  16188. Error("glElementPointerAPPLE : ",Token::GLerrorToString(_error));
  16189. #if REGAL_BREAK
  16190. Break::ErrorCB(_error);
  16191. #endif
  16192. if (_context->err.callback)
  16193. _context->err.callback( _error );
  16194. }
  16195. }
  16196. }
  16197. static void REGAL_CALL error_glMultiDrawElementArrayAPPLE(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
  16198. {
  16199. Internal("error_glMultiDrawElementArrayAPPLE","()");
  16200. RegalContext *_context = REGAL_GET_CONTEXT();
  16201. RegalAssert(_context);
  16202. DispatchTableGL *_next = _context->dispatcher.error.next();
  16203. RegalAssert(_next);
  16204. GLenum _error = GL_NO_ERROR;
  16205. if (!_context->err.inBeginEnd)
  16206. _error = _next->call(&_next->glGetError)();
  16207. RegalAssert(_error==GL_NO_ERROR);
  16208. _next->call(&_next->glMultiDrawElementArrayAPPLE)(mode, first, count, primcount);
  16209. if (!_context->err.inBeginEnd) {
  16210. _error = _next->call(&_next->glGetError)();
  16211. if (_error!=GL_NO_ERROR) {
  16212. Error("glMultiDrawElementArrayAPPLE : ",Token::GLerrorToString(_error));
  16213. #if REGAL_BREAK
  16214. Break::ErrorCB(_error);
  16215. #endif
  16216. if (_context->err.callback)
  16217. _context->err.callback( _error );
  16218. }
  16219. }
  16220. }
  16221. static void REGAL_CALL error_glMultiDrawRangeElementArrayAPPLE(GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount)
  16222. {
  16223. Internal("error_glMultiDrawRangeElementArrayAPPLE","()");
  16224. RegalContext *_context = REGAL_GET_CONTEXT();
  16225. RegalAssert(_context);
  16226. DispatchTableGL *_next = _context->dispatcher.error.next();
  16227. RegalAssert(_next);
  16228. GLenum _error = GL_NO_ERROR;
  16229. if (!_context->err.inBeginEnd)
  16230. _error = _next->call(&_next->glGetError)();
  16231. RegalAssert(_error==GL_NO_ERROR);
  16232. _next->call(&_next->glMultiDrawRangeElementArrayAPPLE)(mode, start, end, first, count, primcount);
  16233. if (!_context->err.inBeginEnd) {
  16234. _error = _next->call(&_next->glGetError)();
  16235. if (_error!=GL_NO_ERROR) {
  16236. Error("glMultiDrawRangeElementArrayAPPLE : ",Token::GLerrorToString(_error));
  16237. #if REGAL_BREAK
  16238. Break::ErrorCB(_error);
  16239. #endif
  16240. if (_context->err.callback)
  16241. _context->err.callback( _error );
  16242. }
  16243. }
  16244. }
  16245. // GL_APPLE_fence
  16246. static void REGAL_CALL error_glDeleteFencesAPPLE(GLsizei n, const GLuint *fences)
  16247. {
  16248. Internal("error_glDeleteFencesAPPLE","()");
  16249. RegalContext *_context = REGAL_GET_CONTEXT();
  16250. RegalAssert(_context);
  16251. DispatchTableGL *_next = _context->dispatcher.error.next();
  16252. RegalAssert(_next);
  16253. GLenum _error = GL_NO_ERROR;
  16254. if (!_context->err.inBeginEnd)
  16255. _error = _next->call(&_next->glGetError)();
  16256. RegalAssert(_error==GL_NO_ERROR);
  16257. _next->call(&_next->glDeleteFencesAPPLE)(n, fences);
  16258. if (!_context->err.inBeginEnd) {
  16259. _error = _next->call(&_next->glGetError)();
  16260. if (_error!=GL_NO_ERROR) {
  16261. Error("glDeleteFencesAPPLE : ",Token::GLerrorToString(_error));
  16262. #if REGAL_BREAK
  16263. Break::ErrorCB(_error);
  16264. #endif
  16265. if (_context->err.callback)
  16266. _context->err.callback( _error );
  16267. }
  16268. }
  16269. }
  16270. static void REGAL_CALL error_glFinishFenceAPPLE(GLuint fence)
  16271. {
  16272. Internal("error_glFinishFenceAPPLE","()");
  16273. RegalContext *_context = REGAL_GET_CONTEXT();
  16274. RegalAssert(_context);
  16275. DispatchTableGL *_next = _context->dispatcher.error.next();
  16276. RegalAssert(_next);
  16277. GLenum _error = GL_NO_ERROR;
  16278. if (!_context->err.inBeginEnd)
  16279. _error = _next->call(&_next->glGetError)();
  16280. RegalAssert(_error==GL_NO_ERROR);
  16281. _next->call(&_next->glFinishFenceAPPLE)(fence);
  16282. if (!_context->err.inBeginEnd) {
  16283. _error = _next->call(&_next->glGetError)();
  16284. if (_error!=GL_NO_ERROR) {
  16285. Error("glFinishFenceAPPLE : ",Token::GLerrorToString(_error));
  16286. #if REGAL_BREAK
  16287. Break::ErrorCB(_error);
  16288. #endif
  16289. if (_context->err.callback)
  16290. _context->err.callback( _error );
  16291. }
  16292. }
  16293. }
  16294. static void REGAL_CALL error_glFinishObjectAPPLE(GLenum object, GLint name)
  16295. {
  16296. Internal("error_glFinishObjectAPPLE","()");
  16297. RegalContext *_context = REGAL_GET_CONTEXT();
  16298. RegalAssert(_context);
  16299. DispatchTableGL *_next = _context->dispatcher.error.next();
  16300. RegalAssert(_next);
  16301. GLenum _error = GL_NO_ERROR;
  16302. if (!_context->err.inBeginEnd)
  16303. _error = _next->call(&_next->glGetError)();
  16304. RegalAssert(_error==GL_NO_ERROR);
  16305. _next->call(&_next->glFinishObjectAPPLE)(object, name);
  16306. if (!_context->err.inBeginEnd) {
  16307. _error = _next->call(&_next->glGetError)();
  16308. if (_error!=GL_NO_ERROR) {
  16309. Error("glFinishObjectAPPLE : ",Token::GLerrorToString(_error));
  16310. #if REGAL_BREAK
  16311. Break::ErrorCB(_error);
  16312. #endif
  16313. if (_context->err.callback)
  16314. _context->err.callback( _error );
  16315. }
  16316. }
  16317. }
  16318. static void REGAL_CALL error_glGenFencesAPPLE(GLsizei n, GLuint *fences)
  16319. {
  16320. Internal("error_glGenFencesAPPLE","()");
  16321. RegalContext *_context = REGAL_GET_CONTEXT();
  16322. RegalAssert(_context);
  16323. DispatchTableGL *_next = _context->dispatcher.error.next();
  16324. RegalAssert(_next);
  16325. GLenum _error = GL_NO_ERROR;
  16326. if (!_context->err.inBeginEnd)
  16327. _error = _next->call(&_next->glGetError)();
  16328. RegalAssert(_error==GL_NO_ERROR);
  16329. _next->call(&_next->glGenFencesAPPLE)(n, fences);
  16330. if (!_context->err.inBeginEnd) {
  16331. _error = _next->call(&_next->glGetError)();
  16332. if (_error!=GL_NO_ERROR) {
  16333. Error("glGenFencesAPPLE : ",Token::GLerrorToString(_error));
  16334. #if REGAL_BREAK
  16335. Break::ErrorCB(_error);
  16336. #endif
  16337. if (_context->err.callback)
  16338. _context->err.callback( _error );
  16339. }
  16340. }
  16341. }
  16342. static GLboolean REGAL_CALL error_glIsFenceAPPLE(GLuint fence)
  16343. {
  16344. Internal("error_glIsFenceAPPLE","()");
  16345. RegalContext *_context = REGAL_GET_CONTEXT();
  16346. RegalAssert(_context);
  16347. DispatchTableGL *_next = _context->dispatcher.error.next();
  16348. RegalAssert(_next);
  16349. GLenum _error = GL_NO_ERROR;
  16350. if (!_context->err.inBeginEnd)
  16351. _error = _next->call(&_next->glGetError)();
  16352. RegalAssert(_error==GL_NO_ERROR);
  16353. GLboolean ret = _next->call(&_next->glIsFenceAPPLE)(fence);
  16354. if (!_context->err.inBeginEnd) {
  16355. _error = _next->call(&_next->glGetError)();
  16356. if (_error!=GL_NO_ERROR) {
  16357. Error("glIsFenceAPPLE : ",Token::GLerrorToString(_error));
  16358. #if REGAL_BREAK
  16359. Break::ErrorCB(_error);
  16360. #endif
  16361. if (_context->err.callback)
  16362. _context->err.callback( _error );
  16363. }
  16364. }
  16365. return ret;
  16366. }
  16367. static void REGAL_CALL error_glSetFenceAPPLE(GLuint fence)
  16368. {
  16369. Internal("error_glSetFenceAPPLE","()");
  16370. RegalContext *_context = REGAL_GET_CONTEXT();
  16371. RegalAssert(_context);
  16372. DispatchTableGL *_next = _context->dispatcher.error.next();
  16373. RegalAssert(_next);
  16374. GLenum _error = GL_NO_ERROR;
  16375. if (!_context->err.inBeginEnd)
  16376. _error = _next->call(&_next->glGetError)();
  16377. RegalAssert(_error==GL_NO_ERROR);
  16378. _next->call(&_next->glSetFenceAPPLE)(fence);
  16379. if (!_context->err.inBeginEnd) {
  16380. _error = _next->call(&_next->glGetError)();
  16381. if (_error!=GL_NO_ERROR) {
  16382. Error("glSetFenceAPPLE : ",Token::GLerrorToString(_error));
  16383. #if REGAL_BREAK
  16384. Break::ErrorCB(_error);
  16385. #endif
  16386. if (_context->err.callback)
  16387. _context->err.callback( _error );
  16388. }
  16389. }
  16390. }
  16391. static GLboolean REGAL_CALL error_glTestFenceAPPLE(GLuint fence)
  16392. {
  16393. Internal("error_glTestFenceAPPLE","()");
  16394. RegalContext *_context = REGAL_GET_CONTEXT();
  16395. RegalAssert(_context);
  16396. DispatchTableGL *_next = _context->dispatcher.error.next();
  16397. RegalAssert(_next);
  16398. GLenum _error = GL_NO_ERROR;
  16399. if (!_context->err.inBeginEnd)
  16400. _error = _next->call(&_next->glGetError)();
  16401. RegalAssert(_error==GL_NO_ERROR);
  16402. GLboolean ret = _next->call(&_next->glTestFenceAPPLE)(fence);
  16403. if (!_context->err.inBeginEnd) {
  16404. _error = _next->call(&_next->glGetError)();
  16405. if (_error!=GL_NO_ERROR) {
  16406. Error("glTestFenceAPPLE : ",Token::GLerrorToString(_error));
  16407. #if REGAL_BREAK
  16408. Break::ErrorCB(_error);
  16409. #endif
  16410. if (_context->err.callback)
  16411. _context->err.callback( _error );
  16412. }
  16413. }
  16414. return ret;
  16415. }
  16416. static GLboolean REGAL_CALL error_glTestObjectAPPLE(GLenum object, GLuint name)
  16417. {
  16418. Internal("error_glTestObjectAPPLE","()");
  16419. RegalContext *_context = REGAL_GET_CONTEXT();
  16420. RegalAssert(_context);
  16421. DispatchTableGL *_next = _context->dispatcher.error.next();
  16422. RegalAssert(_next);
  16423. GLenum _error = GL_NO_ERROR;
  16424. if (!_context->err.inBeginEnd)
  16425. _error = _next->call(&_next->glGetError)();
  16426. RegalAssert(_error==GL_NO_ERROR);
  16427. GLboolean ret = _next->call(&_next->glTestObjectAPPLE)(object, name);
  16428. if (!_context->err.inBeginEnd) {
  16429. _error = _next->call(&_next->glGetError)();
  16430. if (_error!=GL_NO_ERROR) {
  16431. Error("glTestObjectAPPLE : ",Token::GLerrorToString(_error));
  16432. #if REGAL_BREAK
  16433. Break::ErrorCB(_error);
  16434. #endif
  16435. if (_context->err.callback)
  16436. _context->err.callback( _error );
  16437. }
  16438. }
  16439. return ret;
  16440. }
  16441. // GL_APPLE_flush_buffer_range
  16442. static void REGAL_CALL error_glBufferParameteriAPPLE(GLenum target, GLenum pname, GLint param)
  16443. {
  16444. Internal("error_glBufferParameteriAPPLE","()");
  16445. RegalContext *_context = REGAL_GET_CONTEXT();
  16446. RegalAssert(_context);
  16447. DispatchTableGL *_next = _context->dispatcher.error.next();
  16448. RegalAssert(_next);
  16449. GLenum _error = GL_NO_ERROR;
  16450. if (!_context->err.inBeginEnd)
  16451. _error = _next->call(&_next->glGetError)();
  16452. RegalAssert(_error==GL_NO_ERROR);
  16453. _next->call(&_next->glBufferParameteriAPPLE)(target, pname, param);
  16454. if (!_context->err.inBeginEnd) {
  16455. _error = _next->call(&_next->glGetError)();
  16456. if (_error!=GL_NO_ERROR) {
  16457. Error("glBufferParameteriAPPLE : ",Token::GLerrorToString(_error));
  16458. #if REGAL_BREAK
  16459. Break::ErrorCB(_error);
  16460. #endif
  16461. if (_context->err.callback)
  16462. _context->err.callback( _error );
  16463. }
  16464. }
  16465. }
  16466. static void REGAL_CALL error_glFlushMappedBufferRangeAPPLE(GLenum target, GLintptr offset, GLsizeiptr size)
  16467. {
  16468. Internal("error_glFlushMappedBufferRangeAPPLE","()");
  16469. RegalContext *_context = REGAL_GET_CONTEXT();
  16470. RegalAssert(_context);
  16471. DispatchTableGL *_next = _context->dispatcher.error.next();
  16472. RegalAssert(_next);
  16473. GLenum _error = GL_NO_ERROR;
  16474. if (!_context->err.inBeginEnd)
  16475. _error = _next->call(&_next->glGetError)();
  16476. RegalAssert(_error==GL_NO_ERROR);
  16477. _next->call(&_next->glFlushMappedBufferRangeAPPLE)(target, offset, size);
  16478. if (!_context->err.inBeginEnd) {
  16479. _error = _next->call(&_next->glGetError)();
  16480. if (_error!=GL_NO_ERROR) {
  16481. Error("glFlushMappedBufferRangeAPPLE : ",Token::GLerrorToString(_error));
  16482. #if REGAL_BREAK
  16483. Break::ErrorCB(_error);
  16484. #endif
  16485. if (_context->err.callback)
  16486. _context->err.callback( _error );
  16487. }
  16488. }
  16489. }
  16490. // GL_APPLE_flush_render
  16491. static void REGAL_CALL error_glFinishRenderAPPLE(void)
  16492. {
  16493. Internal("error_glFinishRenderAPPLE","()");
  16494. RegalContext *_context = REGAL_GET_CONTEXT();
  16495. RegalAssert(_context);
  16496. DispatchTableGL *_next = _context->dispatcher.error.next();
  16497. RegalAssert(_next);
  16498. GLenum _error = GL_NO_ERROR;
  16499. if (!_context->err.inBeginEnd)
  16500. _error = _next->call(&_next->glGetError)();
  16501. RegalAssert(_error==GL_NO_ERROR);
  16502. _next->call(&_next->glFinishRenderAPPLE)();
  16503. if (!_context->err.inBeginEnd) {
  16504. _error = _next->call(&_next->glGetError)();
  16505. if (_error!=GL_NO_ERROR) {
  16506. Error("glFinishRenderAPPLE : ",Token::GLerrorToString(_error));
  16507. #if REGAL_BREAK
  16508. Break::ErrorCB(_error);
  16509. #endif
  16510. if (_context->err.callback)
  16511. _context->err.callback( _error );
  16512. }
  16513. }
  16514. }
  16515. static void REGAL_CALL error_glFlushRenderAPPLE(void)
  16516. {
  16517. Internal("error_glFlushRenderAPPLE","()");
  16518. RegalContext *_context = REGAL_GET_CONTEXT();
  16519. RegalAssert(_context);
  16520. DispatchTableGL *_next = _context->dispatcher.error.next();
  16521. RegalAssert(_next);
  16522. GLenum _error = GL_NO_ERROR;
  16523. if (!_context->err.inBeginEnd)
  16524. _error = _next->call(&_next->glGetError)();
  16525. RegalAssert(_error==GL_NO_ERROR);
  16526. _next->call(&_next->glFlushRenderAPPLE)();
  16527. if (!_context->err.inBeginEnd) {
  16528. _error = _next->call(&_next->glGetError)();
  16529. if (_error!=GL_NO_ERROR) {
  16530. Error("glFlushRenderAPPLE : ",Token::GLerrorToString(_error));
  16531. #if REGAL_BREAK
  16532. Break::ErrorCB(_error);
  16533. #endif
  16534. if (_context->err.callback)
  16535. _context->err.callback( _error );
  16536. }
  16537. }
  16538. }
  16539. static void REGAL_CALL error_glSwapAPPLE(void)
  16540. {
  16541. Internal("error_glSwapAPPLE","()");
  16542. RegalContext *_context = REGAL_GET_CONTEXT();
  16543. RegalAssert(_context);
  16544. DispatchTableGL *_next = _context->dispatcher.error.next();
  16545. RegalAssert(_next);
  16546. GLenum _error = GL_NO_ERROR;
  16547. if (!_context->err.inBeginEnd)
  16548. _error = _next->call(&_next->glGetError)();
  16549. RegalAssert(_error==GL_NO_ERROR);
  16550. _next->call(&_next->glSwapAPPLE)();
  16551. if (!_context->err.inBeginEnd) {
  16552. _error = _next->call(&_next->glGetError)();
  16553. if (_error!=GL_NO_ERROR) {
  16554. Error("glSwapAPPLE : ",Token::GLerrorToString(_error));
  16555. #if REGAL_BREAK
  16556. Break::ErrorCB(_error);
  16557. #endif
  16558. if (_context->err.callback)
  16559. _context->err.callback( _error );
  16560. }
  16561. }
  16562. }
  16563. // GL_APPLE_framebuffer_multisample
  16564. static void REGAL_CALL error_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
  16565. {
  16566. Internal("error_glRenderbufferStorageMultisampleAPPLE","()");
  16567. RegalContext *_context = REGAL_GET_CONTEXT();
  16568. RegalAssert(_context);
  16569. DispatchTableGL *_next = _context->dispatcher.error.next();
  16570. RegalAssert(_next);
  16571. GLenum _error = GL_NO_ERROR;
  16572. if (!_context->err.inBeginEnd)
  16573. _error = _next->call(&_next->glGetError)();
  16574. RegalAssert(_error==GL_NO_ERROR);
  16575. _next->call(&_next->glRenderbufferStorageMultisampleAPPLE)(target, samples, internalformat, width, height);
  16576. if (!_context->err.inBeginEnd) {
  16577. _error = _next->call(&_next->glGetError)();
  16578. if (_error!=GL_NO_ERROR) {
  16579. Error("glRenderbufferStorageMultisampleAPPLE : ",Token::GLerrorToString(_error));
  16580. #if REGAL_BREAK
  16581. Break::ErrorCB(_error);
  16582. #endif
  16583. if (_context->err.callback)
  16584. _context->err.callback( _error );
  16585. }
  16586. }
  16587. }
  16588. static void REGAL_CALL error_glResolveMultisampleFramebufferAPPLE(void)
  16589. {
  16590. Internal("error_glResolveMultisampleFramebufferAPPLE","()");
  16591. RegalContext *_context = REGAL_GET_CONTEXT();
  16592. RegalAssert(_context);
  16593. DispatchTableGL *_next = _context->dispatcher.error.next();
  16594. RegalAssert(_next);
  16595. GLenum _error = GL_NO_ERROR;
  16596. if (!_context->err.inBeginEnd)
  16597. _error = _next->call(&_next->glGetError)();
  16598. RegalAssert(_error==GL_NO_ERROR);
  16599. _next->call(&_next->glResolveMultisampleFramebufferAPPLE)();
  16600. if (!_context->err.inBeginEnd) {
  16601. _error = _next->call(&_next->glGetError)();
  16602. if (_error!=GL_NO_ERROR) {
  16603. Error("glResolveMultisampleFramebufferAPPLE : ",Token::GLerrorToString(_error));
  16604. #if REGAL_BREAK
  16605. Break::ErrorCB(_error);
  16606. #endif
  16607. if (_context->err.callback)
  16608. _context->err.callback( _error );
  16609. }
  16610. }
  16611. }
  16612. // GL_APPLE_object_purgeable
  16613. static void REGAL_CALL error_glGetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint *params)
  16614. {
  16615. Internal("error_glGetObjectParameterivAPPLE","()");
  16616. RegalContext *_context = REGAL_GET_CONTEXT();
  16617. RegalAssert(_context);
  16618. DispatchTableGL *_next = _context->dispatcher.error.next();
  16619. RegalAssert(_next);
  16620. GLenum _error = GL_NO_ERROR;
  16621. if (!_context->err.inBeginEnd)
  16622. _error = _next->call(&_next->glGetError)();
  16623. RegalAssert(_error==GL_NO_ERROR);
  16624. _next->call(&_next->glGetObjectParameterivAPPLE)(objectType, name, pname, params);
  16625. if (!_context->err.inBeginEnd) {
  16626. _error = _next->call(&_next->glGetError)();
  16627. if (_error!=GL_NO_ERROR) {
  16628. Error("glGetObjectParameterivAPPLE : ",Token::GLerrorToString(_error));
  16629. #if REGAL_BREAK
  16630. Break::ErrorCB(_error);
  16631. #endif
  16632. if (_context->err.callback)
  16633. _context->err.callback( _error );
  16634. }
  16635. }
  16636. }
  16637. static GLenum REGAL_CALL error_glObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
  16638. {
  16639. Internal("error_glObjectPurgeableAPPLE","()");
  16640. RegalContext *_context = REGAL_GET_CONTEXT();
  16641. RegalAssert(_context);
  16642. DispatchTableGL *_next = _context->dispatcher.error.next();
  16643. RegalAssert(_next);
  16644. GLenum _error = GL_NO_ERROR;
  16645. if (!_context->err.inBeginEnd)
  16646. _error = _next->call(&_next->glGetError)();
  16647. RegalAssert(_error==GL_NO_ERROR);
  16648. GLenum ret = _next->call(&_next->glObjectPurgeableAPPLE)(objectType, name, option);
  16649. if (!_context->err.inBeginEnd) {
  16650. _error = _next->call(&_next->glGetError)();
  16651. if (_error!=GL_NO_ERROR) {
  16652. Error("glObjectPurgeableAPPLE : ",Token::GLerrorToString(_error));
  16653. #if REGAL_BREAK
  16654. Break::ErrorCB(_error);
  16655. #endif
  16656. if (_context->err.callback)
  16657. _context->err.callback( _error );
  16658. }
  16659. }
  16660. return ret;
  16661. }
  16662. static GLenum REGAL_CALL error_glObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
  16663. {
  16664. Internal("error_glObjectUnpurgeableAPPLE","()");
  16665. RegalContext *_context = REGAL_GET_CONTEXT();
  16666. RegalAssert(_context);
  16667. DispatchTableGL *_next = _context->dispatcher.error.next();
  16668. RegalAssert(_next);
  16669. GLenum _error = GL_NO_ERROR;
  16670. if (!_context->err.inBeginEnd)
  16671. _error = _next->call(&_next->glGetError)();
  16672. RegalAssert(_error==GL_NO_ERROR);
  16673. GLenum ret = _next->call(&_next->glObjectUnpurgeableAPPLE)(objectType, name, option);
  16674. if (!_context->err.inBeginEnd) {
  16675. _error = _next->call(&_next->glGetError)();
  16676. if (_error!=GL_NO_ERROR) {
  16677. Error("glObjectUnpurgeableAPPLE : ",Token::GLerrorToString(_error));
  16678. #if REGAL_BREAK
  16679. Break::ErrorCB(_error);
  16680. #endif
  16681. if (_context->err.callback)
  16682. _context->err.callback( _error );
  16683. }
  16684. }
  16685. return ret;
  16686. }
  16687. // GL_APPLE_sync
  16688. static GLenum REGAL_CALL error_glClientWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout)
  16689. {
  16690. Internal("error_glClientWaitSyncAPPLE","()");
  16691. RegalContext *_context = REGAL_GET_CONTEXT();
  16692. RegalAssert(_context);
  16693. DispatchTableGL *_next = _context->dispatcher.error.next();
  16694. RegalAssert(_next);
  16695. GLenum _error = GL_NO_ERROR;
  16696. if (!_context->err.inBeginEnd)
  16697. _error = _next->call(&_next->glGetError)();
  16698. RegalAssert(_error==GL_NO_ERROR);
  16699. GLenum ret = _next->call(&_next->glClientWaitSyncAPPLE)(sync, flags, timeout);
  16700. if (!_context->err.inBeginEnd) {
  16701. _error = _next->call(&_next->glGetError)();
  16702. if (_error!=GL_NO_ERROR) {
  16703. Error("glClientWaitSyncAPPLE : ",Token::GLerrorToString(_error));
  16704. #if REGAL_BREAK
  16705. Break::ErrorCB(_error);
  16706. #endif
  16707. if (_context->err.callback)
  16708. _context->err.callback( _error );
  16709. }
  16710. }
  16711. return ret;
  16712. }
  16713. static void REGAL_CALL error_glDeleteSyncAPPLE(GLsync sync)
  16714. {
  16715. Internal("error_glDeleteSyncAPPLE","()");
  16716. RegalContext *_context = REGAL_GET_CONTEXT();
  16717. RegalAssert(_context);
  16718. DispatchTableGL *_next = _context->dispatcher.error.next();
  16719. RegalAssert(_next);
  16720. GLenum _error = GL_NO_ERROR;
  16721. if (!_context->err.inBeginEnd)
  16722. _error = _next->call(&_next->glGetError)();
  16723. RegalAssert(_error==GL_NO_ERROR);
  16724. _next->call(&_next->glDeleteSyncAPPLE)(sync);
  16725. if (!_context->err.inBeginEnd) {
  16726. _error = _next->call(&_next->glGetError)();
  16727. if (_error!=GL_NO_ERROR) {
  16728. Error("glDeleteSyncAPPLE : ",Token::GLerrorToString(_error));
  16729. #if REGAL_BREAK
  16730. Break::ErrorCB(_error);
  16731. #endif
  16732. if (_context->err.callback)
  16733. _context->err.callback( _error );
  16734. }
  16735. }
  16736. }
  16737. static GLsync REGAL_CALL error_glFenceSyncAPPLE(GLenum condition, GLbitfield flags)
  16738. {
  16739. Internal("error_glFenceSyncAPPLE","()");
  16740. RegalContext *_context = REGAL_GET_CONTEXT();
  16741. RegalAssert(_context);
  16742. DispatchTableGL *_next = _context->dispatcher.error.next();
  16743. RegalAssert(_next);
  16744. GLenum _error = GL_NO_ERROR;
  16745. if (!_context->err.inBeginEnd)
  16746. _error = _next->call(&_next->glGetError)();
  16747. RegalAssert(_error==GL_NO_ERROR);
  16748. GLsync ret = _next->call(&_next->glFenceSyncAPPLE)(condition, flags);
  16749. if (!_context->err.inBeginEnd) {
  16750. _error = _next->call(&_next->glGetError)();
  16751. if (_error!=GL_NO_ERROR) {
  16752. Error("glFenceSyncAPPLE : ",Token::GLerrorToString(_error));
  16753. #if REGAL_BREAK
  16754. Break::ErrorCB(_error);
  16755. #endif
  16756. if (_context->err.callback)
  16757. _context->err.callback( _error );
  16758. }
  16759. }
  16760. return ret;
  16761. }
  16762. static void REGAL_CALL error_glGetInteger64vAPPLE(GLenum pname, GLint64 *params)
  16763. {
  16764. Internal("error_glGetInteger64vAPPLE","()");
  16765. RegalContext *_context = REGAL_GET_CONTEXT();
  16766. RegalAssert(_context);
  16767. DispatchTableGL *_next = _context->dispatcher.error.next();
  16768. RegalAssert(_next);
  16769. GLenum _error = GL_NO_ERROR;
  16770. if (!_context->err.inBeginEnd)
  16771. _error = _next->call(&_next->glGetError)();
  16772. RegalAssert(_error==GL_NO_ERROR);
  16773. _next->call(&_next->glGetInteger64vAPPLE)(pname, params);
  16774. if (!_context->err.inBeginEnd) {
  16775. _error = _next->call(&_next->glGetError)();
  16776. if (_error!=GL_NO_ERROR) {
  16777. Error("glGetInteger64vAPPLE : ",Token::GLerrorToString(_error));
  16778. #if REGAL_BREAK
  16779. Break::ErrorCB(_error);
  16780. #endif
  16781. if (_context->err.callback)
  16782. _context->err.callback( _error );
  16783. }
  16784. }
  16785. }
  16786. static void REGAL_CALL error_glGetSyncivAPPLE(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
  16787. {
  16788. Internal("error_glGetSyncivAPPLE","()");
  16789. RegalContext *_context = REGAL_GET_CONTEXT();
  16790. RegalAssert(_context);
  16791. DispatchTableGL *_next = _context->dispatcher.error.next();
  16792. RegalAssert(_next);
  16793. GLenum _error = GL_NO_ERROR;
  16794. if (!_context->err.inBeginEnd)
  16795. _error = _next->call(&_next->glGetError)();
  16796. RegalAssert(_error==GL_NO_ERROR);
  16797. _next->call(&_next->glGetSyncivAPPLE)(sync, pname, bufSize, length, values);
  16798. if (!_context->err.inBeginEnd) {
  16799. _error = _next->call(&_next->glGetError)();
  16800. if (_error!=GL_NO_ERROR) {
  16801. Error("glGetSyncivAPPLE : ",Token::GLerrorToString(_error));
  16802. #if REGAL_BREAK
  16803. Break::ErrorCB(_error);
  16804. #endif
  16805. if (_context->err.callback)
  16806. _context->err.callback( _error );
  16807. }
  16808. }
  16809. }
  16810. static GLboolean REGAL_CALL error_glIsSyncAPPLE(GLsync sync)
  16811. {
  16812. Internal("error_glIsSyncAPPLE","()");
  16813. RegalContext *_context = REGAL_GET_CONTEXT();
  16814. RegalAssert(_context);
  16815. DispatchTableGL *_next = _context->dispatcher.error.next();
  16816. RegalAssert(_next);
  16817. GLenum _error = GL_NO_ERROR;
  16818. if (!_context->err.inBeginEnd)
  16819. _error = _next->call(&_next->glGetError)();
  16820. RegalAssert(_error==GL_NO_ERROR);
  16821. GLboolean ret = _next->call(&_next->glIsSyncAPPLE)(sync);
  16822. if (!_context->err.inBeginEnd) {
  16823. _error = _next->call(&_next->glGetError)();
  16824. if (_error!=GL_NO_ERROR) {
  16825. Error("glIsSyncAPPLE : ",Token::GLerrorToString(_error));
  16826. #if REGAL_BREAK
  16827. Break::ErrorCB(_error);
  16828. #endif
  16829. if (_context->err.callback)
  16830. _context->err.callback( _error );
  16831. }
  16832. }
  16833. return ret;
  16834. }
  16835. static void REGAL_CALL error_glWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout)
  16836. {
  16837. Internal("error_glWaitSyncAPPLE","()");
  16838. RegalContext *_context = REGAL_GET_CONTEXT();
  16839. RegalAssert(_context);
  16840. DispatchTableGL *_next = _context->dispatcher.error.next();
  16841. RegalAssert(_next);
  16842. GLenum _error = GL_NO_ERROR;
  16843. if (!_context->err.inBeginEnd)
  16844. _error = _next->call(&_next->glGetError)();
  16845. RegalAssert(_error==GL_NO_ERROR);
  16846. _next->call(&_next->glWaitSyncAPPLE)(sync, flags, timeout);
  16847. if (!_context->err.inBeginEnd) {
  16848. _error = _next->call(&_next->glGetError)();
  16849. if (_error!=GL_NO_ERROR) {
  16850. Error("glWaitSyncAPPLE : ",Token::GLerrorToString(_error));
  16851. #if REGAL_BREAK
  16852. Break::ErrorCB(_error);
  16853. #endif
  16854. if (_context->err.callback)
  16855. _context->err.callback( _error );
  16856. }
  16857. }
  16858. }
  16859. // GL_APPLE_texture_range
  16860. static void REGAL_CALL error_glGetTexParameterPointervAPPLE(GLenum target, GLenum pname, GLvoid **params)
  16861. {
  16862. Internal("error_glGetTexParameterPointervAPPLE","()");
  16863. RegalContext *_context = REGAL_GET_CONTEXT();
  16864. RegalAssert(_context);
  16865. DispatchTableGL *_next = _context->dispatcher.error.next();
  16866. RegalAssert(_next);
  16867. GLenum _error = GL_NO_ERROR;
  16868. if (!_context->err.inBeginEnd)
  16869. _error = _next->call(&_next->glGetError)();
  16870. RegalAssert(_error==GL_NO_ERROR);
  16871. _next->call(&_next->glGetTexParameterPointervAPPLE)(target, pname, params);
  16872. if (!_context->err.inBeginEnd) {
  16873. _error = _next->call(&_next->glGetError)();
  16874. if (_error!=GL_NO_ERROR) {
  16875. Error("glGetTexParameterPointervAPPLE : ",Token::GLerrorToString(_error));
  16876. #if REGAL_BREAK
  16877. Break::ErrorCB(_error);
  16878. #endif
  16879. if (_context->err.callback)
  16880. _context->err.callback( _error );
  16881. }
  16882. }
  16883. }
  16884. static void REGAL_CALL error_glTextureRangeAPPLE(GLenum target, GLsizei length, const GLvoid *pointer)
  16885. {
  16886. Internal("error_glTextureRangeAPPLE","()");
  16887. RegalContext *_context = REGAL_GET_CONTEXT();
  16888. RegalAssert(_context);
  16889. DispatchTableGL *_next = _context->dispatcher.error.next();
  16890. RegalAssert(_next);
  16891. GLenum _error = GL_NO_ERROR;
  16892. if (!_context->err.inBeginEnd)
  16893. _error = _next->call(&_next->glGetError)();
  16894. RegalAssert(_error==GL_NO_ERROR);
  16895. _next->call(&_next->glTextureRangeAPPLE)(target, length, pointer);
  16896. if (!_context->err.inBeginEnd) {
  16897. _error = _next->call(&_next->glGetError)();
  16898. if (_error!=GL_NO_ERROR) {
  16899. Error("glTextureRangeAPPLE : ",Token::GLerrorToString(_error));
  16900. #if REGAL_BREAK
  16901. Break::ErrorCB(_error);
  16902. #endif
  16903. if (_context->err.callback)
  16904. _context->err.callback( _error );
  16905. }
  16906. }
  16907. }
  16908. // GL_APPLE_vertex_array_object
  16909. static void REGAL_CALL error_glBindVertexArrayAPPLE(GLuint array)
  16910. {
  16911. Internal("error_glBindVertexArrayAPPLE","()");
  16912. RegalContext *_context = REGAL_GET_CONTEXT();
  16913. RegalAssert(_context);
  16914. DispatchTableGL *_next = _context->dispatcher.error.next();
  16915. RegalAssert(_next);
  16916. GLenum _error = GL_NO_ERROR;
  16917. if (!_context->err.inBeginEnd)
  16918. _error = _next->call(&_next->glGetError)();
  16919. RegalAssert(_error==GL_NO_ERROR);
  16920. _next->call(&_next->glBindVertexArrayAPPLE)(array);
  16921. if (!_context->err.inBeginEnd) {
  16922. _error = _next->call(&_next->glGetError)();
  16923. if (_error!=GL_NO_ERROR) {
  16924. Error("glBindVertexArrayAPPLE : ",Token::GLerrorToString(_error));
  16925. #if REGAL_BREAK
  16926. Break::ErrorCB(_error);
  16927. #endif
  16928. if (_context->err.callback)
  16929. _context->err.callback( _error );
  16930. }
  16931. }
  16932. }
  16933. static void REGAL_CALL error_glDeleteVertexArraysAPPLE(GLsizei n, const GLuint *arrays)
  16934. {
  16935. Internal("error_glDeleteVertexArraysAPPLE","()");
  16936. RegalContext *_context = REGAL_GET_CONTEXT();
  16937. RegalAssert(_context);
  16938. DispatchTableGL *_next = _context->dispatcher.error.next();
  16939. RegalAssert(_next);
  16940. GLenum _error = GL_NO_ERROR;
  16941. if (!_context->err.inBeginEnd)
  16942. _error = _next->call(&_next->glGetError)();
  16943. RegalAssert(_error==GL_NO_ERROR);
  16944. _next->call(&_next->glDeleteVertexArraysAPPLE)(n, arrays);
  16945. if (!_context->err.inBeginEnd) {
  16946. _error = _next->call(&_next->glGetError)();
  16947. if (_error!=GL_NO_ERROR) {
  16948. Error("glDeleteVertexArraysAPPLE : ",Token::GLerrorToString(_error));
  16949. #if REGAL_BREAK
  16950. Break::ErrorCB(_error);
  16951. #endif
  16952. if (_context->err.callback)
  16953. _context->err.callback( _error );
  16954. }
  16955. }
  16956. }
  16957. static void REGAL_CALL error_glGenVertexArraysAPPLE(GLsizei n, GLuint *arrays)
  16958. {
  16959. Internal("error_glGenVertexArraysAPPLE","()");
  16960. RegalContext *_context = REGAL_GET_CONTEXT();
  16961. RegalAssert(_context);
  16962. DispatchTableGL *_next = _context->dispatcher.error.next();
  16963. RegalAssert(_next);
  16964. GLenum _error = GL_NO_ERROR;
  16965. if (!_context->err.inBeginEnd)
  16966. _error = _next->call(&_next->glGetError)();
  16967. RegalAssert(_error==GL_NO_ERROR);
  16968. _next->call(&_next->glGenVertexArraysAPPLE)(n, arrays);
  16969. if (!_context->err.inBeginEnd) {
  16970. _error = _next->call(&_next->glGetError)();
  16971. if (_error!=GL_NO_ERROR) {
  16972. Error("glGenVertexArraysAPPLE : ",Token::GLerrorToString(_error));
  16973. #if REGAL_BREAK
  16974. Break::ErrorCB(_error);
  16975. #endif
  16976. if (_context->err.callback)
  16977. _context->err.callback( _error );
  16978. }
  16979. }
  16980. }
  16981. static GLboolean REGAL_CALL error_glIsVertexArrayAPPLE(GLuint array)
  16982. {
  16983. Internal("error_glIsVertexArrayAPPLE","()");
  16984. RegalContext *_context = REGAL_GET_CONTEXT();
  16985. RegalAssert(_context);
  16986. DispatchTableGL *_next = _context->dispatcher.error.next();
  16987. RegalAssert(_next);
  16988. GLenum _error = GL_NO_ERROR;
  16989. if (!_context->err.inBeginEnd)
  16990. _error = _next->call(&_next->glGetError)();
  16991. RegalAssert(_error==GL_NO_ERROR);
  16992. GLboolean ret = _next->call(&_next->glIsVertexArrayAPPLE)(array);
  16993. if (!_context->err.inBeginEnd) {
  16994. _error = _next->call(&_next->glGetError)();
  16995. if (_error!=GL_NO_ERROR) {
  16996. Error("glIsVertexArrayAPPLE : ",Token::GLerrorToString(_error));
  16997. #if REGAL_BREAK
  16998. Break::ErrorCB(_error);
  16999. #endif
  17000. if (_context->err.callback)
  17001. _context->err.callback( _error );
  17002. }
  17003. }
  17004. return ret;
  17005. }
  17006. // GL_APPLE_vertex_array_range
  17007. static void REGAL_CALL error_glFlushVertexArrayRangeAPPLE(GLsizei length, GLvoid *pointer)
  17008. {
  17009. Internal("error_glFlushVertexArrayRangeAPPLE","()");
  17010. RegalContext *_context = REGAL_GET_CONTEXT();
  17011. RegalAssert(_context);
  17012. DispatchTableGL *_next = _context->dispatcher.error.next();
  17013. RegalAssert(_next);
  17014. GLenum _error = GL_NO_ERROR;
  17015. if (!_context->err.inBeginEnd)
  17016. _error = _next->call(&_next->glGetError)();
  17017. RegalAssert(_error==GL_NO_ERROR);
  17018. _next->call(&_next->glFlushVertexArrayRangeAPPLE)(length, pointer);
  17019. if (!_context->err.inBeginEnd) {
  17020. _error = _next->call(&_next->glGetError)();
  17021. if (_error!=GL_NO_ERROR) {
  17022. Error("glFlushVertexArrayRangeAPPLE : ",Token::GLerrorToString(_error));
  17023. #if REGAL_BREAK
  17024. Break::ErrorCB(_error);
  17025. #endif
  17026. if (_context->err.callback)
  17027. _context->err.callback( _error );
  17028. }
  17029. }
  17030. }
  17031. static void REGAL_CALL error_glVertexArrayParameteriAPPLE(GLenum pname, GLint param)
  17032. {
  17033. Internal("error_glVertexArrayParameteriAPPLE","()");
  17034. RegalContext *_context = REGAL_GET_CONTEXT();
  17035. RegalAssert(_context);
  17036. DispatchTableGL *_next = _context->dispatcher.error.next();
  17037. RegalAssert(_next);
  17038. GLenum _error = GL_NO_ERROR;
  17039. if (!_context->err.inBeginEnd)
  17040. _error = _next->call(&_next->glGetError)();
  17041. RegalAssert(_error==GL_NO_ERROR);
  17042. _next->call(&_next->glVertexArrayParameteriAPPLE)(pname, param);
  17043. if (!_context->err.inBeginEnd) {
  17044. _error = _next->call(&_next->glGetError)();
  17045. if (_error!=GL_NO_ERROR) {
  17046. Error("glVertexArrayParameteriAPPLE : ",Token::GLerrorToString(_error));
  17047. #if REGAL_BREAK
  17048. Break::ErrorCB(_error);
  17049. #endif
  17050. if (_context->err.callback)
  17051. _context->err.callback( _error );
  17052. }
  17053. }
  17054. }
  17055. static void REGAL_CALL error_glVertexArrayRangeAPPLE(GLsizei length, GLvoid *pointer)
  17056. {
  17057. Internal("error_glVertexArrayRangeAPPLE","()");
  17058. RegalContext *_context = REGAL_GET_CONTEXT();
  17059. RegalAssert(_context);
  17060. DispatchTableGL *_next = _context->dispatcher.error.next();
  17061. RegalAssert(_next);
  17062. GLenum _error = GL_NO_ERROR;
  17063. if (!_context->err.inBeginEnd)
  17064. _error = _next->call(&_next->glGetError)();
  17065. RegalAssert(_error==GL_NO_ERROR);
  17066. _next->call(&_next->glVertexArrayRangeAPPLE)(length, pointer);
  17067. if (!_context->err.inBeginEnd) {
  17068. _error = _next->call(&_next->glGetError)();
  17069. if (_error!=GL_NO_ERROR) {
  17070. Error("glVertexArrayRangeAPPLE : ",Token::GLerrorToString(_error));
  17071. #if REGAL_BREAK
  17072. Break::ErrorCB(_error);
  17073. #endif
  17074. if (_context->err.callback)
  17075. _context->err.callback( _error );
  17076. }
  17077. }
  17078. }
  17079. // GL_APPLE_vertex_program_evaluators
  17080. static void REGAL_CALL error_glDisableVertexAttribAPPLE(GLuint index, GLenum pname)
  17081. {
  17082. Internal("error_glDisableVertexAttribAPPLE","()");
  17083. RegalContext *_context = REGAL_GET_CONTEXT();
  17084. RegalAssert(_context);
  17085. DispatchTableGL *_next = _context->dispatcher.error.next();
  17086. RegalAssert(_next);
  17087. GLenum _error = GL_NO_ERROR;
  17088. if (!_context->err.inBeginEnd)
  17089. _error = _next->call(&_next->glGetError)();
  17090. RegalAssert(_error==GL_NO_ERROR);
  17091. _next->call(&_next->glDisableVertexAttribAPPLE)(index, pname);
  17092. if (!_context->err.inBeginEnd) {
  17093. _error = _next->call(&_next->glGetError)();
  17094. if (_error!=GL_NO_ERROR) {
  17095. Error("glDisableVertexAttribAPPLE : ",Token::GLerrorToString(_error));
  17096. #if REGAL_BREAK
  17097. Break::ErrorCB(_error);
  17098. #endif
  17099. if (_context->err.callback)
  17100. _context->err.callback( _error );
  17101. }
  17102. }
  17103. }
  17104. static void REGAL_CALL error_glEnableVertexAttribAPPLE(GLuint index, GLenum pname)
  17105. {
  17106. Internal("error_glEnableVertexAttribAPPLE","()");
  17107. RegalContext *_context = REGAL_GET_CONTEXT();
  17108. RegalAssert(_context);
  17109. DispatchTableGL *_next = _context->dispatcher.error.next();
  17110. RegalAssert(_next);
  17111. GLenum _error = GL_NO_ERROR;
  17112. if (!_context->err.inBeginEnd)
  17113. _error = _next->call(&_next->glGetError)();
  17114. RegalAssert(_error==GL_NO_ERROR);
  17115. _next->call(&_next->glEnableVertexAttribAPPLE)(index, pname);
  17116. if (!_context->err.inBeginEnd) {
  17117. _error = _next->call(&_next->glGetError)();
  17118. if (_error!=GL_NO_ERROR) {
  17119. Error("glEnableVertexAttribAPPLE : ",Token::GLerrorToString(_error));
  17120. #if REGAL_BREAK
  17121. Break::ErrorCB(_error);
  17122. #endif
  17123. if (_context->err.callback)
  17124. _context->err.callback( _error );
  17125. }
  17126. }
  17127. }
  17128. static GLboolean REGAL_CALL error_glIsVertexAttribEnabledAPPLE(GLuint index, GLenum pname)
  17129. {
  17130. Internal("error_glIsVertexAttribEnabledAPPLE","()");
  17131. RegalContext *_context = REGAL_GET_CONTEXT();
  17132. RegalAssert(_context);
  17133. DispatchTableGL *_next = _context->dispatcher.error.next();
  17134. RegalAssert(_next);
  17135. GLenum _error = GL_NO_ERROR;
  17136. if (!_context->err.inBeginEnd)
  17137. _error = _next->call(&_next->glGetError)();
  17138. RegalAssert(_error==GL_NO_ERROR);
  17139. GLboolean ret = _next->call(&_next->glIsVertexAttribEnabledAPPLE)(index, pname);
  17140. if (!_context->err.inBeginEnd) {
  17141. _error = _next->call(&_next->glGetError)();
  17142. if (_error!=GL_NO_ERROR) {
  17143. Error("glIsVertexAttribEnabledAPPLE : ",Token::GLerrorToString(_error));
  17144. #if REGAL_BREAK
  17145. Break::ErrorCB(_error);
  17146. #endif
  17147. if (_context->err.callback)
  17148. _context->err.callback( _error );
  17149. }
  17150. }
  17151. return ret;
  17152. }
  17153. static void REGAL_CALL error_glMapVertexAttrib1dAPPLE(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
  17154. {
  17155. Internal("error_glMapVertexAttrib1dAPPLE","()");
  17156. RegalContext *_context = REGAL_GET_CONTEXT();
  17157. RegalAssert(_context);
  17158. DispatchTableGL *_next = _context->dispatcher.error.next();
  17159. RegalAssert(_next);
  17160. GLenum _error = GL_NO_ERROR;
  17161. if (!_context->err.inBeginEnd)
  17162. _error = _next->call(&_next->glGetError)();
  17163. RegalAssert(_error==GL_NO_ERROR);
  17164. _next->call(&_next->glMapVertexAttrib1dAPPLE)(index, size, u1, u2, stride, order, points);
  17165. if (!_context->err.inBeginEnd) {
  17166. _error = _next->call(&_next->glGetError)();
  17167. if (_error!=GL_NO_ERROR) {
  17168. Error("glMapVertexAttrib1dAPPLE : ",Token::GLerrorToString(_error));
  17169. #if REGAL_BREAK
  17170. Break::ErrorCB(_error);
  17171. #endif
  17172. if (_context->err.callback)
  17173. _context->err.callback( _error );
  17174. }
  17175. }
  17176. }
  17177. static void REGAL_CALL error_glMapVertexAttrib1fAPPLE(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
  17178. {
  17179. Internal("error_glMapVertexAttrib1fAPPLE","()");
  17180. RegalContext *_context = REGAL_GET_CONTEXT();
  17181. RegalAssert(_context);
  17182. DispatchTableGL *_next = _context->dispatcher.error.next();
  17183. RegalAssert(_next);
  17184. GLenum _error = GL_NO_ERROR;
  17185. if (!_context->err.inBeginEnd)
  17186. _error = _next->call(&_next->glGetError)();
  17187. RegalAssert(_error==GL_NO_ERROR);
  17188. _next->call(&_next->glMapVertexAttrib1fAPPLE)(index, size, u1, u2, stride, order, points);
  17189. if (!_context->err.inBeginEnd) {
  17190. _error = _next->call(&_next->glGetError)();
  17191. if (_error!=GL_NO_ERROR) {
  17192. Error("glMapVertexAttrib1fAPPLE : ",Token::GLerrorToString(_error));
  17193. #if REGAL_BREAK
  17194. Break::ErrorCB(_error);
  17195. #endif
  17196. if (_context->err.callback)
  17197. _context->err.callback( _error );
  17198. }
  17199. }
  17200. }
  17201. static void REGAL_CALL error_glMapVertexAttrib2dAPPLE(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
  17202. {
  17203. Internal("error_glMapVertexAttrib2dAPPLE","()");
  17204. RegalContext *_context = REGAL_GET_CONTEXT();
  17205. RegalAssert(_context);
  17206. DispatchTableGL *_next = _context->dispatcher.error.next();
  17207. RegalAssert(_next);
  17208. GLenum _error = GL_NO_ERROR;
  17209. if (!_context->err.inBeginEnd)
  17210. _error = _next->call(&_next->glGetError)();
  17211. RegalAssert(_error==GL_NO_ERROR);
  17212. _next->call(&_next->glMapVertexAttrib2dAPPLE)(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
  17213. if (!_context->err.inBeginEnd) {
  17214. _error = _next->call(&_next->glGetError)();
  17215. if (_error!=GL_NO_ERROR) {
  17216. Error("glMapVertexAttrib2dAPPLE : ",Token::GLerrorToString(_error));
  17217. #if REGAL_BREAK
  17218. Break::ErrorCB(_error);
  17219. #endif
  17220. if (_context->err.callback)
  17221. _context->err.callback( _error );
  17222. }
  17223. }
  17224. }
  17225. static void REGAL_CALL error_glMapVertexAttrib2fAPPLE(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
  17226. {
  17227. Internal("error_glMapVertexAttrib2fAPPLE","()");
  17228. RegalContext *_context = REGAL_GET_CONTEXT();
  17229. RegalAssert(_context);
  17230. DispatchTableGL *_next = _context->dispatcher.error.next();
  17231. RegalAssert(_next);
  17232. GLenum _error = GL_NO_ERROR;
  17233. if (!_context->err.inBeginEnd)
  17234. _error = _next->call(&_next->glGetError)();
  17235. RegalAssert(_error==GL_NO_ERROR);
  17236. _next->call(&_next->glMapVertexAttrib2fAPPLE)(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
  17237. if (!_context->err.inBeginEnd) {
  17238. _error = _next->call(&_next->glGetError)();
  17239. if (_error!=GL_NO_ERROR) {
  17240. Error("glMapVertexAttrib2fAPPLE : ",Token::GLerrorToString(_error));
  17241. #if REGAL_BREAK
  17242. Break::ErrorCB(_error);
  17243. #endif
  17244. if (_context->err.callback)
  17245. _context->err.callback( _error );
  17246. }
  17247. }
  17248. }
  17249. // GL_ARB_ES2_compatibility
  17250. static void REGAL_CALL error_glClearDepthf(GLclampf d)
  17251. {
  17252. Internal("error_glClearDepthf","()");
  17253. RegalContext *_context = REGAL_GET_CONTEXT();
  17254. RegalAssert(_context);
  17255. DispatchTableGL *_next = _context->dispatcher.error.next();
  17256. RegalAssert(_next);
  17257. GLenum _error = GL_NO_ERROR;
  17258. if (!_context->err.inBeginEnd)
  17259. _error = _next->call(&_next->glGetError)();
  17260. RegalAssert(_error==GL_NO_ERROR);
  17261. _next->call(&_next->glClearDepthf)(d);
  17262. if (!_context->err.inBeginEnd) {
  17263. _error = _next->call(&_next->glGetError)();
  17264. if (_error!=GL_NO_ERROR) {
  17265. Error("glClearDepthf : ",Token::GLerrorToString(_error));
  17266. #if REGAL_BREAK
  17267. Break::ErrorCB(_error);
  17268. #endif
  17269. if (_context->err.callback)
  17270. _context->err.callback( _error );
  17271. }
  17272. }
  17273. }
  17274. static void REGAL_CALL error_glDepthRangef(GLclampf n, GLclampf f)
  17275. {
  17276. Internal("error_glDepthRangef","()");
  17277. RegalContext *_context = REGAL_GET_CONTEXT();
  17278. RegalAssert(_context);
  17279. DispatchTableGL *_next = _context->dispatcher.error.next();
  17280. RegalAssert(_next);
  17281. GLenum _error = GL_NO_ERROR;
  17282. if (!_context->err.inBeginEnd)
  17283. _error = _next->call(&_next->glGetError)();
  17284. RegalAssert(_error==GL_NO_ERROR);
  17285. _next->call(&_next->glDepthRangef)(n, f);
  17286. if (!_context->err.inBeginEnd) {
  17287. _error = _next->call(&_next->glGetError)();
  17288. if (_error!=GL_NO_ERROR) {
  17289. Error("glDepthRangef : ",Token::GLerrorToString(_error));
  17290. #if REGAL_BREAK
  17291. Break::ErrorCB(_error);
  17292. #endif
  17293. if (_context->err.callback)
  17294. _context->err.callback( _error );
  17295. }
  17296. }
  17297. }
  17298. static void REGAL_CALL error_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
  17299. {
  17300. Internal("error_glGetShaderPrecisionFormat","()");
  17301. RegalContext *_context = REGAL_GET_CONTEXT();
  17302. RegalAssert(_context);
  17303. DispatchTableGL *_next = _context->dispatcher.error.next();
  17304. RegalAssert(_next);
  17305. GLenum _error = GL_NO_ERROR;
  17306. if (!_context->err.inBeginEnd)
  17307. _error = _next->call(&_next->glGetError)();
  17308. RegalAssert(_error==GL_NO_ERROR);
  17309. _next->call(&_next->glGetShaderPrecisionFormat)(shadertype, precisiontype, range, precision);
  17310. if (!_context->err.inBeginEnd) {
  17311. _error = _next->call(&_next->glGetError)();
  17312. if (_error!=GL_NO_ERROR) {
  17313. Error("glGetShaderPrecisionFormat : ",Token::GLerrorToString(_error));
  17314. #if REGAL_BREAK
  17315. Break::ErrorCB(_error);
  17316. #endif
  17317. if (_context->err.callback)
  17318. _context->err.callback( _error );
  17319. }
  17320. }
  17321. }
  17322. static void REGAL_CALL error_glReleaseShaderCompiler(void)
  17323. {
  17324. Internal("error_glReleaseShaderCompiler","()");
  17325. RegalContext *_context = REGAL_GET_CONTEXT();
  17326. RegalAssert(_context);
  17327. DispatchTableGL *_next = _context->dispatcher.error.next();
  17328. RegalAssert(_next);
  17329. GLenum _error = GL_NO_ERROR;
  17330. if (!_context->err.inBeginEnd)
  17331. _error = _next->call(&_next->glGetError)();
  17332. RegalAssert(_error==GL_NO_ERROR);
  17333. _next->call(&_next->glReleaseShaderCompiler)();
  17334. if (!_context->err.inBeginEnd) {
  17335. _error = _next->call(&_next->glGetError)();
  17336. if (_error!=GL_NO_ERROR) {
  17337. Error("glReleaseShaderCompiler : ",Token::GLerrorToString(_error));
  17338. #if REGAL_BREAK
  17339. Break::ErrorCB(_error);
  17340. #endif
  17341. if (_context->err.callback)
  17342. _context->err.callback( _error );
  17343. }
  17344. }
  17345. }
  17346. static void REGAL_CALL error_glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)
  17347. {
  17348. Internal("error_glShaderBinary","()");
  17349. RegalContext *_context = REGAL_GET_CONTEXT();
  17350. RegalAssert(_context);
  17351. DispatchTableGL *_next = _context->dispatcher.error.next();
  17352. RegalAssert(_next);
  17353. GLenum _error = GL_NO_ERROR;
  17354. if (!_context->err.inBeginEnd)
  17355. _error = _next->call(&_next->glGetError)();
  17356. RegalAssert(_error==GL_NO_ERROR);
  17357. _next->call(&_next->glShaderBinary)(count, shaders, binaryformat, binary, length);
  17358. if (!_context->err.inBeginEnd) {
  17359. _error = _next->call(&_next->glGetError)();
  17360. if (_error!=GL_NO_ERROR) {
  17361. Error("glShaderBinary : ",Token::GLerrorToString(_error));
  17362. #if REGAL_BREAK
  17363. Break::ErrorCB(_error);
  17364. #endif
  17365. if (_context->err.callback)
  17366. _context->err.callback( _error );
  17367. }
  17368. }
  17369. }
  17370. // GL_ARB_base_instance
  17371. static void REGAL_CALL error_glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance)
  17372. {
  17373. Internal("error_glDrawArraysInstancedBaseInstance","()");
  17374. RegalContext *_context = REGAL_GET_CONTEXT();
  17375. RegalAssert(_context);
  17376. DispatchTableGL *_next = _context->dispatcher.error.next();
  17377. RegalAssert(_next);
  17378. GLenum _error = GL_NO_ERROR;
  17379. if (!_context->err.inBeginEnd)
  17380. _error = _next->call(&_next->glGetError)();
  17381. RegalAssert(_error==GL_NO_ERROR);
  17382. _next->call(&_next->glDrawArraysInstancedBaseInstance)(mode, first, count, primcount, baseinstance);
  17383. if (!_context->err.inBeginEnd) {
  17384. _error = _next->call(&_next->glGetError)();
  17385. if (_error!=GL_NO_ERROR) {
  17386. Error("glDrawArraysInstancedBaseInstance : ",Token::GLerrorToString(_error));
  17387. #if REGAL_BREAK
  17388. Break::ErrorCB(_error);
  17389. #endif
  17390. if (_context->err.callback)
  17391. _context->err.callback( _error );
  17392. }
  17393. }
  17394. }
  17395. static void REGAL_CALL error_glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLuint baseinstance)
  17396. {
  17397. Internal("error_glDrawElementsInstancedBaseInstance","()");
  17398. RegalContext *_context = REGAL_GET_CONTEXT();
  17399. RegalAssert(_context);
  17400. DispatchTableGL *_next = _context->dispatcher.error.next();
  17401. RegalAssert(_next);
  17402. GLenum _error = GL_NO_ERROR;
  17403. if (!_context->err.inBeginEnd)
  17404. _error = _next->call(&_next->glGetError)();
  17405. RegalAssert(_error==GL_NO_ERROR);
  17406. _next->call(&_next->glDrawElementsInstancedBaseInstance)(mode, count, type, indices, primcount, baseinstance);
  17407. if (!_context->err.inBeginEnd) {
  17408. _error = _next->call(&_next->glGetError)();
  17409. if (_error!=GL_NO_ERROR) {
  17410. Error("glDrawElementsInstancedBaseInstance : ",Token::GLerrorToString(_error));
  17411. #if REGAL_BREAK
  17412. Break::ErrorCB(_error);
  17413. #endif
  17414. if (_context->err.callback)
  17415. _context->err.callback( _error );
  17416. }
  17417. }
  17418. }
  17419. static void REGAL_CALL error_glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance)
  17420. {
  17421. Internal("error_glDrawElementsInstancedBaseVertexBaseInstance","()");
  17422. RegalContext *_context = REGAL_GET_CONTEXT();
  17423. RegalAssert(_context);
  17424. DispatchTableGL *_next = _context->dispatcher.error.next();
  17425. RegalAssert(_next);
  17426. GLenum _error = GL_NO_ERROR;
  17427. if (!_context->err.inBeginEnd)
  17428. _error = _next->call(&_next->glGetError)();
  17429. RegalAssert(_error==GL_NO_ERROR);
  17430. _next->call(&_next->glDrawElementsInstancedBaseVertexBaseInstance)(mode, count, type, indices, primcount, basevertex, baseinstance);
  17431. if (!_context->err.inBeginEnd) {
  17432. _error = _next->call(&_next->glGetError)();
  17433. if (_error!=GL_NO_ERROR) {
  17434. Error("glDrawElementsInstancedBaseVertexBaseInstance : ",Token::GLerrorToString(_error));
  17435. #if REGAL_BREAK
  17436. Break::ErrorCB(_error);
  17437. #endif
  17438. if (_context->err.callback)
  17439. _context->err.callback( _error );
  17440. }
  17441. }
  17442. }
  17443. // GL_ARB_bindless_texture
  17444. static GLuint64 REGAL_CALL error_glGetImageHandleARB(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format)
  17445. {
  17446. Internal("error_glGetImageHandleARB","()");
  17447. RegalContext *_context = REGAL_GET_CONTEXT();
  17448. RegalAssert(_context);
  17449. DispatchTableGL *_next = _context->dispatcher.error.next();
  17450. RegalAssert(_next);
  17451. GLenum _error = GL_NO_ERROR;
  17452. if (!_context->err.inBeginEnd)
  17453. _error = _next->call(&_next->glGetError)();
  17454. RegalAssert(_error==GL_NO_ERROR);
  17455. GLuint64 ret = _next->call(&_next->glGetImageHandleARB)(texture, level, layered, layer, format);
  17456. if (!_context->err.inBeginEnd) {
  17457. _error = _next->call(&_next->glGetError)();
  17458. if (_error!=GL_NO_ERROR) {
  17459. Error("glGetImageHandleARB : ",Token::GLerrorToString(_error));
  17460. #if REGAL_BREAK
  17461. Break::ErrorCB(_error);
  17462. #endif
  17463. if (_context->err.callback)
  17464. _context->err.callback( _error );
  17465. }
  17466. }
  17467. return ret;
  17468. }
  17469. static GLuint64 REGAL_CALL error_glGetTextureHandleARB(GLuint texture)
  17470. {
  17471. Internal("error_glGetTextureHandleARB","()");
  17472. RegalContext *_context = REGAL_GET_CONTEXT();
  17473. RegalAssert(_context);
  17474. DispatchTableGL *_next = _context->dispatcher.error.next();
  17475. RegalAssert(_next);
  17476. GLenum _error = GL_NO_ERROR;
  17477. if (!_context->err.inBeginEnd)
  17478. _error = _next->call(&_next->glGetError)();
  17479. RegalAssert(_error==GL_NO_ERROR);
  17480. GLuint64 ret = _next->call(&_next->glGetTextureHandleARB)(texture);
  17481. if (!_context->err.inBeginEnd) {
  17482. _error = _next->call(&_next->glGetError)();
  17483. if (_error!=GL_NO_ERROR) {
  17484. Error("glGetTextureHandleARB : ",Token::GLerrorToString(_error));
  17485. #if REGAL_BREAK
  17486. Break::ErrorCB(_error);
  17487. #endif
  17488. if (_context->err.callback)
  17489. _context->err.callback( _error );
  17490. }
  17491. }
  17492. return ret;
  17493. }
  17494. static GLuint64 REGAL_CALL error_glGetTextureSamplerHandleARB(GLuint texture, GLuint sampler)
  17495. {
  17496. Internal("error_glGetTextureSamplerHandleARB","()");
  17497. RegalContext *_context = REGAL_GET_CONTEXT();
  17498. RegalAssert(_context);
  17499. DispatchTableGL *_next = _context->dispatcher.error.next();
  17500. RegalAssert(_next);
  17501. GLenum _error = GL_NO_ERROR;
  17502. if (!_context->err.inBeginEnd)
  17503. _error = _next->call(&_next->glGetError)();
  17504. RegalAssert(_error==GL_NO_ERROR);
  17505. GLuint64 ret = _next->call(&_next->glGetTextureSamplerHandleARB)(texture, sampler);
  17506. if (!_context->err.inBeginEnd) {
  17507. _error = _next->call(&_next->glGetError)();
  17508. if (_error!=GL_NO_ERROR) {
  17509. Error("glGetTextureSamplerHandleARB : ",Token::GLerrorToString(_error));
  17510. #if REGAL_BREAK
  17511. Break::ErrorCB(_error);
  17512. #endif
  17513. if (_context->err.callback)
  17514. _context->err.callback( _error );
  17515. }
  17516. }
  17517. return ret;
  17518. }
  17519. static void REGAL_CALL error_glGetVertexAttribLui64vARB(GLuint index, GLenum pname, GLuint64EXT *params)
  17520. {
  17521. Internal("error_glGetVertexAttribLui64vARB","()");
  17522. RegalContext *_context = REGAL_GET_CONTEXT();
  17523. RegalAssert(_context);
  17524. DispatchTableGL *_next = _context->dispatcher.error.next();
  17525. RegalAssert(_next);
  17526. GLenum _error = GL_NO_ERROR;
  17527. if (!_context->err.inBeginEnd)
  17528. _error = _next->call(&_next->glGetError)();
  17529. RegalAssert(_error==GL_NO_ERROR);
  17530. _next->call(&_next->glGetVertexAttribLui64vARB)(index, pname, params);
  17531. if (!_context->err.inBeginEnd) {
  17532. _error = _next->call(&_next->glGetError)();
  17533. if (_error!=GL_NO_ERROR) {
  17534. Error("glGetVertexAttribLui64vARB : ",Token::GLerrorToString(_error));
  17535. #if REGAL_BREAK
  17536. Break::ErrorCB(_error);
  17537. #endif
  17538. if (_context->err.callback)
  17539. _context->err.callback( _error );
  17540. }
  17541. }
  17542. }
  17543. static GLboolean REGAL_CALL error_glIsImageHandleResidentARB(GLuint64 handle)
  17544. {
  17545. Internal("error_glIsImageHandleResidentARB","()");
  17546. RegalContext *_context = REGAL_GET_CONTEXT();
  17547. RegalAssert(_context);
  17548. DispatchTableGL *_next = _context->dispatcher.error.next();
  17549. RegalAssert(_next);
  17550. GLenum _error = GL_NO_ERROR;
  17551. if (!_context->err.inBeginEnd)
  17552. _error = _next->call(&_next->glGetError)();
  17553. RegalAssert(_error==GL_NO_ERROR);
  17554. GLboolean ret = _next->call(&_next->glIsImageHandleResidentARB)(handle);
  17555. if (!_context->err.inBeginEnd) {
  17556. _error = _next->call(&_next->glGetError)();
  17557. if (_error!=GL_NO_ERROR) {
  17558. Error("glIsImageHandleResidentARB : ",Token::GLerrorToString(_error));
  17559. #if REGAL_BREAK
  17560. Break::ErrorCB(_error);
  17561. #endif
  17562. if (_context->err.callback)
  17563. _context->err.callback( _error );
  17564. }
  17565. }
  17566. return ret;
  17567. }
  17568. static GLboolean REGAL_CALL error_glIsTextureHandleResidentARB(GLuint64 handle)
  17569. {
  17570. Internal("error_glIsTextureHandleResidentARB","()");
  17571. RegalContext *_context = REGAL_GET_CONTEXT();
  17572. RegalAssert(_context);
  17573. DispatchTableGL *_next = _context->dispatcher.error.next();
  17574. RegalAssert(_next);
  17575. GLenum _error = GL_NO_ERROR;
  17576. if (!_context->err.inBeginEnd)
  17577. _error = _next->call(&_next->glGetError)();
  17578. RegalAssert(_error==GL_NO_ERROR);
  17579. GLboolean ret = _next->call(&_next->glIsTextureHandleResidentARB)(handle);
  17580. if (!_context->err.inBeginEnd) {
  17581. _error = _next->call(&_next->glGetError)();
  17582. if (_error!=GL_NO_ERROR) {
  17583. Error("glIsTextureHandleResidentARB : ",Token::GLerrorToString(_error));
  17584. #if REGAL_BREAK
  17585. Break::ErrorCB(_error);
  17586. #endif
  17587. if (_context->err.callback)
  17588. _context->err.callback( _error );
  17589. }
  17590. }
  17591. return ret;
  17592. }
  17593. static void REGAL_CALL error_glMakeImageHandleNonResidentARB(GLuint64 handle)
  17594. {
  17595. Internal("error_glMakeImageHandleNonResidentARB","()");
  17596. RegalContext *_context = REGAL_GET_CONTEXT();
  17597. RegalAssert(_context);
  17598. DispatchTableGL *_next = _context->dispatcher.error.next();
  17599. RegalAssert(_next);
  17600. GLenum _error = GL_NO_ERROR;
  17601. if (!_context->err.inBeginEnd)
  17602. _error = _next->call(&_next->glGetError)();
  17603. RegalAssert(_error==GL_NO_ERROR);
  17604. _next->call(&_next->glMakeImageHandleNonResidentARB)(handle);
  17605. if (!_context->err.inBeginEnd) {
  17606. _error = _next->call(&_next->glGetError)();
  17607. if (_error!=GL_NO_ERROR) {
  17608. Error("glMakeImageHandleNonResidentARB : ",Token::GLerrorToString(_error));
  17609. #if REGAL_BREAK
  17610. Break::ErrorCB(_error);
  17611. #endif
  17612. if (_context->err.callback)
  17613. _context->err.callback( _error );
  17614. }
  17615. }
  17616. }
  17617. static void REGAL_CALL error_glMakeImageHandleResidentARB(GLuint64 handle, GLenum access)
  17618. {
  17619. Internal("error_glMakeImageHandleResidentARB","()");
  17620. RegalContext *_context = REGAL_GET_CONTEXT();
  17621. RegalAssert(_context);
  17622. DispatchTableGL *_next = _context->dispatcher.error.next();
  17623. RegalAssert(_next);
  17624. GLenum _error = GL_NO_ERROR;
  17625. if (!_context->err.inBeginEnd)
  17626. _error = _next->call(&_next->glGetError)();
  17627. RegalAssert(_error==GL_NO_ERROR);
  17628. _next->call(&_next->glMakeImageHandleResidentARB)(handle, access);
  17629. if (!_context->err.inBeginEnd) {
  17630. _error = _next->call(&_next->glGetError)();
  17631. if (_error!=GL_NO_ERROR) {
  17632. Error("glMakeImageHandleResidentARB : ",Token::GLerrorToString(_error));
  17633. #if REGAL_BREAK
  17634. Break::ErrorCB(_error);
  17635. #endif
  17636. if (_context->err.callback)
  17637. _context->err.callback( _error );
  17638. }
  17639. }
  17640. }
  17641. static void REGAL_CALL error_glMakeTextureHandleNonResidentARB(GLuint64 handle)
  17642. {
  17643. Internal("error_glMakeTextureHandleNonResidentARB","()");
  17644. RegalContext *_context = REGAL_GET_CONTEXT();
  17645. RegalAssert(_context);
  17646. DispatchTableGL *_next = _context->dispatcher.error.next();
  17647. RegalAssert(_next);
  17648. GLenum _error = GL_NO_ERROR;
  17649. if (!_context->err.inBeginEnd)
  17650. _error = _next->call(&_next->glGetError)();
  17651. RegalAssert(_error==GL_NO_ERROR);
  17652. _next->call(&_next->glMakeTextureHandleNonResidentARB)(handle);
  17653. if (!_context->err.inBeginEnd) {
  17654. _error = _next->call(&_next->glGetError)();
  17655. if (_error!=GL_NO_ERROR) {
  17656. Error("glMakeTextureHandleNonResidentARB : ",Token::GLerrorToString(_error));
  17657. #if REGAL_BREAK
  17658. Break::ErrorCB(_error);
  17659. #endif
  17660. if (_context->err.callback)
  17661. _context->err.callback( _error );
  17662. }
  17663. }
  17664. }
  17665. static void REGAL_CALL error_glMakeTextureHandleResidentARB(GLuint64 handle)
  17666. {
  17667. Internal("error_glMakeTextureHandleResidentARB","()");
  17668. RegalContext *_context = REGAL_GET_CONTEXT();
  17669. RegalAssert(_context);
  17670. DispatchTableGL *_next = _context->dispatcher.error.next();
  17671. RegalAssert(_next);
  17672. GLenum _error = GL_NO_ERROR;
  17673. if (!_context->err.inBeginEnd)
  17674. _error = _next->call(&_next->glGetError)();
  17675. RegalAssert(_error==GL_NO_ERROR);
  17676. _next->call(&_next->glMakeTextureHandleResidentARB)(handle);
  17677. if (!_context->err.inBeginEnd) {
  17678. _error = _next->call(&_next->glGetError)();
  17679. if (_error!=GL_NO_ERROR) {
  17680. Error("glMakeTextureHandleResidentARB : ",Token::GLerrorToString(_error));
  17681. #if REGAL_BREAK
  17682. Break::ErrorCB(_error);
  17683. #endif
  17684. if (_context->err.callback)
  17685. _context->err.callback( _error );
  17686. }
  17687. }
  17688. }
  17689. static void REGAL_CALL error_glProgramUniformHandleui64ARB(GLuint program, GLint location, GLuint64 value)
  17690. {
  17691. Internal("error_glProgramUniformHandleui64ARB","()");
  17692. RegalContext *_context = REGAL_GET_CONTEXT();
  17693. RegalAssert(_context);
  17694. DispatchTableGL *_next = _context->dispatcher.error.next();
  17695. RegalAssert(_next);
  17696. GLenum _error = GL_NO_ERROR;
  17697. if (!_context->err.inBeginEnd)
  17698. _error = _next->call(&_next->glGetError)();
  17699. RegalAssert(_error==GL_NO_ERROR);
  17700. _next->call(&_next->glProgramUniformHandleui64ARB)(program, location, value);
  17701. if (!_context->err.inBeginEnd) {
  17702. _error = _next->call(&_next->glGetError)();
  17703. if (_error!=GL_NO_ERROR) {
  17704. Error("glProgramUniformHandleui64ARB : ",Token::GLerrorToString(_error));
  17705. #if REGAL_BREAK
  17706. Break::ErrorCB(_error);
  17707. #endif
  17708. if (_context->err.callback)
  17709. _context->err.callback( _error );
  17710. }
  17711. }
  17712. }
  17713. static void REGAL_CALL error_glProgramUniformHandleui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64 *values)
  17714. {
  17715. Internal("error_glProgramUniformHandleui64vARB","()");
  17716. RegalContext *_context = REGAL_GET_CONTEXT();
  17717. RegalAssert(_context);
  17718. DispatchTableGL *_next = _context->dispatcher.error.next();
  17719. RegalAssert(_next);
  17720. GLenum _error = GL_NO_ERROR;
  17721. if (!_context->err.inBeginEnd)
  17722. _error = _next->call(&_next->glGetError)();
  17723. RegalAssert(_error==GL_NO_ERROR);
  17724. _next->call(&_next->glProgramUniformHandleui64vARB)(program, location, count, values);
  17725. if (!_context->err.inBeginEnd) {
  17726. _error = _next->call(&_next->glGetError)();
  17727. if (_error!=GL_NO_ERROR) {
  17728. Error("glProgramUniformHandleui64vARB : ",Token::GLerrorToString(_error));
  17729. #if REGAL_BREAK
  17730. Break::ErrorCB(_error);
  17731. #endif
  17732. if (_context->err.callback)
  17733. _context->err.callback( _error );
  17734. }
  17735. }
  17736. }
  17737. static void REGAL_CALL error_glUniformHandleui64ARB(GLint location, GLuint64 value)
  17738. {
  17739. Internal("error_glUniformHandleui64ARB","()");
  17740. RegalContext *_context = REGAL_GET_CONTEXT();
  17741. RegalAssert(_context);
  17742. DispatchTableGL *_next = _context->dispatcher.error.next();
  17743. RegalAssert(_next);
  17744. GLenum _error = GL_NO_ERROR;
  17745. if (!_context->err.inBeginEnd)
  17746. _error = _next->call(&_next->glGetError)();
  17747. RegalAssert(_error==GL_NO_ERROR);
  17748. _next->call(&_next->glUniformHandleui64ARB)(location, value);
  17749. if (!_context->err.inBeginEnd) {
  17750. _error = _next->call(&_next->glGetError)();
  17751. if (_error!=GL_NO_ERROR) {
  17752. Error("glUniformHandleui64ARB : ",Token::GLerrorToString(_error));
  17753. #if REGAL_BREAK
  17754. Break::ErrorCB(_error);
  17755. #endif
  17756. if (_context->err.callback)
  17757. _context->err.callback( _error );
  17758. }
  17759. }
  17760. }
  17761. static void REGAL_CALL error_glUniformHandleui64vARB(GLint location, GLsizei count, const GLuint64 *value)
  17762. {
  17763. Internal("error_glUniformHandleui64vARB","()");
  17764. RegalContext *_context = REGAL_GET_CONTEXT();
  17765. RegalAssert(_context);
  17766. DispatchTableGL *_next = _context->dispatcher.error.next();
  17767. RegalAssert(_next);
  17768. GLenum _error = GL_NO_ERROR;
  17769. if (!_context->err.inBeginEnd)
  17770. _error = _next->call(&_next->glGetError)();
  17771. RegalAssert(_error==GL_NO_ERROR);
  17772. _next->call(&_next->glUniformHandleui64vARB)(location, count, value);
  17773. if (!_context->err.inBeginEnd) {
  17774. _error = _next->call(&_next->glGetError)();
  17775. if (_error!=GL_NO_ERROR) {
  17776. Error("glUniformHandleui64vARB : ",Token::GLerrorToString(_error));
  17777. #if REGAL_BREAK
  17778. Break::ErrorCB(_error);
  17779. #endif
  17780. if (_context->err.callback)
  17781. _context->err.callback( _error );
  17782. }
  17783. }
  17784. }
  17785. static void REGAL_CALL error_glVertexAttribL1ui64ARB(GLuint index, GLuint64EXT x)
  17786. {
  17787. Internal("error_glVertexAttribL1ui64ARB","()");
  17788. RegalContext *_context = REGAL_GET_CONTEXT();
  17789. RegalAssert(_context);
  17790. DispatchTableGL *_next = _context->dispatcher.error.next();
  17791. RegalAssert(_next);
  17792. GLenum _error = GL_NO_ERROR;
  17793. if (!_context->err.inBeginEnd)
  17794. _error = _next->call(&_next->glGetError)();
  17795. RegalAssert(_error==GL_NO_ERROR);
  17796. _next->call(&_next->glVertexAttribL1ui64ARB)(index, x);
  17797. if (!_context->err.inBeginEnd) {
  17798. _error = _next->call(&_next->glGetError)();
  17799. if (_error!=GL_NO_ERROR) {
  17800. Error("glVertexAttribL1ui64ARB : ",Token::GLerrorToString(_error));
  17801. #if REGAL_BREAK
  17802. Break::ErrorCB(_error);
  17803. #endif
  17804. if (_context->err.callback)
  17805. _context->err.callback( _error );
  17806. }
  17807. }
  17808. }
  17809. static void REGAL_CALL error_glVertexAttribL1ui64vARB(GLuint index, const GLuint64EXT *v)
  17810. {
  17811. Internal("error_glVertexAttribL1ui64vARB","()");
  17812. RegalContext *_context = REGAL_GET_CONTEXT();
  17813. RegalAssert(_context);
  17814. DispatchTableGL *_next = _context->dispatcher.error.next();
  17815. RegalAssert(_next);
  17816. GLenum _error = GL_NO_ERROR;
  17817. if (!_context->err.inBeginEnd)
  17818. _error = _next->call(&_next->glGetError)();
  17819. RegalAssert(_error==GL_NO_ERROR);
  17820. _next->call(&_next->glVertexAttribL1ui64vARB)(index, v);
  17821. if (!_context->err.inBeginEnd) {
  17822. _error = _next->call(&_next->glGetError)();
  17823. if (_error!=GL_NO_ERROR) {
  17824. Error("glVertexAttribL1ui64vARB : ",Token::GLerrorToString(_error));
  17825. #if REGAL_BREAK
  17826. Break::ErrorCB(_error);
  17827. #endif
  17828. if (_context->err.callback)
  17829. _context->err.callback( _error );
  17830. }
  17831. }
  17832. }
  17833. // GL_ARB_blend_func_extended
  17834. static void REGAL_CALL error_glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name)
  17835. {
  17836. Internal("error_glBindFragDataLocationIndexed","()");
  17837. RegalContext *_context = REGAL_GET_CONTEXT();
  17838. RegalAssert(_context);
  17839. DispatchTableGL *_next = _context->dispatcher.error.next();
  17840. RegalAssert(_next);
  17841. GLenum _error = GL_NO_ERROR;
  17842. if (!_context->err.inBeginEnd)
  17843. _error = _next->call(&_next->glGetError)();
  17844. RegalAssert(_error==GL_NO_ERROR);
  17845. _next->call(&_next->glBindFragDataLocationIndexed)(program, colorNumber, index, name);
  17846. if (!_context->err.inBeginEnd) {
  17847. _error = _next->call(&_next->glGetError)();
  17848. if (_error!=GL_NO_ERROR) {
  17849. Error("glBindFragDataLocationIndexed : ",Token::GLerrorToString(_error));
  17850. #if REGAL_BREAK
  17851. Break::ErrorCB(_error);
  17852. #endif
  17853. if (_context->err.callback)
  17854. _context->err.callback( _error );
  17855. }
  17856. }
  17857. }
  17858. static GLint REGAL_CALL error_glGetFragDataIndex(GLuint program, const GLchar *name)
  17859. {
  17860. Internal("error_glGetFragDataIndex","()");
  17861. RegalContext *_context = REGAL_GET_CONTEXT();
  17862. RegalAssert(_context);
  17863. DispatchTableGL *_next = _context->dispatcher.error.next();
  17864. RegalAssert(_next);
  17865. GLenum _error = GL_NO_ERROR;
  17866. if (!_context->err.inBeginEnd)
  17867. _error = _next->call(&_next->glGetError)();
  17868. RegalAssert(_error==GL_NO_ERROR);
  17869. GLint ret = _next->call(&_next->glGetFragDataIndex)(program, name);
  17870. if (!_context->err.inBeginEnd) {
  17871. _error = _next->call(&_next->glGetError)();
  17872. if (_error!=GL_NO_ERROR) {
  17873. Error("glGetFragDataIndex : ",Token::GLerrorToString(_error));
  17874. #if REGAL_BREAK
  17875. Break::ErrorCB(_error);
  17876. #endif
  17877. if (_context->err.callback)
  17878. _context->err.callback( _error );
  17879. }
  17880. }
  17881. return ret;
  17882. }
  17883. // GL_ARB_buffer_storage
  17884. static void REGAL_CALL error_glBufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data, GLbitfield flags)
  17885. {
  17886. Internal("error_glBufferStorage","()");
  17887. RegalContext *_context = REGAL_GET_CONTEXT();
  17888. RegalAssert(_context);
  17889. DispatchTableGL *_next = _context->dispatcher.error.next();
  17890. RegalAssert(_next);
  17891. GLenum _error = GL_NO_ERROR;
  17892. if (!_context->err.inBeginEnd)
  17893. _error = _next->call(&_next->glGetError)();
  17894. RegalAssert(_error==GL_NO_ERROR);
  17895. _next->call(&_next->glBufferStorage)(target, size, data, flags);
  17896. if (!_context->err.inBeginEnd) {
  17897. _error = _next->call(&_next->glGetError)();
  17898. if (_error!=GL_NO_ERROR) {
  17899. Error("glBufferStorage : ",Token::GLerrorToString(_error));
  17900. #if REGAL_BREAK
  17901. Break::ErrorCB(_error);
  17902. #endif
  17903. if (_context->err.callback)
  17904. _context->err.callback( _error );
  17905. }
  17906. }
  17907. }
  17908. static void REGAL_CALL error_glNamedBufferStorageEXT(GLuint buffer, GLsizeiptr size, const GLvoid *data, GLbitfield flags)
  17909. {
  17910. Internal("error_glNamedBufferStorageEXT","()");
  17911. RegalContext *_context = REGAL_GET_CONTEXT();
  17912. RegalAssert(_context);
  17913. DispatchTableGL *_next = _context->dispatcher.error.next();
  17914. RegalAssert(_next);
  17915. GLenum _error = GL_NO_ERROR;
  17916. if (!_context->err.inBeginEnd)
  17917. _error = _next->call(&_next->glGetError)();
  17918. RegalAssert(_error==GL_NO_ERROR);
  17919. _next->call(&_next->glNamedBufferStorageEXT)(buffer, size, data, flags);
  17920. if (!_context->err.inBeginEnd) {
  17921. _error = _next->call(&_next->glGetError)();
  17922. if (_error!=GL_NO_ERROR) {
  17923. Error("glNamedBufferStorageEXT : ",Token::GLerrorToString(_error));
  17924. #if REGAL_BREAK
  17925. Break::ErrorCB(_error);
  17926. #endif
  17927. if (_context->err.callback)
  17928. _context->err.callback( _error );
  17929. }
  17930. }
  17931. }
  17932. // GL_ARB_cl_event
  17933. static GLsync REGAL_CALL error_glCreateSyncFromCLeventARB(cl_context context, cl_event event, GLbitfield flags)
  17934. {
  17935. Internal("error_glCreateSyncFromCLeventARB","()");
  17936. RegalContext *_context = REGAL_GET_CONTEXT();
  17937. RegalAssert(_context);
  17938. DispatchTableGL *_next = _context->dispatcher.error.next();
  17939. RegalAssert(_next);
  17940. GLenum _error = GL_NO_ERROR;
  17941. if (!_context->err.inBeginEnd)
  17942. _error = _next->call(&_next->glGetError)();
  17943. RegalAssert(_error==GL_NO_ERROR);
  17944. GLsync ret = _next->call(&_next->glCreateSyncFromCLeventARB)(context, event, flags);
  17945. if (!_context->err.inBeginEnd) {
  17946. _error = _next->call(&_next->glGetError)();
  17947. if (_error!=GL_NO_ERROR) {
  17948. Error("glCreateSyncFromCLeventARB : ",Token::GLerrorToString(_error));
  17949. #if REGAL_BREAK
  17950. Break::ErrorCB(_error);
  17951. #endif
  17952. if (_context->err.callback)
  17953. _context->err.callback( _error );
  17954. }
  17955. }
  17956. return ret;
  17957. }
  17958. // GL_ARB_clear_buffer_object
  17959. static void REGAL_CALL error_glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const GLvoid *data)
  17960. {
  17961. Internal("error_glClearBufferData","()");
  17962. RegalContext *_context = REGAL_GET_CONTEXT();
  17963. RegalAssert(_context);
  17964. DispatchTableGL *_next = _context->dispatcher.error.next();
  17965. RegalAssert(_next);
  17966. GLenum _error = GL_NO_ERROR;
  17967. if (!_context->err.inBeginEnd)
  17968. _error = _next->call(&_next->glGetError)();
  17969. RegalAssert(_error==GL_NO_ERROR);
  17970. _next->call(&_next->glClearBufferData)(target, internalformat, format, type, data);
  17971. if (!_context->err.inBeginEnd) {
  17972. _error = _next->call(&_next->glGetError)();
  17973. if (_error!=GL_NO_ERROR) {
  17974. Error("glClearBufferData : ",Token::GLerrorToString(_error));
  17975. #if REGAL_BREAK
  17976. Break::ErrorCB(_error);
  17977. #endif
  17978. if (_context->err.callback)
  17979. _context->err.callback( _error );
  17980. }
  17981. }
  17982. }
  17983. static void REGAL_CALL error_glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const GLvoid *data)
  17984. {
  17985. Internal("error_glClearBufferSubData","()");
  17986. RegalContext *_context = REGAL_GET_CONTEXT();
  17987. RegalAssert(_context);
  17988. DispatchTableGL *_next = _context->dispatcher.error.next();
  17989. RegalAssert(_next);
  17990. GLenum _error = GL_NO_ERROR;
  17991. if (!_context->err.inBeginEnd)
  17992. _error = _next->call(&_next->glGetError)();
  17993. RegalAssert(_error==GL_NO_ERROR);
  17994. _next->call(&_next->glClearBufferSubData)(target, internalformat, offset, size, format, type, data);
  17995. if (!_context->err.inBeginEnd) {
  17996. _error = _next->call(&_next->glGetError)();
  17997. if (_error!=GL_NO_ERROR) {
  17998. Error("glClearBufferSubData : ",Token::GLerrorToString(_error));
  17999. #if REGAL_BREAK
  18000. Break::ErrorCB(_error);
  18001. #endif
  18002. if (_context->err.callback)
  18003. _context->err.callback( _error );
  18004. }
  18005. }
  18006. }
  18007. static void REGAL_CALL error_glClearNamedBufferDataEXT(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const GLvoid *data)
  18008. {
  18009. Internal("error_glClearNamedBufferDataEXT","()");
  18010. RegalContext *_context = REGAL_GET_CONTEXT();
  18011. RegalAssert(_context);
  18012. DispatchTableGL *_next = _context->dispatcher.error.next();
  18013. RegalAssert(_next);
  18014. GLenum _error = GL_NO_ERROR;
  18015. if (!_context->err.inBeginEnd)
  18016. _error = _next->call(&_next->glGetError)();
  18017. RegalAssert(_error==GL_NO_ERROR);
  18018. _next->call(&_next->glClearNamedBufferDataEXT)(buffer, internalformat, format, type, data);
  18019. if (!_context->err.inBeginEnd) {
  18020. _error = _next->call(&_next->glGetError)();
  18021. if (_error!=GL_NO_ERROR) {
  18022. Error("glClearNamedBufferDataEXT : ",Token::GLerrorToString(_error));
  18023. #if REGAL_BREAK
  18024. Break::ErrorCB(_error);
  18025. #endif
  18026. if (_context->err.callback)
  18027. _context->err.callback( _error );
  18028. }
  18029. }
  18030. }
  18031. static void REGAL_CALL error_glClearNamedBufferSubDataEXT(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const GLvoid *data)
  18032. {
  18033. Internal("error_glClearNamedBufferSubDataEXT","()");
  18034. RegalContext *_context = REGAL_GET_CONTEXT();
  18035. RegalAssert(_context);
  18036. DispatchTableGL *_next = _context->dispatcher.error.next();
  18037. RegalAssert(_next);
  18038. GLenum _error = GL_NO_ERROR;
  18039. if (!_context->err.inBeginEnd)
  18040. _error = _next->call(&_next->glGetError)();
  18041. RegalAssert(_error==GL_NO_ERROR);
  18042. _next->call(&_next->glClearNamedBufferSubDataEXT)(buffer, internalformat, offset, size, format, type, data);
  18043. if (!_context->err.inBeginEnd) {
  18044. _error = _next->call(&_next->glGetError)();
  18045. if (_error!=GL_NO_ERROR) {
  18046. Error("glClearNamedBufferSubDataEXT : ",Token::GLerrorToString(_error));
  18047. #if REGAL_BREAK
  18048. Break::ErrorCB(_error);
  18049. #endif
  18050. if (_context->err.callback)
  18051. _context->err.callback( _error );
  18052. }
  18053. }
  18054. }
  18055. // GL_ARB_clear_texture
  18056. static void REGAL_CALL error_glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const GLvoid *data)
  18057. {
  18058. Internal("error_glClearTexImage","()");
  18059. RegalContext *_context = REGAL_GET_CONTEXT();
  18060. RegalAssert(_context);
  18061. DispatchTableGL *_next = _context->dispatcher.error.next();
  18062. RegalAssert(_next);
  18063. GLenum _error = GL_NO_ERROR;
  18064. if (!_context->err.inBeginEnd)
  18065. _error = _next->call(&_next->glGetError)();
  18066. RegalAssert(_error==GL_NO_ERROR);
  18067. _next->call(&_next->glClearTexImage)(texture, level, format, type, data);
  18068. if (!_context->err.inBeginEnd) {
  18069. _error = _next->call(&_next->glGetError)();
  18070. if (_error!=GL_NO_ERROR) {
  18071. Error("glClearTexImage : ",Token::GLerrorToString(_error));
  18072. #if REGAL_BREAK
  18073. Break::ErrorCB(_error);
  18074. #endif
  18075. if (_context->err.callback)
  18076. _context->err.callback( _error );
  18077. }
  18078. }
  18079. }
  18080. static void REGAL_CALL error_glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *data)
  18081. {
  18082. Internal("error_glClearTexSubImage","()");
  18083. RegalContext *_context = REGAL_GET_CONTEXT();
  18084. RegalAssert(_context);
  18085. DispatchTableGL *_next = _context->dispatcher.error.next();
  18086. RegalAssert(_next);
  18087. GLenum _error = GL_NO_ERROR;
  18088. if (!_context->err.inBeginEnd)
  18089. _error = _next->call(&_next->glGetError)();
  18090. RegalAssert(_error==GL_NO_ERROR);
  18091. _next->call(&_next->glClearTexSubImage)(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
  18092. if (!_context->err.inBeginEnd) {
  18093. _error = _next->call(&_next->glGetError)();
  18094. if (_error!=GL_NO_ERROR) {
  18095. Error("glClearTexSubImage : ",Token::GLerrorToString(_error));
  18096. #if REGAL_BREAK
  18097. Break::ErrorCB(_error);
  18098. #endif
  18099. if (_context->err.callback)
  18100. _context->err.callback( _error );
  18101. }
  18102. }
  18103. }
  18104. // GL_ARB_color_buffer_float
  18105. static void REGAL_CALL error_glClampColorARB(GLenum target, GLenum clamp)
  18106. {
  18107. Internal("error_glClampColorARB","()");
  18108. RegalContext *_context = REGAL_GET_CONTEXT();
  18109. RegalAssert(_context);
  18110. DispatchTableGL *_next = _context->dispatcher.error.next();
  18111. RegalAssert(_next);
  18112. GLenum _error = GL_NO_ERROR;
  18113. if (!_context->err.inBeginEnd)
  18114. _error = _next->call(&_next->glGetError)();
  18115. RegalAssert(_error==GL_NO_ERROR);
  18116. _next->call(&_next->glClampColorARB)(target, clamp);
  18117. if (!_context->err.inBeginEnd) {
  18118. _error = _next->call(&_next->glGetError)();
  18119. if (_error!=GL_NO_ERROR) {
  18120. Error("glClampColorARB : ",Token::GLerrorToString(_error));
  18121. #if REGAL_BREAK
  18122. Break::ErrorCB(_error);
  18123. #endif
  18124. if (_context->err.callback)
  18125. _context->err.callback( _error );
  18126. }
  18127. }
  18128. }
  18129. // GL_ARB_compute_shader
  18130. static void REGAL_CALL error_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
  18131. {
  18132. Internal("error_glDispatchCompute","()");
  18133. RegalContext *_context = REGAL_GET_CONTEXT();
  18134. RegalAssert(_context);
  18135. DispatchTableGL *_next = _context->dispatcher.error.next();
  18136. RegalAssert(_next);
  18137. GLenum _error = GL_NO_ERROR;
  18138. if (!_context->err.inBeginEnd)
  18139. _error = _next->call(&_next->glGetError)();
  18140. RegalAssert(_error==GL_NO_ERROR);
  18141. _next->call(&_next->glDispatchCompute)(num_groups_x, num_groups_y, num_groups_z);
  18142. if (!_context->err.inBeginEnd) {
  18143. _error = _next->call(&_next->glGetError)();
  18144. if (_error!=GL_NO_ERROR) {
  18145. Error("glDispatchCompute : ",Token::GLerrorToString(_error));
  18146. #if REGAL_BREAK
  18147. Break::ErrorCB(_error);
  18148. #endif
  18149. if (_context->err.callback)
  18150. _context->err.callback( _error );
  18151. }
  18152. }
  18153. }
  18154. static void REGAL_CALL error_glDispatchComputeIndirect(GLintptr indirect)
  18155. {
  18156. Internal("error_glDispatchComputeIndirect","()");
  18157. RegalContext *_context = REGAL_GET_CONTEXT();
  18158. RegalAssert(_context);
  18159. DispatchTableGL *_next = _context->dispatcher.error.next();
  18160. RegalAssert(_next);
  18161. GLenum _error = GL_NO_ERROR;
  18162. if (!_context->err.inBeginEnd)
  18163. _error = _next->call(&_next->glGetError)();
  18164. RegalAssert(_error==GL_NO_ERROR);
  18165. _next->call(&_next->glDispatchComputeIndirect)(indirect);
  18166. if (!_context->err.inBeginEnd) {
  18167. _error = _next->call(&_next->glGetError)();
  18168. if (_error!=GL_NO_ERROR) {
  18169. Error("glDispatchComputeIndirect : ",Token::GLerrorToString(_error));
  18170. #if REGAL_BREAK
  18171. Break::ErrorCB(_error);
  18172. #endif
  18173. if (_context->err.callback)
  18174. _context->err.callback( _error );
  18175. }
  18176. }
  18177. }
  18178. // GL_ARB_compute_variable_group_size
  18179. static void REGAL_CALL error_glDispatchComputeGroupSizeARB(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z)
  18180. {
  18181. Internal("error_glDispatchComputeGroupSizeARB","()");
  18182. RegalContext *_context = REGAL_GET_CONTEXT();
  18183. RegalAssert(_context);
  18184. DispatchTableGL *_next = _context->dispatcher.error.next();
  18185. RegalAssert(_next);
  18186. GLenum _error = GL_NO_ERROR;
  18187. if (!_context->err.inBeginEnd)
  18188. _error = _next->call(&_next->glGetError)();
  18189. RegalAssert(_error==GL_NO_ERROR);
  18190. _next->call(&_next->glDispatchComputeGroupSizeARB)(num_groups_x, num_groups_y, num_groups_z, group_size_x, group_size_y, group_size_z);
  18191. if (!_context->err.inBeginEnd) {
  18192. _error = _next->call(&_next->glGetError)();
  18193. if (_error!=GL_NO_ERROR) {
  18194. Error("glDispatchComputeGroupSizeARB : ",Token::GLerrorToString(_error));
  18195. #if REGAL_BREAK
  18196. Break::ErrorCB(_error);
  18197. #endif
  18198. if (_context->err.callback)
  18199. _context->err.callback( _error );
  18200. }
  18201. }
  18202. }
  18203. // GL_ARB_copy_buffer
  18204. static void REGAL_CALL error_glCopyBufferSubData(GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size)
  18205. {
  18206. Internal("error_glCopyBufferSubData","()");
  18207. RegalContext *_context = REGAL_GET_CONTEXT();
  18208. RegalAssert(_context);
  18209. DispatchTableGL *_next = _context->dispatcher.error.next();
  18210. RegalAssert(_next);
  18211. GLenum _error = GL_NO_ERROR;
  18212. if (!_context->err.inBeginEnd)
  18213. _error = _next->call(&_next->glGetError)();
  18214. RegalAssert(_error==GL_NO_ERROR);
  18215. _next->call(&_next->glCopyBufferSubData)(readtarget, writetarget, readoffset, writeoffset, size);
  18216. if (!_context->err.inBeginEnd) {
  18217. _error = _next->call(&_next->glGetError)();
  18218. if (_error!=GL_NO_ERROR) {
  18219. Error("glCopyBufferSubData : ",Token::GLerrorToString(_error));
  18220. #if REGAL_BREAK
  18221. Break::ErrorCB(_error);
  18222. #endif
  18223. if (_context->err.callback)
  18224. _context->err.callback( _error );
  18225. }
  18226. }
  18227. }
  18228. // GL_ARB_copy_image
  18229. static void REGAL_CALL error_glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)
  18230. {
  18231. Internal("error_glCopyImageSubData","()");
  18232. RegalContext *_context = REGAL_GET_CONTEXT();
  18233. RegalAssert(_context);
  18234. DispatchTableGL *_next = _context->dispatcher.error.next();
  18235. RegalAssert(_next);
  18236. GLenum _error = GL_NO_ERROR;
  18237. if (!_context->err.inBeginEnd)
  18238. _error = _next->call(&_next->glGetError)();
  18239. RegalAssert(_error==GL_NO_ERROR);
  18240. _next->call(&_next->glCopyImageSubData)(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth);
  18241. if (!_context->err.inBeginEnd) {
  18242. _error = _next->call(&_next->glGetError)();
  18243. if (_error!=GL_NO_ERROR) {
  18244. Error("glCopyImageSubData : ",Token::GLerrorToString(_error));
  18245. #if REGAL_BREAK
  18246. Break::ErrorCB(_error);
  18247. #endif
  18248. if (_context->err.callback)
  18249. _context->err.callback( _error );
  18250. }
  18251. }
  18252. }
  18253. // GL_ARB_debug_output
  18254. static void REGAL_CALL error_glDebugMessageCallbackARB(GLDEBUGPROCARB callback, const GLvoid *userParam)
  18255. {
  18256. Internal("error_glDebugMessageCallbackARB","()");
  18257. RegalContext *_context = REGAL_GET_CONTEXT();
  18258. RegalAssert(_context);
  18259. DispatchTableGL *_next = _context->dispatcher.error.next();
  18260. RegalAssert(_next);
  18261. GLenum _error = GL_NO_ERROR;
  18262. if (!_context->err.inBeginEnd)
  18263. _error = _next->call(&_next->glGetError)();
  18264. RegalAssert(_error==GL_NO_ERROR);
  18265. _next->call(&_next->glDebugMessageCallbackARB)(callback, userParam);
  18266. if (!_context->err.inBeginEnd) {
  18267. _error = _next->call(&_next->glGetError)();
  18268. if (_error!=GL_NO_ERROR) {
  18269. Error("glDebugMessageCallbackARB : ",Token::GLerrorToString(_error));
  18270. #if REGAL_BREAK
  18271. Break::ErrorCB(_error);
  18272. #endif
  18273. if (_context->err.callback)
  18274. _context->err.callback( _error );
  18275. }
  18276. }
  18277. }
  18278. static void REGAL_CALL error_glDebugMessageControlARB(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
  18279. {
  18280. Internal("error_glDebugMessageControlARB","()");
  18281. RegalContext *_context = REGAL_GET_CONTEXT();
  18282. RegalAssert(_context);
  18283. DispatchTableGL *_next = _context->dispatcher.error.next();
  18284. RegalAssert(_next);
  18285. GLenum _error = GL_NO_ERROR;
  18286. if (!_context->err.inBeginEnd)
  18287. _error = _next->call(&_next->glGetError)();
  18288. RegalAssert(_error==GL_NO_ERROR);
  18289. _next->call(&_next->glDebugMessageControlARB)(source, type, severity, count, ids, enabled);
  18290. if (!_context->err.inBeginEnd) {
  18291. _error = _next->call(&_next->glGetError)();
  18292. if (_error!=GL_NO_ERROR) {
  18293. Error("glDebugMessageControlARB : ",Token::GLerrorToString(_error));
  18294. #if REGAL_BREAK
  18295. Break::ErrorCB(_error);
  18296. #endif
  18297. if (_context->err.callback)
  18298. _context->err.callback( _error );
  18299. }
  18300. }
  18301. }
  18302. static void REGAL_CALL error_glDebugMessageInsertARB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)
  18303. {
  18304. Internal("error_glDebugMessageInsertARB","()");
  18305. RegalContext *_context = REGAL_GET_CONTEXT();
  18306. RegalAssert(_context);
  18307. DispatchTableGL *_next = _context->dispatcher.error.next();
  18308. RegalAssert(_next);
  18309. GLenum _error = GL_NO_ERROR;
  18310. if (!_context->err.inBeginEnd)
  18311. _error = _next->call(&_next->glGetError)();
  18312. RegalAssert(_error==GL_NO_ERROR);
  18313. _next->call(&_next->glDebugMessageInsertARB)(source, type, id, severity, length, buf);
  18314. if (!_context->err.inBeginEnd) {
  18315. _error = _next->call(&_next->glGetError)();
  18316. if (_error!=GL_NO_ERROR) {
  18317. Error("glDebugMessageInsertARB : ",Token::GLerrorToString(_error));
  18318. #if REGAL_BREAK
  18319. Break::ErrorCB(_error);
  18320. #endif
  18321. if (_context->err.callback)
  18322. _context->err.callback( _error );
  18323. }
  18324. }
  18325. }
  18326. static GLuint REGAL_CALL error_glGetDebugMessageLogARB(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)
  18327. {
  18328. Internal("error_glGetDebugMessageLogARB","()");
  18329. RegalContext *_context = REGAL_GET_CONTEXT();
  18330. RegalAssert(_context);
  18331. DispatchTableGL *_next = _context->dispatcher.error.next();
  18332. RegalAssert(_next);
  18333. GLenum _error = GL_NO_ERROR;
  18334. if (!_context->err.inBeginEnd)
  18335. _error = _next->call(&_next->glGetError)();
  18336. RegalAssert(_error==GL_NO_ERROR);
  18337. GLuint ret = _next->call(&_next->glGetDebugMessageLogARB)(count, bufsize, sources, types, ids, severities, lengths, messageLog);
  18338. if (!_context->err.inBeginEnd) {
  18339. _error = _next->call(&_next->glGetError)();
  18340. if (_error!=GL_NO_ERROR) {
  18341. Error("glGetDebugMessageLogARB : ",Token::GLerrorToString(_error));
  18342. #if REGAL_BREAK
  18343. Break::ErrorCB(_error);
  18344. #endif
  18345. if (_context->err.callback)
  18346. _context->err.callback( _error );
  18347. }
  18348. }
  18349. return ret;
  18350. }
  18351. // GL_ARB_draw_buffers
  18352. static void REGAL_CALL error_glDrawBuffersARB(GLsizei n, const GLenum *bufs)
  18353. {
  18354. Internal("error_glDrawBuffersARB","()");
  18355. RegalContext *_context = REGAL_GET_CONTEXT();
  18356. RegalAssert(_context);
  18357. DispatchTableGL *_next = _context->dispatcher.error.next();
  18358. RegalAssert(_next);
  18359. GLenum _error = GL_NO_ERROR;
  18360. if (!_context->err.inBeginEnd)
  18361. _error = _next->call(&_next->glGetError)();
  18362. RegalAssert(_error==GL_NO_ERROR);
  18363. _next->call(&_next->glDrawBuffersARB)(n, bufs);
  18364. if (!_context->err.inBeginEnd) {
  18365. _error = _next->call(&_next->glGetError)();
  18366. if (_error!=GL_NO_ERROR) {
  18367. Error("glDrawBuffersARB : ",Token::GLerrorToString(_error));
  18368. #if REGAL_BREAK
  18369. Break::ErrorCB(_error);
  18370. #endif
  18371. if (_context->err.callback)
  18372. _context->err.callback( _error );
  18373. }
  18374. }
  18375. }
  18376. // GL_ARB_draw_buffers_blend
  18377. static void REGAL_CALL error_glBlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
  18378. {
  18379. Internal("error_glBlendEquationSeparateiARB","()");
  18380. RegalContext *_context = REGAL_GET_CONTEXT();
  18381. RegalAssert(_context);
  18382. DispatchTableGL *_next = _context->dispatcher.error.next();
  18383. RegalAssert(_next);
  18384. GLenum _error = GL_NO_ERROR;
  18385. if (!_context->err.inBeginEnd)
  18386. _error = _next->call(&_next->glGetError)();
  18387. RegalAssert(_error==GL_NO_ERROR);
  18388. _next->call(&_next->glBlendEquationSeparateiARB)(buf, modeRGB, modeAlpha);
  18389. if (!_context->err.inBeginEnd) {
  18390. _error = _next->call(&_next->glGetError)();
  18391. if (_error!=GL_NO_ERROR) {
  18392. Error("glBlendEquationSeparateiARB : ",Token::GLerrorToString(_error));
  18393. #if REGAL_BREAK
  18394. Break::ErrorCB(_error);
  18395. #endif
  18396. if (_context->err.callback)
  18397. _context->err.callback( _error );
  18398. }
  18399. }
  18400. }
  18401. static void REGAL_CALL error_glBlendEquationiARB(GLuint buf, GLenum mode)
  18402. {
  18403. Internal("error_glBlendEquationiARB","()");
  18404. RegalContext *_context = REGAL_GET_CONTEXT();
  18405. RegalAssert(_context);
  18406. DispatchTableGL *_next = _context->dispatcher.error.next();
  18407. RegalAssert(_next);
  18408. GLenum _error = GL_NO_ERROR;
  18409. if (!_context->err.inBeginEnd)
  18410. _error = _next->call(&_next->glGetError)();
  18411. RegalAssert(_error==GL_NO_ERROR);
  18412. _next->call(&_next->glBlendEquationiARB)(buf, mode);
  18413. if (!_context->err.inBeginEnd) {
  18414. _error = _next->call(&_next->glGetError)();
  18415. if (_error!=GL_NO_ERROR) {
  18416. Error("glBlendEquationiARB : ",Token::GLerrorToString(_error));
  18417. #if REGAL_BREAK
  18418. Break::ErrorCB(_error);
  18419. #endif
  18420. if (_context->err.callback)
  18421. _context->err.callback( _error );
  18422. }
  18423. }
  18424. }
  18425. static void REGAL_CALL error_glBlendFuncSeparateiARB(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
  18426. {
  18427. Internal("error_glBlendFuncSeparateiARB","()");
  18428. RegalContext *_context = REGAL_GET_CONTEXT();
  18429. RegalAssert(_context);
  18430. DispatchTableGL *_next = _context->dispatcher.error.next();
  18431. RegalAssert(_next);
  18432. GLenum _error = GL_NO_ERROR;
  18433. if (!_context->err.inBeginEnd)
  18434. _error = _next->call(&_next->glGetError)();
  18435. RegalAssert(_error==GL_NO_ERROR);
  18436. _next->call(&_next->glBlendFuncSeparateiARB)(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
  18437. if (!_context->err.inBeginEnd) {
  18438. _error = _next->call(&_next->glGetError)();
  18439. if (_error!=GL_NO_ERROR) {
  18440. Error("glBlendFuncSeparateiARB : ",Token::GLerrorToString(_error));
  18441. #if REGAL_BREAK
  18442. Break::ErrorCB(_error);
  18443. #endif
  18444. if (_context->err.callback)
  18445. _context->err.callback( _error );
  18446. }
  18447. }
  18448. }
  18449. static void REGAL_CALL error_glBlendFunciARB(GLuint buf, GLenum src, GLenum dst)
  18450. {
  18451. Internal("error_glBlendFunciARB","()");
  18452. RegalContext *_context = REGAL_GET_CONTEXT();
  18453. RegalAssert(_context);
  18454. DispatchTableGL *_next = _context->dispatcher.error.next();
  18455. RegalAssert(_next);
  18456. GLenum _error = GL_NO_ERROR;
  18457. if (!_context->err.inBeginEnd)
  18458. _error = _next->call(&_next->glGetError)();
  18459. RegalAssert(_error==GL_NO_ERROR);
  18460. _next->call(&_next->glBlendFunciARB)(buf, src, dst);
  18461. if (!_context->err.inBeginEnd) {
  18462. _error = _next->call(&_next->glGetError)();
  18463. if (_error!=GL_NO_ERROR) {
  18464. Error("glBlendFunciARB : ",Token::GLerrorToString(_error));
  18465. #if REGAL_BREAK
  18466. Break::ErrorCB(_error);
  18467. #endif
  18468. if (_context->err.callback)
  18469. _context->err.callback( _error );
  18470. }
  18471. }
  18472. }
  18473. // GL_ARB_draw_elements_base_vertex
  18474. static void REGAL_CALL error_glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
  18475. {
  18476. Internal("error_glDrawElementsBaseVertex","()");
  18477. RegalContext *_context = REGAL_GET_CONTEXT();
  18478. RegalAssert(_context);
  18479. DispatchTableGL *_next = _context->dispatcher.error.next();
  18480. RegalAssert(_next);
  18481. GLenum _error = GL_NO_ERROR;
  18482. if (!_context->err.inBeginEnd)
  18483. _error = _next->call(&_next->glGetError)();
  18484. RegalAssert(_error==GL_NO_ERROR);
  18485. _next->call(&_next->glDrawElementsBaseVertex)(mode, count, type, indices, basevertex);
  18486. if (!_context->err.inBeginEnd) {
  18487. _error = _next->call(&_next->glGetError)();
  18488. if (_error!=GL_NO_ERROR) {
  18489. Error("glDrawElementsBaseVertex : ",Token::GLerrorToString(_error));
  18490. #if REGAL_BREAK
  18491. Break::ErrorCB(_error);
  18492. #endif
  18493. if (_context->err.callback)
  18494. _context->err.callback( _error );
  18495. }
  18496. }
  18497. }
  18498. static void REGAL_CALL error_glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex)
  18499. {
  18500. Internal("error_glDrawElementsInstancedBaseVertex","()");
  18501. RegalContext *_context = REGAL_GET_CONTEXT();
  18502. RegalAssert(_context);
  18503. DispatchTableGL *_next = _context->dispatcher.error.next();
  18504. RegalAssert(_next);
  18505. GLenum _error = GL_NO_ERROR;
  18506. if (!_context->err.inBeginEnd)
  18507. _error = _next->call(&_next->glGetError)();
  18508. RegalAssert(_error==GL_NO_ERROR);
  18509. _next->call(&_next->glDrawElementsInstancedBaseVertex)(mode, count, type, indices, primcount, basevertex);
  18510. if (!_context->err.inBeginEnd) {
  18511. _error = _next->call(&_next->glGetError)();
  18512. if (_error!=GL_NO_ERROR) {
  18513. Error("glDrawElementsInstancedBaseVertex : ",Token::GLerrorToString(_error));
  18514. #if REGAL_BREAK
  18515. Break::ErrorCB(_error);
  18516. #endif
  18517. if (_context->err.callback)
  18518. _context->err.callback( _error );
  18519. }
  18520. }
  18521. }
  18522. static void REGAL_CALL error_glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
  18523. {
  18524. Internal("error_glDrawRangeElementsBaseVertex","()");
  18525. RegalContext *_context = REGAL_GET_CONTEXT();
  18526. RegalAssert(_context);
  18527. DispatchTableGL *_next = _context->dispatcher.error.next();
  18528. RegalAssert(_next);
  18529. GLenum _error = GL_NO_ERROR;
  18530. if (!_context->err.inBeginEnd)
  18531. _error = _next->call(&_next->glGetError)();
  18532. RegalAssert(_error==GL_NO_ERROR);
  18533. _next->call(&_next->glDrawRangeElementsBaseVertex)(mode, start, end, count, type, indices, basevertex);
  18534. if (!_context->err.inBeginEnd) {
  18535. _error = _next->call(&_next->glGetError)();
  18536. if (_error!=GL_NO_ERROR) {
  18537. Error("glDrawRangeElementsBaseVertex : ",Token::GLerrorToString(_error));
  18538. #if REGAL_BREAK
  18539. Break::ErrorCB(_error);
  18540. #endif
  18541. if (_context->err.callback)
  18542. _context->err.callback( _error );
  18543. }
  18544. }
  18545. }
  18546. static void REGAL_CALL error_glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, const GLint *basevertex)
  18547. {
  18548. Internal("error_glMultiDrawElementsBaseVertex","()");
  18549. RegalContext *_context = REGAL_GET_CONTEXT();
  18550. RegalAssert(_context);
  18551. DispatchTableGL *_next = _context->dispatcher.error.next();
  18552. RegalAssert(_next);
  18553. GLenum _error = GL_NO_ERROR;
  18554. if (!_context->err.inBeginEnd)
  18555. _error = _next->call(&_next->glGetError)();
  18556. RegalAssert(_error==GL_NO_ERROR);
  18557. _next->call(&_next->glMultiDrawElementsBaseVertex)(mode, count, type, indices, primcount, basevertex);
  18558. if (!_context->err.inBeginEnd) {
  18559. _error = _next->call(&_next->glGetError)();
  18560. if (_error!=GL_NO_ERROR) {
  18561. Error("glMultiDrawElementsBaseVertex : ",Token::GLerrorToString(_error));
  18562. #if REGAL_BREAK
  18563. Break::ErrorCB(_error);
  18564. #endif
  18565. if (_context->err.callback)
  18566. _context->err.callback( _error );
  18567. }
  18568. }
  18569. }
  18570. // GL_ARB_draw_indirect
  18571. static void REGAL_CALL error_glDrawArraysIndirect(GLenum mode, const GLvoid *indirect)
  18572. {
  18573. Internal("error_glDrawArraysIndirect","()");
  18574. RegalContext *_context = REGAL_GET_CONTEXT();
  18575. RegalAssert(_context);
  18576. DispatchTableGL *_next = _context->dispatcher.error.next();
  18577. RegalAssert(_next);
  18578. GLenum _error = GL_NO_ERROR;
  18579. if (!_context->err.inBeginEnd)
  18580. _error = _next->call(&_next->glGetError)();
  18581. RegalAssert(_error==GL_NO_ERROR);
  18582. _next->call(&_next->glDrawArraysIndirect)(mode, indirect);
  18583. if (!_context->err.inBeginEnd) {
  18584. _error = _next->call(&_next->glGetError)();
  18585. if (_error!=GL_NO_ERROR) {
  18586. Error("glDrawArraysIndirect : ",Token::GLerrorToString(_error));
  18587. #if REGAL_BREAK
  18588. Break::ErrorCB(_error);
  18589. #endif
  18590. if (_context->err.callback)
  18591. _context->err.callback( _error );
  18592. }
  18593. }
  18594. }
  18595. static void REGAL_CALL error_glDrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect)
  18596. {
  18597. Internal("error_glDrawElementsIndirect","()");
  18598. RegalContext *_context = REGAL_GET_CONTEXT();
  18599. RegalAssert(_context);
  18600. DispatchTableGL *_next = _context->dispatcher.error.next();
  18601. RegalAssert(_next);
  18602. GLenum _error = GL_NO_ERROR;
  18603. if (!_context->err.inBeginEnd)
  18604. _error = _next->call(&_next->glGetError)();
  18605. RegalAssert(_error==GL_NO_ERROR);
  18606. _next->call(&_next->glDrawElementsIndirect)(mode, type, indirect);
  18607. if (!_context->err.inBeginEnd) {
  18608. _error = _next->call(&_next->glGetError)();
  18609. if (_error!=GL_NO_ERROR) {
  18610. Error("glDrawElementsIndirect : ",Token::GLerrorToString(_error));
  18611. #if REGAL_BREAK
  18612. Break::ErrorCB(_error);
  18613. #endif
  18614. if (_context->err.callback)
  18615. _context->err.callback( _error );
  18616. }
  18617. }
  18618. }
  18619. // GL_ARB_draw_instanced
  18620. static void REGAL_CALL error_glDrawArraysInstancedARB(GLenum mode, GLint start, GLsizei count, GLsizei primcount)
  18621. {
  18622. Internal("error_glDrawArraysInstancedARB","()");
  18623. RegalContext *_context = REGAL_GET_CONTEXT();
  18624. RegalAssert(_context);
  18625. DispatchTableGL *_next = _context->dispatcher.error.next();
  18626. RegalAssert(_next);
  18627. GLenum _error = GL_NO_ERROR;
  18628. if (!_context->err.inBeginEnd)
  18629. _error = _next->call(&_next->glGetError)();
  18630. RegalAssert(_error==GL_NO_ERROR);
  18631. _next->call(&_next->glDrawArraysInstancedARB)(mode, start, count, primcount);
  18632. if (!_context->err.inBeginEnd) {
  18633. _error = _next->call(&_next->glGetError)();
  18634. if (_error!=GL_NO_ERROR) {
  18635. Error("glDrawArraysInstancedARB : ",Token::GLerrorToString(_error));
  18636. #if REGAL_BREAK
  18637. Break::ErrorCB(_error);
  18638. #endif
  18639. if (_context->err.callback)
  18640. _context->err.callback( _error );
  18641. }
  18642. }
  18643. }
  18644. static void REGAL_CALL error_glDrawElementsInstancedARB(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
  18645. {
  18646. Internal("error_glDrawElementsInstancedARB","()");
  18647. RegalContext *_context = REGAL_GET_CONTEXT();
  18648. RegalAssert(_context);
  18649. DispatchTableGL *_next = _context->dispatcher.error.next();
  18650. RegalAssert(_next);
  18651. GLenum _error = GL_NO_ERROR;
  18652. if (!_context->err.inBeginEnd)
  18653. _error = _next->call(&_next->glGetError)();
  18654. RegalAssert(_error==GL_NO_ERROR);
  18655. _next->call(&_next->glDrawElementsInstancedARB)(mode, count, type, indices, primcount);
  18656. if (!_context->err.inBeginEnd) {
  18657. _error = _next->call(&_next->glGetError)();
  18658. if (_error!=GL_NO_ERROR) {
  18659. Error("glDrawElementsInstancedARB : ",Token::GLerrorToString(_error));
  18660. #if REGAL_BREAK
  18661. Break::ErrorCB(_error);
  18662. #endif
  18663. if (_context->err.callback)
  18664. _context->err.callback( _error );
  18665. }
  18666. }
  18667. }
  18668. // GL_ARB_framebuffer_no_attachments
  18669. static void REGAL_CALL error_glFramebufferParameteri(GLenum target, GLenum pname, GLint param)
  18670. {
  18671. Internal("error_glFramebufferParameteri","()");
  18672. RegalContext *_context = REGAL_GET_CONTEXT();
  18673. RegalAssert(_context);
  18674. DispatchTableGL *_next = _context->dispatcher.error.next();
  18675. RegalAssert(_next);
  18676. GLenum _error = GL_NO_ERROR;
  18677. if (!_context->err.inBeginEnd)
  18678. _error = _next->call(&_next->glGetError)();
  18679. RegalAssert(_error==GL_NO_ERROR);
  18680. _next->call(&_next->glFramebufferParameteri)(target, pname, param);
  18681. if (!_context->err.inBeginEnd) {
  18682. _error = _next->call(&_next->glGetError)();
  18683. if (_error!=GL_NO_ERROR) {
  18684. Error("glFramebufferParameteri : ",Token::GLerrorToString(_error));
  18685. #if REGAL_BREAK
  18686. Break::ErrorCB(_error);
  18687. #endif
  18688. if (_context->err.callback)
  18689. _context->err.callback( _error );
  18690. }
  18691. }
  18692. }
  18693. static void REGAL_CALL error_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
  18694. {
  18695. Internal("error_glGetFramebufferParameteriv","()");
  18696. RegalContext *_context = REGAL_GET_CONTEXT();
  18697. RegalAssert(_context);
  18698. DispatchTableGL *_next = _context->dispatcher.error.next();
  18699. RegalAssert(_next);
  18700. GLenum _error = GL_NO_ERROR;
  18701. if (!_context->err.inBeginEnd)
  18702. _error = _next->call(&_next->glGetError)();
  18703. RegalAssert(_error==GL_NO_ERROR);
  18704. _next->call(&_next->glGetFramebufferParameteriv)(target, pname, params);
  18705. if (!_context->err.inBeginEnd) {
  18706. _error = _next->call(&_next->glGetError)();
  18707. if (_error!=GL_NO_ERROR) {
  18708. Error("glGetFramebufferParameteriv : ",Token::GLerrorToString(_error));
  18709. #if REGAL_BREAK
  18710. Break::ErrorCB(_error);
  18711. #endif
  18712. if (_context->err.callback)
  18713. _context->err.callback( _error );
  18714. }
  18715. }
  18716. }
  18717. static void REGAL_CALL error_glGetNamedFramebufferParameterivEXT(GLuint framebuffer, GLenum pname, GLint *params)
  18718. {
  18719. Internal("error_glGetNamedFramebufferParameterivEXT","()");
  18720. RegalContext *_context = REGAL_GET_CONTEXT();
  18721. RegalAssert(_context);
  18722. DispatchTableGL *_next = _context->dispatcher.error.next();
  18723. RegalAssert(_next);
  18724. GLenum _error = GL_NO_ERROR;
  18725. if (!_context->err.inBeginEnd)
  18726. _error = _next->call(&_next->glGetError)();
  18727. RegalAssert(_error==GL_NO_ERROR);
  18728. _next->call(&_next->glGetNamedFramebufferParameterivEXT)(framebuffer, pname, params);
  18729. if (!_context->err.inBeginEnd) {
  18730. _error = _next->call(&_next->glGetError)();
  18731. if (_error!=GL_NO_ERROR) {
  18732. Error("glGetNamedFramebufferParameterivEXT : ",Token::GLerrorToString(_error));
  18733. #if REGAL_BREAK
  18734. Break::ErrorCB(_error);
  18735. #endif
  18736. if (_context->err.callback)
  18737. _context->err.callback( _error );
  18738. }
  18739. }
  18740. }
  18741. static void REGAL_CALL error_glNamedFramebufferParameteriEXT(GLuint framebuffer, GLenum pname, GLint param)
  18742. {
  18743. Internal("error_glNamedFramebufferParameteriEXT","()");
  18744. RegalContext *_context = REGAL_GET_CONTEXT();
  18745. RegalAssert(_context);
  18746. DispatchTableGL *_next = _context->dispatcher.error.next();
  18747. RegalAssert(_next);
  18748. GLenum _error = GL_NO_ERROR;
  18749. if (!_context->err.inBeginEnd)
  18750. _error = _next->call(&_next->glGetError)();
  18751. RegalAssert(_error==GL_NO_ERROR);
  18752. _next->call(&_next->glNamedFramebufferParameteriEXT)(framebuffer, pname, param);
  18753. if (!_context->err.inBeginEnd) {
  18754. _error = _next->call(&_next->glGetError)();
  18755. if (_error!=GL_NO_ERROR) {
  18756. Error("glNamedFramebufferParameteriEXT : ",Token::GLerrorToString(_error));
  18757. #if REGAL_BREAK
  18758. Break::ErrorCB(_error);
  18759. #endif
  18760. if (_context->err.callback)
  18761. _context->err.callback( _error );
  18762. }
  18763. }
  18764. }
  18765. // GL_ARB_framebuffer_object
  18766. static void REGAL_CALL error_glBindFramebuffer(GLenum target, GLuint framebuffer)
  18767. {
  18768. Internal("error_glBindFramebuffer","()");
  18769. RegalContext *_context = REGAL_GET_CONTEXT();
  18770. RegalAssert(_context);
  18771. DispatchTableGL *_next = _context->dispatcher.error.next();
  18772. RegalAssert(_next);
  18773. GLenum _error = GL_NO_ERROR;
  18774. if (!_context->err.inBeginEnd)
  18775. _error = _next->call(&_next->glGetError)();
  18776. RegalAssert(_error==GL_NO_ERROR);
  18777. _next->call(&_next->glBindFramebuffer)(target, framebuffer);
  18778. if (!_context->err.inBeginEnd) {
  18779. _error = _next->call(&_next->glGetError)();
  18780. if (_error!=GL_NO_ERROR) {
  18781. Error("glBindFramebuffer : ",Token::GLerrorToString(_error));
  18782. #if REGAL_BREAK
  18783. Break::ErrorCB(_error);
  18784. #endif
  18785. if (_context->err.callback)
  18786. _context->err.callback( _error );
  18787. }
  18788. }
  18789. }
  18790. static void REGAL_CALL error_glBindRenderbuffer(GLenum target, GLuint renderbuffer)
  18791. {
  18792. Internal("error_glBindRenderbuffer","()");
  18793. RegalContext *_context = REGAL_GET_CONTEXT();
  18794. RegalAssert(_context);
  18795. DispatchTableGL *_next = _context->dispatcher.error.next();
  18796. RegalAssert(_next);
  18797. GLenum _error = GL_NO_ERROR;
  18798. if (!_context->err.inBeginEnd)
  18799. _error = _next->call(&_next->glGetError)();
  18800. RegalAssert(_error==GL_NO_ERROR);
  18801. _next->call(&_next->glBindRenderbuffer)(target, renderbuffer);
  18802. if (!_context->err.inBeginEnd) {
  18803. _error = _next->call(&_next->glGetError)();
  18804. if (_error!=GL_NO_ERROR) {
  18805. Error("glBindRenderbuffer : ",Token::GLerrorToString(_error));
  18806. #if REGAL_BREAK
  18807. Break::ErrorCB(_error);
  18808. #endif
  18809. if (_context->err.callback)
  18810. _context->err.callback( _error );
  18811. }
  18812. }
  18813. }
  18814. static void REGAL_CALL error_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
  18815. {
  18816. Internal("error_glBlitFramebuffer","()");
  18817. RegalContext *_context = REGAL_GET_CONTEXT();
  18818. RegalAssert(_context);
  18819. DispatchTableGL *_next = _context->dispatcher.error.next();
  18820. RegalAssert(_next);
  18821. GLenum _error = GL_NO_ERROR;
  18822. if (!_context->err.inBeginEnd)
  18823. _error = _next->call(&_next->glGetError)();
  18824. RegalAssert(_error==GL_NO_ERROR);
  18825. _next->call(&_next->glBlitFramebuffer)(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
  18826. if (!_context->err.inBeginEnd) {
  18827. _error = _next->call(&_next->glGetError)();
  18828. if (_error!=GL_NO_ERROR) {
  18829. Error("glBlitFramebuffer : ",Token::GLerrorToString(_error));
  18830. #if REGAL_BREAK
  18831. Break::ErrorCB(_error);
  18832. #endif
  18833. if (_context->err.callback)
  18834. _context->err.callback( _error );
  18835. }
  18836. }
  18837. }
  18838. static GLenum REGAL_CALL error_glCheckFramebufferStatus(GLenum target)
  18839. {
  18840. Internal("error_glCheckFramebufferStatus","()");
  18841. RegalContext *_context = REGAL_GET_CONTEXT();
  18842. RegalAssert(_context);
  18843. DispatchTableGL *_next = _context->dispatcher.error.next();
  18844. RegalAssert(_next);
  18845. GLenum _error = GL_NO_ERROR;
  18846. if (!_context->err.inBeginEnd)
  18847. _error = _next->call(&_next->glGetError)();
  18848. RegalAssert(_error==GL_NO_ERROR);
  18849. GLenum ret = _next->call(&_next->glCheckFramebufferStatus)(target);
  18850. if (!_context->err.inBeginEnd) {
  18851. _error = _next->call(&_next->glGetError)();
  18852. if (_error!=GL_NO_ERROR) {
  18853. Error("glCheckFramebufferStatus : ",Token::GLerrorToString(_error));
  18854. #if REGAL_BREAK
  18855. Break::ErrorCB(_error);
  18856. #endif
  18857. if (_context->err.callback)
  18858. _context->err.callback( _error );
  18859. }
  18860. }
  18861. return ret;
  18862. }
  18863. static void REGAL_CALL error_glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
  18864. {
  18865. Internal("error_glDeleteFramebuffers","()");
  18866. RegalContext *_context = REGAL_GET_CONTEXT();
  18867. RegalAssert(_context);
  18868. DispatchTableGL *_next = _context->dispatcher.error.next();
  18869. RegalAssert(_next);
  18870. GLenum _error = GL_NO_ERROR;
  18871. if (!_context->err.inBeginEnd)
  18872. _error = _next->call(&_next->glGetError)();
  18873. RegalAssert(_error==GL_NO_ERROR);
  18874. _next->call(&_next->glDeleteFramebuffers)(n, framebuffers);
  18875. if (!_context->err.inBeginEnd) {
  18876. _error = _next->call(&_next->glGetError)();
  18877. if (_error!=GL_NO_ERROR) {
  18878. Error("glDeleteFramebuffers : ",Token::GLerrorToString(_error));
  18879. #if REGAL_BREAK
  18880. Break::ErrorCB(_error);
  18881. #endif
  18882. if (_context->err.callback)
  18883. _context->err.callback( _error );
  18884. }
  18885. }
  18886. }
  18887. static void REGAL_CALL error_glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
  18888. {
  18889. Internal("error_glDeleteRenderbuffers","()");
  18890. RegalContext *_context = REGAL_GET_CONTEXT();
  18891. RegalAssert(_context);
  18892. DispatchTableGL *_next = _context->dispatcher.error.next();
  18893. RegalAssert(_next);
  18894. GLenum _error = GL_NO_ERROR;
  18895. if (!_context->err.inBeginEnd)
  18896. _error = _next->call(&_next->glGetError)();
  18897. RegalAssert(_error==GL_NO_ERROR);
  18898. _next->call(&_next->glDeleteRenderbuffers)(n, renderbuffers);
  18899. if (!_context->err.inBeginEnd) {
  18900. _error = _next->call(&_next->glGetError)();
  18901. if (_error!=GL_NO_ERROR) {
  18902. Error("glDeleteRenderbuffers : ",Token::GLerrorToString(_error));
  18903. #if REGAL_BREAK
  18904. Break::ErrorCB(_error);
  18905. #endif
  18906. if (_context->err.callback)
  18907. _context->err.callback( _error );
  18908. }
  18909. }
  18910. }
  18911. static void REGAL_CALL error_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
  18912. {
  18913. Internal("error_glFramebufferRenderbuffer","()");
  18914. RegalContext *_context = REGAL_GET_CONTEXT();
  18915. RegalAssert(_context);
  18916. DispatchTableGL *_next = _context->dispatcher.error.next();
  18917. RegalAssert(_next);
  18918. GLenum _error = GL_NO_ERROR;
  18919. if (!_context->err.inBeginEnd)
  18920. _error = _next->call(&_next->glGetError)();
  18921. RegalAssert(_error==GL_NO_ERROR);
  18922. _next->call(&_next->glFramebufferRenderbuffer)(target, attachment, renderbuffertarget, renderbuffer);
  18923. if (!_context->err.inBeginEnd) {
  18924. _error = _next->call(&_next->glGetError)();
  18925. if (_error!=GL_NO_ERROR) {
  18926. Error("glFramebufferRenderbuffer : ",Token::GLerrorToString(_error));
  18927. #if REGAL_BREAK
  18928. Break::ErrorCB(_error);
  18929. #endif
  18930. if (_context->err.callback)
  18931. _context->err.callback( _error );
  18932. }
  18933. }
  18934. }
  18935. static void REGAL_CALL error_glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
  18936. {
  18937. Internal("error_glFramebufferTexture1D","()");
  18938. RegalContext *_context = REGAL_GET_CONTEXT();
  18939. RegalAssert(_context);
  18940. DispatchTableGL *_next = _context->dispatcher.error.next();
  18941. RegalAssert(_next);
  18942. GLenum _error = GL_NO_ERROR;
  18943. if (!_context->err.inBeginEnd)
  18944. _error = _next->call(&_next->glGetError)();
  18945. RegalAssert(_error==GL_NO_ERROR);
  18946. _next->call(&_next->glFramebufferTexture1D)(target, attachment, textarget, texture, level);
  18947. if (!_context->err.inBeginEnd) {
  18948. _error = _next->call(&_next->glGetError)();
  18949. if (_error!=GL_NO_ERROR) {
  18950. Error("glFramebufferTexture1D : ",Token::GLerrorToString(_error));
  18951. #if REGAL_BREAK
  18952. Break::ErrorCB(_error);
  18953. #endif
  18954. if (_context->err.callback)
  18955. _context->err.callback( _error );
  18956. }
  18957. }
  18958. }
  18959. static void REGAL_CALL error_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
  18960. {
  18961. Internal("error_glFramebufferTexture2D","()");
  18962. RegalContext *_context = REGAL_GET_CONTEXT();
  18963. RegalAssert(_context);
  18964. DispatchTableGL *_next = _context->dispatcher.error.next();
  18965. RegalAssert(_next);
  18966. GLenum _error = GL_NO_ERROR;
  18967. if (!_context->err.inBeginEnd)
  18968. _error = _next->call(&_next->glGetError)();
  18969. RegalAssert(_error==GL_NO_ERROR);
  18970. _next->call(&_next->glFramebufferTexture2D)(target, attachment, textarget, texture, level);
  18971. if (!_context->err.inBeginEnd) {
  18972. _error = _next->call(&_next->glGetError)();
  18973. if (_error!=GL_NO_ERROR) {
  18974. Error("glFramebufferTexture2D : ",Token::GLerrorToString(_error));
  18975. #if REGAL_BREAK
  18976. Break::ErrorCB(_error);
  18977. #endif
  18978. if (_context->err.callback)
  18979. _context->err.callback( _error );
  18980. }
  18981. }
  18982. }
  18983. static void REGAL_CALL error_glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer)
  18984. {
  18985. Internal("error_glFramebufferTexture3D","()");
  18986. RegalContext *_context = REGAL_GET_CONTEXT();
  18987. RegalAssert(_context);
  18988. DispatchTableGL *_next = _context->dispatcher.error.next();
  18989. RegalAssert(_next);
  18990. GLenum _error = GL_NO_ERROR;
  18991. if (!_context->err.inBeginEnd)
  18992. _error = _next->call(&_next->glGetError)();
  18993. RegalAssert(_error==GL_NO_ERROR);
  18994. _next->call(&_next->glFramebufferTexture3D)(target, attachment, textarget, texture, level, layer);
  18995. if (!_context->err.inBeginEnd) {
  18996. _error = _next->call(&_next->glGetError)();
  18997. if (_error!=GL_NO_ERROR) {
  18998. Error("glFramebufferTexture3D : ",Token::GLerrorToString(_error));
  18999. #if REGAL_BREAK
  19000. Break::ErrorCB(_error);
  19001. #endif
  19002. if (_context->err.callback)
  19003. _context->err.callback( _error );
  19004. }
  19005. }
  19006. }
  19007. static void REGAL_CALL error_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
  19008. {
  19009. Internal("error_glFramebufferTextureLayer","()");
  19010. RegalContext *_context = REGAL_GET_CONTEXT();
  19011. RegalAssert(_context);
  19012. DispatchTableGL *_next = _context->dispatcher.error.next();
  19013. RegalAssert(_next);
  19014. GLenum _error = GL_NO_ERROR;
  19015. if (!_context->err.inBeginEnd)
  19016. _error = _next->call(&_next->glGetError)();
  19017. RegalAssert(_error==GL_NO_ERROR);
  19018. _next->call(&_next->glFramebufferTextureLayer)(target, attachment, texture, level, layer);
  19019. if (!_context->err.inBeginEnd) {
  19020. _error = _next->call(&_next->glGetError)();
  19021. if (_error!=GL_NO_ERROR) {
  19022. Error("glFramebufferTextureLayer : ",Token::GLerrorToString(_error));
  19023. #if REGAL_BREAK
  19024. Break::ErrorCB(_error);
  19025. #endif
  19026. if (_context->err.callback)
  19027. _context->err.callback( _error );
  19028. }
  19029. }
  19030. }
  19031. static void REGAL_CALL error_glGenFramebuffers(GLsizei n, GLuint *framebuffers)
  19032. {
  19033. Internal("error_glGenFramebuffers","()");
  19034. RegalContext *_context = REGAL_GET_CONTEXT();
  19035. RegalAssert(_context);
  19036. DispatchTableGL *_next = _context->dispatcher.error.next();
  19037. RegalAssert(_next);
  19038. GLenum _error = GL_NO_ERROR;
  19039. if (!_context->err.inBeginEnd)
  19040. _error = _next->call(&_next->glGetError)();
  19041. RegalAssert(_error==GL_NO_ERROR);
  19042. _next->call(&_next->glGenFramebuffers)(n, framebuffers);
  19043. if (!_context->err.inBeginEnd) {
  19044. _error = _next->call(&_next->glGetError)();
  19045. if (_error!=GL_NO_ERROR) {
  19046. Error("glGenFramebuffers : ",Token::GLerrorToString(_error));
  19047. #if REGAL_BREAK
  19048. Break::ErrorCB(_error);
  19049. #endif
  19050. if (_context->err.callback)
  19051. _context->err.callback( _error );
  19052. }
  19053. }
  19054. }
  19055. static void REGAL_CALL error_glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
  19056. {
  19057. Internal("error_glGenRenderbuffers","()");
  19058. RegalContext *_context = REGAL_GET_CONTEXT();
  19059. RegalAssert(_context);
  19060. DispatchTableGL *_next = _context->dispatcher.error.next();
  19061. RegalAssert(_next);
  19062. GLenum _error = GL_NO_ERROR;
  19063. if (!_context->err.inBeginEnd)
  19064. _error = _next->call(&_next->glGetError)();
  19065. RegalAssert(_error==GL_NO_ERROR);
  19066. _next->call(&_next->glGenRenderbuffers)(n, renderbuffers);
  19067. if (!_context->err.inBeginEnd) {
  19068. _error = _next->call(&_next->glGetError)();
  19069. if (_error!=GL_NO_ERROR) {
  19070. Error("glGenRenderbuffers : ",Token::GLerrorToString(_error));
  19071. #if REGAL_BREAK
  19072. Break::ErrorCB(_error);
  19073. #endif
  19074. if (_context->err.callback)
  19075. _context->err.callback( _error );
  19076. }
  19077. }
  19078. }
  19079. static void REGAL_CALL error_glGenerateMipmap(GLenum target)
  19080. {
  19081. Internal("error_glGenerateMipmap","()");
  19082. RegalContext *_context = REGAL_GET_CONTEXT();
  19083. RegalAssert(_context);
  19084. DispatchTableGL *_next = _context->dispatcher.error.next();
  19085. RegalAssert(_next);
  19086. GLenum _error = GL_NO_ERROR;
  19087. if (!_context->err.inBeginEnd)
  19088. _error = _next->call(&_next->glGetError)();
  19089. RegalAssert(_error==GL_NO_ERROR);
  19090. _next->call(&_next->glGenerateMipmap)(target);
  19091. if (!_context->err.inBeginEnd) {
  19092. _error = _next->call(&_next->glGetError)();
  19093. if (_error!=GL_NO_ERROR) {
  19094. Error("glGenerateMipmap : ",Token::GLerrorToString(_error));
  19095. #if REGAL_BREAK
  19096. Break::ErrorCB(_error);
  19097. #endif
  19098. if (_context->err.callback)
  19099. _context->err.callback( _error );
  19100. }
  19101. }
  19102. }
  19103. static void REGAL_CALL error_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
  19104. {
  19105. Internal("error_glGetFramebufferAttachmentParameteriv","()");
  19106. RegalContext *_context = REGAL_GET_CONTEXT();
  19107. RegalAssert(_context);
  19108. DispatchTableGL *_next = _context->dispatcher.error.next();
  19109. RegalAssert(_next);
  19110. GLenum _error = GL_NO_ERROR;
  19111. if (!_context->err.inBeginEnd)
  19112. _error = _next->call(&_next->glGetError)();
  19113. RegalAssert(_error==GL_NO_ERROR);
  19114. _next->call(&_next->glGetFramebufferAttachmentParameteriv)(target, attachment, pname, params);
  19115. if (!_context->err.inBeginEnd) {
  19116. _error = _next->call(&_next->glGetError)();
  19117. if (_error!=GL_NO_ERROR) {
  19118. Error("glGetFramebufferAttachmentParameteriv : ",Token::GLerrorToString(_error));
  19119. #if REGAL_BREAK
  19120. Break::ErrorCB(_error);
  19121. #endif
  19122. if (_context->err.callback)
  19123. _context->err.callback( _error );
  19124. }
  19125. }
  19126. }
  19127. static void REGAL_CALL error_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
  19128. {
  19129. Internal("error_glGetRenderbufferParameteriv","()");
  19130. RegalContext *_context = REGAL_GET_CONTEXT();
  19131. RegalAssert(_context);
  19132. DispatchTableGL *_next = _context->dispatcher.error.next();
  19133. RegalAssert(_next);
  19134. GLenum _error = GL_NO_ERROR;
  19135. if (!_context->err.inBeginEnd)
  19136. _error = _next->call(&_next->glGetError)();
  19137. RegalAssert(_error==GL_NO_ERROR);
  19138. _next->call(&_next->glGetRenderbufferParameteriv)(target, pname, params);
  19139. if (!_context->err.inBeginEnd) {
  19140. _error = _next->call(&_next->glGetError)();
  19141. if (_error!=GL_NO_ERROR) {
  19142. Error("glGetRenderbufferParameteriv : ",Token::GLerrorToString(_error));
  19143. #if REGAL_BREAK
  19144. Break::ErrorCB(_error);
  19145. #endif
  19146. if (_context->err.callback)
  19147. _context->err.callback( _error );
  19148. }
  19149. }
  19150. }
  19151. static GLboolean REGAL_CALL error_glIsFramebuffer(GLuint framebuffer)
  19152. {
  19153. Internal("error_glIsFramebuffer","()");
  19154. RegalContext *_context = REGAL_GET_CONTEXT();
  19155. RegalAssert(_context);
  19156. DispatchTableGL *_next = _context->dispatcher.error.next();
  19157. RegalAssert(_next);
  19158. GLenum _error = GL_NO_ERROR;
  19159. if (!_context->err.inBeginEnd)
  19160. _error = _next->call(&_next->glGetError)();
  19161. RegalAssert(_error==GL_NO_ERROR);
  19162. GLboolean ret = _next->call(&_next->glIsFramebuffer)(framebuffer);
  19163. if (!_context->err.inBeginEnd) {
  19164. _error = _next->call(&_next->glGetError)();
  19165. if (_error!=GL_NO_ERROR) {
  19166. Error("glIsFramebuffer : ",Token::GLerrorToString(_error));
  19167. #if REGAL_BREAK
  19168. Break::ErrorCB(_error);
  19169. #endif
  19170. if (_context->err.callback)
  19171. _context->err.callback( _error );
  19172. }
  19173. }
  19174. return ret;
  19175. }
  19176. static GLboolean REGAL_CALL error_glIsRenderbuffer(GLuint renderbuffer)
  19177. {
  19178. Internal("error_glIsRenderbuffer","()");
  19179. RegalContext *_context = REGAL_GET_CONTEXT();
  19180. RegalAssert(_context);
  19181. DispatchTableGL *_next = _context->dispatcher.error.next();
  19182. RegalAssert(_next);
  19183. GLenum _error = GL_NO_ERROR;
  19184. if (!_context->err.inBeginEnd)
  19185. _error = _next->call(&_next->glGetError)();
  19186. RegalAssert(_error==GL_NO_ERROR);
  19187. GLboolean ret = _next->call(&_next->glIsRenderbuffer)(renderbuffer);
  19188. if (!_context->err.inBeginEnd) {
  19189. _error = _next->call(&_next->glGetError)();
  19190. if (_error!=GL_NO_ERROR) {
  19191. Error("glIsRenderbuffer : ",Token::GLerrorToString(_error));
  19192. #if REGAL_BREAK
  19193. Break::ErrorCB(_error);
  19194. #endif
  19195. if (_context->err.callback)
  19196. _context->err.callback( _error );
  19197. }
  19198. }
  19199. return ret;
  19200. }
  19201. static void REGAL_CALL error_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
  19202. {
  19203. Internal("error_glRenderbufferStorage","()");
  19204. RegalContext *_context = REGAL_GET_CONTEXT();
  19205. RegalAssert(_context);
  19206. DispatchTableGL *_next = _context->dispatcher.error.next();
  19207. RegalAssert(_next);
  19208. GLenum _error = GL_NO_ERROR;
  19209. if (!_context->err.inBeginEnd)
  19210. _error = _next->call(&_next->glGetError)();
  19211. RegalAssert(_error==GL_NO_ERROR);
  19212. _next->call(&_next->glRenderbufferStorage)(target, internalformat, width, height);
  19213. if (!_context->err.inBeginEnd) {
  19214. _error = _next->call(&_next->glGetError)();
  19215. if (_error!=GL_NO_ERROR) {
  19216. Error("glRenderbufferStorage : ",Token::GLerrorToString(_error));
  19217. #if REGAL_BREAK
  19218. Break::ErrorCB(_error);
  19219. #endif
  19220. if (_context->err.callback)
  19221. _context->err.callback( _error );
  19222. }
  19223. }
  19224. }
  19225. static void REGAL_CALL error_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
  19226. {
  19227. Internal("error_glRenderbufferStorageMultisample","()");
  19228. RegalContext *_context = REGAL_GET_CONTEXT();
  19229. RegalAssert(_context);
  19230. DispatchTableGL *_next = _context->dispatcher.error.next();
  19231. RegalAssert(_next);
  19232. GLenum _error = GL_NO_ERROR;
  19233. if (!_context->err.inBeginEnd)
  19234. _error = _next->call(&_next->glGetError)();
  19235. RegalAssert(_error==GL_NO_ERROR);
  19236. _next->call(&_next->glRenderbufferStorageMultisample)(target, samples, internalformat, width, height);
  19237. if (!_context->err.inBeginEnd) {
  19238. _error = _next->call(&_next->glGetError)();
  19239. if (_error!=GL_NO_ERROR) {
  19240. Error("glRenderbufferStorageMultisample : ",Token::GLerrorToString(_error));
  19241. #if REGAL_BREAK
  19242. Break::ErrorCB(_error);
  19243. #endif
  19244. if (_context->err.callback)
  19245. _context->err.callback( _error );
  19246. }
  19247. }
  19248. }
  19249. // GL_ARB_geometry_shader4
  19250. static void REGAL_CALL error_glFramebufferTextureARB(GLenum target, GLenum attachment, GLuint texture, GLint level)
  19251. {
  19252. Internal("error_glFramebufferTextureARB","()");
  19253. RegalContext *_context = REGAL_GET_CONTEXT();
  19254. RegalAssert(_context);
  19255. DispatchTableGL *_next = _context->dispatcher.error.next();
  19256. RegalAssert(_next);
  19257. GLenum _error = GL_NO_ERROR;
  19258. if (!_context->err.inBeginEnd)
  19259. _error = _next->call(&_next->glGetError)();
  19260. RegalAssert(_error==GL_NO_ERROR);
  19261. _next->call(&_next->glFramebufferTextureARB)(target, attachment, texture, level);
  19262. if (!_context->err.inBeginEnd) {
  19263. _error = _next->call(&_next->glGetError)();
  19264. if (_error!=GL_NO_ERROR) {
  19265. Error("glFramebufferTextureARB : ",Token::GLerrorToString(_error));
  19266. #if REGAL_BREAK
  19267. Break::ErrorCB(_error);
  19268. #endif
  19269. if (_context->err.callback)
  19270. _context->err.callback( _error );
  19271. }
  19272. }
  19273. }
  19274. static void REGAL_CALL error_glFramebufferTextureFaceARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)
  19275. {
  19276. Internal("error_glFramebufferTextureFaceARB","()");
  19277. RegalContext *_context = REGAL_GET_CONTEXT();
  19278. RegalAssert(_context);
  19279. DispatchTableGL *_next = _context->dispatcher.error.next();
  19280. RegalAssert(_next);
  19281. GLenum _error = GL_NO_ERROR;
  19282. if (!_context->err.inBeginEnd)
  19283. _error = _next->call(&_next->glGetError)();
  19284. RegalAssert(_error==GL_NO_ERROR);
  19285. _next->call(&_next->glFramebufferTextureFaceARB)(target, attachment, texture, level, face);
  19286. if (!_context->err.inBeginEnd) {
  19287. _error = _next->call(&_next->glGetError)();
  19288. if (_error!=GL_NO_ERROR) {
  19289. Error("glFramebufferTextureFaceARB : ",Token::GLerrorToString(_error));
  19290. #if REGAL_BREAK
  19291. Break::ErrorCB(_error);
  19292. #endif
  19293. if (_context->err.callback)
  19294. _context->err.callback( _error );
  19295. }
  19296. }
  19297. }
  19298. static void REGAL_CALL error_glFramebufferTextureLayerARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
  19299. {
  19300. Internal("error_glFramebufferTextureLayerARB","()");
  19301. RegalContext *_context = REGAL_GET_CONTEXT();
  19302. RegalAssert(_context);
  19303. DispatchTableGL *_next = _context->dispatcher.error.next();
  19304. RegalAssert(_next);
  19305. GLenum _error = GL_NO_ERROR;
  19306. if (!_context->err.inBeginEnd)
  19307. _error = _next->call(&_next->glGetError)();
  19308. RegalAssert(_error==GL_NO_ERROR);
  19309. _next->call(&_next->glFramebufferTextureLayerARB)(target, attachment, texture, level, layer);
  19310. if (!_context->err.inBeginEnd) {
  19311. _error = _next->call(&_next->glGetError)();
  19312. if (_error!=GL_NO_ERROR) {
  19313. Error("glFramebufferTextureLayerARB : ",Token::GLerrorToString(_error));
  19314. #if REGAL_BREAK
  19315. Break::ErrorCB(_error);
  19316. #endif
  19317. if (_context->err.callback)
  19318. _context->err.callback( _error );
  19319. }
  19320. }
  19321. }
  19322. static void REGAL_CALL error_glProgramParameteriARB(GLuint program, GLenum pname, GLint value)
  19323. {
  19324. Internal("error_glProgramParameteriARB","()");
  19325. RegalContext *_context = REGAL_GET_CONTEXT();
  19326. RegalAssert(_context);
  19327. DispatchTableGL *_next = _context->dispatcher.error.next();
  19328. RegalAssert(_next);
  19329. GLenum _error = GL_NO_ERROR;
  19330. if (!_context->err.inBeginEnd)
  19331. _error = _next->call(&_next->glGetError)();
  19332. RegalAssert(_error==GL_NO_ERROR);
  19333. _next->call(&_next->glProgramParameteriARB)(program, pname, value);
  19334. if (!_context->err.inBeginEnd) {
  19335. _error = _next->call(&_next->glGetError)();
  19336. if (_error!=GL_NO_ERROR) {
  19337. Error("glProgramParameteriARB : ",Token::GLerrorToString(_error));
  19338. #if REGAL_BREAK
  19339. Break::ErrorCB(_error);
  19340. #endif
  19341. if (_context->err.callback)
  19342. _context->err.callback( _error );
  19343. }
  19344. }
  19345. }
  19346. // GL_ARB_get_program_binary
  19347. static void REGAL_CALL error_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
  19348. {
  19349. Internal("error_glGetProgramBinary","()");
  19350. RegalContext *_context = REGAL_GET_CONTEXT();
  19351. RegalAssert(_context);
  19352. DispatchTableGL *_next = _context->dispatcher.error.next();
  19353. RegalAssert(_next);
  19354. GLenum _error = GL_NO_ERROR;
  19355. if (!_context->err.inBeginEnd)
  19356. _error = _next->call(&_next->glGetError)();
  19357. RegalAssert(_error==GL_NO_ERROR);
  19358. _next->call(&_next->glGetProgramBinary)(program, bufSize, length, binaryFormat, binary);
  19359. if (!_context->err.inBeginEnd) {
  19360. _error = _next->call(&_next->glGetError)();
  19361. if (_error!=GL_NO_ERROR) {
  19362. Error("glGetProgramBinary : ",Token::GLerrorToString(_error));
  19363. #if REGAL_BREAK
  19364. Break::ErrorCB(_error);
  19365. #endif
  19366. if (_context->err.callback)
  19367. _context->err.callback( _error );
  19368. }
  19369. }
  19370. }
  19371. static void REGAL_CALL error_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length)
  19372. {
  19373. Internal("error_glProgramBinary","()");
  19374. RegalContext *_context = REGAL_GET_CONTEXT();
  19375. RegalAssert(_context);
  19376. DispatchTableGL *_next = _context->dispatcher.error.next();
  19377. RegalAssert(_next);
  19378. GLenum _error = GL_NO_ERROR;
  19379. if (!_context->err.inBeginEnd)
  19380. _error = _next->call(&_next->glGetError)();
  19381. RegalAssert(_error==GL_NO_ERROR);
  19382. _next->call(&_next->glProgramBinary)(program, binaryFormat, binary, length);
  19383. if (!_context->err.inBeginEnd) {
  19384. _error = _next->call(&_next->glGetError)();
  19385. if (_error!=GL_NO_ERROR) {
  19386. Error("glProgramBinary : ",Token::GLerrorToString(_error));
  19387. #if REGAL_BREAK
  19388. Break::ErrorCB(_error);
  19389. #endif
  19390. if (_context->err.callback)
  19391. _context->err.callback( _error );
  19392. }
  19393. }
  19394. }
  19395. static void REGAL_CALL error_glProgramParameteri(GLuint program, GLenum pname, GLint value)
  19396. {
  19397. Internal("error_glProgramParameteri","()");
  19398. RegalContext *_context = REGAL_GET_CONTEXT();
  19399. RegalAssert(_context);
  19400. DispatchTableGL *_next = _context->dispatcher.error.next();
  19401. RegalAssert(_next);
  19402. GLenum _error = GL_NO_ERROR;
  19403. if (!_context->err.inBeginEnd)
  19404. _error = _next->call(&_next->glGetError)();
  19405. RegalAssert(_error==GL_NO_ERROR);
  19406. _next->call(&_next->glProgramParameteri)(program, pname, value);
  19407. if (!_context->err.inBeginEnd) {
  19408. _error = _next->call(&_next->glGetError)();
  19409. if (_error!=GL_NO_ERROR) {
  19410. Error("glProgramParameteri : ",Token::GLerrorToString(_error));
  19411. #if REGAL_BREAK
  19412. Break::ErrorCB(_error);
  19413. #endif
  19414. if (_context->err.callback)
  19415. _context->err.callback( _error );
  19416. }
  19417. }
  19418. }
  19419. // GL_ARB_gpu_shader_fp64
  19420. static void REGAL_CALL error_glGetUniformdv(GLuint program, GLint location, GLdouble *params)
  19421. {
  19422. Internal("error_glGetUniformdv","()");
  19423. RegalContext *_context = REGAL_GET_CONTEXT();
  19424. RegalAssert(_context);
  19425. DispatchTableGL *_next = _context->dispatcher.error.next();
  19426. RegalAssert(_next);
  19427. GLenum _error = GL_NO_ERROR;
  19428. if (!_context->err.inBeginEnd)
  19429. _error = _next->call(&_next->glGetError)();
  19430. RegalAssert(_error==GL_NO_ERROR);
  19431. _next->call(&_next->glGetUniformdv)(program, location, params);
  19432. if (!_context->err.inBeginEnd) {
  19433. _error = _next->call(&_next->glGetError)();
  19434. if (_error!=GL_NO_ERROR) {
  19435. Error("glGetUniformdv : ",Token::GLerrorToString(_error));
  19436. #if REGAL_BREAK
  19437. Break::ErrorCB(_error);
  19438. #endif
  19439. if (_context->err.callback)
  19440. _context->err.callback( _error );
  19441. }
  19442. }
  19443. }
  19444. static void REGAL_CALL error_glUniform1d(GLint location, GLdouble x)
  19445. {
  19446. Internal("error_glUniform1d","()");
  19447. RegalContext *_context = REGAL_GET_CONTEXT();
  19448. RegalAssert(_context);
  19449. DispatchTableGL *_next = _context->dispatcher.error.next();
  19450. RegalAssert(_next);
  19451. GLenum _error = GL_NO_ERROR;
  19452. if (!_context->err.inBeginEnd)
  19453. _error = _next->call(&_next->glGetError)();
  19454. RegalAssert(_error==GL_NO_ERROR);
  19455. _next->call(&_next->glUniform1d)(location, x);
  19456. if (!_context->err.inBeginEnd) {
  19457. _error = _next->call(&_next->glGetError)();
  19458. if (_error!=GL_NO_ERROR) {
  19459. Error("glUniform1d : ",Token::GLerrorToString(_error));
  19460. #if REGAL_BREAK
  19461. Break::ErrorCB(_error);
  19462. #endif
  19463. if (_context->err.callback)
  19464. _context->err.callback( _error );
  19465. }
  19466. }
  19467. }
  19468. static void REGAL_CALL error_glUniform1dv(GLint location, GLsizei count, const GLdouble *value)
  19469. {
  19470. Internal("error_glUniform1dv","()");
  19471. RegalContext *_context = REGAL_GET_CONTEXT();
  19472. RegalAssert(_context);
  19473. DispatchTableGL *_next = _context->dispatcher.error.next();
  19474. RegalAssert(_next);
  19475. GLenum _error = GL_NO_ERROR;
  19476. if (!_context->err.inBeginEnd)
  19477. _error = _next->call(&_next->glGetError)();
  19478. RegalAssert(_error==GL_NO_ERROR);
  19479. _next->call(&_next->glUniform1dv)(location, count, value);
  19480. if (!_context->err.inBeginEnd) {
  19481. _error = _next->call(&_next->glGetError)();
  19482. if (_error!=GL_NO_ERROR) {
  19483. Error("glUniform1dv : ",Token::GLerrorToString(_error));
  19484. #if REGAL_BREAK
  19485. Break::ErrorCB(_error);
  19486. #endif
  19487. if (_context->err.callback)
  19488. _context->err.callback( _error );
  19489. }
  19490. }
  19491. }
  19492. static void REGAL_CALL error_glUniform2d(GLint location, GLdouble x, GLdouble y)
  19493. {
  19494. Internal("error_glUniform2d","()");
  19495. RegalContext *_context = REGAL_GET_CONTEXT();
  19496. RegalAssert(_context);
  19497. DispatchTableGL *_next = _context->dispatcher.error.next();
  19498. RegalAssert(_next);
  19499. GLenum _error = GL_NO_ERROR;
  19500. if (!_context->err.inBeginEnd)
  19501. _error = _next->call(&_next->glGetError)();
  19502. RegalAssert(_error==GL_NO_ERROR);
  19503. _next->call(&_next->glUniform2d)(location, x, y);
  19504. if (!_context->err.inBeginEnd) {
  19505. _error = _next->call(&_next->glGetError)();
  19506. if (_error!=GL_NO_ERROR) {
  19507. Error("glUniform2d : ",Token::GLerrorToString(_error));
  19508. #if REGAL_BREAK
  19509. Break::ErrorCB(_error);
  19510. #endif
  19511. if (_context->err.callback)
  19512. _context->err.callback( _error );
  19513. }
  19514. }
  19515. }
  19516. static void REGAL_CALL error_glUniform2dv(GLint location, GLsizei count, const GLdouble *value)
  19517. {
  19518. Internal("error_glUniform2dv","()");
  19519. RegalContext *_context = REGAL_GET_CONTEXT();
  19520. RegalAssert(_context);
  19521. DispatchTableGL *_next = _context->dispatcher.error.next();
  19522. RegalAssert(_next);
  19523. GLenum _error = GL_NO_ERROR;
  19524. if (!_context->err.inBeginEnd)
  19525. _error = _next->call(&_next->glGetError)();
  19526. RegalAssert(_error==GL_NO_ERROR);
  19527. _next->call(&_next->glUniform2dv)(location, count, value);
  19528. if (!_context->err.inBeginEnd) {
  19529. _error = _next->call(&_next->glGetError)();
  19530. if (_error!=GL_NO_ERROR) {
  19531. Error("glUniform2dv : ",Token::GLerrorToString(_error));
  19532. #if REGAL_BREAK
  19533. Break::ErrorCB(_error);
  19534. #endif
  19535. if (_context->err.callback)
  19536. _context->err.callback( _error );
  19537. }
  19538. }
  19539. }
  19540. static void REGAL_CALL error_glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
  19541. {
  19542. Internal("error_glUniform3d","()");
  19543. RegalContext *_context = REGAL_GET_CONTEXT();
  19544. RegalAssert(_context);
  19545. DispatchTableGL *_next = _context->dispatcher.error.next();
  19546. RegalAssert(_next);
  19547. GLenum _error = GL_NO_ERROR;
  19548. if (!_context->err.inBeginEnd)
  19549. _error = _next->call(&_next->glGetError)();
  19550. RegalAssert(_error==GL_NO_ERROR);
  19551. _next->call(&_next->glUniform3d)(location, x, y, z);
  19552. if (!_context->err.inBeginEnd) {
  19553. _error = _next->call(&_next->glGetError)();
  19554. if (_error!=GL_NO_ERROR) {
  19555. Error("glUniform3d : ",Token::GLerrorToString(_error));
  19556. #if REGAL_BREAK
  19557. Break::ErrorCB(_error);
  19558. #endif
  19559. if (_context->err.callback)
  19560. _context->err.callback( _error );
  19561. }
  19562. }
  19563. }
  19564. static void REGAL_CALL error_glUniform3dv(GLint location, GLsizei count, const GLdouble *value)
  19565. {
  19566. Internal("error_glUniform3dv","()");
  19567. RegalContext *_context = REGAL_GET_CONTEXT();
  19568. RegalAssert(_context);
  19569. DispatchTableGL *_next = _context->dispatcher.error.next();
  19570. RegalAssert(_next);
  19571. GLenum _error = GL_NO_ERROR;
  19572. if (!_context->err.inBeginEnd)
  19573. _error = _next->call(&_next->glGetError)();
  19574. RegalAssert(_error==GL_NO_ERROR);
  19575. _next->call(&_next->glUniform3dv)(location, count, value);
  19576. if (!_context->err.inBeginEnd) {
  19577. _error = _next->call(&_next->glGetError)();
  19578. if (_error!=GL_NO_ERROR) {
  19579. Error("glUniform3dv : ",Token::GLerrorToString(_error));
  19580. #if REGAL_BREAK
  19581. Break::ErrorCB(_error);
  19582. #endif
  19583. if (_context->err.callback)
  19584. _context->err.callback( _error );
  19585. }
  19586. }
  19587. }
  19588. static void REGAL_CALL error_glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  19589. {
  19590. Internal("error_glUniform4d","()");
  19591. RegalContext *_context = REGAL_GET_CONTEXT();
  19592. RegalAssert(_context);
  19593. DispatchTableGL *_next = _context->dispatcher.error.next();
  19594. RegalAssert(_next);
  19595. GLenum _error = GL_NO_ERROR;
  19596. if (!_context->err.inBeginEnd)
  19597. _error = _next->call(&_next->glGetError)();
  19598. RegalAssert(_error==GL_NO_ERROR);
  19599. _next->call(&_next->glUniform4d)(location, x, y, z, w);
  19600. if (!_context->err.inBeginEnd) {
  19601. _error = _next->call(&_next->glGetError)();
  19602. if (_error!=GL_NO_ERROR) {
  19603. Error("glUniform4d : ",Token::GLerrorToString(_error));
  19604. #if REGAL_BREAK
  19605. Break::ErrorCB(_error);
  19606. #endif
  19607. if (_context->err.callback)
  19608. _context->err.callback( _error );
  19609. }
  19610. }
  19611. }
  19612. static void REGAL_CALL error_glUniform4dv(GLint location, GLsizei count, const GLdouble *value)
  19613. {
  19614. Internal("error_glUniform4dv","()");
  19615. RegalContext *_context = REGAL_GET_CONTEXT();
  19616. RegalAssert(_context);
  19617. DispatchTableGL *_next = _context->dispatcher.error.next();
  19618. RegalAssert(_next);
  19619. GLenum _error = GL_NO_ERROR;
  19620. if (!_context->err.inBeginEnd)
  19621. _error = _next->call(&_next->glGetError)();
  19622. RegalAssert(_error==GL_NO_ERROR);
  19623. _next->call(&_next->glUniform4dv)(location, count, value);
  19624. if (!_context->err.inBeginEnd) {
  19625. _error = _next->call(&_next->glGetError)();
  19626. if (_error!=GL_NO_ERROR) {
  19627. Error("glUniform4dv : ",Token::GLerrorToString(_error));
  19628. #if REGAL_BREAK
  19629. Break::ErrorCB(_error);
  19630. #endif
  19631. if (_context->err.callback)
  19632. _context->err.callback( _error );
  19633. }
  19634. }
  19635. }
  19636. static void REGAL_CALL error_glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19637. {
  19638. Internal("error_glUniformMatrix2dv","()");
  19639. RegalContext *_context = REGAL_GET_CONTEXT();
  19640. RegalAssert(_context);
  19641. DispatchTableGL *_next = _context->dispatcher.error.next();
  19642. RegalAssert(_next);
  19643. GLenum _error = GL_NO_ERROR;
  19644. if (!_context->err.inBeginEnd)
  19645. _error = _next->call(&_next->glGetError)();
  19646. RegalAssert(_error==GL_NO_ERROR);
  19647. _next->call(&_next->glUniformMatrix2dv)(location, count, transpose, value);
  19648. if (!_context->err.inBeginEnd) {
  19649. _error = _next->call(&_next->glGetError)();
  19650. if (_error!=GL_NO_ERROR) {
  19651. Error("glUniformMatrix2dv : ",Token::GLerrorToString(_error));
  19652. #if REGAL_BREAK
  19653. Break::ErrorCB(_error);
  19654. #endif
  19655. if (_context->err.callback)
  19656. _context->err.callback( _error );
  19657. }
  19658. }
  19659. }
  19660. static void REGAL_CALL error_glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19661. {
  19662. Internal("error_glUniformMatrix2x3dv","()");
  19663. RegalContext *_context = REGAL_GET_CONTEXT();
  19664. RegalAssert(_context);
  19665. DispatchTableGL *_next = _context->dispatcher.error.next();
  19666. RegalAssert(_next);
  19667. GLenum _error = GL_NO_ERROR;
  19668. if (!_context->err.inBeginEnd)
  19669. _error = _next->call(&_next->glGetError)();
  19670. RegalAssert(_error==GL_NO_ERROR);
  19671. _next->call(&_next->glUniformMatrix2x3dv)(location, count, transpose, value);
  19672. if (!_context->err.inBeginEnd) {
  19673. _error = _next->call(&_next->glGetError)();
  19674. if (_error!=GL_NO_ERROR) {
  19675. Error("glUniformMatrix2x3dv : ",Token::GLerrorToString(_error));
  19676. #if REGAL_BREAK
  19677. Break::ErrorCB(_error);
  19678. #endif
  19679. if (_context->err.callback)
  19680. _context->err.callback( _error );
  19681. }
  19682. }
  19683. }
  19684. static void REGAL_CALL error_glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19685. {
  19686. Internal("error_glUniformMatrix2x4dv","()");
  19687. RegalContext *_context = REGAL_GET_CONTEXT();
  19688. RegalAssert(_context);
  19689. DispatchTableGL *_next = _context->dispatcher.error.next();
  19690. RegalAssert(_next);
  19691. GLenum _error = GL_NO_ERROR;
  19692. if (!_context->err.inBeginEnd)
  19693. _error = _next->call(&_next->glGetError)();
  19694. RegalAssert(_error==GL_NO_ERROR);
  19695. _next->call(&_next->glUniformMatrix2x4dv)(location, count, transpose, value);
  19696. if (!_context->err.inBeginEnd) {
  19697. _error = _next->call(&_next->glGetError)();
  19698. if (_error!=GL_NO_ERROR) {
  19699. Error("glUniformMatrix2x4dv : ",Token::GLerrorToString(_error));
  19700. #if REGAL_BREAK
  19701. Break::ErrorCB(_error);
  19702. #endif
  19703. if (_context->err.callback)
  19704. _context->err.callback( _error );
  19705. }
  19706. }
  19707. }
  19708. static void REGAL_CALL error_glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19709. {
  19710. Internal("error_glUniformMatrix3dv","()");
  19711. RegalContext *_context = REGAL_GET_CONTEXT();
  19712. RegalAssert(_context);
  19713. DispatchTableGL *_next = _context->dispatcher.error.next();
  19714. RegalAssert(_next);
  19715. GLenum _error = GL_NO_ERROR;
  19716. if (!_context->err.inBeginEnd)
  19717. _error = _next->call(&_next->glGetError)();
  19718. RegalAssert(_error==GL_NO_ERROR);
  19719. _next->call(&_next->glUniformMatrix3dv)(location, count, transpose, value);
  19720. if (!_context->err.inBeginEnd) {
  19721. _error = _next->call(&_next->glGetError)();
  19722. if (_error!=GL_NO_ERROR) {
  19723. Error("glUniformMatrix3dv : ",Token::GLerrorToString(_error));
  19724. #if REGAL_BREAK
  19725. Break::ErrorCB(_error);
  19726. #endif
  19727. if (_context->err.callback)
  19728. _context->err.callback( _error );
  19729. }
  19730. }
  19731. }
  19732. static void REGAL_CALL error_glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19733. {
  19734. Internal("error_glUniformMatrix3x2dv","()");
  19735. RegalContext *_context = REGAL_GET_CONTEXT();
  19736. RegalAssert(_context);
  19737. DispatchTableGL *_next = _context->dispatcher.error.next();
  19738. RegalAssert(_next);
  19739. GLenum _error = GL_NO_ERROR;
  19740. if (!_context->err.inBeginEnd)
  19741. _error = _next->call(&_next->glGetError)();
  19742. RegalAssert(_error==GL_NO_ERROR);
  19743. _next->call(&_next->glUniformMatrix3x2dv)(location, count, transpose, value);
  19744. if (!_context->err.inBeginEnd) {
  19745. _error = _next->call(&_next->glGetError)();
  19746. if (_error!=GL_NO_ERROR) {
  19747. Error("glUniformMatrix3x2dv : ",Token::GLerrorToString(_error));
  19748. #if REGAL_BREAK
  19749. Break::ErrorCB(_error);
  19750. #endif
  19751. if (_context->err.callback)
  19752. _context->err.callback( _error );
  19753. }
  19754. }
  19755. }
  19756. static void REGAL_CALL error_glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19757. {
  19758. Internal("error_glUniformMatrix3x4dv","()");
  19759. RegalContext *_context = REGAL_GET_CONTEXT();
  19760. RegalAssert(_context);
  19761. DispatchTableGL *_next = _context->dispatcher.error.next();
  19762. RegalAssert(_next);
  19763. GLenum _error = GL_NO_ERROR;
  19764. if (!_context->err.inBeginEnd)
  19765. _error = _next->call(&_next->glGetError)();
  19766. RegalAssert(_error==GL_NO_ERROR);
  19767. _next->call(&_next->glUniformMatrix3x4dv)(location, count, transpose, value);
  19768. if (!_context->err.inBeginEnd) {
  19769. _error = _next->call(&_next->glGetError)();
  19770. if (_error!=GL_NO_ERROR) {
  19771. Error("glUniformMatrix3x4dv : ",Token::GLerrorToString(_error));
  19772. #if REGAL_BREAK
  19773. Break::ErrorCB(_error);
  19774. #endif
  19775. if (_context->err.callback)
  19776. _context->err.callback( _error );
  19777. }
  19778. }
  19779. }
  19780. static void REGAL_CALL error_glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19781. {
  19782. Internal("error_glUniformMatrix4dv","()");
  19783. RegalContext *_context = REGAL_GET_CONTEXT();
  19784. RegalAssert(_context);
  19785. DispatchTableGL *_next = _context->dispatcher.error.next();
  19786. RegalAssert(_next);
  19787. GLenum _error = GL_NO_ERROR;
  19788. if (!_context->err.inBeginEnd)
  19789. _error = _next->call(&_next->glGetError)();
  19790. RegalAssert(_error==GL_NO_ERROR);
  19791. _next->call(&_next->glUniformMatrix4dv)(location, count, transpose, value);
  19792. if (!_context->err.inBeginEnd) {
  19793. _error = _next->call(&_next->glGetError)();
  19794. if (_error!=GL_NO_ERROR) {
  19795. Error("glUniformMatrix4dv : ",Token::GLerrorToString(_error));
  19796. #if REGAL_BREAK
  19797. Break::ErrorCB(_error);
  19798. #endif
  19799. if (_context->err.callback)
  19800. _context->err.callback( _error );
  19801. }
  19802. }
  19803. }
  19804. static void REGAL_CALL error_glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19805. {
  19806. Internal("error_glUniformMatrix4x2dv","()");
  19807. RegalContext *_context = REGAL_GET_CONTEXT();
  19808. RegalAssert(_context);
  19809. DispatchTableGL *_next = _context->dispatcher.error.next();
  19810. RegalAssert(_next);
  19811. GLenum _error = GL_NO_ERROR;
  19812. if (!_context->err.inBeginEnd)
  19813. _error = _next->call(&_next->glGetError)();
  19814. RegalAssert(_error==GL_NO_ERROR);
  19815. _next->call(&_next->glUniformMatrix4x2dv)(location, count, transpose, value);
  19816. if (!_context->err.inBeginEnd) {
  19817. _error = _next->call(&_next->glGetError)();
  19818. if (_error!=GL_NO_ERROR) {
  19819. Error("glUniformMatrix4x2dv : ",Token::GLerrorToString(_error));
  19820. #if REGAL_BREAK
  19821. Break::ErrorCB(_error);
  19822. #endif
  19823. if (_context->err.callback)
  19824. _context->err.callback( _error );
  19825. }
  19826. }
  19827. }
  19828. static void REGAL_CALL error_glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  19829. {
  19830. Internal("error_glUniformMatrix4x3dv","()");
  19831. RegalContext *_context = REGAL_GET_CONTEXT();
  19832. RegalAssert(_context);
  19833. DispatchTableGL *_next = _context->dispatcher.error.next();
  19834. RegalAssert(_next);
  19835. GLenum _error = GL_NO_ERROR;
  19836. if (!_context->err.inBeginEnd)
  19837. _error = _next->call(&_next->glGetError)();
  19838. RegalAssert(_error==GL_NO_ERROR);
  19839. _next->call(&_next->glUniformMatrix4x3dv)(location, count, transpose, value);
  19840. if (!_context->err.inBeginEnd) {
  19841. _error = _next->call(&_next->glGetError)();
  19842. if (_error!=GL_NO_ERROR) {
  19843. Error("glUniformMatrix4x3dv : ",Token::GLerrorToString(_error));
  19844. #if REGAL_BREAK
  19845. Break::ErrorCB(_error);
  19846. #endif
  19847. if (_context->err.callback)
  19848. _context->err.callback( _error );
  19849. }
  19850. }
  19851. }
  19852. // GL_ARB_imaging
  19853. static void REGAL_CALL error_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)
  19854. {
  19855. Internal("error_glColorSubTable","()");
  19856. RegalContext *_context = REGAL_GET_CONTEXT();
  19857. RegalAssert(_context);
  19858. DispatchTableGL *_next = _context->dispatcher.error.next();
  19859. RegalAssert(_next);
  19860. GLenum _error = GL_NO_ERROR;
  19861. if (!_context->err.inBeginEnd)
  19862. _error = _next->call(&_next->glGetError)();
  19863. RegalAssert(_error==GL_NO_ERROR);
  19864. _next->call(&_next->glColorSubTable)(target, start, count, format, type, data);
  19865. if (!_context->err.inBeginEnd) {
  19866. _error = _next->call(&_next->glGetError)();
  19867. if (_error!=GL_NO_ERROR) {
  19868. Error("glColorSubTable : ",Token::GLerrorToString(_error));
  19869. #if REGAL_BREAK
  19870. Break::ErrorCB(_error);
  19871. #endif
  19872. if (_context->err.callback)
  19873. _context->err.callback( _error );
  19874. }
  19875. }
  19876. }
  19877. static void REGAL_CALL error_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)
  19878. {
  19879. Internal("error_glColorTable","()");
  19880. RegalContext *_context = REGAL_GET_CONTEXT();
  19881. RegalAssert(_context);
  19882. DispatchTableGL *_next = _context->dispatcher.error.next();
  19883. RegalAssert(_next);
  19884. GLenum _error = GL_NO_ERROR;
  19885. if (!_context->err.inBeginEnd)
  19886. _error = _next->call(&_next->glGetError)();
  19887. RegalAssert(_error==GL_NO_ERROR);
  19888. _next->call(&_next->glColorTable)(target, internalformat, width, format, type, table);
  19889. if (!_context->err.inBeginEnd) {
  19890. _error = _next->call(&_next->glGetError)();
  19891. if (_error!=GL_NO_ERROR) {
  19892. Error("glColorTable : ",Token::GLerrorToString(_error));
  19893. #if REGAL_BREAK
  19894. Break::ErrorCB(_error);
  19895. #endif
  19896. if (_context->err.callback)
  19897. _context->err.callback( _error );
  19898. }
  19899. }
  19900. }
  19901. static void REGAL_CALL error_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
  19902. {
  19903. Internal("error_glColorTableParameterfv","()");
  19904. RegalContext *_context = REGAL_GET_CONTEXT();
  19905. RegalAssert(_context);
  19906. DispatchTableGL *_next = _context->dispatcher.error.next();
  19907. RegalAssert(_next);
  19908. GLenum _error = GL_NO_ERROR;
  19909. if (!_context->err.inBeginEnd)
  19910. _error = _next->call(&_next->glGetError)();
  19911. RegalAssert(_error==GL_NO_ERROR);
  19912. _next->call(&_next->glColorTableParameterfv)(target, pname, params);
  19913. if (!_context->err.inBeginEnd) {
  19914. _error = _next->call(&_next->glGetError)();
  19915. if (_error!=GL_NO_ERROR) {
  19916. Error("glColorTableParameterfv : ",Token::GLerrorToString(_error));
  19917. #if REGAL_BREAK
  19918. Break::ErrorCB(_error);
  19919. #endif
  19920. if (_context->err.callback)
  19921. _context->err.callback( _error );
  19922. }
  19923. }
  19924. }
  19925. static void REGAL_CALL error_glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
  19926. {
  19927. Internal("error_glColorTableParameteriv","()");
  19928. RegalContext *_context = REGAL_GET_CONTEXT();
  19929. RegalAssert(_context);
  19930. DispatchTableGL *_next = _context->dispatcher.error.next();
  19931. RegalAssert(_next);
  19932. GLenum _error = GL_NO_ERROR;
  19933. if (!_context->err.inBeginEnd)
  19934. _error = _next->call(&_next->glGetError)();
  19935. RegalAssert(_error==GL_NO_ERROR);
  19936. _next->call(&_next->glColorTableParameteriv)(target, pname, params);
  19937. if (!_context->err.inBeginEnd) {
  19938. _error = _next->call(&_next->glGetError)();
  19939. if (_error!=GL_NO_ERROR) {
  19940. Error("glColorTableParameteriv : ",Token::GLerrorToString(_error));
  19941. #if REGAL_BREAK
  19942. Break::ErrorCB(_error);
  19943. #endif
  19944. if (_context->err.callback)
  19945. _context->err.callback( _error );
  19946. }
  19947. }
  19948. }
  19949. static void REGAL_CALL error_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
  19950. {
  19951. Internal("error_glConvolutionFilter1D","()");
  19952. RegalContext *_context = REGAL_GET_CONTEXT();
  19953. RegalAssert(_context);
  19954. DispatchTableGL *_next = _context->dispatcher.error.next();
  19955. RegalAssert(_next);
  19956. GLenum _error = GL_NO_ERROR;
  19957. if (!_context->err.inBeginEnd)
  19958. _error = _next->call(&_next->glGetError)();
  19959. RegalAssert(_error==GL_NO_ERROR);
  19960. _next->call(&_next->glConvolutionFilter1D)(target, internalformat, width, format, type, image);
  19961. if (!_context->err.inBeginEnd) {
  19962. _error = _next->call(&_next->glGetError)();
  19963. if (_error!=GL_NO_ERROR) {
  19964. Error("glConvolutionFilter1D : ",Token::GLerrorToString(_error));
  19965. #if REGAL_BREAK
  19966. Break::ErrorCB(_error);
  19967. #endif
  19968. if (_context->err.callback)
  19969. _context->err.callback( _error );
  19970. }
  19971. }
  19972. }
  19973. static void REGAL_CALL error_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
  19974. {
  19975. Internal("error_glConvolutionFilter2D","()");
  19976. RegalContext *_context = REGAL_GET_CONTEXT();
  19977. RegalAssert(_context);
  19978. DispatchTableGL *_next = _context->dispatcher.error.next();
  19979. RegalAssert(_next);
  19980. GLenum _error = GL_NO_ERROR;
  19981. if (!_context->err.inBeginEnd)
  19982. _error = _next->call(&_next->glGetError)();
  19983. RegalAssert(_error==GL_NO_ERROR);
  19984. _next->call(&_next->glConvolutionFilter2D)(target, internalformat, width, height, format, type, image);
  19985. if (!_context->err.inBeginEnd) {
  19986. _error = _next->call(&_next->glGetError)();
  19987. if (_error!=GL_NO_ERROR) {
  19988. Error("glConvolutionFilter2D : ",Token::GLerrorToString(_error));
  19989. #if REGAL_BREAK
  19990. Break::ErrorCB(_error);
  19991. #endif
  19992. if (_context->err.callback)
  19993. _context->err.callback( _error );
  19994. }
  19995. }
  19996. }
  19997. static void REGAL_CALL error_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
  19998. {
  19999. Internal("error_glConvolutionParameterf","()");
  20000. RegalContext *_context = REGAL_GET_CONTEXT();
  20001. RegalAssert(_context);
  20002. DispatchTableGL *_next = _context->dispatcher.error.next();
  20003. RegalAssert(_next);
  20004. GLenum _error = GL_NO_ERROR;
  20005. if (!_context->err.inBeginEnd)
  20006. _error = _next->call(&_next->glGetError)();
  20007. RegalAssert(_error==GL_NO_ERROR);
  20008. _next->call(&_next->glConvolutionParameterf)(target, pname, params);
  20009. if (!_context->err.inBeginEnd) {
  20010. _error = _next->call(&_next->glGetError)();
  20011. if (_error!=GL_NO_ERROR) {
  20012. Error("glConvolutionParameterf : ",Token::GLerrorToString(_error));
  20013. #if REGAL_BREAK
  20014. Break::ErrorCB(_error);
  20015. #endif
  20016. if (_context->err.callback)
  20017. _context->err.callback( _error );
  20018. }
  20019. }
  20020. }
  20021. static void REGAL_CALL error_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
  20022. {
  20023. Internal("error_glConvolutionParameterfv","()");
  20024. RegalContext *_context = REGAL_GET_CONTEXT();
  20025. RegalAssert(_context);
  20026. DispatchTableGL *_next = _context->dispatcher.error.next();
  20027. RegalAssert(_next);
  20028. GLenum _error = GL_NO_ERROR;
  20029. if (!_context->err.inBeginEnd)
  20030. _error = _next->call(&_next->glGetError)();
  20031. RegalAssert(_error==GL_NO_ERROR);
  20032. _next->call(&_next->glConvolutionParameterfv)(target, pname, params);
  20033. if (!_context->err.inBeginEnd) {
  20034. _error = _next->call(&_next->glGetError)();
  20035. if (_error!=GL_NO_ERROR) {
  20036. Error("glConvolutionParameterfv : ",Token::GLerrorToString(_error));
  20037. #if REGAL_BREAK
  20038. Break::ErrorCB(_error);
  20039. #endif
  20040. if (_context->err.callback)
  20041. _context->err.callback( _error );
  20042. }
  20043. }
  20044. }
  20045. static void REGAL_CALL error_glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
  20046. {
  20047. Internal("error_glConvolutionParameteri","()");
  20048. RegalContext *_context = REGAL_GET_CONTEXT();
  20049. RegalAssert(_context);
  20050. DispatchTableGL *_next = _context->dispatcher.error.next();
  20051. RegalAssert(_next);
  20052. GLenum _error = GL_NO_ERROR;
  20053. if (!_context->err.inBeginEnd)
  20054. _error = _next->call(&_next->glGetError)();
  20055. RegalAssert(_error==GL_NO_ERROR);
  20056. _next->call(&_next->glConvolutionParameteri)(target, pname, params);
  20057. if (!_context->err.inBeginEnd) {
  20058. _error = _next->call(&_next->glGetError)();
  20059. if (_error!=GL_NO_ERROR) {
  20060. Error("glConvolutionParameteri : ",Token::GLerrorToString(_error));
  20061. #if REGAL_BREAK
  20062. Break::ErrorCB(_error);
  20063. #endif
  20064. if (_context->err.callback)
  20065. _context->err.callback( _error );
  20066. }
  20067. }
  20068. }
  20069. static void REGAL_CALL error_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
  20070. {
  20071. Internal("error_glConvolutionParameteriv","()");
  20072. RegalContext *_context = REGAL_GET_CONTEXT();
  20073. RegalAssert(_context);
  20074. DispatchTableGL *_next = _context->dispatcher.error.next();
  20075. RegalAssert(_next);
  20076. GLenum _error = GL_NO_ERROR;
  20077. if (!_context->err.inBeginEnd)
  20078. _error = _next->call(&_next->glGetError)();
  20079. RegalAssert(_error==GL_NO_ERROR);
  20080. _next->call(&_next->glConvolutionParameteriv)(target, pname, params);
  20081. if (!_context->err.inBeginEnd) {
  20082. _error = _next->call(&_next->glGetError)();
  20083. if (_error!=GL_NO_ERROR) {
  20084. Error("glConvolutionParameteriv : ",Token::GLerrorToString(_error));
  20085. #if REGAL_BREAK
  20086. Break::ErrorCB(_error);
  20087. #endif
  20088. if (_context->err.callback)
  20089. _context->err.callback( _error );
  20090. }
  20091. }
  20092. }
  20093. static void REGAL_CALL error_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
  20094. {
  20095. Internal("error_glCopyColorSubTable","()");
  20096. RegalContext *_context = REGAL_GET_CONTEXT();
  20097. RegalAssert(_context);
  20098. DispatchTableGL *_next = _context->dispatcher.error.next();
  20099. RegalAssert(_next);
  20100. GLenum _error = GL_NO_ERROR;
  20101. if (!_context->err.inBeginEnd)
  20102. _error = _next->call(&_next->glGetError)();
  20103. RegalAssert(_error==GL_NO_ERROR);
  20104. _next->call(&_next->glCopyColorSubTable)(target, start, x, y, width);
  20105. if (!_context->err.inBeginEnd) {
  20106. _error = _next->call(&_next->glGetError)();
  20107. if (_error!=GL_NO_ERROR) {
  20108. Error("glCopyColorSubTable : ",Token::GLerrorToString(_error));
  20109. #if REGAL_BREAK
  20110. Break::ErrorCB(_error);
  20111. #endif
  20112. if (_context->err.callback)
  20113. _context->err.callback( _error );
  20114. }
  20115. }
  20116. }
  20117. static void REGAL_CALL error_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
  20118. {
  20119. Internal("error_glCopyColorTable","()");
  20120. RegalContext *_context = REGAL_GET_CONTEXT();
  20121. RegalAssert(_context);
  20122. DispatchTableGL *_next = _context->dispatcher.error.next();
  20123. RegalAssert(_next);
  20124. GLenum _error = GL_NO_ERROR;
  20125. if (!_context->err.inBeginEnd)
  20126. _error = _next->call(&_next->glGetError)();
  20127. RegalAssert(_error==GL_NO_ERROR);
  20128. _next->call(&_next->glCopyColorTable)(target, internalformat, x, y, width);
  20129. if (!_context->err.inBeginEnd) {
  20130. _error = _next->call(&_next->glGetError)();
  20131. if (_error!=GL_NO_ERROR) {
  20132. Error("glCopyColorTable : ",Token::GLerrorToString(_error));
  20133. #if REGAL_BREAK
  20134. Break::ErrorCB(_error);
  20135. #endif
  20136. if (_context->err.callback)
  20137. _context->err.callback( _error );
  20138. }
  20139. }
  20140. }
  20141. static void REGAL_CALL error_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
  20142. {
  20143. Internal("error_glCopyConvolutionFilter1D","()");
  20144. RegalContext *_context = REGAL_GET_CONTEXT();
  20145. RegalAssert(_context);
  20146. DispatchTableGL *_next = _context->dispatcher.error.next();
  20147. RegalAssert(_next);
  20148. GLenum _error = GL_NO_ERROR;
  20149. if (!_context->err.inBeginEnd)
  20150. _error = _next->call(&_next->glGetError)();
  20151. RegalAssert(_error==GL_NO_ERROR);
  20152. _next->call(&_next->glCopyConvolutionFilter1D)(target, internalformat, x, y, width);
  20153. if (!_context->err.inBeginEnd) {
  20154. _error = _next->call(&_next->glGetError)();
  20155. if (_error!=GL_NO_ERROR) {
  20156. Error("glCopyConvolutionFilter1D : ",Token::GLerrorToString(_error));
  20157. #if REGAL_BREAK
  20158. Break::ErrorCB(_error);
  20159. #endif
  20160. if (_context->err.callback)
  20161. _context->err.callback( _error );
  20162. }
  20163. }
  20164. }
  20165. static void REGAL_CALL error_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
  20166. {
  20167. Internal("error_glCopyConvolutionFilter2D","()");
  20168. RegalContext *_context = REGAL_GET_CONTEXT();
  20169. RegalAssert(_context);
  20170. DispatchTableGL *_next = _context->dispatcher.error.next();
  20171. RegalAssert(_next);
  20172. GLenum _error = GL_NO_ERROR;
  20173. if (!_context->err.inBeginEnd)
  20174. _error = _next->call(&_next->glGetError)();
  20175. RegalAssert(_error==GL_NO_ERROR);
  20176. _next->call(&_next->glCopyConvolutionFilter2D)(target, internalformat, x, y, width, height);
  20177. if (!_context->err.inBeginEnd) {
  20178. _error = _next->call(&_next->glGetError)();
  20179. if (_error!=GL_NO_ERROR) {
  20180. Error("glCopyConvolutionFilter2D : ",Token::GLerrorToString(_error));
  20181. #if REGAL_BREAK
  20182. Break::ErrorCB(_error);
  20183. #endif
  20184. if (_context->err.callback)
  20185. _context->err.callback( _error );
  20186. }
  20187. }
  20188. }
  20189. static void REGAL_CALL error_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid *table)
  20190. {
  20191. Internal("error_glGetColorTable","()");
  20192. RegalContext *_context = REGAL_GET_CONTEXT();
  20193. RegalAssert(_context);
  20194. DispatchTableGL *_next = _context->dispatcher.error.next();
  20195. RegalAssert(_next);
  20196. GLenum _error = GL_NO_ERROR;
  20197. if (!_context->err.inBeginEnd)
  20198. _error = _next->call(&_next->glGetError)();
  20199. RegalAssert(_error==GL_NO_ERROR);
  20200. _next->call(&_next->glGetColorTable)(target, format, type, table);
  20201. if (!_context->err.inBeginEnd) {
  20202. _error = _next->call(&_next->glGetError)();
  20203. if (_error!=GL_NO_ERROR) {
  20204. Error("glGetColorTable : ",Token::GLerrorToString(_error));
  20205. #if REGAL_BREAK
  20206. Break::ErrorCB(_error);
  20207. #endif
  20208. if (_context->err.callback)
  20209. _context->err.callback( _error );
  20210. }
  20211. }
  20212. }
  20213. static void REGAL_CALL error_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params)
  20214. {
  20215. Internal("error_glGetColorTableParameterfv","()");
  20216. RegalContext *_context = REGAL_GET_CONTEXT();
  20217. RegalAssert(_context);
  20218. DispatchTableGL *_next = _context->dispatcher.error.next();
  20219. RegalAssert(_next);
  20220. GLenum _error = GL_NO_ERROR;
  20221. if (!_context->err.inBeginEnd)
  20222. _error = _next->call(&_next->glGetError)();
  20223. RegalAssert(_error==GL_NO_ERROR);
  20224. _next->call(&_next->glGetColorTableParameterfv)(target, pname, params);
  20225. if (!_context->err.inBeginEnd) {
  20226. _error = _next->call(&_next->glGetError)();
  20227. if (_error!=GL_NO_ERROR) {
  20228. Error("glGetColorTableParameterfv : ",Token::GLerrorToString(_error));
  20229. #if REGAL_BREAK
  20230. Break::ErrorCB(_error);
  20231. #endif
  20232. if (_context->err.callback)
  20233. _context->err.callback( _error );
  20234. }
  20235. }
  20236. }
  20237. static void REGAL_CALL error_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params)
  20238. {
  20239. Internal("error_glGetColorTableParameteriv","()");
  20240. RegalContext *_context = REGAL_GET_CONTEXT();
  20241. RegalAssert(_context);
  20242. DispatchTableGL *_next = _context->dispatcher.error.next();
  20243. RegalAssert(_next);
  20244. GLenum _error = GL_NO_ERROR;
  20245. if (!_context->err.inBeginEnd)
  20246. _error = _next->call(&_next->glGetError)();
  20247. RegalAssert(_error==GL_NO_ERROR);
  20248. _next->call(&_next->glGetColorTableParameteriv)(target, pname, params);
  20249. if (!_context->err.inBeginEnd) {
  20250. _error = _next->call(&_next->glGetError)();
  20251. if (_error!=GL_NO_ERROR) {
  20252. Error("glGetColorTableParameteriv : ",Token::GLerrorToString(_error));
  20253. #if REGAL_BREAK
  20254. Break::ErrorCB(_error);
  20255. #endif
  20256. if (_context->err.callback)
  20257. _context->err.callback( _error );
  20258. }
  20259. }
  20260. }
  20261. static void REGAL_CALL error_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image)
  20262. {
  20263. Internal("error_glGetConvolutionFilter","()");
  20264. RegalContext *_context = REGAL_GET_CONTEXT();
  20265. RegalAssert(_context);
  20266. DispatchTableGL *_next = _context->dispatcher.error.next();
  20267. RegalAssert(_next);
  20268. GLenum _error = GL_NO_ERROR;
  20269. if (!_context->err.inBeginEnd)
  20270. _error = _next->call(&_next->glGetError)();
  20271. RegalAssert(_error==GL_NO_ERROR);
  20272. _next->call(&_next->glGetConvolutionFilter)(target, format, type, image);
  20273. if (!_context->err.inBeginEnd) {
  20274. _error = _next->call(&_next->glGetError)();
  20275. if (_error!=GL_NO_ERROR) {
  20276. Error("glGetConvolutionFilter : ",Token::GLerrorToString(_error));
  20277. #if REGAL_BREAK
  20278. Break::ErrorCB(_error);
  20279. #endif
  20280. if (_context->err.callback)
  20281. _context->err.callback( _error );
  20282. }
  20283. }
  20284. }
  20285. static void REGAL_CALL error_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
  20286. {
  20287. Internal("error_glGetConvolutionParameterfv","()");
  20288. RegalContext *_context = REGAL_GET_CONTEXT();
  20289. RegalAssert(_context);
  20290. DispatchTableGL *_next = _context->dispatcher.error.next();
  20291. RegalAssert(_next);
  20292. GLenum _error = GL_NO_ERROR;
  20293. if (!_context->err.inBeginEnd)
  20294. _error = _next->call(&_next->glGetError)();
  20295. RegalAssert(_error==GL_NO_ERROR);
  20296. _next->call(&_next->glGetConvolutionParameterfv)(target, pname, params);
  20297. if (!_context->err.inBeginEnd) {
  20298. _error = _next->call(&_next->glGetError)();
  20299. if (_error!=GL_NO_ERROR) {
  20300. Error("glGetConvolutionParameterfv : ",Token::GLerrorToString(_error));
  20301. #if REGAL_BREAK
  20302. Break::ErrorCB(_error);
  20303. #endif
  20304. if (_context->err.callback)
  20305. _context->err.callback( _error );
  20306. }
  20307. }
  20308. }
  20309. static void REGAL_CALL error_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
  20310. {
  20311. Internal("error_glGetConvolutionParameteriv","()");
  20312. RegalContext *_context = REGAL_GET_CONTEXT();
  20313. RegalAssert(_context);
  20314. DispatchTableGL *_next = _context->dispatcher.error.next();
  20315. RegalAssert(_next);
  20316. GLenum _error = GL_NO_ERROR;
  20317. if (!_context->err.inBeginEnd)
  20318. _error = _next->call(&_next->glGetError)();
  20319. RegalAssert(_error==GL_NO_ERROR);
  20320. _next->call(&_next->glGetConvolutionParameteriv)(target, pname, params);
  20321. if (!_context->err.inBeginEnd) {
  20322. _error = _next->call(&_next->glGetError)();
  20323. if (_error!=GL_NO_ERROR) {
  20324. Error("glGetConvolutionParameteriv : ",Token::GLerrorToString(_error));
  20325. #if REGAL_BREAK
  20326. Break::ErrorCB(_error);
  20327. #endif
  20328. if (_context->err.callback)
  20329. _context->err.callback( _error );
  20330. }
  20331. }
  20332. }
  20333. static void REGAL_CALL error_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
  20334. {
  20335. Internal("error_glGetHistogram","()");
  20336. RegalContext *_context = REGAL_GET_CONTEXT();
  20337. RegalAssert(_context);
  20338. DispatchTableGL *_next = _context->dispatcher.error.next();
  20339. RegalAssert(_next);
  20340. GLenum _error = GL_NO_ERROR;
  20341. if (!_context->err.inBeginEnd)
  20342. _error = _next->call(&_next->glGetError)();
  20343. RegalAssert(_error==GL_NO_ERROR);
  20344. _next->call(&_next->glGetHistogram)(target, reset, format, type, values);
  20345. if (!_context->err.inBeginEnd) {
  20346. _error = _next->call(&_next->glGetError)();
  20347. if (_error!=GL_NO_ERROR) {
  20348. Error("glGetHistogram : ",Token::GLerrorToString(_error));
  20349. #if REGAL_BREAK
  20350. Break::ErrorCB(_error);
  20351. #endif
  20352. if (_context->err.callback)
  20353. _context->err.callback( _error );
  20354. }
  20355. }
  20356. }
  20357. static void REGAL_CALL error_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
  20358. {
  20359. Internal("error_glGetHistogramParameterfv","()");
  20360. RegalContext *_context = REGAL_GET_CONTEXT();
  20361. RegalAssert(_context);
  20362. DispatchTableGL *_next = _context->dispatcher.error.next();
  20363. RegalAssert(_next);
  20364. GLenum _error = GL_NO_ERROR;
  20365. if (!_context->err.inBeginEnd)
  20366. _error = _next->call(&_next->glGetError)();
  20367. RegalAssert(_error==GL_NO_ERROR);
  20368. _next->call(&_next->glGetHistogramParameterfv)(target, pname, params);
  20369. if (!_context->err.inBeginEnd) {
  20370. _error = _next->call(&_next->glGetError)();
  20371. if (_error!=GL_NO_ERROR) {
  20372. Error("glGetHistogramParameterfv : ",Token::GLerrorToString(_error));
  20373. #if REGAL_BREAK
  20374. Break::ErrorCB(_error);
  20375. #endif
  20376. if (_context->err.callback)
  20377. _context->err.callback( _error );
  20378. }
  20379. }
  20380. }
  20381. static void REGAL_CALL error_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
  20382. {
  20383. Internal("error_glGetHistogramParameteriv","()");
  20384. RegalContext *_context = REGAL_GET_CONTEXT();
  20385. RegalAssert(_context);
  20386. DispatchTableGL *_next = _context->dispatcher.error.next();
  20387. RegalAssert(_next);
  20388. GLenum _error = GL_NO_ERROR;
  20389. if (!_context->err.inBeginEnd)
  20390. _error = _next->call(&_next->glGetError)();
  20391. RegalAssert(_error==GL_NO_ERROR);
  20392. _next->call(&_next->glGetHistogramParameteriv)(target, pname, params);
  20393. if (!_context->err.inBeginEnd) {
  20394. _error = _next->call(&_next->glGetError)();
  20395. if (_error!=GL_NO_ERROR) {
  20396. Error("glGetHistogramParameteriv : ",Token::GLerrorToString(_error));
  20397. #if REGAL_BREAK
  20398. Break::ErrorCB(_error);
  20399. #endif
  20400. if (_context->err.callback)
  20401. _context->err.callback( _error );
  20402. }
  20403. }
  20404. }
  20405. static void REGAL_CALL error_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values)
  20406. {
  20407. Internal("error_glGetMinmax","()");
  20408. RegalContext *_context = REGAL_GET_CONTEXT();
  20409. RegalAssert(_context);
  20410. DispatchTableGL *_next = _context->dispatcher.error.next();
  20411. RegalAssert(_next);
  20412. GLenum _error = GL_NO_ERROR;
  20413. if (!_context->err.inBeginEnd)
  20414. _error = _next->call(&_next->glGetError)();
  20415. RegalAssert(_error==GL_NO_ERROR);
  20416. _next->call(&_next->glGetMinmax)(target, reset, format, types, values);
  20417. if (!_context->err.inBeginEnd) {
  20418. _error = _next->call(&_next->glGetError)();
  20419. if (_error!=GL_NO_ERROR) {
  20420. Error("glGetMinmax : ",Token::GLerrorToString(_error));
  20421. #if REGAL_BREAK
  20422. Break::ErrorCB(_error);
  20423. #endif
  20424. if (_context->err.callback)
  20425. _context->err.callback( _error );
  20426. }
  20427. }
  20428. }
  20429. static void REGAL_CALL error_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
  20430. {
  20431. Internal("error_glGetMinmaxParameterfv","()");
  20432. RegalContext *_context = REGAL_GET_CONTEXT();
  20433. RegalAssert(_context);
  20434. DispatchTableGL *_next = _context->dispatcher.error.next();
  20435. RegalAssert(_next);
  20436. GLenum _error = GL_NO_ERROR;
  20437. if (!_context->err.inBeginEnd)
  20438. _error = _next->call(&_next->glGetError)();
  20439. RegalAssert(_error==GL_NO_ERROR);
  20440. _next->call(&_next->glGetMinmaxParameterfv)(target, pname, params);
  20441. if (!_context->err.inBeginEnd) {
  20442. _error = _next->call(&_next->glGetError)();
  20443. if (_error!=GL_NO_ERROR) {
  20444. Error("glGetMinmaxParameterfv : ",Token::GLerrorToString(_error));
  20445. #if REGAL_BREAK
  20446. Break::ErrorCB(_error);
  20447. #endif
  20448. if (_context->err.callback)
  20449. _context->err.callback( _error );
  20450. }
  20451. }
  20452. }
  20453. static void REGAL_CALL error_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
  20454. {
  20455. Internal("error_glGetMinmaxParameteriv","()");
  20456. RegalContext *_context = REGAL_GET_CONTEXT();
  20457. RegalAssert(_context);
  20458. DispatchTableGL *_next = _context->dispatcher.error.next();
  20459. RegalAssert(_next);
  20460. GLenum _error = GL_NO_ERROR;
  20461. if (!_context->err.inBeginEnd)
  20462. _error = _next->call(&_next->glGetError)();
  20463. RegalAssert(_error==GL_NO_ERROR);
  20464. _next->call(&_next->glGetMinmaxParameteriv)(target, pname, params);
  20465. if (!_context->err.inBeginEnd) {
  20466. _error = _next->call(&_next->glGetError)();
  20467. if (_error!=GL_NO_ERROR) {
  20468. Error("glGetMinmaxParameteriv : ",Token::GLerrorToString(_error));
  20469. #if REGAL_BREAK
  20470. Break::ErrorCB(_error);
  20471. #endif
  20472. if (_context->err.callback)
  20473. _context->err.callback( _error );
  20474. }
  20475. }
  20476. }
  20477. static void REGAL_CALL error_glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
  20478. {
  20479. Internal("error_glGetSeparableFilter","()");
  20480. RegalContext *_context = REGAL_GET_CONTEXT();
  20481. RegalAssert(_context);
  20482. DispatchTableGL *_next = _context->dispatcher.error.next();
  20483. RegalAssert(_next);
  20484. GLenum _error = GL_NO_ERROR;
  20485. if (!_context->err.inBeginEnd)
  20486. _error = _next->call(&_next->glGetError)();
  20487. RegalAssert(_error==GL_NO_ERROR);
  20488. _next->call(&_next->glGetSeparableFilter)(target, format, type, row, column, span);
  20489. if (!_context->err.inBeginEnd) {
  20490. _error = _next->call(&_next->glGetError)();
  20491. if (_error!=GL_NO_ERROR) {
  20492. Error("glGetSeparableFilter : ",Token::GLerrorToString(_error));
  20493. #if REGAL_BREAK
  20494. Break::ErrorCB(_error);
  20495. #endif
  20496. if (_context->err.callback)
  20497. _context->err.callback( _error );
  20498. }
  20499. }
  20500. }
  20501. static void REGAL_CALL error_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
  20502. {
  20503. Internal("error_glHistogram","()");
  20504. RegalContext *_context = REGAL_GET_CONTEXT();
  20505. RegalAssert(_context);
  20506. DispatchTableGL *_next = _context->dispatcher.error.next();
  20507. RegalAssert(_next);
  20508. GLenum _error = GL_NO_ERROR;
  20509. if (!_context->err.inBeginEnd)
  20510. _error = _next->call(&_next->glGetError)();
  20511. RegalAssert(_error==GL_NO_ERROR);
  20512. _next->call(&_next->glHistogram)(target, width, internalformat, sink);
  20513. if (!_context->err.inBeginEnd) {
  20514. _error = _next->call(&_next->glGetError)();
  20515. if (_error!=GL_NO_ERROR) {
  20516. Error("glHistogram : ",Token::GLerrorToString(_error));
  20517. #if REGAL_BREAK
  20518. Break::ErrorCB(_error);
  20519. #endif
  20520. if (_context->err.callback)
  20521. _context->err.callback( _error );
  20522. }
  20523. }
  20524. }
  20525. static void REGAL_CALL error_glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
  20526. {
  20527. Internal("error_glMinmax","()");
  20528. RegalContext *_context = REGAL_GET_CONTEXT();
  20529. RegalAssert(_context);
  20530. DispatchTableGL *_next = _context->dispatcher.error.next();
  20531. RegalAssert(_next);
  20532. GLenum _error = GL_NO_ERROR;
  20533. if (!_context->err.inBeginEnd)
  20534. _error = _next->call(&_next->glGetError)();
  20535. RegalAssert(_error==GL_NO_ERROR);
  20536. _next->call(&_next->glMinmax)(target, internalformat, sink);
  20537. if (!_context->err.inBeginEnd) {
  20538. _error = _next->call(&_next->glGetError)();
  20539. if (_error!=GL_NO_ERROR) {
  20540. Error("glMinmax : ",Token::GLerrorToString(_error));
  20541. #if REGAL_BREAK
  20542. Break::ErrorCB(_error);
  20543. #endif
  20544. if (_context->err.callback)
  20545. _context->err.callback( _error );
  20546. }
  20547. }
  20548. }
  20549. static void REGAL_CALL error_glResetHistogram(GLenum target)
  20550. {
  20551. Internal("error_glResetHistogram","()");
  20552. RegalContext *_context = REGAL_GET_CONTEXT();
  20553. RegalAssert(_context);
  20554. DispatchTableGL *_next = _context->dispatcher.error.next();
  20555. RegalAssert(_next);
  20556. GLenum _error = GL_NO_ERROR;
  20557. if (!_context->err.inBeginEnd)
  20558. _error = _next->call(&_next->glGetError)();
  20559. RegalAssert(_error==GL_NO_ERROR);
  20560. _next->call(&_next->glResetHistogram)(target);
  20561. if (!_context->err.inBeginEnd) {
  20562. _error = _next->call(&_next->glGetError)();
  20563. if (_error!=GL_NO_ERROR) {
  20564. Error("glResetHistogram : ",Token::GLerrorToString(_error));
  20565. #if REGAL_BREAK
  20566. Break::ErrorCB(_error);
  20567. #endif
  20568. if (_context->err.callback)
  20569. _context->err.callback( _error );
  20570. }
  20571. }
  20572. }
  20573. static void REGAL_CALL error_glResetMinmax(GLenum target)
  20574. {
  20575. Internal("error_glResetMinmax","()");
  20576. RegalContext *_context = REGAL_GET_CONTEXT();
  20577. RegalAssert(_context);
  20578. DispatchTableGL *_next = _context->dispatcher.error.next();
  20579. RegalAssert(_next);
  20580. GLenum _error = GL_NO_ERROR;
  20581. if (!_context->err.inBeginEnd)
  20582. _error = _next->call(&_next->glGetError)();
  20583. RegalAssert(_error==GL_NO_ERROR);
  20584. _next->call(&_next->glResetMinmax)(target);
  20585. if (!_context->err.inBeginEnd) {
  20586. _error = _next->call(&_next->glGetError)();
  20587. if (_error!=GL_NO_ERROR) {
  20588. Error("glResetMinmax : ",Token::GLerrorToString(_error));
  20589. #if REGAL_BREAK
  20590. Break::ErrorCB(_error);
  20591. #endif
  20592. if (_context->err.callback)
  20593. _context->err.callback( _error );
  20594. }
  20595. }
  20596. }
  20597. static void REGAL_CALL error_glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
  20598. {
  20599. Internal("error_glSeparableFilter2D","()");
  20600. RegalContext *_context = REGAL_GET_CONTEXT();
  20601. RegalAssert(_context);
  20602. DispatchTableGL *_next = _context->dispatcher.error.next();
  20603. RegalAssert(_next);
  20604. GLenum _error = GL_NO_ERROR;
  20605. if (!_context->err.inBeginEnd)
  20606. _error = _next->call(&_next->glGetError)();
  20607. RegalAssert(_error==GL_NO_ERROR);
  20608. _next->call(&_next->glSeparableFilter2D)(target, internalformat, width, height, format, type, row, column);
  20609. if (!_context->err.inBeginEnd) {
  20610. _error = _next->call(&_next->glGetError)();
  20611. if (_error!=GL_NO_ERROR) {
  20612. Error("glSeparableFilter2D : ",Token::GLerrorToString(_error));
  20613. #if REGAL_BREAK
  20614. Break::ErrorCB(_error);
  20615. #endif
  20616. if (_context->err.callback)
  20617. _context->err.callback( _error );
  20618. }
  20619. }
  20620. }
  20621. // GL_ARB_indirect_parameters
  20622. static void REGAL_CALL error_glMultiDrawArraysIndirectCountARB(GLenum mode, const GLvoid *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride)
  20623. {
  20624. Internal("error_glMultiDrawArraysIndirectCountARB","()");
  20625. RegalContext *_context = REGAL_GET_CONTEXT();
  20626. RegalAssert(_context);
  20627. DispatchTableGL *_next = _context->dispatcher.error.next();
  20628. RegalAssert(_next);
  20629. GLenum _error = GL_NO_ERROR;
  20630. if (!_context->err.inBeginEnd)
  20631. _error = _next->call(&_next->glGetError)();
  20632. RegalAssert(_error==GL_NO_ERROR);
  20633. _next->call(&_next->glMultiDrawArraysIndirectCountARB)(mode, indirect, drawcount, maxdrawcount, stride);
  20634. if (!_context->err.inBeginEnd) {
  20635. _error = _next->call(&_next->glGetError)();
  20636. if (_error!=GL_NO_ERROR) {
  20637. Error("glMultiDrawArraysIndirectCountARB : ",Token::GLerrorToString(_error));
  20638. #if REGAL_BREAK
  20639. Break::ErrorCB(_error);
  20640. #endif
  20641. if (_context->err.callback)
  20642. _context->err.callback( _error );
  20643. }
  20644. }
  20645. }
  20646. static void REGAL_CALL error_glMultiDrawElementsIndirectCountARB(GLenum mode, GLenum type, const GLvoid *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride)
  20647. {
  20648. Internal("error_glMultiDrawElementsIndirectCountARB","()");
  20649. RegalContext *_context = REGAL_GET_CONTEXT();
  20650. RegalAssert(_context);
  20651. DispatchTableGL *_next = _context->dispatcher.error.next();
  20652. RegalAssert(_next);
  20653. GLenum _error = GL_NO_ERROR;
  20654. if (!_context->err.inBeginEnd)
  20655. _error = _next->call(&_next->glGetError)();
  20656. RegalAssert(_error==GL_NO_ERROR);
  20657. _next->call(&_next->glMultiDrawElementsIndirectCountARB)(mode, type, indirect, drawcount, maxdrawcount, stride);
  20658. if (!_context->err.inBeginEnd) {
  20659. _error = _next->call(&_next->glGetError)();
  20660. if (_error!=GL_NO_ERROR) {
  20661. Error("glMultiDrawElementsIndirectCountARB : ",Token::GLerrorToString(_error));
  20662. #if REGAL_BREAK
  20663. Break::ErrorCB(_error);
  20664. #endif
  20665. if (_context->err.callback)
  20666. _context->err.callback( _error );
  20667. }
  20668. }
  20669. }
  20670. // GL_ARB_instanced_arrays
  20671. static void REGAL_CALL error_glVertexAttribDivisorARB(GLuint index, GLuint divisor)
  20672. {
  20673. Internal("error_glVertexAttribDivisorARB","()");
  20674. RegalContext *_context = REGAL_GET_CONTEXT();
  20675. RegalAssert(_context);
  20676. DispatchTableGL *_next = _context->dispatcher.error.next();
  20677. RegalAssert(_next);
  20678. GLenum _error = GL_NO_ERROR;
  20679. if (!_context->err.inBeginEnd)
  20680. _error = _next->call(&_next->glGetError)();
  20681. RegalAssert(_error==GL_NO_ERROR);
  20682. _next->call(&_next->glVertexAttribDivisorARB)(index, divisor);
  20683. if (!_context->err.inBeginEnd) {
  20684. _error = _next->call(&_next->glGetError)();
  20685. if (_error!=GL_NO_ERROR) {
  20686. Error("glVertexAttribDivisorARB : ",Token::GLerrorToString(_error));
  20687. #if REGAL_BREAK
  20688. Break::ErrorCB(_error);
  20689. #endif
  20690. if (_context->err.callback)
  20691. _context->err.callback( _error );
  20692. }
  20693. }
  20694. }
  20695. // GL_ARB_internalformat_query
  20696. static void REGAL_CALL error_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
  20697. {
  20698. Internal("error_glGetInternalformativ","()");
  20699. RegalContext *_context = REGAL_GET_CONTEXT();
  20700. RegalAssert(_context);
  20701. DispatchTableGL *_next = _context->dispatcher.error.next();
  20702. RegalAssert(_next);
  20703. GLenum _error = GL_NO_ERROR;
  20704. if (!_context->err.inBeginEnd)
  20705. _error = _next->call(&_next->glGetError)();
  20706. RegalAssert(_error==GL_NO_ERROR);
  20707. _next->call(&_next->glGetInternalformativ)(target, internalformat, pname, bufSize, params);
  20708. if (!_context->err.inBeginEnd) {
  20709. _error = _next->call(&_next->glGetError)();
  20710. if (_error!=GL_NO_ERROR) {
  20711. Error("glGetInternalformativ : ",Token::GLerrorToString(_error));
  20712. #if REGAL_BREAK
  20713. Break::ErrorCB(_error);
  20714. #endif
  20715. if (_context->err.callback)
  20716. _context->err.callback( _error );
  20717. }
  20718. }
  20719. }
  20720. // GL_ARB_internalformat_query2
  20721. static void REGAL_CALL error_glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params)
  20722. {
  20723. Internal("error_glGetInternalformati64v","()");
  20724. RegalContext *_context = REGAL_GET_CONTEXT();
  20725. RegalAssert(_context);
  20726. DispatchTableGL *_next = _context->dispatcher.error.next();
  20727. RegalAssert(_next);
  20728. GLenum _error = GL_NO_ERROR;
  20729. if (!_context->err.inBeginEnd)
  20730. _error = _next->call(&_next->glGetError)();
  20731. RegalAssert(_error==GL_NO_ERROR);
  20732. _next->call(&_next->glGetInternalformati64v)(target, internalformat, pname, bufSize, params);
  20733. if (!_context->err.inBeginEnd) {
  20734. _error = _next->call(&_next->glGetError)();
  20735. if (_error!=GL_NO_ERROR) {
  20736. Error("glGetInternalformati64v : ",Token::GLerrorToString(_error));
  20737. #if REGAL_BREAK
  20738. Break::ErrorCB(_error);
  20739. #endif
  20740. if (_context->err.callback)
  20741. _context->err.callback( _error );
  20742. }
  20743. }
  20744. }
  20745. // GL_ARB_invalidate_subdata
  20746. static void REGAL_CALL error_glInvalidateBufferData(GLuint buffer)
  20747. {
  20748. Internal("error_glInvalidateBufferData","()");
  20749. RegalContext *_context = REGAL_GET_CONTEXT();
  20750. RegalAssert(_context);
  20751. DispatchTableGL *_next = _context->dispatcher.error.next();
  20752. RegalAssert(_next);
  20753. GLenum _error = GL_NO_ERROR;
  20754. if (!_context->err.inBeginEnd)
  20755. _error = _next->call(&_next->glGetError)();
  20756. RegalAssert(_error==GL_NO_ERROR);
  20757. _next->call(&_next->glInvalidateBufferData)(buffer);
  20758. if (!_context->err.inBeginEnd) {
  20759. _error = _next->call(&_next->glGetError)();
  20760. if (_error!=GL_NO_ERROR) {
  20761. Error("glInvalidateBufferData : ",Token::GLerrorToString(_error));
  20762. #if REGAL_BREAK
  20763. Break::ErrorCB(_error);
  20764. #endif
  20765. if (_context->err.callback)
  20766. _context->err.callback( _error );
  20767. }
  20768. }
  20769. }
  20770. static void REGAL_CALL error_glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length)
  20771. {
  20772. Internal("error_glInvalidateBufferSubData","()");
  20773. RegalContext *_context = REGAL_GET_CONTEXT();
  20774. RegalAssert(_context);
  20775. DispatchTableGL *_next = _context->dispatcher.error.next();
  20776. RegalAssert(_next);
  20777. GLenum _error = GL_NO_ERROR;
  20778. if (!_context->err.inBeginEnd)
  20779. _error = _next->call(&_next->glGetError)();
  20780. RegalAssert(_error==GL_NO_ERROR);
  20781. _next->call(&_next->glInvalidateBufferSubData)(buffer, offset, length);
  20782. if (!_context->err.inBeginEnd) {
  20783. _error = _next->call(&_next->glGetError)();
  20784. if (_error!=GL_NO_ERROR) {
  20785. Error("glInvalidateBufferSubData : ",Token::GLerrorToString(_error));
  20786. #if REGAL_BREAK
  20787. Break::ErrorCB(_error);
  20788. #endif
  20789. if (_context->err.callback)
  20790. _context->err.callback( _error );
  20791. }
  20792. }
  20793. }
  20794. static void REGAL_CALL error_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
  20795. {
  20796. Internal("error_glInvalidateFramebuffer","()");
  20797. RegalContext *_context = REGAL_GET_CONTEXT();
  20798. RegalAssert(_context);
  20799. DispatchTableGL *_next = _context->dispatcher.error.next();
  20800. RegalAssert(_next);
  20801. GLenum _error = GL_NO_ERROR;
  20802. if (!_context->err.inBeginEnd)
  20803. _error = _next->call(&_next->glGetError)();
  20804. RegalAssert(_error==GL_NO_ERROR);
  20805. _next->call(&_next->glInvalidateFramebuffer)(target, numAttachments, attachments);
  20806. if (!_context->err.inBeginEnd) {
  20807. _error = _next->call(&_next->glGetError)();
  20808. if (_error!=GL_NO_ERROR) {
  20809. Error("glInvalidateFramebuffer : ",Token::GLerrorToString(_error));
  20810. #if REGAL_BREAK
  20811. Break::ErrorCB(_error);
  20812. #endif
  20813. if (_context->err.callback)
  20814. _context->err.callback( _error );
  20815. }
  20816. }
  20817. }
  20818. static void REGAL_CALL error_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
  20819. {
  20820. Internal("error_glInvalidateSubFramebuffer","()");
  20821. RegalContext *_context = REGAL_GET_CONTEXT();
  20822. RegalAssert(_context);
  20823. DispatchTableGL *_next = _context->dispatcher.error.next();
  20824. RegalAssert(_next);
  20825. GLenum _error = GL_NO_ERROR;
  20826. if (!_context->err.inBeginEnd)
  20827. _error = _next->call(&_next->glGetError)();
  20828. RegalAssert(_error==GL_NO_ERROR);
  20829. _next->call(&_next->glInvalidateSubFramebuffer)(target, numAttachments, attachments, x, y, width, height);
  20830. if (!_context->err.inBeginEnd) {
  20831. _error = _next->call(&_next->glGetError)();
  20832. if (_error!=GL_NO_ERROR) {
  20833. Error("glInvalidateSubFramebuffer : ",Token::GLerrorToString(_error));
  20834. #if REGAL_BREAK
  20835. Break::ErrorCB(_error);
  20836. #endif
  20837. if (_context->err.callback)
  20838. _context->err.callback( _error );
  20839. }
  20840. }
  20841. }
  20842. static void REGAL_CALL error_glInvalidateTexImage(GLuint texture, GLint level)
  20843. {
  20844. Internal("error_glInvalidateTexImage","()");
  20845. RegalContext *_context = REGAL_GET_CONTEXT();
  20846. RegalAssert(_context);
  20847. DispatchTableGL *_next = _context->dispatcher.error.next();
  20848. RegalAssert(_next);
  20849. GLenum _error = GL_NO_ERROR;
  20850. if (!_context->err.inBeginEnd)
  20851. _error = _next->call(&_next->glGetError)();
  20852. RegalAssert(_error==GL_NO_ERROR);
  20853. _next->call(&_next->glInvalidateTexImage)(texture, level);
  20854. if (!_context->err.inBeginEnd) {
  20855. _error = _next->call(&_next->glGetError)();
  20856. if (_error!=GL_NO_ERROR) {
  20857. Error("glInvalidateTexImage : ",Token::GLerrorToString(_error));
  20858. #if REGAL_BREAK
  20859. Break::ErrorCB(_error);
  20860. #endif
  20861. if (_context->err.callback)
  20862. _context->err.callback( _error );
  20863. }
  20864. }
  20865. }
  20866. static void REGAL_CALL error_glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth)
  20867. {
  20868. Internal("error_glInvalidateTexSubImage","()");
  20869. RegalContext *_context = REGAL_GET_CONTEXT();
  20870. RegalAssert(_context);
  20871. DispatchTableGL *_next = _context->dispatcher.error.next();
  20872. RegalAssert(_next);
  20873. GLenum _error = GL_NO_ERROR;
  20874. if (!_context->err.inBeginEnd)
  20875. _error = _next->call(&_next->glGetError)();
  20876. RegalAssert(_error==GL_NO_ERROR);
  20877. _next->call(&_next->glInvalidateTexSubImage)(texture, level, xoffset, yoffset, zoffset, width, height, depth);
  20878. if (!_context->err.inBeginEnd) {
  20879. _error = _next->call(&_next->glGetError)();
  20880. if (_error!=GL_NO_ERROR) {
  20881. Error("glInvalidateTexSubImage : ",Token::GLerrorToString(_error));
  20882. #if REGAL_BREAK
  20883. Break::ErrorCB(_error);
  20884. #endif
  20885. if (_context->err.callback)
  20886. _context->err.callback( _error );
  20887. }
  20888. }
  20889. }
  20890. // GL_ARB_map_buffer_range
  20891. static void REGAL_CALL error_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
  20892. {
  20893. Internal("error_glFlushMappedBufferRange","()");
  20894. RegalContext *_context = REGAL_GET_CONTEXT();
  20895. RegalAssert(_context);
  20896. DispatchTableGL *_next = _context->dispatcher.error.next();
  20897. RegalAssert(_next);
  20898. GLenum _error = GL_NO_ERROR;
  20899. if (!_context->err.inBeginEnd)
  20900. _error = _next->call(&_next->glGetError)();
  20901. RegalAssert(_error==GL_NO_ERROR);
  20902. _next->call(&_next->glFlushMappedBufferRange)(target, offset, length);
  20903. if (!_context->err.inBeginEnd) {
  20904. _error = _next->call(&_next->glGetError)();
  20905. if (_error!=GL_NO_ERROR) {
  20906. Error("glFlushMappedBufferRange : ",Token::GLerrorToString(_error));
  20907. #if REGAL_BREAK
  20908. Break::ErrorCB(_error);
  20909. #endif
  20910. if (_context->err.callback)
  20911. _context->err.callback( _error );
  20912. }
  20913. }
  20914. }
  20915. static GLvoid *REGAL_CALL error_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
  20916. {
  20917. Internal("error_glMapBufferRange","()");
  20918. RegalContext *_context = REGAL_GET_CONTEXT();
  20919. RegalAssert(_context);
  20920. DispatchTableGL *_next = _context->dispatcher.error.next();
  20921. RegalAssert(_next);
  20922. GLenum _error = GL_NO_ERROR;
  20923. if (!_context->err.inBeginEnd)
  20924. _error = _next->call(&_next->glGetError)();
  20925. RegalAssert(_error==GL_NO_ERROR);
  20926. GLvoid * ret = _next->call(&_next->glMapBufferRange)(target, offset, length, access);
  20927. if (!_context->err.inBeginEnd) {
  20928. _error = _next->call(&_next->glGetError)();
  20929. if (_error!=GL_NO_ERROR) {
  20930. Error("glMapBufferRange : ",Token::GLerrorToString(_error));
  20931. #if REGAL_BREAK
  20932. Break::ErrorCB(_error);
  20933. #endif
  20934. if (_context->err.callback)
  20935. _context->err.callback( _error );
  20936. }
  20937. }
  20938. return ret;
  20939. }
  20940. // GL_ARB_matrix_palette
  20941. static void REGAL_CALL error_glCurrentPaletteMatrixARB(GLint index)
  20942. {
  20943. Internal("error_glCurrentPaletteMatrixARB","()");
  20944. RegalContext *_context = REGAL_GET_CONTEXT();
  20945. RegalAssert(_context);
  20946. DispatchTableGL *_next = _context->dispatcher.error.next();
  20947. RegalAssert(_next);
  20948. GLenum _error = GL_NO_ERROR;
  20949. if (!_context->err.inBeginEnd)
  20950. _error = _next->call(&_next->glGetError)();
  20951. RegalAssert(_error==GL_NO_ERROR);
  20952. _next->call(&_next->glCurrentPaletteMatrixARB)(index);
  20953. if (!_context->err.inBeginEnd) {
  20954. _error = _next->call(&_next->glGetError)();
  20955. if (_error!=GL_NO_ERROR) {
  20956. Error("glCurrentPaletteMatrixARB : ",Token::GLerrorToString(_error));
  20957. #if REGAL_BREAK
  20958. Break::ErrorCB(_error);
  20959. #endif
  20960. if (_context->err.callback)
  20961. _context->err.callback( _error );
  20962. }
  20963. }
  20964. }
  20965. static void REGAL_CALL error_glMatrixIndexPointerARB(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  20966. {
  20967. Internal("error_glMatrixIndexPointerARB","()");
  20968. RegalContext *_context = REGAL_GET_CONTEXT();
  20969. RegalAssert(_context);
  20970. DispatchTableGL *_next = _context->dispatcher.error.next();
  20971. RegalAssert(_next);
  20972. GLenum _error = GL_NO_ERROR;
  20973. if (!_context->err.inBeginEnd)
  20974. _error = _next->call(&_next->glGetError)();
  20975. RegalAssert(_error==GL_NO_ERROR);
  20976. _next->call(&_next->glMatrixIndexPointerARB)(size, type, stride, pointer);
  20977. if (!_context->err.inBeginEnd) {
  20978. _error = _next->call(&_next->glGetError)();
  20979. if (_error!=GL_NO_ERROR) {
  20980. Error("glMatrixIndexPointerARB : ",Token::GLerrorToString(_error));
  20981. #if REGAL_BREAK
  20982. Break::ErrorCB(_error);
  20983. #endif
  20984. if (_context->err.callback)
  20985. _context->err.callback( _error );
  20986. }
  20987. }
  20988. }
  20989. static void REGAL_CALL error_glMatrixIndexubvARB(GLint size, const GLubyte *indices)
  20990. {
  20991. Internal("error_glMatrixIndexubvARB","()");
  20992. RegalContext *_context = REGAL_GET_CONTEXT();
  20993. RegalAssert(_context);
  20994. DispatchTableGL *_next = _context->dispatcher.error.next();
  20995. RegalAssert(_next);
  20996. GLenum _error = GL_NO_ERROR;
  20997. if (!_context->err.inBeginEnd)
  20998. _error = _next->call(&_next->glGetError)();
  20999. RegalAssert(_error==GL_NO_ERROR);
  21000. _next->call(&_next->glMatrixIndexubvARB)(size, indices);
  21001. if (!_context->err.inBeginEnd) {
  21002. _error = _next->call(&_next->glGetError)();
  21003. if (_error!=GL_NO_ERROR) {
  21004. Error("glMatrixIndexubvARB : ",Token::GLerrorToString(_error));
  21005. #if REGAL_BREAK
  21006. Break::ErrorCB(_error);
  21007. #endif
  21008. if (_context->err.callback)
  21009. _context->err.callback( _error );
  21010. }
  21011. }
  21012. }
  21013. static void REGAL_CALL error_glMatrixIndexuivARB(GLint size, const GLuint *indices)
  21014. {
  21015. Internal("error_glMatrixIndexuivARB","()");
  21016. RegalContext *_context = REGAL_GET_CONTEXT();
  21017. RegalAssert(_context);
  21018. DispatchTableGL *_next = _context->dispatcher.error.next();
  21019. RegalAssert(_next);
  21020. GLenum _error = GL_NO_ERROR;
  21021. if (!_context->err.inBeginEnd)
  21022. _error = _next->call(&_next->glGetError)();
  21023. RegalAssert(_error==GL_NO_ERROR);
  21024. _next->call(&_next->glMatrixIndexuivARB)(size, indices);
  21025. if (!_context->err.inBeginEnd) {
  21026. _error = _next->call(&_next->glGetError)();
  21027. if (_error!=GL_NO_ERROR) {
  21028. Error("glMatrixIndexuivARB : ",Token::GLerrorToString(_error));
  21029. #if REGAL_BREAK
  21030. Break::ErrorCB(_error);
  21031. #endif
  21032. if (_context->err.callback)
  21033. _context->err.callback( _error );
  21034. }
  21035. }
  21036. }
  21037. static void REGAL_CALL error_glMatrixIndexusvARB(GLint size, const GLushort *indices)
  21038. {
  21039. Internal("error_glMatrixIndexusvARB","()");
  21040. RegalContext *_context = REGAL_GET_CONTEXT();
  21041. RegalAssert(_context);
  21042. DispatchTableGL *_next = _context->dispatcher.error.next();
  21043. RegalAssert(_next);
  21044. GLenum _error = GL_NO_ERROR;
  21045. if (!_context->err.inBeginEnd)
  21046. _error = _next->call(&_next->glGetError)();
  21047. RegalAssert(_error==GL_NO_ERROR);
  21048. _next->call(&_next->glMatrixIndexusvARB)(size, indices);
  21049. if (!_context->err.inBeginEnd) {
  21050. _error = _next->call(&_next->glGetError)();
  21051. if (_error!=GL_NO_ERROR) {
  21052. Error("glMatrixIndexusvARB : ",Token::GLerrorToString(_error));
  21053. #if REGAL_BREAK
  21054. Break::ErrorCB(_error);
  21055. #endif
  21056. if (_context->err.callback)
  21057. _context->err.callback( _error );
  21058. }
  21059. }
  21060. }
  21061. // GL_ARB_multi_bind
  21062. static void REGAL_CALL error_glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers)
  21063. {
  21064. Internal("error_glBindBuffersBase","()");
  21065. RegalContext *_context = REGAL_GET_CONTEXT();
  21066. RegalAssert(_context);
  21067. DispatchTableGL *_next = _context->dispatcher.error.next();
  21068. RegalAssert(_next);
  21069. GLenum _error = GL_NO_ERROR;
  21070. if (!_context->err.inBeginEnd)
  21071. _error = _next->call(&_next->glGetError)();
  21072. RegalAssert(_error==GL_NO_ERROR);
  21073. _next->call(&_next->glBindBuffersBase)(target, first, count, buffers);
  21074. if (!_context->err.inBeginEnd) {
  21075. _error = _next->call(&_next->glGetError)();
  21076. if (_error!=GL_NO_ERROR) {
  21077. Error("glBindBuffersBase : ",Token::GLerrorToString(_error));
  21078. #if REGAL_BREAK
  21079. Break::ErrorCB(_error);
  21080. #endif
  21081. if (_context->err.callback)
  21082. _context->err.callback( _error );
  21083. }
  21084. }
  21085. }
  21086. static void REGAL_CALL error_glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes)
  21087. {
  21088. Internal("error_glBindBuffersRange","()");
  21089. RegalContext *_context = REGAL_GET_CONTEXT();
  21090. RegalAssert(_context);
  21091. DispatchTableGL *_next = _context->dispatcher.error.next();
  21092. RegalAssert(_next);
  21093. GLenum _error = GL_NO_ERROR;
  21094. if (!_context->err.inBeginEnd)
  21095. _error = _next->call(&_next->glGetError)();
  21096. RegalAssert(_error==GL_NO_ERROR);
  21097. _next->call(&_next->glBindBuffersRange)(target, first, count, buffers, offsets, sizes);
  21098. if (!_context->err.inBeginEnd) {
  21099. _error = _next->call(&_next->glGetError)();
  21100. if (_error!=GL_NO_ERROR) {
  21101. Error("glBindBuffersRange : ",Token::GLerrorToString(_error));
  21102. #if REGAL_BREAK
  21103. Break::ErrorCB(_error);
  21104. #endif
  21105. if (_context->err.callback)
  21106. _context->err.callback( _error );
  21107. }
  21108. }
  21109. }
  21110. static void REGAL_CALL error_glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
  21111. {
  21112. Internal("error_glBindImageTextures","()");
  21113. RegalContext *_context = REGAL_GET_CONTEXT();
  21114. RegalAssert(_context);
  21115. DispatchTableGL *_next = _context->dispatcher.error.next();
  21116. RegalAssert(_next);
  21117. GLenum _error = GL_NO_ERROR;
  21118. if (!_context->err.inBeginEnd)
  21119. _error = _next->call(&_next->glGetError)();
  21120. RegalAssert(_error==GL_NO_ERROR);
  21121. _next->call(&_next->glBindImageTextures)(first, count, textures);
  21122. if (!_context->err.inBeginEnd) {
  21123. _error = _next->call(&_next->glGetError)();
  21124. if (_error!=GL_NO_ERROR) {
  21125. Error("glBindImageTextures : ",Token::GLerrorToString(_error));
  21126. #if REGAL_BREAK
  21127. Break::ErrorCB(_error);
  21128. #endif
  21129. if (_context->err.callback)
  21130. _context->err.callback( _error );
  21131. }
  21132. }
  21133. }
  21134. static void REGAL_CALL error_glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers)
  21135. {
  21136. Internal("error_glBindSamplers","()");
  21137. RegalContext *_context = REGAL_GET_CONTEXT();
  21138. RegalAssert(_context);
  21139. DispatchTableGL *_next = _context->dispatcher.error.next();
  21140. RegalAssert(_next);
  21141. GLenum _error = GL_NO_ERROR;
  21142. if (!_context->err.inBeginEnd)
  21143. _error = _next->call(&_next->glGetError)();
  21144. RegalAssert(_error==GL_NO_ERROR);
  21145. _next->call(&_next->glBindSamplers)(first, count, samplers);
  21146. if (!_context->err.inBeginEnd) {
  21147. _error = _next->call(&_next->glGetError)();
  21148. if (_error!=GL_NO_ERROR) {
  21149. Error("glBindSamplers : ",Token::GLerrorToString(_error));
  21150. #if REGAL_BREAK
  21151. Break::ErrorCB(_error);
  21152. #endif
  21153. if (_context->err.callback)
  21154. _context->err.callback( _error );
  21155. }
  21156. }
  21157. }
  21158. static void REGAL_CALL error_glBindTextures(GLuint first, GLsizei count, const GLuint *textures)
  21159. {
  21160. Internal("error_glBindTextures","()");
  21161. RegalContext *_context = REGAL_GET_CONTEXT();
  21162. RegalAssert(_context);
  21163. DispatchTableGL *_next = _context->dispatcher.error.next();
  21164. RegalAssert(_next);
  21165. GLenum _error = GL_NO_ERROR;
  21166. if (!_context->err.inBeginEnd)
  21167. _error = _next->call(&_next->glGetError)();
  21168. RegalAssert(_error==GL_NO_ERROR);
  21169. _next->call(&_next->glBindTextures)(first, count, textures);
  21170. if (!_context->err.inBeginEnd) {
  21171. _error = _next->call(&_next->glGetError)();
  21172. if (_error!=GL_NO_ERROR) {
  21173. Error("glBindTextures : ",Token::GLerrorToString(_error));
  21174. #if REGAL_BREAK
  21175. Break::ErrorCB(_error);
  21176. #endif
  21177. if (_context->err.callback)
  21178. _context->err.callback( _error );
  21179. }
  21180. }
  21181. }
  21182. static void REGAL_CALL error_glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)
  21183. {
  21184. Internal("error_glBindVertexBuffers","()");
  21185. RegalContext *_context = REGAL_GET_CONTEXT();
  21186. RegalAssert(_context);
  21187. DispatchTableGL *_next = _context->dispatcher.error.next();
  21188. RegalAssert(_next);
  21189. GLenum _error = GL_NO_ERROR;
  21190. if (!_context->err.inBeginEnd)
  21191. _error = _next->call(&_next->glGetError)();
  21192. RegalAssert(_error==GL_NO_ERROR);
  21193. _next->call(&_next->glBindVertexBuffers)(first, count, buffers, offsets, strides);
  21194. if (!_context->err.inBeginEnd) {
  21195. _error = _next->call(&_next->glGetError)();
  21196. if (_error!=GL_NO_ERROR) {
  21197. Error("glBindVertexBuffers : ",Token::GLerrorToString(_error));
  21198. #if REGAL_BREAK
  21199. Break::ErrorCB(_error);
  21200. #endif
  21201. if (_context->err.callback)
  21202. _context->err.callback( _error );
  21203. }
  21204. }
  21205. }
  21206. // GL_ARB_multi_draw_indirect
  21207. static void REGAL_CALL error_glMultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride)
  21208. {
  21209. Internal("error_glMultiDrawArraysIndirect","()");
  21210. RegalContext *_context = REGAL_GET_CONTEXT();
  21211. RegalAssert(_context);
  21212. DispatchTableGL *_next = _context->dispatcher.error.next();
  21213. RegalAssert(_next);
  21214. GLenum _error = GL_NO_ERROR;
  21215. if (!_context->err.inBeginEnd)
  21216. _error = _next->call(&_next->glGetError)();
  21217. RegalAssert(_error==GL_NO_ERROR);
  21218. _next->call(&_next->glMultiDrawArraysIndirect)(mode, indirect, primcount, stride);
  21219. if (!_context->err.inBeginEnd) {
  21220. _error = _next->call(&_next->glGetError)();
  21221. if (_error!=GL_NO_ERROR) {
  21222. Error("glMultiDrawArraysIndirect : ",Token::GLerrorToString(_error));
  21223. #if REGAL_BREAK
  21224. Break::ErrorCB(_error);
  21225. #endif
  21226. if (_context->err.callback)
  21227. _context->err.callback( _error );
  21228. }
  21229. }
  21230. }
  21231. static void REGAL_CALL error_glMultiDrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride)
  21232. {
  21233. Internal("error_glMultiDrawElementsIndirect","()");
  21234. RegalContext *_context = REGAL_GET_CONTEXT();
  21235. RegalAssert(_context);
  21236. DispatchTableGL *_next = _context->dispatcher.error.next();
  21237. RegalAssert(_next);
  21238. GLenum _error = GL_NO_ERROR;
  21239. if (!_context->err.inBeginEnd)
  21240. _error = _next->call(&_next->glGetError)();
  21241. RegalAssert(_error==GL_NO_ERROR);
  21242. _next->call(&_next->glMultiDrawElementsIndirect)(mode, type, indirect, primcount, stride);
  21243. if (!_context->err.inBeginEnd) {
  21244. _error = _next->call(&_next->glGetError)();
  21245. if (_error!=GL_NO_ERROR) {
  21246. Error("glMultiDrawElementsIndirect : ",Token::GLerrorToString(_error));
  21247. #if REGAL_BREAK
  21248. Break::ErrorCB(_error);
  21249. #endif
  21250. if (_context->err.callback)
  21251. _context->err.callback( _error );
  21252. }
  21253. }
  21254. }
  21255. // GL_ARB_multisample
  21256. static void REGAL_CALL error_glSampleCoverageARB(GLclampf value, GLboolean invert)
  21257. {
  21258. Internal("error_glSampleCoverageARB","()");
  21259. RegalContext *_context = REGAL_GET_CONTEXT();
  21260. RegalAssert(_context);
  21261. DispatchTableGL *_next = _context->dispatcher.error.next();
  21262. RegalAssert(_next);
  21263. GLenum _error = GL_NO_ERROR;
  21264. if (!_context->err.inBeginEnd)
  21265. _error = _next->call(&_next->glGetError)();
  21266. RegalAssert(_error==GL_NO_ERROR);
  21267. _next->call(&_next->glSampleCoverageARB)(value, invert);
  21268. if (!_context->err.inBeginEnd) {
  21269. _error = _next->call(&_next->glGetError)();
  21270. if (_error!=GL_NO_ERROR) {
  21271. Error("glSampleCoverageARB : ",Token::GLerrorToString(_error));
  21272. #if REGAL_BREAK
  21273. Break::ErrorCB(_error);
  21274. #endif
  21275. if (_context->err.callback)
  21276. _context->err.callback( _error );
  21277. }
  21278. }
  21279. }
  21280. // GL_ARB_multitexture
  21281. static void REGAL_CALL error_glActiveTextureARB(GLenum texture)
  21282. {
  21283. Internal("error_glActiveTextureARB","()");
  21284. RegalContext *_context = REGAL_GET_CONTEXT();
  21285. RegalAssert(_context);
  21286. DispatchTableGL *_next = _context->dispatcher.error.next();
  21287. RegalAssert(_next);
  21288. GLenum _error = GL_NO_ERROR;
  21289. if (!_context->err.inBeginEnd)
  21290. _error = _next->call(&_next->glGetError)();
  21291. RegalAssert(_error==GL_NO_ERROR);
  21292. _next->call(&_next->glActiveTextureARB)(texture);
  21293. if (!_context->err.inBeginEnd) {
  21294. _error = _next->call(&_next->glGetError)();
  21295. if (_error!=GL_NO_ERROR) {
  21296. Error("glActiveTextureARB : ",Token::GLerrorToString(_error));
  21297. #if REGAL_BREAK
  21298. Break::ErrorCB(_error);
  21299. #endif
  21300. if (_context->err.callback)
  21301. _context->err.callback( _error );
  21302. }
  21303. }
  21304. }
  21305. static void REGAL_CALL error_glClientActiveTextureARB(GLenum texture)
  21306. {
  21307. Internal("error_glClientActiveTextureARB","()");
  21308. RegalContext *_context = REGAL_GET_CONTEXT();
  21309. RegalAssert(_context);
  21310. DispatchTableGL *_next = _context->dispatcher.error.next();
  21311. RegalAssert(_next);
  21312. GLenum _error = GL_NO_ERROR;
  21313. if (!_context->err.inBeginEnd)
  21314. _error = _next->call(&_next->glGetError)();
  21315. RegalAssert(_error==GL_NO_ERROR);
  21316. _next->call(&_next->glClientActiveTextureARB)(texture);
  21317. if (!_context->err.inBeginEnd) {
  21318. _error = _next->call(&_next->glGetError)();
  21319. if (_error!=GL_NO_ERROR) {
  21320. Error("glClientActiveTextureARB : ",Token::GLerrorToString(_error));
  21321. #if REGAL_BREAK
  21322. Break::ErrorCB(_error);
  21323. #endif
  21324. if (_context->err.callback)
  21325. _context->err.callback( _error );
  21326. }
  21327. }
  21328. }
  21329. static void REGAL_CALL error_glMultiTexCoord1dARB(GLenum target, GLdouble s)
  21330. {
  21331. Internal("error_glMultiTexCoord1dARB","()");
  21332. RegalContext *_context = REGAL_GET_CONTEXT();
  21333. RegalAssert(_context);
  21334. DispatchTableGL *_next = _context->dispatcher.error.next();
  21335. RegalAssert(_next);
  21336. GLenum _error = GL_NO_ERROR;
  21337. if (!_context->err.inBeginEnd)
  21338. _error = _next->call(&_next->glGetError)();
  21339. RegalAssert(_error==GL_NO_ERROR);
  21340. _next->call(&_next->glMultiTexCoord1dARB)(target, s);
  21341. if (!_context->err.inBeginEnd) {
  21342. _error = _next->call(&_next->glGetError)();
  21343. if (_error!=GL_NO_ERROR) {
  21344. Error("glMultiTexCoord1dARB : ",Token::GLerrorToString(_error));
  21345. #if REGAL_BREAK
  21346. Break::ErrorCB(_error);
  21347. #endif
  21348. if (_context->err.callback)
  21349. _context->err.callback( _error );
  21350. }
  21351. }
  21352. }
  21353. static void REGAL_CALL error_glMultiTexCoord1dvARB(GLenum target, const GLdouble *v)
  21354. {
  21355. Internal("error_glMultiTexCoord1dvARB","()");
  21356. RegalContext *_context = REGAL_GET_CONTEXT();
  21357. RegalAssert(_context);
  21358. DispatchTableGL *_next = _context->dispatcher.error.next();
  21359. RegalAssert(_next);
  21360. GLenum _error = GL_NO_ERROR;
  21361. if (!_context->err.inBeginEnd)
  21362. _error = _next->call(&_next->glGetError)();
  21363. RegalAssert(_error==GL_NO_ERROR);
  21364. _next->call(&_next->glMultiTexCoord1dvARB)(target, v);
  21365. if (!_context->err.inBeginEnd) {
  21366. _error = _next->call(&_next->glGetError)();
  21367. if (_error!=GL_NO_ERROR) {
  21368. Error("glMultiTexCoord1dvARB : ",Token::GLerrorToString(_error));
  21369. #if REGAL_BREAK
  21370. Break::ErrorCB(_error);
  21371. #endif
  21372. if (_context->err.callback)
  21373. _context->err.callback( _error );
  21374. }
  21375. }
  21376. }
  21377. static void REGAL_CALL error_glMultiTexCoord1fARB(GLenum target, GLfloat s)
  21378. {
  21379. Internal("error_glMultiTexCoord1fARB","()");
  21380. RegalContext *_context = REGAL_GET_CONTEXT();
  21381. RegalAssert(_context);
  21382. DispatchTableGL *_next = _context->dispatcher.error.next();
  21383. RegalAssert(_next);
  21384. GLenum _error = GL_NO_ERROR;
  21385. if (!_context->err.inBeginEnd)
  21386. _error = _next->call(&_next->glGetError)();
  21387. RegalAssert(_error==GL_NO_ERROR);
  21388. _next->call(&_next->glMultiTexCoord1fARB)(target, s);
  21389. if (!_context->err.inBeginEnd) {
  21390. _error = _next->call(&_next->glGetError)();
  21391. if (_error!=GL_NO_ERROR) {
  21392. Error("glMultiTexCoord1fARB : ",Token::GLerrorToString(_error));
  21393. #if REGAL_BREAK
  21394. Break::ErrorCB(_error);
  21395. #endif
  21396. if (_context->err.callback)
  21397. _context->err.callback( _error );
  21398. }
  21399. }
  21400. }
  21401. static void REGAL_CALL error_glMultiTexCoord1fvARB(GLenum target, const GLfloat *v)
  21402. {
  21403. Internal("error_glMultiTexCoord1fvARB","()");
  21404. RegalContext *_context = REGAL_GET_CONTEXT();
  21405. RegalAssert(_context);
  21406. DispatchTableGL *_next = _context->dispatcher.error.next();
  21407. RegalAssert(_next);
  21408. GLenum _error = GL_NO_ERROR;
  21409. if (!_context->err.inBeginEnd)
  21410. _error = _next->call(&_next->glGetError)();
  21411. RegalAssert(_error==GL_NO_ERROR);
  21412. _next->call(&_next->glMultiTexCoord1fvARB)(target, v);
  21413. if (!_context->err.inBeginEnd) {
  21414. _error = _next->call(&_next->glGetError)();
  21415. if (_error!=GL_NO_ERROR) {
  21416. Error("glMultiTexCoord1fvARB : ",Token::GLerrorToString(_error));
  21417. #if REGAL_BREAK
  21418. Break::ErrorCB(_error);
  21419. #endif
  21420. if (_context->err.callback)
  21421. _context->err.callback( _error );
  21422. }
  21423. }
  21424. }
  21425. static void REGAL_CALL error_glMultiTexCoord1iARB(GLenum target, GLint s)
  21426. {
  21427. Internal("error_glMultiTexCoord1iARB","()");
  21428. RegalContext *_context = REGAL_GET_CONTEXT();
  21429. RegalAssert(_context);
  21430. DispatchTableGL *_next = _context->dispatcher.error.next();
  21431. RegalAssert(_next);
  21432. GLenum _error = GL_NO_ERROR;
  21433. if (!_context->err.inBeginEnd)
  21434. _error = _next->call(&_next->glGetError)();
  21435. RegalAssert(_error==GL_NO_ERROR);
  21436. _next->call(&_next->glMultiTexCoord1iARB)(target, s);
  21437. if (!_context->err.inBeginEnd) {
  21438. _error = _next->call(&_next->glGetError)();
  21439. if (_error!=GL_NO_ERROR) {
  21440. Error("glMultiTexCoord1iARB : ",Token::GLerrorToString(_error));
  21441. #if REGAL_BREAK
  21442. Break::ErrorCB(_error);
  21443. #endif
  21444. if (_context->err.callback)
  21445. _context->err.callback( _error );
  21446. }
  21447. }
  21448. }
  21449. static void REGAL_CALL error_glMultiTexCoord1ivARB(GLenum target, const GLint *v)
  21450. {
  21451. Internal("error_glMultiTexCoord1ivARB","()");
  21452. RegalContext *_context = REGAL_GET_CONTEXT();
  21453. RegalAssert(_context);
  21454. DispatchTableGL *_next = _context->dispatcher.error.next();
  21455. RegalAssert(_next);
  21456. GLenum _error = GL_NO_ERROR;
  21457. if (!_context->err.inBeginEnd)
  21458. _error = _next->call(&_next->glGetError)();
  21459. RegalAssert(_error==GL_NO_ERROR);
  21460. _next->call(&_next->glMultiTexCoord1ivARB)(target, v);
  21461. if (!_context->err.inBeginEnd) {
  21462. _error = _next->call(&_next->glGetError)();
  21463. if (_error!=GL_NO_ERROR) {
  21464. Error("glMultiTexCoord1ivARB : ",Token::GLerrorToString(_error));
  21465. #if REGAL_BREAK
  21466. Break::ErrorCB(_error);
  21467. #endif
  21468. if (_context->err.callback)
  21469. _context->err.callback( _error );
  21470. }
  21471. }
  21472. }
  21473. static void REGAL_CALL error_glMultiTexCoord1sARB(GLenum target, GLshort s)
  21474. {
  21475. Internal("error_glMultiTexCoord1sARB","()");
  21476. RegalContext *_context = REGAL_GET_CONTEXT();
  21477. RegalAssert(_context);
  21478. DispatchTableGL *_next = _context->dispatcher.error.next();
  21479. RegalAssert(_next);
  21480. GLenum _error = GL_NO_ERROR;
  21481. if (!_context->err.inBeginEnd)
  21482. _error = _next->call(&_next->glGetError)();
  21483. RegalAssert(_error==GL_NO_ERROR);
  21484. _next->call(&_next->glMultiTexCoord1sARB)(target, s);
  21485. if (!_context->err.inBeginEnd) {
  21486. _error = _next->call(&_next->glGetError)();
  21487. if (_error!=GL_NO_ERROR) {
  21488. Error("glMultiTexCoord1sARB : ",Token::GLerrorToString(_error));
  21489. #if REGAL_BREAK
  21490. Break::ErrorCB(_error);
  21491. #endif
  21492. if (_context->err.callback)
  21493. _context->err.callback( _error );
  21494. }
  21495. }
  21496. }
  21497. static void REGAL_CALL error_glMultiTexCoord1svARB(GLenum target, const GLshort *v)
  21498. {
  21499. Internal("error_glMultiTexCoord1svARB","()");
  21500. RegalContext *_context = REGAL_GET_CONTEXT();
  21501. RegalAssert(_context);
  21502. DispatchTableGL *_next = _context->dispatcher.error.next();
  21503. RegalAssert(_next);
  21504. GLenum _error = GL_NO_ERROR;
  21505. if (!_context->err.inBeginEnd)
  21506. _error = _next->call(&_next->glGetError)();
  21507. RegalAssert(_error==GL_NO_ERROR);
  21508. _next->call(&_next->glMultiTexCoord1svARB)(target, v);
  21509. if (!_context->err.inBeginEnd) {
  21510. _error = _next->call(&_next->glGetError)();
  21511. if (_error!=GL_NO_ERROR) {
  21512. Error("glMultiTexCoord1svARB : ",Token::GLerrorToString(_error));
  21513. #if REGAL_BREAK
  21514. Break::ErrorCB(_error);
  21515. #endif
  21516. if (_context->err.callback)
  21517. _context->err.callback( _error );
  21518. }
  21519. }
  21520. }
  21521. static void REGAL_CALL error_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
  21522. {
  21523. Internal("error_glMultiTexCoord2dARB","()");
  21524. RegalContext *_context = REGAL_GET_CONTEXT();
  21525. RegalAssert(_context);
  21526. DispatchTableGL *_next = _context->dispatcher.error.next();
  21527. RegalAssert(_next);
  21528. GLenum _error = GL_NO_ERROR;
  21529. if (!_context->err.inBeginEnd)
  21530. _error = _next->call(&_next->glGetError)();
  21531. RegalAssert(_error==GL_NO_ERROR);
  21532. _next->call(&_next->glMultiTexCoord2dARB)(target, s, t);
  21533. if (!_context->err.inBeginEnd) {
  21534. _error = _next->call(&_next->glGetError)();
  21535. if (_error!=GL_NO_ERROR) {
  21536. Error("glMultiTexCoord2dARB : ",Token::GLerrorToString(_error));
  21537. #if REGAL_BREAK
  21538. Break::ErrorCB(_error);
  21539. #endif
  21540. if (_context->err.callback)
  21541. _context->err.callback( _error );
  21542. }
  21543. }
  21544. }
  21545. static void REGAL_CALL error_glMultiTexCoord2dvARB(GLenum target, const GLdouble *v)
  21546. {
  21547. Internal("error_glMultiTexCoord2dvARB","()");
  21548. RegalContext *_context = REGAL_GET_CONTEXT();
  21549. RegalAssert(_context);
  21550. DispatchTableGL *_next = _context->dispatcher.error.next();
  21551. RegalAssert(_next);
  21552. GLenum _error = GL_NO_ERROR;
  21553. if (!_context->err.inBeginEnd)
  21554. _error = _next->call(&_next->glGetError)();
  21555. RegalAssert(_error==GL_NO_ERROR);
  21556. _next->call(&_next->glMultiTexCoord2dvARB)(target, v);
  21557. if (!_context->err.inBeginEnd) {
  21558. _error = _next->call(&_next->glGetError)();
  21559. if (_error!=GL_NO_ERROR) {
  21560. Error("glMultiTexCoord2dvARB : ",Token::GLerrorToString(_error));
  21561. #if REGAL_BREAK
  21562. Break::ErrorCB(_error);
  21563. #endif
  21564. if (_context->err.callback)
  21565. _context->err.callback( _error );
  21566. }
  21567. }
  21568. }
  21569. static void REGAL_CALL error_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
  21570. {
  21571. Internal("error_glMultiTexCoord2fARB","()");
  21572. RegalContext *_context = REGAL_GET_CONTEXT();
  21573. RegalAssert(_context);
  21574. DispatchTableGL *_next = _context->dispatcher.error.next();
  21575. RegalAssert(_next);
  21576. GLenum _error = GL_NO_ERROR;
  21577. if (!_context->err.inBeginEnd)
  21578. _error = _next->call(&_next->glGetError)();
  21579. RegalAssert(_error==GL_NO_ERROR);
  21580. _next->call(&_next->glMultiTexCoord2fARB)(target, s, t);
  21581. if (!_context->err.inBeginEnd) {
  21582. _error = _next->call(&_next->glGetError)();
  21583. if (_error!=GL_NO_ERROR) {
  21584. Error("glMultiTexCoord2fARB : ",Token::GLerrorToString(_error));
  21585. #if REGAL_BREAK
  21586. Break::ErrorCB(_error);
  21587. #endif
  21588. if (_context->err.callback)
  21589. _context->err.callback( _error );
  21590. }
  21591. }
  21592. }
  21593. static void REGAL_CALL error_glMultiTexCoord2fvARB(GLenum target, const GLfloat *v)
  21594. {
  21595. Internal("error_glMultiTexCoord2fvARB","()");
  21596. RegalContext *_context = REGAL_GET_CONTEXT();
  21597. RegalAssert(_context);
  21598. DispatchTableGL *_next = _context->dispatcher.error.next();
  21599. RegalAssert(_next);
  21600. GLenum _error = GL_NO_ERROR;
  21601. if (!_context->err.inBeginEnd)
  21602. _error = _next->call(&_next->glGetError)();
  21603. RegalAssert(_error==GL_NO_ERROR);
  21604. _next->call(&_next->glMultiTexCoord2fvARB)(target, v);
  21605. if (!_context->err.inBeginEnd) {
  21606. _error = _next->call(&_next->glGetError)();
  21607. if (_error!=GL_NO_ERROR) {
  21608. Error("glMultiTexCoord2fvARB : ",Token::GLerrorToString(_error));
  21609. #if REGAL_BREAK
  21610. Break::ErrorCB(_error);
  21611. #endif
  21612. if (_context->err.callback)
  21613. _context->err.callback( _error );
  21614. }
  21615. }
  21616. }
  21617. static void REGAL_CALL error_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
  21618. {
  21619. Internal("error_glMultiTexCoord2iARB","()");
  21620. RegalContext *_context = REGAL_GET_CONTEXT();
  21621. RegalAssert(_context);
  21622. DispatchTableGL *_next = _context->dispatcher.error.next();
  21623. RegalAssert(_next);
  21624. GLenum _error = GL_NO_ERROR;
  21625. if (!_context->err.inBeginEnd)
  21626. _error = _next->call(&_next->glGetError)();
  21627. RegalAssert(_error==GL_NO_ERROR);
  21628. _next->call(&_next->glMultiTexCoord2iARB)(target, s, t);
  21629. if (!_context->err.inBeginEnd) {
  21630. _error = _next->call(&_next->glGetError)();
  21631. if (_error!=GL_NO_ERROR) {
  21632. Error("glMultiTexCoord2iARB : ",Token::GLerrorToString(_error));
  21633. #if REGAL_BREAK
  21634. Break::ErrorCB(_error);
  21635. #endif
  21636. if (_context->err.callback)
  21637. _context->err.callback( _error );
  21638. }
  21639. }
  21640. }
  21641. static void REGAL_CALL error_glMultiTexCoord2ivARB(GLenum target, const GLint *v)
  21642. {
  21643. Internal("error_glMultiTexCoord2ivARB","()");
  21644. RegalContext *_context = REGAL_GET_CONTEXT();
  21645. RegalAssert(_context);
  21646. DispatchTableGL *_next = _context->dispatcher.error.next();
  21647. RegalAssert(_next);
  21648. GLenum _error = GL_NO_ERROR;
  21649. if (!_context->err.inBeginEnd)
  21650. _error = _next->call(&_next->glGetError)();
  21651. RegalAssert(_error==GL_NO_ERROR);
  21652. _next->call(&_next->glMultiTexCoord2ivARB)(target, v);
  21653. if (!_context->err.inBeginEnd) {
  21654. _error = _next->call(&_next->glGetError)();
  21655. if (_error!=GL_NO_ERROR) {
  21656. Error("glMultiTexCoord2ivARB : ",Token::GLerrorToString(_error));
  21657. #if REGAL_BREAK
  21658. Break::ErrorCB(_error);
  21659. #endif
  21660. if (_context->err.callback)
  21661. _context->err.callback( _error );
  21662. }
  21663. }
  21664. }
  21665. static void REGAL_CALL error_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
  21666. {
  21667. Internal("error_glMultiTexCoord2sARB","()");
  21668. RegalContext *_context = REGAL_GET_CONTEXT();
  21669. RegalAssert(_context);
  21670. DispatchTableGL *_next = _context->dispatcher.error.next();
  21671. RegalAssert(_next);
  21672. GLenum _error = GL_NO_ERROR;
  21673. if (!_context->err.inBeginEnd)
  21674. _error = _next->call(&_next->glGetError)();
  21675. RegalAssert(_error==GL_NO_ERROR);
  21676. _next->call(&_next->glMultiTexCoord2sARB)(target, s, t);
  21677. if (!_context->err.inBeginEnd) {
  21678. _error = _next->call(&_next->glGetError)();
  21679. if (_error!=GL_NO_ERROR) {
  21680. Error("glMultiTexCoord2sARB : ",Token::GLerrorToString(_error));
  21681. #if REGAL_BREAK
  21682. Break::ErrorCB(_error);
  21683. #endif
  21684. if (_context->err.callback)
  21685. _context->err.callback( _error );
  21686. }
  21687. }
  21688. }
  21689. static void REGAL_CALL error_glMultiTexCoord2svARB(GLenum target, const GLshort *v)
  21690. {
  21691. Internal("error_glMultiTexCoord2svARB","()");
  21692. RegalContext *_context = REGAL_GET_CONTEXT();
  21693. RegalAssert(_context);
  21694. DispatchTableGL *_next = _context->dispatcher.error.next();
  21695. RegalAssert(_next);
  21696. GLenum _error = GL_NO_ERROR;
  21697. if (!_context->err.inBeginEnd)
  21698. _error = _next->call(&_next->glGetError)();
  21699. RegalAssert(_error==GL_NO_ERROR);
  21700. _next->call(&_next->glMultiTexCoord2svARB)(target, v);
  21701. if (!_context->err.inBeginEnd) {
  21702. _error = _next->call(&_next->glGetError)();
  21703. if (_error!=GL_NO_ERROR) {
  21704. Error("glMultiTexCoord2svARB : ",Token::GLerrorToString(_error));
  21705. #if REGAL_BREAK
  21706. Break::ErrorCB(_error);
  21707. #endif
  21708. if (_context->err.callback)
  21709. _context->err.callback( _error );
  21710. }
  21711. }
  21712. }
  21713. static void REGAL_CALL error_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
  21714. {
  21715. Internal("error_glMultiTexCoord3dARB","()");
  21716. RegalContext *_context = REGAL_GET_CONTEXT();
  21717. RegalAssert(_context);
  21718. DispatchTableGL *_next = _context->dispatcher.error.next();
  21719. RegalAssert(_next);
  21720. GLenum _error = GL_NO_ERROR;
  21721. if (!_context->err.inBeginEnd)
  21722. _error = _next->call(&_next->glGetError)();
  21723. RegalAssert(_error==GL_NO_ERROR);
  21724. _next->call(&_next->glMultiTexCoord3dARB)(target, s, t, r);
  21725. if (!_context->err.inBeginEnd) {
  21726. _error = _next->call(&_next->glGetError)();
  21727. if (_error!=GL_NO_ERROR) {
  21728. Error("glMultiTexCoord3dARB : ",Token::GLerrorToString(_error));
  21729. #if REGAL_BREAK
  21730. Break::ErrorCB(_error);
  21731. #endif
  21732. if (_context->err.callback)
  21733. _context->err.callback( _error );
  21734. }
  21735. }
  21736. }
  21737. static void REGAL_CALL error_glMultiTexCoord3dvARB(GLenum target, const GLdouble *v)
  21738. {
  21739. Internal("error_glMultiTexCoord3dvARB","()");
  21740. RegalContext *_context = REGAL_GET_CONTEXT();
  21741. RegalAssert(_context);
  21742. DispatchTableGL *_next = _context->dispatcher.error.next();
  21743. RegalAssert(_next);
  21744. GLenum _error = GL_NO_ERROR;
  21745. if (!_context->err.inBeginEnd)
  21746. _error = _next->call(&_next->glGetError)();
  21747. RegalAssert(_error==GL_NO_ERROR);
  21748. _next->call(&_next->glMultiTexCoord3dvARB)(target, v);
  21749. if (!_context->err.inBeginEnd) {
  21750. _error = _next->call(&_next->glGetError)();
  21751. if (_error!=GL_NO_ERROR) {
  21752. Error("glMultiTexCoord3dvARB : ",Token::GLerrorToString(_error));
  21753. #if REGAL_BREAK
  21754. Break::ErrorCB(_error);
  21755. #endif
  21756. if (_context->err.callback)
  21757. _context->err.callback( _error );
  21758. }
  21759. }
  21760. }
  21761. static void REGAL_CALL error_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
  21762. {
  21763. Internal("error_glMultiTexCoord3fARB","()");
  21764. RegalContext *_context = REGAL_GET_CONTEXT();
  21765. RegalAssert(_context);
  21766. DispatchTableGL *_next = _context->dispatcher.error.next();
  21767. RegalAssert(_next);
  21768. GLenum _error = GL_NO_ERROR;
  21769. if (!_context->err.inBeginEnd)
  21770. _error = _next->call(&_next->glGetError)();
  21771. RegalAssert(_error==GL_NO_ERROR);
  21772. _next->call(&_next->glMultiTexCoord3fARB)(target, s, t, r);
  21773. if (!_context->err.inBeginEnd) {
  21774. _error = _next->call(&_next->glGetError)();
  21775. if (_error!=GL_NO_ERROR) {
  21776. Error("glMultiTexCoord3fARB : ",Token::GLerrorToString(_error));
  21777. #if REGAL_BREAK
  21778. Break::ErrorCB(_error);
  21779. #endif
  21780. if (_context->err.callback)
  21781. _context->err.callback( _error );
  21782. }
  21783. }
  21784. }
  21785. static void REGAL_CALL error_glMultiTexCoord3fvARB(GLenum target, const GLfloat *v)
  21786. {
  21787. Internal("error_glMultiTexCoord3fvARB","()");
  21788. RegalContext *_context = REGAL_GET_CONTEXT();
  21789. RegalAssert(_context);
  21790. DispatchTableGL *_next = _context->dispatcher.error.next();
  21791. RegalAssert(_next);
  21792. GLenum _error = GL_NO_ERROR;
  21793. if (!_context->err.inBeginEnd)
  21794. _error = _next->call(&_next->glGetError)();
  21795. RegalAssert(_error==GL_NO_ERROR);
  21796. _next->call(&_next->glMultiTexCoord3fvARB)(target, v);
  21797. if (!_context->err.inBeginEnd) {
  21798. _error = _next->call(&_next->glGetError)();
  21799. if (_error!=GL_NO_ERROR) {
  21800. Error("glMultiTexCoord3fvARB : ",Token::GLerrorToString(_error));
  21801. #if REGAL_BREAK
  21802. Break::ErrorCB(_error);
  21803. #endif
  21804. if (_context->err.callback)
  21805. _context->err.callback( _error );
  21806. }
  21807. }
  21808. }
  21809. static void REGAL_CALL error_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
  21810. {
  21811. Internal("error_glMultiTexCoord3iARB","()");
  21812. RegalContext *_context = REGAL_GET_CONTEXT();
  21813. RegalAssert(_context);
  21814. DispatchTableGL *_next = _context->dispatcher.error.next();
  21815. RegalAssert(_next);
  21816. GLenum _error = GL_NO_ERROR;
  21817. if (!_context->err.inBeginEnd)
  21818. _error = _next->call(&_next->glGetError)();
  21819. RegalAssert(_error==GL_NO_ERROR);
  21820. _next->call(&_next->glMultiTexCoord3iARB)(target, s, t, r);
  21821. if (!_context->err.inBeginEnd) {
  21822. _error = _next->call(&_next->glGetError)();
  21823. if (_error!=GL_NO_ERROR) {
  21824. Error("glMultiTexCoord3iARB : ",Token::GLerrorToString(_error));
  21825. #if REGAL_BREAK
  21826. Break::ErrorCB(_error);
  21827. #endif
  21828. if (_context->err.callback)
  21829. _context->err.callback( _error );
  21830. }
  21831. }
  21832. }
  21833. static void REGAL_CALL error_glMultiTexCoord3ivARB(GLenum target, const GLint *v)
  21834. {
  21835. Internal("error_glMultiTexCoord3ivARB","()");
  21836. RegalContext *_context = REGAL_GET_CONTEXT();
  21837. RegalAssert(_context);
  21838. DispatchTableGL *_next = _context->dispatcher.error.next();
  21839. RegalAssert(_next);
  21840. GLenum _error = GL_NO_ERROR;
  21841. if (!_context->err.inBeginEnd)
  21842. _error = _next->call(&_next->glGetError)();
  21843. RegalAssert(_error==GL_NO_ERROR);
  21844. _next->call(&_next->glMultiTexCoord3ivARB)(target, v);
  21845. if (!_context->err.inBeginEnd) {
  21846. _error = _next->call(&_next->glGetError)();
  21847. if (_error!=GL_NO_ERROR) {
  21848. Error("glMultiTexCoord3ivARB : ",Token::GLerrorToString(_error));
  21849. #if REGAL_BREAK
  21850. Break::ErrorCB(_error);
  21851. #endif
  21852. if (_context->err.callback)
  21853. _context->err.callback( _error );
  21854. }
  21855. }
  21856. }
  21857. static void REGAL_CALL error_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
  21858. {
  21859. Internal("error_glMultiTexCoord3sARB","()");
  21860. RegalContext *_context = REGAL_GET_CONTEXT();
  21861. RegalAssert(_context);
  21862. DispatchTableGL *_next = _context->dispatcher.error.next();
  21863. RegalAssert(_next);
  21864. GLenum _error = GL_NO_ERROR;
  21865. if (!_context->err.inBeginEnd)
  21866. _error = _next->call(&_next->glGetError)();
  21867. RegalAssert(_error==GL_NO_ERROR);
  21868. _next->call(&_next->glMultiTexCoord3sARB)(target, s, t, r);
  21869. if (!_context->err.inBeginEnd) {
  21870. _error = _next->call(&_next->glGetError)();
  21871. if (_error!=GL_NO_ERROR) {
  21872. Error("glMultiTexCoord3sARB : ",Token::GLerrorToString(_error));
  21873. #if REGAL_BREAK
  21874. Break::ErrorCB(_error);
  21875. #endif
  21876. if (_context->err.callback)
  21877. _context->err.callback( _error );
  21878. }
  21879. }
  21880. }
  21881. static void REGAL_CALL error_glMultiTexCoord3svARB(GLenum target, const GLshort *v)
  21882. {
  21883. Internal("error_glMultiTexCoord3svARB","()");
  21884. RegalContext *_context = REGAL_GET_CONTEXT();
  21885. RegalAssert(_context);
  21886. DispatchTableGL *_next = _context->dispatcher.error.next();
  21887. RegalAssert(_next);
  21888. GLenum _error = GL_NO_ERROR;
  21889. if (!_context->err.inBeginEnd)
  21890. _error = _next->call(&_next->glGetError)();
  21891. RegalAssert(_error==GL_NO_ERROR);
  21892. _next->call(&_next->glMultiTexCoord3svARB)(target, v);
  21893. if (!_context->err.inBeginEnd) {
  21894. _error = _next->call(&_next->glGetError)();
  21895. if (_error!=GL_NO_ERROR) {
  21896. Error("glMultiTexCoord3svARB : ",Token::GLerrorToString(_error));
  21897. #if REGAL_BREAK
  21898. Break::ErrorCB(_error);
  21899. #endif
  21900. if (_context->err.callback)
  21901. _context->err.callback( _error );
  21902. }
  21903. }
  21904. }
  21905. static void REGAL_CALL error_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  21906. {
  21907. Internal("error_glMultiTexCoord4dARB","()");
  21908. RegalContext *_context = REGAL_GET_CONTEXT();
  21909. RegalAssert(_context);
  21910. DispatchTableGL *_next = _context->dispatcher.error.next();
  21911. RegalAssert(_next);
  21912. GLenum _error = GL_NO_ERROR;
  21913. if (!_context->err.inBeginEnd)
  21914. _error = _next->call(&_next->glGetError)();
  21915. RegalAssert(_error==GL_NO_ERROR);
  21916. _next->call(&_next->glMultiTexCoord4dARB)(target, s, t, r, q);
  21917. if (!_context->err.inBeginEnd) {
  21918. _error = _next->call(&_next->glGetError)();
  21919. if (_error!=GL_NO_ERROR) {
  21920. Error("glMultiTexCoord4dARB : ",Token::GLerrorToString(_error));
  21921. #if REGAL_BREAK
  21922. Break::ErrorCB(_error);
  21923. #endif
  21924. if (_context->err.callback)
  21925. _context->err.callback( _error );
  21926. }
  21927. }
  21928. }
  21929. static void REGAL_CALL error_glMultiTexCoord4dvARB(GLenum target, const GLdouble *v)
  21930. {
  21931. Internal("error_glMultiTexCoord4dvARB","()");
  21932. RegalContext *_context = REGAL_GET_CONTEXT();
  21933. RegalAssert(_context);
  21934. DispatchTableGL *_next = _context->dispatcher.error.next();
  21935. RegalAssert(_next);
  21936. GLenum _error = GL_NO_ERROR;
  21937. if (!_context->err.inBeginEnd)
  21938. _error = _next->call(&_next->glGetError)();
  21939. RegalAssert(_error==GL_NO_ERROR);
  21940. _next->call(&_next->glMultiTexCoord4dvARB)(target, v);
  21941. if (!_context->err.inBeginEnd) {
  21942. _error = _next->call(&_next->glGetError)();
  21943. if (_error!=GL_NO_ERROR) {
  21944. Error("glMultiTexCoord4dvARB : ",Token::GLerrorToString(_error));
  21945. #if REGAL_BREAK
  21946. Break::ErrorCB(_error);
  21947. #endif
  21948. if (_context->err.callback)
  21949. _context->err.callback( _error );
  21950. }
  21951. }
  21952. }
  21953. static void REGAL_CALL error_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  21954. {
  21955. Internal("error_glMultiTexCoord4fARB","()");
  21956. RegalContext *_context = REGAL_GET_CONTEXT();
  21957. RegalAssert(_context);
  21958. DispatchTableGL *_next = _context->dispatcher.error.next();
  21959. RegalAssert(_next);
  21960. GLenum _error = GL_NO_ERROR;
  21961. if (!_context->err.inBeginEnd)
  21962. _error = _next->call(&_next->glGetError)();
  21963. RegalAssert(_error==GL_NO_ERROR);
  21964. _next->call(&_next->glMultiTexCoord4fARB)(target, s, t, r, q);
  21965. if (!_context->err.inBeginEnd) {
  21966. _error = _next->call(&_next->glGetError)();
  21967. if (_error!=GL_NO_ERROR) {
  21968. Error("glMultiTexCoord4fARB : ",Token::GLerrorToString(_error));
  21969. #if REGAL_BREAK
  21970. Break::ErrorCB(_error);
  21971. #endif
  21972. if (_context->err.callback)
  21973. _context->err.callback( _error );
  21974. }
  21975. }
  21976. }
  21977. static void REGAL_CALL error_glMultiTexCoord4fvARB(GLenum target, const GLfloat *v)
  21978. {
  21979. Internal("error_glMultiTexCoord4fvARB","()");
  21980. RegalContext *_context = REGAL_GET_CONTEXT();
  21981. RegalAssert(_context);
  21982. DispatchTableGL *_next = _context->dispatcher.error.next();
  21983. RegalAssert(_next);
  21984. GLenum _error = GL_NO_ERROR;
  21985. if (!_context->err.inBeginEnd)
  21986. _error = _next->call(&_next->glGetError)();
  21987. RegalAssert(_error==GL_NO_ERROR);
  21988. _next->call(&_next->glMultiTexCoord4fvARB)(target, v);
  21989. if (!_context->err.inBeginEnd) {
  21990. _error = _next->call(&_next->glGetError)();
  21991. if (_error!=GL_NO_ERROR) {
  21992. Error("glMultiTexCoord4fvARB : ",Token::GLerrorToString(_error));
  21993. #if REGAL_BREAK
  21994. Break::ErrorCB(_error);
  21995. #endif
  21996. if (_context->err.callback)
  21997. _context->err.callback( _error );
  21998. }
  21999. }
  22000. }
  22001. static void REGAL_CALL error_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
  22002. {
  22003. Internal("error_glMultiTexCoord4iARB","()");
  22004. RegalContext *_context = REGAL_GET_CONTEXT();
  22005. RegalAssert(_context);
  22006. DispatchTableGL *_next = _context->dispatcher.error.next();
  22007. RegalAssert(_next);
  22008. GLenum _error = GL_NO_ERROR;
  22009. if (!_context->err.inBeginEnd)
  22010. _error = _next->call(&_next->glGetError)();
  22011. RegalAssert(_error==GL_NO_ERROR);
  22012. _next->call(&_next->glMultiTexCoord4iARB)(target, s, t, r, q);
  22013. if (!_context->err.inBeginEnd) {
  22014. _error = _next->call(&_next->glGetError)();
  22015. if (_error!=GL_NO_ERROR) {
  22016. Error("glMultiTexCoord4iARB : ",Token::GLerrorToString(_error));
  22017. #if REGAL_BREAK
  22018. Break::ErrorCB(_error);
  22019. #endif
  22020. if (_context->err.callback)
  22021. _context->err.callback( _error );
  22022. }
  22023. }
  22024. }
  22025. static void REGAL_CALL error_glMultiTexCoord4ivARB(GLenum target, const GLint *v)
  22026. {
  22027. Internal("error_glMultiTexCoord4ivARB","()");
  22028. RegalContext *_context = REGAL_GET_CONTEXT();
  22029. RegalAssert(_context);
  22030. DispatchTableGL *_next = _context->dispatcher.error.next();
  22031. RegalAssert(_next);
  22032. GLenum _error = GL_NO_ERROR;
  22033. if (!_context->err.inBeginEnd)
  22034. _error = _next->call(&_next->glGetError)();
  22035. RegalAssert(_error==GL_NO_ERROR);
  22036. _next->call(&_next->glMultiTexCoord4ivARB)(target, v);
  22037. if (!_context->err.inBeginEnd) {
  22038. _error = _next->call(&_next->glGetError)();
  22039. if (_error!=GL_NO_ERROR) {
  22040. Error("glMultiTexCoord4ivARB : ",Token::GLerrorToString(_error));
  22041. #if REGAL_BREAK
  22042. Break::ErrorCB(_error);
  22043. #endif
  22044. if (_context->err.callback)
  22045. _context->err.callback( _error );
  22046. }
  22047. }
  22048. }
  22049. static void REGAL_CALL error_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
  22050. {
  22051. Internal("error_glMultiTexCoord4sARB","()");
  22052. RegalContext *_context = REGAL_GET_CONTEXT();
  22053. RegalAssert(_context);
  22054. DispatchTableGL *_next = _context->dispatcher.error.next();
  22055. RegalAssert(_next);
  22056. GLenum _error = GL_NO_ERROR;
  22057. if (!_context->err.inBeginEnd)
  22058. _error = _next->call(&_next->glGetError)();
  22059. RegalAssert(_error==GL_NO_ERROR);
  22060. _next->call(&_next->glMultiTexCoord4sARB)(target, s, t, r, q);
  22061. if (!_context->err.inBeginEnd) {
  22062. _error = _next->call(&_next->glGetError)();
  22063. if (_error!=GL_NO_ERROR) {
  22064. Error("glMultiTexCoord4sARB : ",Token::GLerrorToString(_error));
  22065. #if REGAL_BREAK
  22066. Break::ErrorCB(_error);
  22067. #endif
  22068. if (_context->err.callback)
  22069. _context->err.callback( _error );
  22070. }
  22071. }
  22072. }
  22073. static void REGAL_CALL error_glMultiTexCoord4svARB(GLenum target, const GLshort *v)
  22074. {
  22075. Internal("error_glMultiTexCoord4svARB","()");
  22076. RegalContext *_context = REGAL_GET_CONTEXT();
  22077. RegalAssert(_context);
  22078. DispatchTableGL *_next = _context->dispatcher.error.next();
  22079. RegalAssert(_next);
  22080. GLenum _error = GL_NO_ERROR;
  22081. if (!_context->err.inBeginEnd)
  22082. _error = _next->call(&_next->glGetError)();
  22083. RegalAssert(_error==GL_NO_ERROR);
  22084. _next->call(&_next->glMultiTexCoord4svARB)(target, v);
  22085. if (!_context->err.inBeginEnd) {
  22086. _error = _next->call(&_next->glGetError)();
  22087. if (_error!=GL_NO_ERROR) {
  22088. Error("glMultiTexCoord4svARB : ",Token::GLerrorToString(_error));
  22089. #if REGAL_BREAK
  22090. Break::ErrorCB(_error);
  22091. #endif
  22092. if (_context->err.callback)
  22093. _context->err.callback( _error );
  22094. }
  22095. }
  22096. }
  22097. // GL_ARB_occlusion_query
  22098. static void REGAL_CALL error_glBeginQueryARB(GLenum target, GLuint id)
  22099. {
  22100. Internal("error_glBeginQueryARB","()");
  22101. RegalContext *_context = REGAL_GET_CONTEXT();
  22102. RegalAssert(_context);
  22103. DispatchTableGL *_next = _context->dispatcher.error.next();
  22104. RegalAssert(_next);
  22105. GLenum _error = GL_NO_ERROR;
  22106. if (!_context->err.inBeginEnd)
  22107. _error = _next->call(&_next->glGetError)();
  22108. RegalAssert(_error==GL_NO_ERROR);
  22109. _next->call(&_next->glBeginQueryARB)(target, id);
  22110. if (!_context->err.inBeginEnd) {
  22111. _error = _next->call(&_next->glGetError)();
  22112. if (_error!=GL_NO_ERROR) {
  22113. Error("glBeginQueryARB : ",Token::GLerrorToString(_error));
  22114. #if REGAL_BREAK
  22115. Break::ErrorCB(_error);
  22116. #endif
  22117. if (_context->err.callback)
  22118. _context->err.callback( _error );
  22119. }
  22120. }
  22121. }
  22122. static void REGAL_CALL error_glDeleteQueriesARB(GLsizei n, const GLuint *ids)
  22123. {
  22124. Internal("error_glDeleteQueriesARB","()");
  22125. RegalContext *_context = REGAL_GET_CONTEXT();
  22126. RegalAssert(_context);
  22127. DispatchTableGL *_next = _context->dispatcher.error.next();
  22128. RegalAssert(_next);
  22129. GLenum _error = GL_NO_ERROR;
  22130. if (!_context->err.inBeginEnd)
  22131. _error = _next->call(&_next->glGetError)();
  22132. RegalAssert(_error==GL_NO_ERROR);
  22133. _next->call(&_next->glDeleteQueriesARB)(n, ids);
  22134. if (!_context->err.inBeginEnd) {
  22135. _error = _next->call(&_next->glGetError)();
  22136. if (_error!=GL_NO_ERROR) {
  22137. Error("glDeleteQueriesARB : ",Token::GLerrorToString(_error));
  22138. #if REGAL_BREAK
  22139. Break::ErrorCB(_error);
  22140. #endif
  22141. if (_context->err.callback)
  22142. _context->err.callback( _error );
  22143. }
  22144. }
  22145. }
  22146. static void REGAL_CALL error_glEndQueryARB(GLenum target)
  22147. {
  22148. Internal("error_glEndQueryARB","()");
  22149. RegalContext *_context = REGAL_GET_CONTEXT();
  22150. RegalAssert(_context);
  22151. DispatchTableGL *_next = _context->dispatcher.error.next();
  22152. RegalAssert(_next);
  22153. GLenum _error = GL_NO_ERROR;
  22154. if (!_context->err.inBeginEnd)
  22155. _error = _next->call(&_next->glGetError)();
  22156. RegalAssert(_error==GL_NO_ERROR);
  22157. _next->call(&_next->glEndQueryARB)(target);
  22158. if (!_context->err.inBeginEnd) {
  22159. _error = _next->call(&_next->glGetError)();
  22160. if (_error!=GL_NO_ERROR) {
  22161. Error("glEndQueryARB : ",Token::GLerrorToString(_error));
  22162. #if REGAL_BREAK
  22163. Break::ErrorCB(_error);
  22164. #endif
  22165. if (_context->err.callback)
  22166. _context->err.callback( _error );
  22167. }
  22168. }
  22169. }
  22170. static void REGAL_CALL error_glGenQueriesARB(GLsizei n, GLuint *ids)
  22171. {
  22172. Internal("error_glGenQueriesARB","()");
  22173. RegalContext *_context = REGAL_GET_CONTEXT();
  22174. RegalAssert(_context);
  22175. DispatchTableGL *_next = _context->dispatcher.error.next();
  22176. RegalAssert(_next);
  22177. GLenum _error = GL_NO_ERROR;
  22178. if (!_context->err.inBeginEnd)
  22179. _error = _next->call(&_next->glGetError)();
  22180. RegalAssert(_error==GL_NO_ERROR);
  22181. _next->call(&_next->glGenQueriesARB)(n, ids);
  22182. if (!_context->err.inBeginEnd) {
  22183. _error = _next->call(&_next->glGetError)();
  22184. if (_error!=GL_NO_ERROR) {
  22185. Error("glGenQueriesARB : ",Token::GLerrorToString(_error));
  22186. #if REGAL_BREAK
  22187. Break::ErrorCB(_error);
  22188. #endif
  22189. if (_context->err.callback)
  22190. _context->err.callback( _error );
  22191. }
  22192. }
  22193. }
  22194. static void REGAL_CALL error_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint *params)
  22195. {
  22196. Internal("error_glGetQueryObjectivARB","()");
  22197. RegalContext *_context = REGAL_GET_CONTEXT();
  22198. RegalAssert(_context);
  22199. DispatchTableGL *_next = _context->dispatcher.error.next();
  22200. RegalAssert(_next);
  22201. GLenum _error = GL_NO_ERROR;
  22202. if (!_context->err.inBeginEnd)
  22203. _error = _next->call(&_next->glGetError)();
  22204. RegalAssert(_error==GL_NO_ERROR);
  22205. _next->call(&_next->glGetQueryObjectivARB)(id, pname, params);
  22206. if (!_context->err.inBeginEnd) {
  22207. _error = _next->call(&_next->glGetError)();
  22208. if (_error!=GL_NO_ERROR) {
  22209. Error("glGetQueryObjectivARB : ",Token::GLerrorToString(_error));
  22210. #if REGAL_BREAK
  22211. Break::ErrorCB(_error);
  22212. #endif
  22213. if (_context->err.callback)
  22214. _context->err.callback( _error );
  22215. }
  22216. }
  22217. }
  22218. static void REGAL_CALL error_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params)
  22219. {
  22220. Internal("error_glGetQueryObjectuivARB","()");
  22221. RegalContext *_context = REGAL_GET_CONTEXT();
  22222. RegalAssert(_context);
  22223. DispatchTableGL *_next = _context->dispatcher.error.next();
  22224. RegalAssert(_next);
  22225. GLenum _error = GL_NO_ERROR;
  22226. if (!_context->err.inBeginEnd)
  22227. _error = _next->call(&_next->glGetError)();
  22228. RegalAssert(_error==GL_NO_ERROR);
  22229. _next->call(&_next->glGetQueryObjectuivARB)(id, pname, params);
  22230. if (!_context->err.inBeginEnd) {
  22231. _error = _next->call(&_next->glGetError)();
  22232. if (_error!=GL_NO_ERROR) {
  22233. Error("glGetQueryObjectuivARB : ",Token::GLerrorToString(_error));
  22234. #if REGAL_BREAK
  22235. Break::ErrorCB(_error);
  22236. #endif
  22237. if (_context->err.callback)
  22238. _context->err.callback( _error );
  22239. }
  22240. }
  22241. }
  22242. static void REGAL_CALL error_glGetQueryivARB(GLenum target, GLenum pname, GLint *params)
  22243. {
  22244. Internal("error_glGetQueryivARB","()");
  22245. RegalContext *_context = REGAL_GET_CONTEXT();
  22246. RegalAssert(_context);
  22247. DispatchTableGL *_next = _context->dispatcher.error.next();
  22248. RegalAssert(_next);
  22249. GLenum _error = GL_NO_ERROR;
  22250. if (!_context->err.inBeginEnd)
  22251. _error = _next->call(&_next->glGetError)();
  22252. RegalAssert(_error==GL_NO_ERROR);
  22253. _next->call(&_next->glGetQueryivARB)(target, pname, params);
  22254. if (!_context->err.inBeginEnd) {
  22255. _error = _next->call(&_next->glGetError)();
  22256. if (_error!=GL_NO_ERROR) {
  22257. Error("glGetQueryivARB : ",Token::GLerrorToString(_error));
  22258. #if REGAL_BREAK
  22259. Break::ErrorCB(_error);
  22260. #endif
  22261. if (_context->err.callback)
  22262. _context->err.callback( _error );
  22263. }
  22264. }
  22265. }
  22266. static GLboolean REGAL_CALL error_glIsQueryARB(GLuint id)
  22267. {
  22268. Internal("error_glIsQueryARB","()");
  22269. RegalContext *_context = REGAL_GET_CONTEXT();
  22270. RegalAssert(_context);
  22271. DispatchTableGL *_next = _context->dispatcher.error.next();
  22272. RegalAssert(_next);
  22273. GLenum _error = GL_NO_ERROR;
  22274. if (!_context->err.inBeginEnd)
  22275. _error = _next->call(&_next->glGetError)();
  22276. RegalAssert(_error==GL_NO_ERROR);
  22277. GLboolean ret = _next->call(&_next->glIsQueryARB)(id);
  22278. if (!_context->err.inBeginEnd) {
  22279. _error = _next->call(&_next->glGetError)();
  22280. if (_error!=GL_NO_ERROR) {
  22281. Error("glIsQueryARB : ",Token::GLerrorToString(_error));
  22282. #if REGAL_BREAK
  22283. Break::ErrorCB(_error);
  22284. #endif
  22285. if (_context->err.callback)
  22286. _context->err.callback( _error );
  22287. }
  22288. }
  22289. return ret;
  22290. }
  22291. // GL_ARB_point_parameters
  22292. static void REGAL_CALL error_glPointParameterfARB(GLenum pname, GLfloat param)
  22293. {
  22294. Internal("error_glPointParameterfARB","()");
  22295. RegalContext *_context = REGAL_GET_CONTEXT();
  22296. RegalAssert(_context);
  22297. DispatchTableGL *_next = _context->dispatcher.error.next();
  22298. RegalAssert(_next);
  22299. GLenum _error = GL_NO_ERROR;
  22300. if (!_context->err.inBeginEnd)
  22301. _error = _next->call(&_next->glGetError)();
  22302. RegalAssert(_error==GL_NO_ERROR);
  22303. _next->call(&_next->glPointParameterfARB)(pname, param);
  22304. if (!_context->err.inBeginEnd) {
  22305. _error = _next->call(&_next->glGetError)();
  22306. if (_error!=GL_NO_ERROR) {
  22307. Error("glPointParameterfARB : ",Token::GLerrorToString(_error));
  22308. #if REGAL_BREAK
  22309. Break::ErrorCB(_error);
  22310. #endif
  22311. if (_context->err.callback)
  22312. _context->err.callback( _error );
  22313. }
  22314. }
  22315. }
  22316. static void REGAL_CALL error_glPointParameterfvARB(GLenum pname, const GLfloat *params)
  22317. {
  22318. Internal("error_glPointParameterfvARB","()");
  22319. RegalContext *_context = REGAL_GET_CONTEXT();
  22320. RegalAssert(_context);
  22321. DispatchTableGL *_next = _context->dispatcher.error.next();
  22322. RegalAssert(_next);
  22323. GLenum _error = GL_NO_ERROR;
  22324. if (!_context->err.inBeginEnd)
  22325. _error = _next->call(&_next->glGetError)();
  22326. RegalAssert(_error==GL_NO_ERROR);
  22327. _next->call(&_next->glPointParameterfvARB)(pname, params);
  22328. if (!_context->err.inBeginEnd) {
  22329. _error = _next->call(&_next->glGetError)();
  22330. if (_error!=GL_NO_ERROR) {
  22331. Error("glPointParameterfvARB : ",Token::GLerrorToString(_error));
  22332. #if REGAL_BREAK
  22333. Break::ErrorCB(_error);
  22334. #endif
  22335. if (_context->err.callback)
  22336. _context->err.callback( _error );
  22337. }
  22338. }
  22339. }
  22340. // GL_ARB_program_interface_query
  22341. static void REGAL_CALL error_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params)
  22342. {
  22343. Internal("error_glGetProgramInterfaceiv","()");
  22344. RegalContext *_context = REGAL_GET_CONTEXT();
  22345. RegalAssert(_context);
  22346. DispatchTableGL *_next = _context->dispatcher.error.next();
  22347. RegalAssert(_next);
  22348. GLenum _error = GL_NO_ERROR;
  22349. if (!_context->err.inBeginEnd)
  22350. _error = _next->call(&_next->glGetError)();
  22351. RegalAssert(_error==GL_NO_ERROR);
  22352. _next->call(&_next->glGetProgramInterfaceiv)(program, programInterface, pname, params);
  22353. if (!_context->err.inBeginEnd) {
  22354. _error = _next->call(&_next->glGetError)();
  22355. if (_error!=GL_NO_ERROR) {
  22356. Error("glGetProgramInterfaceiv : ",Token::GLerrorToString(_error));
  22357. #if REGAL_BREAK
  22358. Break::ErrorCB(_error);
  22359. #endif
  22360. if (_context->err.callback)
  22361. _context->err.callback( _error );
  22362. }
  22363. }
  22364. }
  22365. static GLuint REGAL_CALL error_glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name)
  22366. {
  22367. Internal("error_glGetProgramResourceIndex","()");
  22368. RegalContext *_context = REGAL_GET_CONTEXT();
  22369. RegalAssert(_context);
  22370. DispatchTableGL *_next = _context->dispatcher.error.next();
  22371. RegalAssert(_next);
  22372. GLenum _error = GL_NO_ERROR;
  22373. if (!_context->err.inBeginEnd)
  22374. _error = _next->call(&_next->glGetError)();
  22375. RegalAssert(_error==GL_NO_ERROR);
  22376. GLuint ret = _next->call(&_next->glGetProgramResourceIndex)(program, programInterface, name);
  22377. if (!_context->err.inBeginEnd) {
  22378. _error = _next->call(&_next->glGetError)();
  22379. if (_error!=GL_NO_ERROR) {
  22380. Error("glGetProgramResourceIndex : ",Token::GLerrorToString(_error));
  22381. #if REGAL_BREAK
  22382. Break::ErrorCB(_error);
  22383. #endif
  22384. if (_context->err.callback)
  22385. _context->err.callback( _error );
  22386. }
  22387. }
  22388. return ret;
  22389. }
  22390. static GLint REGAL_CALL error_glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name)
  22391. {
  22392. Internal("error_glGetProgramResourceLocation","()");
  22393. RegalContext *_context = REGAL_GET_CONTEXT();
  22394. RegalAssert(_context);
  22395. DispatchTableGL *_next = _context->dispatcher.error.next();
  22396. RegalAssert(_next);
  22397. GLenum _error = GL_NO_ERROR;
  22398. if (!_context->err.inBeginEnd)
  22399. _error = _next->call(&_next->glGetError)();
  22400. RegalAssert(_error==GL_NO_ERROR);
  22401. GLint ret = _next->call(&_next->glGetProgramResourceLocation)(program, programInterface, name);
  22402. if (!_context->err.inBeginEnd) {
  22403. _error = _next->call(&_next->glGetError)();
  22404. if (_error!=GL_NO_ERROR) {
  22405. Error("glGetProgramResourceLocation : ",Token::GLerrorToString(_error));
  22406. #if REGAL_BREAK
  22407. Break::ErrorCB(_error);
  22408. #endif
  22409. if (_context->err.callback)
  22410. _context->err.callback( _error );
  22411. }
  22412. }
  22413. return ret;
  22414. }
  22415. static GLint REGAL_CALL error_glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name)
  22416. {
  22417. Internal("error_glGetProgramResourceLocationIndex","()");
  22418. RegalContext *_context = REGAL_GET_CONTEXT();
  22419. RegalAssert(_context);
  22420. DispatchTableGL *_next = _context->dispatcher.error.next();
  22421. RegalAssert(_next);
  22422. GLenum _error = GL_NO_ERROR;
  22423. if (!_context->err.inBeginEnd)
  22424. _error = _next->call(&_next->glGetError)();
  22425. RegalAssert(_error==GL_NO_ERROR);
  22426. GLint ret = _next->call(&_next->glGetProgramResourceLocationIndex)(program, programInterface, name);
  22427. if (!_context->err.inBeginEnd) {
  22428. _error = _next->call(&_next->glGetError)();
  22429. if (_error!=GL_NO_ERROR) {
  22430. Error("glGetProgramResourceLocationIndex : ",Token::GLerrorToString(_error));
  22431. #if REGAL_BREAK
  22432. Break::ErrorCB(_error);
  22433. #endif
  22434. if (_context->err.callback)
  22435. _context->err.callback( _error );
  22436. }
  22437. }
  22438. return ret;
  22439. }
  22440. static void REGAL_CALL error_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)
  22441. {
  22442. Internal("error_glGetProgramResourceName","()");
  22443. RegalContext *_context = REGAL_GET_CONTEXT();
  22444. RegalAssert(_context);
  22445. DispatchTableGL *_next = _context->dispatcher.error.next();
  22446. RegalAssert(_next);
  22447. GLenum _error = GL_NO_ERROR;
  22448. if (!_context->err.inBeginEnd)
  22449. _error = _next->call(&_next->glGetError)();
  22450. RegalAssert(_error==GL_NO_ERROR);
  22451. _next->call(&_next->glGetProgramResourceName)(program, programInterface, index, bufSize, length, name);
  22452. if (!_context->err.inBeginEnd) {
  22453. _error = _next->call(&_next->glGetError)();
  22454. if (_error!=GL_NO_ERROR) {
  22455. Error("glGetProgramResourceName : ",Token::GLerrorToString(_error));
  22456. #if REGAL_BREAK
  22457. Break::ErrorCB(_error);
  22458. #endif
  22459. if (_context->err.callback)
  22460. _context->err.callback( _error );
  22461. }
  22462. }
  22463. }
  22464. static void REGAL_CALL error_glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)
  22465. {
  22466. Internal("error_glGetProgramResourceiv","()");
  22467. RegalContext *_context = REGAL_GET_CONTEXT();
  22468. RegalAssert(_context);
  22469. DispatchTableGL *_next = _context->dispatcher.error.next();
  22470. RegalAssert(_next);
  22471. GLenum _error = GL_NO_ERROR;
  22472. if (!_context->err.inBeginEnd)
  22473. _error = _next->call(&_next->glGetError)();
  22474. RegalAssert(_error==GL_NO_ERROR);
  22475. _next->call(&_next->glGetProgramResourceiv)(program, programInterface, index, propCount, props, bufSize, length, params);
  22476. if (!_context->err.inBeginEnd) {
  22477. _error = _next->call(&_next->glGetError)();
  22478. if (_error!=GL_NO_ERROR) {
  22479. Error("glGetProgramResourceiv : ",Token::GLerrorToString(_error));
  22480. #if REGAL_BREAK
  22481. Break::ErrorCB(_error);
  22482. #endif
  22483. if (_context->err.callback)
  22484. _context->err.callback( _error );
  22485. }
  22486. }
  22487. }
  22488. // GL_ARB_provoking_vertex
  22489. static void REGAL_CALL error_glProvokingVertex(GLenum mode)
  22490. {
  22491. Internal("error_glProvokingVertex","()");
  22492. RegalContext *_context = REGAL_GET_CONTEXT();
  22493. RegalAssert(_context);
  22494. DispatchTableGL *_next = _context->dispatcher.error.next();
  22495. RegalAssert(_next);
  22496. GLenum _error = GL_NO_ERROR;
  22497. if (!_context->err.inBeginEnd)
  22498. _error = _next->call(&_next->glGetError)();
  22499. RegalAssert(_error==GL_NO_ERROR);
  22500. _next->call(&_next->glProvokingVertex)(mode);
  22501. if (!_context->err.inBeginEnd) {
  22502. _error = _next->call(&_next->glGetError)();
  22503. if (_error!=GL_NO_ERROR) {
  22504. Error("glProvokingVertex : ",Token::GLerrorToString(_error));
  22505. #if REGAL_BREAK
  22506. Break::ErrorCB(_error);
  22507. #endif
  22508. if (_context->err.callback)
  22509. _context->err.callback( _error );
  22510. }
  22511. }
  22512. }
  22513. // GL_ARB_robustness
  22514. static GLenum REGAL_CALL error_glGetGraphicsResetStatusARB(void)
  22515. {
  22516. Internal("error_glGetGraphicsResetStatusARB","()");
  22517. RegalContext *_context = REGAL_GET_CONTEXT();
  22518. RegalAssert(_context);
  22519. DispatchTableGL *_next = _context->dispatcher.error.next();
  22520. RegalAssert(_next);
  22521. GLenum _error = GL_NO_ERROR;
  22522. if (!_context->err.inBeginEnd)
  22523. _error = _next->call(&_next->glGetError)();
  22524. RegalAssert(_error==GL_NO_ERROR);
  22525. GLenum ret = _next->call(&_next->glGetGraphicsResetStatusARB)();
  22526. if (!_context->err.inBeginEnd) {
  22527. _error = _next->call(&_next->glGetError)();
  22528. if (_error!=GL_NO_ERROR) {
  22529. Error("glGetGraphicsResetStatusARB : ",Token::GLerrorToString(_error));
  22530. #if REGAL_BREAK
  22531. Break::ErrorCB(_error);
  22532. #endif
  22533. if (_context->err.callback)
  22534. _context->err.callback( _error );
  22535. }
  22536. }
  22537. return ret;
  22538. }
  22539. static void REGAL_CALL error_glGetnColorTableARB(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table)
  22540. {
  22541. Internal("error_glGetnColorTableARB","()");
  22542. RegalContext *_context = REGAL_GET_CONTEXT();
  22543. RegalAssert(_context);
  22544. DispatchTableGL *_next = _context->dispatcher.error.next();
  22545. RegalAssert(_next);
  22546. GLenum _error = GL_NO_ERROR;
  22547. if (!_context->err.inBeginEnd)
  22548. _error = _next->call(&_next->glGetError)();
  22549. RegalAssert(_error==GL_NO_ERROR);
  22550. _next->call(&_next->glGetnColorTableARB)(target, format, type, bufSize, table);
  22551. if (!_context->err.inBeginEnd) {
  22552. _error = _next->call(&_next->glGetError)();
  22553. if (_error!=GL_NO_ERROR) {
  22554. Error("glGetnColorTableARB : ",Token::GLerrorToString(_error));
  22555. #if REGAL_BREAK
  22556. Break::ErrorCB(_error);
  22557. #endif
  22558. if (_context->err.callback)
  22559. _context->err.callback( _error );
  22560. }
  22561. }
  22562. }
  22563. static void REGAL_CALL error_glGetnCompressedTexImageARB(GLenum target, GLint lod, GLsizei bufSize, GLvoid *img)
  22564. {
  22565. Internal("error_glGetnCompressedTexImageARB","()");
  22566. RegalContext *_context = REGAL_GET_CONTEXT();
  22567. RegalAssert(_context);
  22568. DispatchTableGL *_next = _context->dispatcher.error.next();
  22569. RegalAssert(_next);
  22570. GLenum _error = GL_NO_ERROR;
  22571. if (!_context->err.inBeginEnd)
  22572. _error = _next->call(&_next->glGetError)();
  22573. RegalAssert(_error==GL_NO_ERROR);
  22574. _next->call(&_next->glGetnCompressedTexImageARB)(target, lod, bufSize, img);
  22575. if (!_context->err.inBeginEnd) {
  22576. _error = _next->call(&_next->glGetError)();
  22577. if (_error!=GL_NO_ERROR) {
  22578. Error("glGetnCompressedTexImageARB : ",Token::GLerrorToString(_error));
  22579. #if REGAL_BREAK
  22580. Break::ErrorCB(_error);
  22581. #endif
  22582. if (_context->err.callback)
  22583. _context->err.callback( _error );
  22584. }
  22585. }
  22586. }
  22587. static void REGAL_CALL error_glGetnConvolutionFilterARB(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image)
  22588. {
  22589. Internal("error_glGetnConvolutionFilterARB","()");
  22590. RegalContext *_context = REGAL_GET_CONTEXT();
  22591. RegalAssert(_context);
  22592. DispatchTableGL *_next = _context->dispatcher.error.next();
  22593. RegalAssert(_next);
  22594. GLenum _error = GL_NO_ERROR;
  22595. if (!_context->err.inBeginEnd)
  22596. _error = _next->call(&_next->glGetError)();
  22597. RegalAssert(_error==GL_NO_ERROR);
  22598. _next->call(&_next->glGetnConvolutionFilterARB)(target, format, type, bufSize, image);
  22599. if (!_context->err.inBeginEnd) {
  22600. _error = _next->call(&_next->glGetError)();
  22601. if (_error!=GL_NO_ERROR) {
  22602. Error("glGetnConvolutionFilterARB : ",Token::GLerrorToString(_error));
  22603. #if REGAL_BREAK
  22604. Break::ErrorCB(_error);
  22605. #endif
  22606. if (_context->err.callback)
  22607. _context->err.callback( _error );
  22608. }
  22609. }
  22610. }
  22611. static void REGAL_CALL error_glGetnHistogramARB(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values)
  22612. {
  22613. Internal("error_glGetnHistogramARB","()");
  22614. RegalContext *_context = REGAL_GET_CONTEXT();
  22615. RegalAssert(_context);
  22616. DispatchTableGL *_next = _context->dispatcher.error.next();
  22617. RegalAssert(_next);
  22618. GLenum _error = GL_NO_ERROR;
  22619. if (!_context->err.inBeginEnd)
  22620. _error = _next->call(&_next->glGetError)();
  22621. RegalAssert(_error==GL_NO_ERROR);
  22622. _next->call(&_next->glGetnHistogramARB)(target, reset, format, type, bufSize, values);
  22623. if (!_context->err.inBeginEnd) {
  22624. _error = _next->call(&_next->glGetError)();
  22625. if (_error!=GL_NO_ERROR) {
  22626. Error("glGetnHistogramARB : ",Token::GLerrorToString(_error));
  22627. #if REGAL_BREAK
  22628. Break::ErrorCB(_error);
  22629. #endif
  22630. if (_context->err.callback)
  22631. _context->err.callback( _error );
  22632. }
  22633. }
  22634. }
  22635. static void REGAL_CALL error_glGetnMapdvARB(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v)
  22636. {
  22637. Internal("error_glGetnMapdvARB","()");
  22638. RegalContext *_context = REGAL_GET_CONTEXT();
  22639. RegalAssert(_context);
  22640. DispatchTableGL *_next = _context->dispatcher.error.next();
  22641. RegalAssert(_next);
  22642. GLenum _error = GL_NO_ERROR;
  22643. if (!_context->err.inBeginEnd)
  22644. _error = _next->call(&_next->glGetError)();
  22645. RegalAssert(_error==GL_NO_ERROR);
  22646. _next->call(&_next->glGetnMapdvARB)(target, query, bufSize, v);
  22647. if (!_context->err.inBeginEnd) {
  22648. _error = _next->call(&_next->glGetError)();
  22649. if (_error!=GL_NO_ERROR) {
  22650. Error("glGetnMapdvARB : ",Token::GLerrorToString(_error));
  22651. #if REGAL_BREAK
  22652. Break::ErrorCB(_error);
  22653. #endif
  22654. if (_context->err.callback)
  22655. _context->err.callback( _error );
  22656. }
  22657. }
  22658. }
  22659. static void REGAL_CALL error_glGetnMapfvARB(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v)
  22660. {
  22661. Internal("error_glGetnMapfvARB","()");
  22662. RegalContext *_context = REGAL_GET_CONTEXT();
  22663. RegalAssert(_context);
  22664. DispatchTableGL *_next = _context->dispatcher.error.next();
  22665. RegalAssert(_next);
  22666. GLenum _error = GL_NO_ERROR;
  22667. if (!_context->err.inBeginEnd)
  22668. _error = _next->call(&_next->glGetError)();
  22669. RegalAssert(_error==GL_NO_ERROR);
  22670. _next->call(&_next->glGetnMapfvARB)(target, query, bufSize, v);
  22671. if (!_context->err.inBeginEnd) {
  22672. _error = _next->call(&_next->glGetError)();
  22673. if (_error!=GL_NO_ERROR) {
  22674. Error("glGetnMapfvARB : ",Token::GLerrorToString(_error));
  22675. #if REGAL_BREAK
  22676. Break::ErrorCB(_error);
  22677. #endif
  22678. if (_context->err.callback)
  22679. _context->err.callback( _error );
  22680. }
  22681. }
  22682. }
  22683. static void REGAL_CALL error_glGetnMapivARB(GLenum target, GLenum query, GLsizei bufSize, GLint *v)
  22684. {
  22685. Internal("error_glGetnMapivARB","()");
  22686. RegalContext *_context = REGAL_GET_CONTEXT();
  22687. RegalAssert(_context);
  22688. DispatchTableGL *_next = _context->dispatcher.error.next();
  22689. RegalAssert(_next);
  22690. GLenum _error = GL_NO_ERROR;
  22691. if (!_context->err.inBeginEnd)
  22692. _error = _next->call(&_next->glGetError)();
  22693. RegalAssert(_error==GL_NO_ERROR);
  22694. _next->call(&_next->glGetnMapivARB)(target, query, bufSize, v);
  22695. if (!_context->err.inBeginEnd) {
  22696. _error = _next->call(&_next->glGetError)();
  22697. if (_error!=GL_NO_ERROR) {
  22698. Error("glGetnMapivARB : ",Token::GLerrorToString(_error));
  22699. #if REGAL_BREAK
  22700. Break::ErrorCB(_error);
  22701. #endif
  22702. if (_context->err.callback)
  22703. _context->err.callback( _error );
  22704. }
  22705. }
  22706. }
  22707. static void REGAL_CALL error_glGetnMinmaxARB(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values)
  22708. {
  22709. Internal("error_glGetnMinmaxARB","()");
  22710. RegalContext *_context = REGAL_GET_CONTEXT();
  22711. RegalAssert(_context);
  22712. DispatchTableGL *_next = _context->dispatcher.error.next();
  22713. RegalAssert(_next);
  22714. GLenum _error = GL_NO_ERROR;
  22715. if (!_context->err.inBeginEnd)
  22716. _error = _next->call(&_next->glGetError)();
  22717. RegalAssert(_error==GL_NO_ERROR);
  22718. _next->call(&_next->glGetnMinmaxARB)(target, reset, format, type, bufSize, values);
  22719. if (!_context->err.inBeginEnd) {
  22720. _error = _next->call(&_next->glGetError)();
  22721. if (_error!=GL_NO_ERROR) {
  22722. Error("glGetnMinmaxARB : ",Token::GLerrorToString(_error));
  22723. #if REGAL_BREAK
  22724. Break::ErrorCB(_error);
  22725. #endif
  22726. if (_context->err.callback)
  22727. _context->err.callback( _error );
  22728. }
  22729. }
  22730. }
  22731. static void REGAL_CALL error_glGetnPixelMapfvARB(GLenum map, GLsizei bufSize, GLfloat *values)
  22732. {
  22733. Internal("error_glGetnPixelMapfvARB","()");
  22734. RegalContext *_context = REGAL_GET_CONTEXT();
  22735. RegalAssert(_context);
  22736. DispatchTableGL *_next = _context->dispatcher.error.next();
  22737. RegalAssert(_next);
  22738. GLenum _error = GL_NO_ERROR;
  22739. if (!_context->err.inBeginEnd)
  22740. _error = _next->call(&_next->glGetError)();
  22741. RegalAssert(_error==GL_NO_ERROR);
  22742. _next->call(&_next->glGetnPixelMapfvARB)(map, bufSize, values);
  22743. if (!_context->err.inBeginEnd) {
  22744. _error = _next->call(&_next->glGetError)();
  22745. if (_error!=GL_NO_ERROR) {
  22746. Error("glGetnPixelMapfvARB : ",Token::GLerrorToString(_error));
  22747. #if REGAL_BREAK
  22748. Break::ErrorCB(_error);
  22749. #endif
  22750. if (_context->err.callback)
  22751. _context->err.callback( _error );
  22752. }
  22753. }
  22754. }
  22755. static void REGAL_CALL error_glGetnPixelMapuivARB(GLenum map, GLsizei bufSize, GLuint *values)
  22756. {
  22757. Internal("error_glGetnPixelMapuivARB","()");
  22758. RegalContext *_context = REGAL_GET_CONTEXT();
  22759. RegalAssert(_context);
  22760. DispatchTableGL *_next = _context->dispatcher.error.next();
  22761. RegalAssert(_next);
  22762. GLenum _error = GL_NO_ERROR;
  22763. if (!_context->err.inBeginEnd)
  22764. _error = _next->call(&_next->glGetError)();
  22765. RegalAssert(_error==GL_NO_ERROR);
  22766. _next->call(&_next->glGetnPixelMapuivARB)(map, bufSize, values);
  22767. if (!_context->err.inBeginEnd) {
  22768. _error = _next->call(&_next->glGetError)();
  22769. if (_error!=GL_NO_ERROR) {
  22770. Error("glGetnPixelMapuivARB : ",Token::GLerrorToString(_error));
  22771. #if REGAL_BREAK
  22772. Break::ErrorCB(_error);
  22773. #endif
  22774. if (_context->err.callback)
  22775. _context->err.callback( _error );
  22776. }
  22777. }
  22778. }
  22779. static void REGAL_CALL error_glGetnPixelMapusvARB(GLenum map, GLsizei bufSize, GLushort *values)
  22780. {
  22781. Internal("error_glGetnPixelMapusvARB","()");
  22782. RegalContext *_context = REGAL_GET_CONTEXT();
  22783. RegalAssert(_context);
  22784. DispatchTableGL *_next = _context->dispatcher.error.next();
  22785. RegalAssert(_next);
  22786. GLenum _error = GL_NO_ERROR;
  22787. if (!_context->err.inBeginEnd)
  22788. _error = _next->call(&_next->glGetError)();
  22789. RegalAssert(_error==GL_NO_ERROR);
  22790. _next->call(&_next->glGetnPixelMapusvARB)(map, bufSize, values);
  22791. if (!_context->err.inBeginEnd) {
  22792. _error = _next->call(&_next->glGetError)();
  22793. if (_error!=GL_NO_ERROR) {
  22794. Error("glGetnPixelMapusvARB : ",Token::GLerrorToString(_error));
  22795. #if REGAL_BREAK
  22796. Break::ErrorCB(_error);
  22797. #endif
  22798. if (_context->err.callback)
  22799. _context->err.callback( _error );
  22800. }
  22801. }
  22802. }
  22803. static void REGAL_CALL error_glGetnPolygonStippleARB(GLsizei bufSize, GLubyte *pattern)
  22804. {
  22805. Internal("error_glGetnPolygonStippleARB","()");
  22806. RegalContext *_context = REGAL_GET_CONTEXT();
  22807. RegalAssert(_context);
  22808. DispatchTableGL *_next = _context->dispatcher.error.next();
  22809. RegalAssert(_next);
  22810. GLenum _error = GL_NO_ERROR;
  22811. if (!_context->err.inBeginEnd)
  22812. _error = _next->call(&_next->glGetError)();
  22813. RegalAssert(_error==GL_NO_ERROR);
  22814. _next->call(&_next->glGetnPolygonStippleARB)(bufSize, pattern);
  22815. if (!_context->err.inBeginEnd) {
  22816. _error = _next->call(&_next->glGetError)();
  22817. if (_error!=GL_NO_ERROR) {
  22818. Error("glGetnPolygonStippleARB : ",Token::GLerrorToString(_error));
  22819. #if REGAL_BREAK
  22820. Break::ErrorCB(_error);
  22821. #endif
  22822. if (_context->err.callback)
  22823. _context->err.callback( _error );
  22824. }
  22825. }
  22826. }
  22827. static void REGAL_CALL error_glGetnSeparableFilterARB(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span)
  22828. {
  22829. Internal("error_glGetnSeparableFilterARB","()");
  22830. RegalContext *_context = REGAL_GET_CONTEXT();
  22831. RegalAssert(_context);
  22832. DispatchTableGL *_next = _context->dispatcher.error.next();
  22833. RegalAssert(_next);
  22834. GLenum _error = GL_NO_ERROR;
  22835. if (!_context->err.inBeginEnd)
  22836. _error = _next->call(&_next->glGetError)();
  22837. RegalAssert(_error==GL_NO_ERROR);
  22838. _next->call(&_next->glGetnSeparableFilterARB)(target, format, type, rowBufSize, row, columnBufSize, column, span);
  22839. if (!_context->err.inBeginEnd) {
  22840. _error = _next->call(&_next->glGetError)();
  22841. if (_error!=GL_NO_ERROR) {
  22842. Error("glGetnSeparableFilterARB : ",Token::GLerrorToString(_error));
  22843. #if REGAL_BREAK
  22844. Break::ErrorCB(_error);
  22845. #endif
  22846. if (_context->err.callback)
  22847. _context->err.callback( _error );
  22848. }
  22849. }
  22850. }
  22851. static void REGAL_CALL error_glGetnTexImageARB(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img)
  22852. {
  22853. Internal("error_glGetnTexImageARB","()");
  22854. RegalContext *_context = REGAL_GET_CONTEXT();
  22855. RegalAssert(_context);
  22856. DispatchTableGL *_next = _context->dispatcher.error.next();
  22857. RegalAssert(_next);
  22858. GLenum _error = GL_NO_ERROR;
  22859. if (!_context->err.inBeginEnd)
  22860. _error = _next->call(&_next->glGetError)();
  22861. RegalAssert(_error==GL_NO_ERROR);
  22862. _next->call(&_next->glGetnTexImageARB)(target, level, format, type, bufSize, img);
  22863. if (!_context->err.inBeginEnd) {
  22864. _error = _next->call(&_next->glGetError)();
  22865. if (_error!=GL_NO_ERROR) {
  22866. Error("glGetnTexImageARB : ",Token::GLerrorToString(_error));
  22867. #if REGAL_BREAK
  22868. Break::ErrorCB(_error);
  22869. #endif
  22870. if (_context->err.callback)
  22871. _context->err.callback( _error );
  22872. }
  22873. }
  22874. }
  22875. static void REGAL_CALL error_glGetnUniformdvARB(GLuint program, GLint location, GLsizei bufSize, GLdouble *params)
  22876. {
  22877. Internal("error_glGetnUniformdvARB","()");
  22878. RegalContext *_context = REGAL_GET_CONTEXT();
  22879. RegalAssert(_context);
  22880. DispatchTableGL *_next = _context->dispatcher.error.next();
  22881. RegalAssert(_next);
  22882. GLenum _error = GL_NO_ERROR;
  22883. if (!_context->err.inBeginEnd)
  22884. _error = _next->call(&_next->glGetError)();
  22885. RegalAssert(_error==GL_NO_ERROR);
  22886. _next->call(&_next->glGetnUniformdvARB)(program, location, bufSize, params);
  22887. if (!_context->err.inBeginEnd) {
  22888. _error = _next->call(&_next->glGetError)();
  22889. if (_error!=GL_NO_ERROR) {
  22890. Error("glGetnUniformdvARB : ",Token::GLerrorToString(_error));
  22891. #if REGAL_BREAK
  22892. Break::ErrorCB(_error);
  22893. #endif
  22894. if (_context->err.callback)
  22895. _context->err.callback( _error );
  22896. }
  22897. }
  22898. }
  22899. static void REGAL_CALL error_glGetnUniformfvARB(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
  22900. {
  22901. Internal("error_glGetnUniformfvARB","()");
  22902. RegalContext *_context = REGAL_GET_CONTEXT();
  22903. RegalAssert(_context);
  22904. DispatchTableGL *_next = _context->dispatcher.error.next();
  22905. RegalAssert(_next);
  22906. GLenum _error = GL_NO_ERROR;
  22907. if (!_context->err.inBeginEnd)
  22908. _error = _next->call(&_next->glGetError)();
  22909. RegalAssert(_error==GL_NO_ERROR);
  22910. _next->call(&_next->glGetnUniformfvARB)(program, location, bufSize, params);
  22911. if (!_context->err.inBeginEnd) {
  22912. _error = _next->call(&_next->glGetError)();
  22913. if (_error!=GL_NO_ERROR) {
  22914. Error("glGetnUniformfvARB : ",Token::GLerrorToString(_error));
  22915. #if REGAL_BREAK
  22916. Break::ErrorCB(_error);
  22917. #endif
  22918. if (_context->err.callback)
  22919. _context->err.callback( _error );
  22920. }
  22921. }
  22922. }
  22923. static void REGAL_CALL error_glGetnUniformivARB(GLuint program, GLint location, GLsizei bufSize, GLint *params)
  22924. {
  22925. Internal("error_glGetnUniformivARB","()");
  22926. RegalContext *_context = REGAL_GET_CONTEXT();
  22927. RegalAssert(_context);
  22928. DispatchTableGL *_next = _context->dispatcher.error.next();
  22929. RegalAssert(_next);
  22930. GLenum _error = GL_NO_ERROR;
  22931. if (!_context->err.inBeginEnd)
  22932. _error = _next->call(&_next->glGetError)();
  22933. RegalAssert(_error==GL_NO_ERROR);
  22934. _next->call(&_next->glGetnUniformivARB)(program, location, bufSize, params);
  22935. if (!_context->err.inBeginEnd) {
  22936. _error = _next->call(&_next->glGetError)();
  22937. if (_error!=GL_NO_ERROR) {
  22938. Error("glGetnUniformivARB : ",Token::GLerrorToString(_error));
  22939. #if REGAL_BREAK
  22940. Break::ErrorCB(_error);
  22941. #endif
  22942. if (_context->err.callback)
  22943. _context->err.callback( _error );
  22944. }
  22945. }
  22946. }
  22947. static void REGAL_CALL error_glGetnUniformuivARB(GLuint program, GLint location, GLsizei bufSize, GLuint *params)
  22948. {
  22949. Internal("error_glGetnUniformuivARB","()");
  22950. RegalContext *_context = REGAL_GET_CONTEXT();
  22951. RegalAssert(_context);
  22952. DispatchTableGL *_next = _context->dispatcher.error.next();
  22953. RegalAssert(_next);
  22954. GLenum _error = GL_NO_ERROR;
  22955. if (!_context->err.inBeginEnd)
  22956. _error = _next->call(&_next->glGetError)();
  22957. RegalAssert(_error==GL_NO_ERROR);
  22958. _next->call(&_next->glGetnUniformuivARB)(program, location, bufSize, params);
  22959. if (!_context->err.inBeginEnd) {
  22960. _error = _next->call(&_next->glGetError)();
  22961. if (_error!=GL_NO_ERROR) {
  22962. Error("glGetnUniformuivARB : ",Token::GLerrorToString(_error));
  22963. #if REGAL_BREAK
  22964. Break::ErrorCB(_error);
  22965. #endif
  22966. if (_context->err.callback)
  22967. _context->err.callback( _error );
  22968. }
  22969. }
  22970. }
  22971. static void REGAL_CALL error_glReadnPixelsARB(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data)
  22972. {
  22973. Internal("error_glReadnPixelsARB","()");
  22974. RegalContext *_context = REGAL_GET_CONTEXT();
  22975. RegalAssert(_context);
  22976. DispatchTableGL *_next = _context->dispatcher.error.next();
  22977. RegalAssert(_next);
  22978. GLenum _error = GL_NO_ERROR;
  22979. if (!_context->err.inBeginEnd)
  22980. _error = _next->call(&_next->glGetError)();
  22981. RegalAssert(_error==GL_NO_ERROR);
  22982. _next->call(&_next->glReadnPixelsARB)(x, y, width, height, format, type, bufSize, data);
  22983. if (!_context->err.inBeginEnd) {
  22984. _error = _next->call(&_next->glGetError)();
  22985. if (_error!=GL_NO_ERROR) {
  22986. Error("glReadnPixelsARB : ",Token::GLerrorToString(_error));
  22987. #if REGAL_BREAK
  22988. Break::ErrorCB(_error);
  22989. #endif
  22990. if (_context->err.callback)
  22991. _context->err.callback( _error );
  22992. }
  22993. }
  22994. }
  22995. // GL_ARB_sample_shading
  22996. static void REGAL_CALL error_glMinSampleShading(GLclampf value)
  22997. {
  22998. Internal("error_glMinSampleShading","()");
  22999. RegalContext *_context = REGAL_GET_CONTEXT();
  23000. RegalAssert(_context);
  23001. DispatchTableGL *_next = _context->dispatcher.error.next();
  23002. RegalAssert(_next);
  23003. GLenum _error = GL_NO_ERROR;
  23004. if (!_context->err.inBeginEnd)
  23005. _error = _next->call(&_next->glGetError)();
  23006. RegalAssert(_error==GL_NO_ERROR);
  23007. _next->call(&_next->glMinSampleShading)(value);
  23008. if (!_context->err.inBeginEnd) {
  23009. _error = _next->call(&_next->glGetError)();
  23010. if (_error!=GL_NO_ERROR) {
  23011. Error("glMinSampleShading : ",Token::GLerrorToString(_error));
  23012. #if REGAL_BREAK
  23013. Break::ErrorCB(_error);
  23014. #endif
  23015. if (_context->err.callback)
  23016. _context->err.callback( _error );
  23017. }
  23018. }
  23019. }
  23020. static void REGAL_CALL error_glMinSampleShadingARB(GLclampf value)
  23021. {
  23022. Internal("error_glMinSampleShadingARB","()");
  23023. RegalContext *_context = REGAL_GET_CONTEXT();
  23024. RegalAssert(_context);
  23025. DispatchTableGL *_next = _context->dispatcher.error.next();
  23026. RegalAssert(_next);
  23027. GLenum _error = GL_NO_ERROR;
  23028. if (!_context->err.inBeginEnd)
  23029. _error = _next->call(&_next->glGetError)();
  23030. RegalAssert(_error==GL_NO_ERROR);
  23031. _next->call(&_next->glMinSampleShadingARB)(value);
  23032. if (!_context->err.inBeginEnd) {
  23033. _error = _next->call(&_next->glGetError)();
  23034. if (_error!=GL_NO_ERROR) {
  23035. Error("glMinSampleShadingARB : ",Token::GLerrorToString(_error));
  23036. #if REGAL_BREAK
  23037. Break::ErrorCB(_error);
  23038. #endif
  23039. if (_context->err.callback)
  23040. _context->err.callback( _error );
  23041. }
  23042. }
  23043. }
  23044. // GL_ARB_sampler_objects
  23045. static void REGAL_CALL error_glBindSampler(GLuint unit, GLuint sampler)
  23046. {
  23047. Internal("error_glBindSampler","()");
  23048. RegalContext *_context = REGAL_GET_CONTEXT();
  23049. RegalAssert(_context);
  23050. DispatchTableGL *_next = _context->dispatcher.error.next();
  23051. RegalAssert(_next);
  23052. GLenum _error = GL_NO_ERROR;
  23053. if (!_context->err.inBeginEnd)
  23054. _error = _next->call(&_next->glGetError)();
  23055. RegalAssert(_error==GL_NO_ERROR);
  23056. _next->call(&_next->glBindSampler)(unit, sampler);
  23057. if (!_context->err.inBeginEnd) {
  23058. _error = _next->call(&_next->glGetError)();
  23059. if (_error!=GL_NO_ERROR) {
  23060. Error("glBindSampler : ",Token::GLerrorToString(_error));
  23061. #if REGAL_BREAK
  23062. Break::ErrorCB(_error);
  23063. #endif
  23064. if (_context->err.callback)
  23065. _context->err.callback( _error );
  23066. }
  23067. }
  23068. }
  23069. static void REGAL_CALL error_glDeleteSamplers(GLsizei count, const GLuint *samplers)
  23070. {
  23071. Internal("error_glDeleteSamplers","()");
  23072. RegalContext *_context = REGAL_GET_CONTEXT();
  23073. RegalAssert(_context);
  23074. DispatchTableGL *_next = _context->dispatcher.error.next();
  23075. RegalAssert(_next);
  23076. GLenum _error = GL_NO_ERROR;
  23077. if (!_context->err.inBeginEnd)
  23078. _error = _next->call(&_next->glGetError)();
  23079. RegalAssert(_error==GL_NO_ERROR);
  23080. _next->call(&_next->glDeleteSamplers)(count, samplers);
  23081. if (!_context->err.inBeginEnd) {
  23082. _error = _next->call(&_next->glGetError)();
  23083. if (_error!=GL_NO_ERROR) {
  23084. Error("glDeleteSamplers : ",Token::GLerrorToString(_error));
  23085. #if REGAL_BREAK
  23086. Break::ErrorCB(_error);
  23087. #endif
  23088. if (_context->err.callback)
  23089. _context->err.callback( _error );
  23090. }
  23091. }
  23092. }
  23093. static void REGAL_CALL error_glGenSamplers(GLsizei count, GLuint *samplers)
  23094. {
  23095. Internal("error_glGenSamplers","()");
  23096. RegalContext *_context = REGAL_GET_CONTEXT();
  23097. RegalAssert(_context);
  23098. DispatchTableGL *_next = _context->dispatcher.error.next();
  23099. RegalAssert(_next);
  23100. GLenum _error = GL_NO_ERROR;
  23101. if (!_context->err.inBeginEnd)
  23102. _error = _next->call(&_next->glGetError)();
  23103. RegalAssert(_error==GL_NO_ERROR);
  23104. _next->call(&_next->glGenSamplers)(count, samplers);
  23105. if (!_context->err.inBeginEnd) {
  23106. _error = _next->call(&_next->glGetError)();
  23107. if (_error!=GL_NO_ERROR) {
  23108. Error("glGenSamplers : ",Token::GLerrorToString(_error));
  23109. #if REGAL_BREAK
  23110. Break::ErrorCB(_error);
  23111. #endif
  23112. if (_context->err.callback)
  23113. _context->err.callback( _error );
  23114. }
  23115. }
  23116. }
  23117. static void REGAL_CALL error_glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)
  23118. {
  23119. Internal("error_glGetSamplerParameterIiv","()");
  23120. RegalContext *_context = REGAL_GET_CONTEXT();
  23121. RegalAssert(_context);
  23122. DispatchTableGL *_next = _context->dispatcher.error.next();
  23123. RegalAssert(_next);
  23124. GLenum _error = GL_NO_ERROR;
  23125. if (!_context->err.inBeginEnd)
  23126. _error = _next->call(&_next->glGetError)();
  23127. RegalAssert(_error==GL_NO_ERROR);
  23128. _next->call(&_next->glGetSamplerParameterIiv)(sampler, pname, params);
  23129. if (!_context->err.inBeginEnd) {
  23130. _error = _next->call(&_next->glGetError)();
  23131. if (_error!=GL_NO_ERROR) {
  23132. Error("glGetSamplerParameterIiv : ",Token::GLerrorToString(_error));
  23133. #if REGAL_BREAK
  23134. Break::ErrorCB(_error);
  23135. #endif
  23136. if (_context->err.callback)
  23137. _context->err.callback( _error );
  23138. }
  23139. }
  23140. }
  23141. static void REGAL_CALL error_glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)
  23142. {
  23143. Internal("error_glGetSamplerParameterIuiv","()");
  23144. RegalContext *_context = REGAL_GET_CONTEXT();
  23145. RegalAssert(_context);
  23146. DispatchTableGL *_next = _context->dispatcher.error.next();
  23147. RegalAssert(_next);
  23148. GLenum _error = GL_NO_ERROR;
  23149. if (!_context->err.inBeginEnd)
  23150. _error = _next->call(&_next->glGetError)();
  23151. RegalAssert(_error==GL_NO_ERROR);
  23152. _next->call(&_next->glGetSamplerParameterIuiv)(sampler, pname, params);
  23153. if (!_context->err.inBeginEnd) {
  23154. _error = _next->call(&_next->glGetError)();
  23155. if (_error!=GL_NO_ERROR) {
  23156. Error("glGetSamplerParameterIuiv : ",Token::GLerrorToString(_error));
  23157. #if REGAL_BREAK
  23158. Break::ErrorCB(_error);
  23159. #endif
  23160. if (_context->err.callback)
  23161. _context->err.callback( _error );
  23162. }
  23163. }
  23164. }
  23165. static void REGAL_CALL error_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
  23166. {
  23167. Internal("error_glGetSamplerParameterfv","()");
  23168. RegalContext *_context = REGAL_GET_CONTEXT();
  23169. RegalAssert(_context);
  23170. DispatchTableGL *_next = _context->dispatcher.error.next();
  23171. RegalAssert(_next);
  23172. GLenum _error = GL_NO_ERROR;
  23173. if (!_context->err.inBeginEnd)
  23174. _error = _next->call(&_next->glGetError)();
  23175. RegalAssert(_error==GL_NO_ERROR);
  23176. _next->call(&_next->glGetSamplerParameterfv)(sampler, pname, params);
  23177. if (!_context->err.inBeginEnd) {
  23178. _error = _next->call(&_next->glGetError)();
  23179. if (_error!=GL_NO_ERROR) {
  23180. Error("glGetSamplerParameterfv : ",Token::GLerrorToString(_error));
  23181. #if REGAL_BREAK
  23182. Break::ErrorCB(_error);
  23183. #endif
  23184. if (_context->err.callback)
  23185. _context->err.callback( _error );
  23186. }
  23187. }
  23188. }
  23189. static void REGAL_CALL error_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
  23190. {
  23191. Internal("error_glGetSamplerParameteriv","()");
  23192. RegalContext *_context = REGAL_GET_CONTEXT();
  23193. RegalAssert(_context);
  23194. DispatchTableGL *_next = _context->dispatcher.error.next();
  23195. RegalAssert(_next);
  23196. GLenum _error = GL_NO_ERROR;
  23197. if (!_context->err.inBeginEnd)
  23198. _error = _next->call(&_next->glGetError)();
  23199. RegalAssert(_error==GL_NO_ERROR);
  23200. _next->call(&_next->glGetSamplerParameteriv)(sampler, pname, params);
  23201. if (!_context->err.inBeginEnd) {
  23202. _error = _next->call(&_next->glGetError)();
  23203. if (_error!=GL_NO_ERROR) {
  23204. Error("glGetSamplerParameteriv : ",Token::GLerrorToString(_error));
  23205. #if REGAL_BREAK
  23206. Break::ErrorCB(_error);
  23207. #endif
  23208. if (_context->err.callback)
  23209. _context->err.callback( _error );
  23210. }
  23211. }
  23212. }
  23213. static GLboolean REGAL_CALL error_glIsSampler(GLuint sampler)
  23214. {
  23215. Internal("error_glIsSampler","()");
  23216. RegalContext *_context = REGAL_GET_CONTEXT();
  23217. RegalAssert(_context);
  23218. DispatchTableGL *_next = _context->dispatcher.error.next();
  23219. RegalAssert(_next);
  23220. GLenum _error = GL_NO_ERROR;
  23221. if (!_context->err.inBeginEnd)
  23222. _error = _next->call(&_next->glGetError)();
  23223. RegalAssert(_error==GL_NO_ERROR);
  23224. GLboolean ret = _next->call(&_next->glIsSampler)(sampler);
  23225. if (!_context->err.inBeginEnd) {
  23226. _error = _next->call(&_next->glGetError)();
  23227. if (_error!=GL_NO_ERROR) {
  23228. Error("glIsSampler : ",Token::GLerrorToString(_error));
  23229. #if REGAL_BREAK
  23230. Break::ErrorCB(_error);
  23231. #endif
  23232. if (_context->err.callback)
  23233. _context->err.callback( _error );
  23234. }
  23235. }
  23236. return ret;
  23237. }
  23238. static void REGAL_CALL error_glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)
  23239. {
  23240. Internal("error_glSamplerParameterIiv","()");
  23241. RegalContext *_context = REGAL_GET_CONTEXT();
  23242. RegalAssert(_context);
  23243. DispatchTableGL *_next = _context->dispatcher.error.next();
  23244. RegalAssert(_next);
  23245. GLenum _error = GL_NO_ERROR;
  23246. if (!_context->err.inBeginEnd)
  23247. _error = _next->call(&_next->glGetError)();
  23248. RegalAssert(_error==GL_NO_ERROR);
  23249. _next->call(&_next->glSamplerParameterIiv)(sampler, pname, params);
  23250. if (!_context->err.inBeginEnd) {
  23251. _error = _next->call(&_next->glGetError)();
  23252. if (_error!=GL_NO_ERROR) {
  23253. Error("glSamplerParameterIiv : ",Token::GLerrorToString(_error));
  23254. #if REGAL_BREAK
  23255. Break::ErrorCB(_error);
  23256. #endif
  23257. if (_context->err.callback)
  23258. _context->err.callback( _error );
  23259. }
  23260. }
  23261. }
  23262. static void REGAL_CALL error_glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
  23263. {
  23264. Internal("error_glSamplerParameterIuiv","()");
  23265. RegalContext *_context = REGAL_GET_CONTEXT();
  23266. RegalAssert(_context);
  23267. DispatchTableGL *_next = _context->dispatcher.error.next();
  23268. RegalAssert(_next);
  23269. GLenum _error = GL_NO_ERROR;
  23270. if (!_context->err.inBeginEnd)
  23271. _error = _next->call(&_next->glGetError)();
  23272. RegalAssert(_error==GL_NO_ERROR);
  23273. _next->call(&_next->glSamplerParameterIuiv)(sampler, pname, params);
  23274. if (!_context->err.inBeginEnd) {
  23275. _error = _next->call(&_next->glGetError)();
  23276. if (_error!=GL_NO_ERROR) {
  23277. Error("glSamplerParameterIuiv : ",Token::GLerrorToString(_error));
  23278. #if REGAL_BREAK
  23279. Break::ErrorCB(_error);
  23280. #endif
  23281. if (_context->err.callback)
  23282. _context->err.callback( _error );
  23283. }
  23284. }
  23285. }
  23286. static void REGAL_CALL error_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
  23287. {
  23288. Internal("error_glSamplerParameterf","()");
  23289. RegalContext *_context = REGAL_GET_CONTEXT();
  23290. RegalAssert(_context);
  23291. DispatchTableGL *_next = _context->dispatcher.error.next();
  23292. RegalAssert(_next);
  23293. GLenum _error = GL_NO_ERROR;
  23294. if (!_context->err.inBeginEnd)
  23295. _error = _next->call(&_next->glGetError)();
  23296. RegalAssert(_error==GL_NO_ERROR);
  23297. _next->call(&_next->glSamplerParameterf)(sampler, pname, param);
  23298. if (!_context->err.inBeginEnd) {
  23299. _error = _next->call(&_next->glGetError)();
  23300. if (_error!=GL_NO_ERROR) {
  23301. Error("glSamplerParameterf : ",Token::GLerrorToString(_error));
  23302. #if REGAL_BREAK
  23303. Break::ErrorCB(_error);
  23304. #endif
  23305. if (_context->err.callback)
  23306. _context->err.callback( _error );
  23307. }
  23308. }
  23309. }
  23310. static void REGAL_CALL error_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params)
  23311. {
  23312. Internal("error_glSamplerParameterfv","()");
  23313. RegalContext *_context = REGAL_GET_CONTEXT();
  23314. RegalAssert(_context);
  23315. DispatchTableGL *_next = _context->dispatcher.error.next();
  23316. RegalAssert(_next);
  23317. GLenum _error = GL_NO_ERROR;
  23318. if (!_context->err.inBeginEnd)
  23319. _error = _next->call(&_next->glGetError)();
  23320. RegalAssert(_error==GL_NO_ERROR);
  23321. _next->call(&_next->glSamplerParameterfv)(sampler, pname, params);
  23322. if (!_context->err.inBeginEnd) {
  23323. _error = _next->call(&_next->glGetError)();
  23324. if (_error!=GL_NO_ERROR) {
  23325. Error("glSamplerParameterfv : ",Token::GLerrorToString(_error));
  23326. #if REGAL_BREAK
  23327. Break::ErrorCB(_error);
  23328. #endif
  23329. if (_context->err.callback)
  23330. _context->err.callback( _error );
  23331. }
  23332. }
  23333. }
  23334. static void REGAL_CALL error_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
  23335. {
  23336. Internal("error_glSamplerParameteri","()");
  23337. RegalContext *_context = REGAL_GET_CONTEXT();
  23338. RegalAssert(_context);
  23339. DispatchTableGL *_next = _context->dispatcher.error.next();
  23340. RegalAssert(_next);
  23341. GLenum _error = GL_NO_ERROR;
  23342. if (!_context->err.inBeginEnd)
  23343. _error = _next->call(&_next->glGetError)();
  23344. RegalAssert(_error==GL_NO_ERROR);
  23345. _next->call(&_next->glSamplerParameteri)(sampler, pname, param);
  23346. if (!_context->err.inBeginEnd) {
  23347. _error = _next->call(&_next->glGetError)();
  23348. if (_error!=GL_NO_ERROR) {
  23349. Error("glSamplerParameteri : ",Token::GLerrorToString(_error));
  23350. #if REGAL_BREAK
  23351. Break::ErrorCB(_error);
  23352. #endif
  23353. if (_context->err.callback)
  23354. _context->err.callback( _error );
  23355. }
  23356. }
  23357. }
  23358. static void REGAL_CALL error_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params)
  23359. {
  23360. Internal("error_glSamplerParameteriv","()");
  23361. RegalContext *_context = REGAL_GET_CONTEXT();
  23362. RegalAssert(_context);
  23363. DispatchTableGL *_next = _context->dispatcher.error.next();
  23364. RegalAssert(_next);
  23365. GLenum _error = GL_NO_ERROR;
  23366. if (!_context->err.inBeginEnd)
  23367. _error = _next->call(&_next->glGetError)();
  23368. RegalAssert(_error==GL_NO_ERROR);
  23369. _next->call(&_next->glSamplerParameteriv)(sampler, pname, params);
  23370. if (!_context->err.inBeginEnd) {
  23371. _error = _next->call(&_next->glGetError)();
  23372. if (_error!=GL_NO_ERROR) {
  23373. Error("glSamplerParameteriv : ",Token::GLerrorToString(_error));
  23374. #if REGAL_BREAK
  23375. Break::ErrorCB(_error);
  23376. #endif
  23377. if (_context->err.callback)
  23378. _context->err.callback( _error );
  23379. }
  23380. }
  23381. }
  23382. // GL_ARB_separate_shader_objects
  23383. static void REGAL_CALL error_glActiveShaderProgram(GLuint pipeline, GLuint program)
  23384. {
  23385. Internal("error_glActiveShaderProgram","()");
  23386. RegalContext *_context = REGAL_GET_CONTEXT();
  23387. RegalAssert(_context);
  23388. DispatchTableGL *_next = _context->dispatcher.error.next();
  23389. RegalAssert(_next);
  23390. GLenum _error = GL_NO_ERROR;
  23391. if (!_context->err.inBeginEnd)
  23392. _error = _next->call(&_next->glGetError)();
  23393. RegalAssert(_error==GL_NO_ERROR);
  23394. _next->call(&_next->glActiveShaderProgram)(pipeline, program);
  23395. if (!_context->err.inBeginEnd) {
  23396. _error = _next->call(&_next->glGetError)();
  23397. if (_error!=GL_NO_ERROR) {
  23398. Error("glActiveShaderProgram : ",Token::GLerrorToString(_error));
  23399. #if REGAL_BREAK
  23400. Break::ErrorCB(_error);
  23401. #endif
  23402. if (_context->err.callback)
  23403. _context->err.callback( _error );
  23404. }
  23405. }
  23406. }
  23407. static void REGAL_CALL error_glBindProgramPipeline(GLuint pipeline)
  23408. {
  23409. Internal("error_glBindProgramPipeline","()");
  23410. RegalContext *_context = REGAL_GET_CONTEXT();
  23411. RegalAssert(_context);
  23412. DispatchTableGL *_next = _context->dispatcher.error.next();
  23413. RegalAssert(_next);
  23414. GLenum _error = GL_NO_ERROR;
  23415. if (!_context->err.inBeginEnd)
  23416. _error = _next->call(&_next->glGetError)();
  23417. RegalAssert(_error==GL_NO_ERROR);
  23418. _next->call(&_next->glBindProgramPipeline)(pipeline);
  23419. if (!_context->err.inBeginEnd) {
  23420. _error = _next->call(&_next->glGetError)();
  23421. if (_error!=GL_NO_ERROR) {
  23422. Error("glBindProgramPipeline : ",Token::GLerrorToString(_error));
  23423. #if REGAL_BREAK
  23424. Break::ErrorCB(_error);
  23425. #endif
  23426. if (_context->err.callback)
  23427. _context->err.callback( _error );
  23428. }
  23429. }
  23430. }
  23431. static GLuint REGAL_CALL error_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar * const *strings)
  23432. {
  23433. Internal("error_glCreateShaderProgramv","()");
  23434. RegalContext *_context = REGAL_GET_CONTEXT();
  23435. RegalAssert(_context);
  23436. DispatchTableGL *_next = _context->dispatcher.error.next();
  23437. RegalAssert(_next);
  23438. GLenum _error = GL_NO_ERROR;
  23439. if (!_context->err.inBeginEnd)
  23440. _error = _next->call(&_next->glGetError)();
  23441. RegalAssert(_error==GL_NO_ERROR);
  23442. GLuint ret = _next->call(&_next->glCreateShaderProgramv)(type, count, strings);
  23443. if (!_context->err.inBeginEnd) {
  23444. _error = _next->call(&_next->glGetError)();
  23445. if (_error!=GL_NO_ERROR) {
  23446. Error("glCreateShaderProgramv : ",Token::GLerrorToString(_error));
  23447. #if REGAL_BREAK
  23448. Break::ErrorCB(_error);
  23449. #endif
  23450. if (_context->err.callback)
  23451. _context->err.callback( _error );
  23452. }
  23453. }
  23454. return ret;
  23455. }
  23456. static void REGAL_CALL error_glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
  23457. {
  23458. Internal("error_glDeleteProgramPipelines","()");
  23459. RegalContext *_context = REGAL_GET_CONTEXT();
  23460. RegalAssert(_context);
  23461. DispatchTableGL *_next = _context->dispatcher.error.next();
  23462. RegalAssert(_next);
  23463. GLenum _error = GL_NO_ERROR;
  23464. if (!_context->err.inBeginEnd)
  23465. _error = _next->call(&_next->glGetError)();
  23466. RegalAssert(_error==GL_NO_ERROR);
  23467. _next->call(&_next->glDeleteProgramPipelines)(n, pipelines);
  23468. if (!_context->err.inBeginEnd) {
  23469. _error = _next->call(&_next->glGetError)();
  23470. if (_error!=GL_NO_ERROR) {
  23471. Error("glDeleteProgramPipelines : ",Token::GLerrorToString(_error));
  23472. #if REGAL_BREAK
  23473. Break::ErrorCB(_error);
  23474. #endif
  23475. if (_context->err.callback)
  23476. _context->err.callback( _error );
  23477. }
  23478. }
  23479. }
  23480. static void REGAL_CALL error_glGenProgramPipelines(GLsizei n, GLuint *pipelines)
  23481. {
  23482. Internal("error_glGenProgramPipelines","()");
  23483. RegalContext *_context = REGAL_GET_CONTEXT();
  23484. RegalAssert(_context);
  23485. DispatchTableGL *_next = _context->dispatcher.error.next();
  23486. RegalAssert(_next);
  23487. GLenum _error = GL_NO_ERROR;
  23488. if (!_context->err.inBeginEnd)
  23489. _error = _next->call(&_next->glGetError)();
  23490. RegalAssert(_error==GL_NO_ERROR);
  23491. _next->call(&_next->glGenProgramPipelines)(n, pipelines);
  23492. if (!_context->err.inBeginEnd) {
  23493. _error = _next->call(&_next->glGetError)();
  23494. if (_error!=GL_NO_ERROR) {
  23495. Error("glGenProgramPipelines : ",Token::GLerrorToString(_error));
  23496. #if REGAL_BREAK
  23497. Break::ErrorCB(_error);
  23498. #endif
  23499. if (_context->err.callback)
  23500. _context->err.callback( _error );
  23501. }
  23502. }
  23503. }
  23504. static void REGAL_CALL error_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
  23505. {
  23506. Internal("error_glGetProgramPipelineInfoLog","()");
  23507. RegalContext *_context = REGAL_GET_CONTEXT();
  23508. RegalAssert(_context);
  23509. DispatchTableGL *_next = _context->dispatcher.error.next();
  23510. RegalAssert(_next);
  23511. GLenum _error = GL_NO_ERROR;
  23512. if (!_context->err.inBeginEnd)
  23513. _error = _next->call(&_next->glGetError)();
  23514. RegalAssert(_error==GL_NO_ERROR);
  23515. _next->call(&_next->glGetProgramPipelineInfoLog)(pipeline, bufSize, length, infoLog);
  23516. if (!_context->err.inBeginEnd) {
  23517. _error = _next->call(&_next->glGetError)();
  23518. if (_error!=GL_NO_ERROR) {
  23519. Error("glGetProgramPipelineInfoLog : ",Token::GLerrorToString(_error));
  23520. #if REGAL_BREAK
  23521. Break::ErrorCB(_error);
  23522. #endif
  23523. if (_context->err.callback)
  23524. _context->err.callback( _error );
  23525. }
  23526. }
  23527. }
  23528. static void REGAL_CALL error_glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
  23529. {
  23530. Internal("error_glGetProgramPipelineiv","()");
  23531. RegalContext *_context = REGAL_GET_CONTEXT();
  23532. RegalAssert(_context);
  23533. DispatchTableGL *_next = _context->dispatcher.error.next();
  23534. RegalAssert(_next);
  23535. GLenum _error = GL_NO_ERROR;
  23536. if (!_context->err.inBeginEnd)
  23537. _error = _next->call(&_next->glGetError)();
  23538. RegalAssert(_error==GL_NO_ERROR);
  23539. _next->call(&_next->glGetProgramPipelineiv)(pipeline, pname, params);
  23540. if (!_context->err.inBeginEnd) {
  23541. _error = _next->call(&_next->glGetError)();
  23542. if (_error!=GL_NO_ERROR) {
  23543. Error("glGetProgramPipelineiv : ",Token::GLerrorToString(_error));
  23544. #if REGAL_BREAK
  23545. Break::ErrorCB(_error);
  23546. #endif
  23547. if (_context->err.callback)
  23548. _context->err.callback( _error );
  23549. }
  23550. }
  23551. }
  23552. static GLboolean REGAL_CALL error_glIsProgramPipeline(GLuint pipeline)
  23553. {
  23554. Internal("error_glIsProgramPipeline","()");
  23555. RegalContext *_context = REGAL_GET_CONTEXT();
  23556. RegalAssert(_context);
  23557. DispatchTableGL *_next = _context->dispatcher.error.next();
  23558. RegalAssert(_next);
  23559. GLenum _error = GL_NO_ERROR;
  23560. if (!_context->err.inBeginEnd)
  23561. _error = _next->call(&_next->glGetError)();
  23562. RegalAssert(_error==GL_NO_ERROR);
  23563. GLboolean ret = _next->call(&_next->glIsProgramPipeline)(pipeline);
  23564. if (!_context->err.inBeginEnd) {
  23565. _error = _next->call(&_next->glGetError)();
  23566. if (_error!=GL_NO_ERROR) {
  23567. Error("glIsProgramPipeline : ",Token::GLerrorToString(_error));
  23568. #if REGAL_BREAK
  23569. Break::ErrorCB(_error);
  23570. #endif
  23571. if (_context->err.callback)
  23572. _context->err.callback( _error );
  23573. }
  23574. }
  23575. return ret;
  23576. }
  23577. static void REGAL_CALL error_glProgramUniform1d(GLuint program, GLint location, GLdouble x)
  23578. {
  23579. Internal("error_glProgramUniform1d","()");
  23580. RegalContext *_context = REGAL_GET_CONTEXT();
  23581. RegalAssert(_context);
  23582. DispatchTableGL *_next = _context->dispatcher.error.next();
  23583. RegalAssert(_next);
  23584. GLenum _error = GL_NO_ERROR;
  23585. if (!_context->err.inBeginEnd)
  23586. _error = _next->call(&_next->glGetError)();
  23587. RegalAssert(_error==GL_NO_ERROR);
  23588. _next->call(&_next->glProgramUniform1d)(program, location, x);
  23589. if (!_context->err.inBeginEnd) {
  23590. _error = _next->call(&_next->glGetError)();
  23591. if (_error!=GL_NO_ERROR) {
  23592. Error("glProgramUniform1d : ",Token::GLerrorToString(_error));
  23593. #if REGAL_BREAK
  23594. Break::ErrorCB(_error);
  23595. #endif
  23596. if (_context->err.callback)
  23597. _context->err.callback( _error );
  23598. }
  23599. }
  23600. }
  23601. static void REGAL_CALL error_glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
  23602. {
  23603. Internal("error_glProgramUniform1dv","()");
  23604. RegalContext *_context = REGAL_GET_CONTEXT();
  23605. RegalAssert(_context);
  23606. DispatchTableGL *_next = _context->dispatcher.error.next();
  23607. RegalAssert(_next);
  23608. GLenum _error = GL_NO_ERROR;
  23609. if (!_context->err.inBeginEnd)
  23610. _error = _next->call(&_next->glGetError)();
  23611. RegalAssert(_error==GL_NO_ERROR);
  23612. _next->call(&_next->glProgramUniform1dv)(program, location, count, value);
  23613. if (!_context->err.inBeginEnd) {
  23614. _error = _next->call(&_next->glGetError)();
  23615. if (_error!=GL_NO_ERROR) {
  23616. Error("glProgramUniform1dv : ",Token::GLerrorToString(_error));
  23617. #if REGAL_BREAK
  23618. Break::ErrorCB(_error);
  23619. #endif
  23620. if (_context->err.callback)
  23621. _context->err.callback( _error );
  23622. }
  23623. }
  23624. }
  23625. static void REGAL_CALL error_glProgramUniform1f(GLuint program, GLint location, GLfloat x)
  23626. {
  23627. Internal("error_glProgramUniform1f","()");
  23628. RegalContext *_context = REGAL_GET_CONTEXT();
  23629. RegalAssert(_context);
  23630. DispatchTableGL *_next = _context->dispatcher.error.next();
  23631. RegalAssert(_next);
  23632. GLenum _error = GL_NO_ERROR;
  23633. if (!_context->err.inBeginEnd)
  23634. _error = _next->call(&_next->glGetError)();
  23635. RegalAssert(_error==GL_NO_ERROR);
  23636. _next->call(&_next->glProgramUniform1f)(program, location, x);
  23637. if (!_context->err.inBeginEnd) {
  23638. _error = _next->call(&_next->glGetError)();
  23639. if (_error!=GL_NO_ERROR) {
  23640. Error("glProgramUniform1f : ",Token::GLerrorToString(_error));
  23641. #if REGAL_BREAK
  23642. Break::ErrorCB(_error);
  23643. #endif
  23644. if (_context->err.callback)
  23645. _context->err.callback( _error );
  23646. }
  23647. }
  23648. }
  23649. static void REGAL_CALL error_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
  23650. {
  23651. Internal("error_glProgramUniform1fv","()");
  23652. RegalContext *_context = REGAL_GET_CONTEXT();
  23653. RegalAssert(_context);
  23654. DispatchTableGL *_next = _context->dispatcher.error.next();
  23655. RegalAssert(_next);
  23656. GLenum _error = GL_NO_ERROR;
  23657. if (!_context->err.inBeginEnd)
  23658. _error = _next->call(&_next->glGetError)();
  23659. RegalAssert(_error==GL_NO_ERROR);
  23660. _next->call(&_next->glProgramUniform1fv)(program, location, count, value);
  23661. if (!_context->err.inBeginEnd) {
  23662. _error = _next->call(&_next->glGetError)();
  23663. if (_error!=GL_NO_ERROR) {
  23664. Error("glProgramUniform1fv : ",Token::GLerrorToString(_error));
  23665. #if REGAL_BREAK
  23666. Break::ErrorCB(_error);
  23667. #endif
  23668. if (_context->err.callback)
  23669. _context->err.callback( _error );
  23670. }
  23671. }
  23672. }
  23673. static void REGAL_CALL error_glProgramUniform1i(GLuint program, GLint location, GLint x)
  23674. {
  23675. Internal("error_glProgramUniform1i","()");
  23676. RegalContext *_context = REGAL_GET_CONTEXT();
  23677. RegalAssert(_context);
  23678. DispatchTableGL *_next = _context->dispatcher.error.next();
  23679. RegalAssert(_next);
  23680. GLenum _error = GL_NO_ERROR;
  23681. if (!_context->err.inBeginEnd)
  23682. _error = _next->call(&_next->glGetError)();
  23683. RegalAssert(_error==GL_NO_ERROR);
  23684. _next->call(&_next->glProgramUniform1i)(program, location, x);
  23685. if (!_context->err.inBeginEnd) {
  23686. _error = _next->call(&_next->glGetError)();
  23687. if (_error!=GL_NO_ERROR) {
  23688. Error("glProgramUniform1i : ",Token::GLerrorToString(_error));
  23689. #if REGAL_BREAK
  23690. Break::ErrorCB(_error);
  23691. #endif
  23692. if (_context->err.callback)
  23693. _context->err.callback( _error );
  23694. }
  23695. }
  23696. }
  23697. static void REGAL_CALL error_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value)
  23698. {
  23699. Internal("error_glProgramUniform1iv","()");
  23700. RegalContext *_context = REGAL_GET_CONTEXT();
  23701. RegalAssert(_context);
  23702. DispatchTableGL *_next = _context->dispatcher.error.next();
  23703. RegalAssert(_next);
  23704. GLenum _error = GL_NO_ERROR;
  23705. if (!_context->err.inBeginEnd)
  23706. _error = _next->call(&_next->glGetError)();
  23707. RegalAssert(_error==GL_NO_ERROR);
  23708. _next->call(&_next->glProgramUniform1iv)(program, location, count, value);
  23709. if (!_context->err.inBeginEnd) {
  23710. _error = _next->call(&_next->glGetError)();
  23711. if (_error!=GL_NO_ERROR) {
  23712. Error("glProgramUniform1iv : ",Token::GLerrorToString(_error));
  23713. #if REGAL_BREAK
  23714. Break::ErrorCB(_error);
  23715. #endif
  23716. if (_context->err.callback)
  23717. _context->err.callback( _error );
  23718. }
  23719. }
  23720. }
  23721. static void REGAL_CALL error_glProgramUniform1ui(GLuint program, GLint location, GLuint v0)
  23722. {
  23723. Internal("error_glProgramUniform1ui","()");
  23724. RegalContext *_context = REGAL_GET_CONTEXT();
  23725. RegalAssert(_context);
  23726. DispatchTableGL *_next = _context->dispatcher.error.next();
  23727. RegalAssert(_next);
  23728. GLenum _error = GL_NO_ERROR;
  23729. if (!_context->err.inBeginEnd)
  23730. _error = _next->call(&_next->glGetError)();
  23731. RegalAssert(_error==GL_NO_ERROR);
  23732. _next->call(&_next->glProgramUniform1ui)(program, location, v0);
  23733. if (!_context->err.inBeginEnd) {
  23734. _error = _next->call(&_next->glGetError)();
  23735. if (_error!=GL_NO_ERROR) {
  23736. Error("glProgramUniform1ui : ",Token::GLerrorToString(_error));
  23737. #if REGAL_BREAK
  23738. Break::ErrorCB(_error);
  23739. #endif
  23740. if (_context->err.callback)
  23741. _context->err.callback( _error );
  23742. }
  23743. }
  23744. }
  23745. static void REGAL_CALL error_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
  23746. {
  23747. Internal("error_glProgramUniform1uiv","()");
  23748. RegalContext *_context = REGAL_GET_CONTEXT();
  23749. RegalAssert(_context);
  23750. DispatchTableGL *_next = _context->dispatcher.error.next();
  23751. RegalAssert(_next);
  23752. GLenum _error = GL_NO_ERROR;
  23753. if (!_context->err.inBeginEnd)
  23754. _error = _next->call(&_next->glGetError)();
  23755. RegalAssert(_error==GL_NO_ERROR);
  23756. _next->call(&_next->glProgramUniform1uiv)(program, location, count, value);
  23757. if (!_context->err.inBeginEnd) {
  23758. _error = _next->call(&_next->glGetError)();
  23759. if (_error!=GL_NO_ERROR) {
  23760. Error("glProgramUniform1uiv : ",Token::GLerrorToString(_error));
  23761. #if REGAL_BREAK
  23762. Break::ErrorCB(_error);
  23763. #endif
  23764. if (_context->err.callback)
  23765. _context->err.callback( _error );
  23766. }
  23767. }
  23768. }
  23769. static void REGAL_CALL error_glProgramUniform2d(GLuint program, GLint location, GLdouble x, GLdouble y)
  23770. {
  23771. Internal("error_glProgramUniform2d","()");
  23772. RegalContext *_context = REGAL_GET_CONTEXT();
  23773. RegalAssert(_context);
  23774. DispatchTableGL *_next = _context->dispatcher.error.next();
  23775. RegalAssert(_next);
  23776. GLenum _error = GL_NO_ERROR;
  23777. if (!_context->err.inBeginEnd)
  23778. _error = _next->call(&_next->glGetError)();
  23779. RegalAssert(_error==GL_NO_ERROR);
  23780. _next->call(&_next->glProgramUniform2d)(program, location, x, y);
  23781. if (!_context->err.inBeginEnd) {
  23782. _error = _next->call(&_next->glGetError)();
  23783. if (_error!=GL_NO_ERROR) {
  23784. Error("glProgramUniform2d : ",Token::GLerrorToString(_error));
  23785. #if REGAL_BREAK
  23786. Break::ErrorCB(_error);
  23787. #endif
  23788. if (_context->err.callback)
  23789. _context->err.callback( _error );
  23790. }
  23791. }
  23792. }
  23793. static void REGAL_CALL error_glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
  23794. {
  23795. Internal("error_glProgramUniform2dv","()");
  23796. RegalContext *_context = REGAL_GET_CONTEXT();
  23797. RegalAssert(_context);
  23798. DispatchTableGL *_next = _context->dispatcher.error.next();
  23799. RegalAssert(_next);
  23800. GLenum _error = GL_NO_ERROR;
  23801. if (!_context->err.inBeginEnd)
  23802. _error = _next->call(&_next->glGetError)();
  23803. RegalAssert(_error==GL_NO_ERROR);
  23804. _next->call(&_next->glProgramUniform2dv)(program, location, count, value);
  23805. if (!_context->err.inBeginEnd) {
  23806. _error = _next->call(&_next->glGetError)();
  23807. if (_error!=GL_NO_ERROR) {
  23808. Error("glProgramUniform2dv : ",Token::GLerrorToString(_error));
  23809. #if REGAL_BREAK
  23810. Break::ErrorCB(_error);
  23811. #endif
  23812. if (_context->err.callback)
  23813. _context->err.callback( _error );
  23814. }
  23815. }
  23816. }
  23817. static void REGAL_CALL error_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y)
  23818. {
  23819. Internal("error_glProgramUniform2f","()");
  23820. RegalContext *_context = REGAL_GET_CONTEXT();
  23821. RegalAssert(_context);
  23822. DispatchTableGL *_next = _context->dispatcher.error.next();
  23823. RegalAssert(_next);
  23824. GLenum _error = GL_NO_ERROR;
  23825. if (!_context->err.inBeginEnd)
  23826. _error = _next->call(&_next->glGetError)();
  23827. RegalAssert(_error==GL_NO_ERROR);
  23828. _next->call(&_next->glProgramUniform2f)(program, location, x, y);
  23829. if (!_context->err.inBeginEnd) {
  23830. _error = _next->call(&_next->glGetError)();
  23831. if (_error!=GL_NO_ERROR) {
  23832. Error("glProgramUniform2f : ",Token::GLerrorToString(_error));
  23833. #if REGAL_BREAK
  23834. Break::ErrorCB(_error);
  23835. #endif
  23836. if (_context->err.callback)
  23837. _context->err.callback( _error );
  23838. }
  23839. }
  23840. }
  23841. static void REGAL_CALL error_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
  23842. {
  23843. Internal("error_glProgramUniform2fv","()");
  23844. RegalContext *_context = REGAL_GET_CONTEXT();
  23845. RegalAssert(_context);
  23846. DispatchTableGL *_next = _context->dispatcher.error.next();
  23847. RegalAssert(_next);
  23848. GLenum _error = GL_NO_ERROR;
  23849. if (!_context->err.inBeginEnd)
  23850. _error = _next->call(&_next->glGetError)();
  23851. RegalAssert(_error==GL_NO_ERROR);
  23852. _next->call(&_next->glProgramUniform2fv)(program, location, count, value);
  23853. if (!_context->err.inBeginEnd) {
  23854. _error = _next->call(&_next->glGetError)();
  23855. if (_error!=GL_NO_ERROR) {
  23856. Error("glProgramUniform2fv : ",Token::GLerrorToString(_error));
  23857. #if REGAL_BREAK
  23858. Break::ErrorCB(_error);
  23859. #endif
  23860. if (_context->err.callback)
  23861. _context->err.callback( _error );
  23862. }
  23863. }
  23864. }
  23865. static void REGAL_CALL error_glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y)
  23866. {
  23867. Internal("error_glProgramUniform2i","()");
  23868. RegalContext *_context = REGAL_GET_CONTEXT();
  23869. RegalAssert(_context);
  23870. DispatchTableGL *_next = _context->dispatcher.error.next();
  23871. RegalAssert(_next);
  23872. GLenum _error = GL_NO_ERROR;
  23873. if (!_context->err.inBeginEnd)
  23874. _error = _next->call(&_next->glGetError)();
  23875. RegalAssert(_error==GL_NO_ERROR);
  23876. _next->call(&_next->glProgramUniform2i)(program, location, x, y);
  23877. if (!_context->err.inBeginEnd) {
  23878. _error = _next->call(&_next->glGetError)();
  23879. if (_error!=GL_NO_ERROR) {
  23880. Error("glProgramUniform2i : ",Token::GLerrorToString(_error));
  23881. #if REGAL_BREAK
  23882. Break::ErrorCB(_error);
  23883. #endif
  23884. if (_context->err.callback)
  23885. _context->err.callback( _error );
  23886. }
  23887. }
  23888. }
  23889. static void REGAL_CALL error_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value)
  23890. {
  23891. Internal("error_glProgramUniform2iv","()");
  23892. RegalContext *_context = REGAL_GET_CONTEXT();
  23893. RegalAssert(_context);
  23894. DispatchTableGL *_next = _context->dispatcher.error.next();
  23895. RegalAssert(_next);
  23896. GLenum _error = GL_NO_ERROR;
  23897. if (!_context->err.inBeginEnd)
  23898. _error = _next->call(&_next->glGetError)();
  23899. RegalAssert(_error==GL_NO_ERROR);
  23900. _next->call(&_next->glProgramUniform2iv)(program, location, count, value);
  23901. if (!_context->err.inBeginEnd) {
  23902. _error = _next->call(&_next->glGetError)();
  23903. if (_error!=GL_NO_ERROR) {
  23904. Error("glProgramUniform2iv : ",Token::GLerrorToString(_error));
  23905. #if REGAL_BREAK
  23906. Break::ErrorCB(_error);
  23907. #endif
  23908. if (_context->err.callback)
  23909. _context->err.callback( _error );
  23910. }
  23911. }
  23912. }
  23913. static void REGAL_CALL error_glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y)
  23914. {
  23915. Internal("error_glProgramUniform2ui","()");
  23916. RegalContext *_context = REGAL_GET_CONTEXT();
  23917. RegalAssert(_context);
  23918. DispatchTableGL *_next = _context->dispatcher.error.next();
  23919. RegalAssert(_next);
  23920. GLenum _error = GL_NO_ERROR;
  23921. if (!_context->err.inBeginEnd)
  23922. _error = _next->call(&_next->glGetError)();
  23923. RegalAssert(_error==GL_NO_ERROR);
  23924. _next->call(&_next->glProgramUniform2ui)(program, location, x, y);
  23925. if (!_context->err.inBeginEnd) {
  23926. _error = _next->call(&_next->glGetError)();
  23927. if (_error!=GL_NO_ERROR) {
  23928. Error("glProgramUniform2ui : ",Token::GLerrorToString(_error));
  23929. #if REGAL_BREAK
  23930. Break::ErrorCB(_error);
  23931. #endif
  23932. if (_context->err.callback)
  23933. _context->err.callback( _error );
  23934. }
  23935. }
  23936. }
  23937. static void REGAL_CALL error_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
  23938. {
  23939. Internal("error_glProgramUniform2uiv","()");
  23940. RegalContext *_context = REGAL_GET_CONTEXT();
  23941. RegalAssert(_context);
  23942. DispatchTableGL *_next = _context->dispatcher.error.next();
  23943. RegalAssert(_next);
  23944. GLenum _error = GL_NO_ERROR;
  23945. if (!_context->err.inBeginEnd)
  23946. _error = _next->call(&_next->glGetError)();
  23947. RegalAssert(_error==GL_NO_ERROR);
  23948. _next->call(&_next->glProgramUniform2uiv)(program, location, count, value);
  23949. if (!_context->err.inBeginEnd) {
  23950. _error = _next->call(&_next->glGetError)();
  23951. if (_error!=GL_NO_ERROR) {
  23952. Error("glProgramUniform2uiv : ",Token::GLerrorToString(_error));
  23953. #if REGAL_BREAK
  23954. Break::ErrorCB(_error);
  23955. #endif
  23956. if (_context->err.callback)
  23957. _context->err.callback( _error );
  23958. }
  23959. }
  23960. }
  23961. static void REGAL_CALL error_glProgramUniform3d(GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z)
  23962. {
  23963. Internal("error_glProgramUniform3d","()");
  23964. RegalContext *_context = REGAL_GET_CONTEXT();
  23965. RegalAssert(_context);
  23966. DispatchTableGL *_next = _context->dispatcher.error.next();
  23967. RegalAssert(_next);
  23968. GLenum _error = GL_NO_ERROR;
  23969. if (!_context->err.inBeginEnd)
  23970. _error = _next->call(&_next->glGetError)();
  23971. RegalAssert(_error==GL_NO_ERROR);
  23972. _next->call(&_next->glProgramUniform3d)(program, location, x, y, z);
  23973. if (!_context->err.inBeginEnd) {
  23974. _error = _next->call(&_next->glGetError)();
  23975. if (_error!=GL_NO_ERROR) {
  23976. Error("glProgramUniform3d : ",Token::GLerrorToString(_error));
  23977. #if REGAL_BREAK
  23978. Break::ErrorCB(_error);
  23979. #endif
  23980. if (_context->err.callback)
  23981. _context->err.callback( _error );
  23982. }
  23983. }
  23984. }
  23985. static void REGAL_CALL error_glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
  23986. {
  23987. Internal("error_glProgramUniform3dv","()");
  23988. RegalContext *_context = REGAL_GET_CONTEXT();
  23989. RegalAssert(_context);
  23990. DispatchTableGL *_next = _context->dispatcher.error.next();
  23991. RegalAssert(_next);
  23992. GLenum _error = GL_NO_ERROR;
  23993. if (!_context->err.inBeginEnd)
  23994. _error = _next->call(&_next->glGetError)();
  23995. RegalAssert(_error==GL_NO_ERROR);
  23996. _next->call(&_next->glProgramUniform3dv)(program, location, count, value);
  23997. if (!_context->err.inBeginEnd) {
  23998. _error = _next->call(&_next->glGetError)();
  23999. if (_error!=GL_NO_ERROR) {
  24000. Error("glProgramUniform3dv : ",Token::GLerrorToString(_error));
  24001. #if REGAL_BREAK
  24002. Break::ErrorCB(_error);
  24003. #endif
  24004. if (_context->err.callback)
  24005. _context->err.callback( _error );
  24006. }
  24007. }
  24008. }
  24009. static void REGAL_CALL error_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z)
  24010. {
  24011. Internal("error_glProgramUniform3f","()");
  24012. RegalContext *_context = REGAL_GET_CONTEXT();
  24013. RegalAssert(_context);
  24014. DispatchTableGL *_next = _context->dispatcher.error.next();
  24015. RegalAssert(_next);
  24016. GLenum _error = GL_NO_ERROR;
  24017. if (!_context->err.inBeginEnd)
  24018. _error = _next->call(&_next->glGetError)();
  24019. RegalAssert(_error==GL_NO_ERROR);
  24020. _next->call(&_next->glProgramUniform3f)(program, location, x, y, z);
  24021. if (!_context->err.inBeginEnd) {
  24022. _error = _next->call(&_next->glGetError)();
  24023. if (_error!=GL_NO_ERROR) {
  24024. Error("glProgramUniform3f : ",Token::GLerrorToString(_error));
  24025. #if REGAL_BREAK
  24026. Break::ErrorCB(_error);
  24027. #endif
  24028. if (_context->err.callback)
  24029. _context->err.callback( _error );
  24030. }
  24031. }
  24032. }
  24033. static void REGAL_CALL error_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
  24034. {
  24035. Internal("error_glProgramUniform3fv","()");
  24036. RegalContext *_context = REGAL_GET_CONTEXT();
  24037. RegalAssert(_context);
  24038. DispatchTableGL *_next = _context->dispatcher.error.next();
  24039. RegalAssert(_next);
  24040. GLenum _error = GL_NO_ERROR;
  24041. if (!_context->err.inBeginEnd)
  24042. _error = _next->call(&_next->glGetError)();
  24043. RegalAssert(_error==GL_NO_ERROR);
  24044. _next->call(&_next->glProgramUniform3fv)(program, location, count, value);
  24045. if (!_context->err.inBeginEnd) {
  24046. _error = _next->call(&_next->glGetError)();
  24047. if (_error!=GL_NO_ERROR) {
  24048. Error("glProgramUniform3fv : ",Token::GLerrorToString(_error));
  24049. #if REGAL_BREAK
  24050. Break::ErrorCB(_error);
  24051. #endif
  24052. if (_context->err.callback)
  24053. _context->err.callback( _error );
  24054. }
  24055. }
  24056. }
  24057. static void REGAL_CALL error_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z)
  24058. {
  24059. Internal("error_glProgramUniform3i","()");
  24060. RegalContext *_context = REGAL_GET_CONTEXT();
  24061. RegalAssert(_context);
  24062. DispatchTableGL *_next = _context->dispatcher.error.next();
  24063. RegalAssert(_next);
  24064. GLenum _error = GL_NO_ERROR;
  24065. if (!_context->err.inBeginEnd)
  24066. _error = _next->call(&_next->glGetError)();
  24067. RegalAssert(_error==GL_NO_ERROR);
  24068. _next->call(&_next->glProgramUniform3i)(program, location, x, y, z);
  24069. if (!_context->err.inBeginEnd) {
  24070. _error = _next->call(&_next->glGetError)();
  24071. if (_error!=GL_NO_ERROR) {
  24072. Error("glProgramUniform3i : ",Token::GLerrorToString(_error));
  24073. #if REGAL_BREAK
  24074. Break::ErrorCB(_error);
  24075. #endif
  24076. if (_context->err.callback)
  24077. _context->err.callback( _error );
  24078. }
  24079. }
  24080. }
  24081. static void REGAL_CALL error_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value)
  24082. {
  24083. Internal("error_glProgramUniform3iv","()");
  24084. RegalContext *_context = REGAL_GET_CONTEXT();
  24085. RegalAssert(_context);
  24086. DispatchTableGL *_next = _context->dispatcher.error.next();
  24087. RegalAssert(_next);
  24088. GLenum _error = GL_NO_ERROR;
  24089. if (!_context->err.inBeginEnd)
  24090. _error = _next->call(&_next->glGetError)();
  24091. RegalAssert(_error==GL_NO_ERROR);
  24092. _next->call(&_next->glProgramUniform3iv)(program, location, count, value);
  24093. if (!_context->err.inBeginEnd) {
  24094. _error = _next->call(&_next->glGetError)();
  24095. if (_error!=GL_NO_ERROR) {
  24096. Error("glProgramUniform3iv : ",Token::GLerrorToString(_error));
  24097. #if REGAL_BREAK
  24098. Break::ErrorCB(_error);
  24099. #endif
  24100. if (_context->err.callback)
  24101. _context->err.callback( _error );
  24102. }
  24103. }
  24104. }
  24105. static void REGAL_CALL error_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z)
  24106. {
  24107. Internal("error_glProgramUniform3ui","()");
  24108. RegalContext *_context = REGAL_GET_CONTEXT();
  24109. RegalAssert(_context);
  24110. DispatchTableGL *_next = _context->dispatcher.error.next();
  24111. RegalAssert(_next);
  24112. GLenum _error = GL_NO_ERROR;
  24113. if (!_context->err.inBeginEnd)
  24114. _error = _next->call(&_next->glGetError)();
  24115. RegalAssert(_error==GL_NO_ERROR);
  24116. _next->call(&_next->glProgramUniform3ui)(program, location, x, y, z);
  24117. if (!_context->err.inBeginEnd) {
  24118. _error = _next->call(&_next->glGetError)();
  24119. if (_error!=GL_NO_ERROR) {
  24120. Error("glProgramUniform3ui : ",Token::GLerrorToString(_error));
  24121. #if REGAL_BREAK
  24122. Break::ErrorCB(_error);
  24123. #endif
  24124. if (_context->err.callback)
  24125. _context->err.callback( _error );
  24126. }
  24127. }
  24128. }
  24129. static void REGAL_CALL error_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
  24130. {
  24131. Internal("error_glProgramUniform3uiv","()");
  24132. RegalContext *_context = REGAL_GET_CONTEXT();
  24133. RegalAssert(_context);
  24134. DispatchTableGL *_next = _context->dispatcher.error.next();
  24135. RegalAssert(_next);
  24136. GLenum _error = GL_NO_ERROR;
  24137. if (!_context->err.inBeginEnd)
  24138. _error = _next->call(&_next->glGetError)();
  24139. RegalAssert(_error==GL_NO_ERROR);
  24140. _next->call(&_next->glProgramUniform3uiv)(program, location, count, value);
  24141. if (!_context->err.inBeginEnd) {
  24142. _error = _next->call(&_next->glGetError)();
  24143. if (_error!=GL_NO_ERROR) {
  24144. Error("glProgramUniform3uiv : ",Token::GLerrorToString(_error));
  24145. #if REGAL_BREAK
  24146. Break::ErrorCB(_error);
  24147. #endif
  24148. if (_context->err.callback)
  24149. _context->err.callback( _error );
  24150. }
  24151. }
  24152. }
  24153. static void REGAL_CALL error_glProgramUniform4d(GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  24154. {
  24155. Internal("error_glProgramUniform4d","()");
  24156. RegalContext *_context = REGAL_GET_CONTEXT();
  24157. RegalAssert(_context);
  24158. DispatchTableGL *_next = _context->dispatcher.error.next();
  24159. RegalAssert(_next);
  24160. GLenum _error = GL_NO_ERROR;
  24161. if (!_context->err.inBeginEnd)
  24162. _error = _next->call(&_next->glGetError)();
  24163. RegalAssert(_error==GL_NO_ERROR);
  24164. _next->call(&_next->glProgramUniform4d)(program, location, x, y, z, w);
  24165. if (!_context->err.inBeginEnd) {
  24166. _error = _next->call(&_next->glGetError)();
  24167. if (_error!=GL_NO_ERROR) {
  24168. Error("glProgramUniform4d : ",Token::GLerrorToString(_error));
  24169. #if REGAL_BREAK
  24170. Break::ErrorCB(_error);
  24171. #endif
  24172. if (_context->err.callback)
  24173. _context->err.callback( _error );
  24174. }
  24175. }
  24176. }
  24177. static void REGAL_CALL error_glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
  24178. {
  24179. Internal("error_glProgramUniform4dv","()");
  24180. RegalContext *_context = REGAL_GET_CONTEXT();
  24181. RegalAssert(_context);
  24182. DispatchTableGL *_next = _context->dispatcher.error.next();
  24183. RegalAssert(_next);
  24184. GLenum _error = GL_NO_ERROR;
  24185. if (!_context->err.inBeginEnd)
  24186. _error = _next->call(&_next->glGetError)();
  24187. RegalAssert(_error==GL_NO_ERROR);
  24188. _next->call(&_next->glProgramUniform4dv)(program, location, count, value);
  24189. if (!_context->err.inBeginEnd) {
  24190. _error = _next->call(&_next->glGetError)();
  24191. if (_error!=GL_NO_ERROR) {
  24192. Error("glProgramUniform4dv : ",Token::GLerrorToString(_error));
  24193. #if REGAL_BREAK
  24194. Break::ErrorCB(_error);
  24195. #endif
  24196. if (_context->err.callback)
  24197. _context->err.callback( _error );
  24198. }
  24199. }
  24200. }
  24201. static void REGAL_CALL error_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  24202. {
  24203. Internal("error_glProgramUniform4f","()");
  24204. RegalContext *_context = REGAL_GET_CONTEXT();
  24205. RegalAssert(_context);
  24206. DispatchTableGL *_next = _context->dispatcher.error.next();
  24207. RegalAssert(_next);
  24208. GLenum _error = GL_NO_ERROR;
  24209. if (!_context->err.inBeginEnd)
  24210. _error = _next->call(&_next->glGetError)();
  24211. RegalAssert(_error==GL_NO_ERROR);
  24212. _next->call(&_next->glProgramUniform4f)(program, location, x, y, z, w);
  24213. if (!_context->err.inBeginEnd) {
  24214. _error = _next->call(&_next->glGetError)();
  24215. if (_error!=GL_NO_ERROR) {
  24216. Error("glProgramUniform4f : ",Token::GLerrorToString(_error));
  24217. #if REGAL_BREAK
  24218. Break::ErrorCB(_error);
  24219. #endif
  24220. if (_context->err.callback)
  24221. _context->err.callback( _error );
  24222. }
  24223. }
  24224. }
  24225. static void REGAL_CALL error_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
  24226. {
  24227. Internal("error_glProgramUniform4fv","()");
  24228. RegalContext *_context = REGAL_GET_CONTEXT();
  24229. RegalAssert(_context);
  24230. DispatchTableGL *_next = _context->dispatcher.error.next();
  24231. RegalAssert(_next);
  24232. GLenum _error = GL_NO_ERROR;
  24233. if (!_context->err.inBeginEnd)
  24234. _error = _next->call(&_next->glGetError)();
  24235. RegalAssert(_error==GL_NO_ERROR);
  24236. _next->call(&_next->glProgramUniform4fv)(program, location, count, value);
  24237. if (!_context->err.inBeginEnd) {
  24238. _error = _next->call(&_next->glGetError)();
  24239. if (_error!=GL_NO_ERROR) {
  24240. Error("glProgramUniform4fv : ",Token::GLerrorToString(_error));
  24241. #if REGAL_BREAK
  24242. Break::ErrorCB(_error);
  24243. #endif
  24244. if (_context->err.callback)
  24245. _context->err.callback( _error );
  24246. }
  24247. }
  24248. }
  24249. static void REGAL_CALL error_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w)
  24250. {
  24251. Internal("error_glProgramUniform4i","()");
  24252. RegalContext *_context = REGAL_GET_CONTEXT();
  24253. RegalAssert(_context);
  24254. DispatchTableGL *_next = _context->dispatcher.error.next();
  24255. RegalAssert(_next);
  24256. GLenum _error = GL_NO_ERROR;
  24257. if (!_context->err.inBeginEnd)
  24258. _error = _next->call(&_next->glGetError)();
  24259. RegalAssert(_error==GL_NO_ERROR);
  24260. _next->call(&_next->glProgramUniform4i)(program, location, x, y, z, w);
  24261. if (!_context->err.inBeginEnd) {
  24262. _error = _next->call(&_next->glGetError)();
  24263. if (_error!=GL_NO_ERROR) {
  24264. Error("glProgramUniform4i : ",Token::GLerrorToString(_error));
  24265. #if REGAL_BREAK
  24266. Break::ErrorCB(_error);
  24267. #endif
  24268. if (_context->err.callback)
  24269. _context->err.callback( _error );
  24270. }
  24271. }
  24272. }
  24273. static void REGAL_CALL error_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value)
  24274. {
  24275. Internal("error_glProgramUniform4iv","()");
  24276. RegalContext *_context = REGAL_GET_CONTEXT();
  24277. RegalAssert(_context);
  24278. DispatchTableGL *_next = _context->dispatcher.error.next();
  24279. RegalAssert(_next);
  24280. GLenum _error = GL_NO_ERROR;
  24281. if (!_context->err.inBeginEnd)
  24282. _error = _next->call(&_next->glGetError)();
  24283. RegalAssert(_error==GL_NO_ERROR);
  24284. _next->call(&_next->glProgramUniform4iv)(program, location, count, value);
  24285. if (!_context->err.inBeginEnd) {
  24286. _error = _next->call(&_next->glGetError)();
  24287. if (_error!=GL_NO_ERROR) {
  24288. Error("glProgramUniform4iv : ",Token::GLerrorToString(_error));
  24289. #if REGAL_BREAK
  24290. Break::ErrorCB(_error);
  24291. #endif
  24292. if (_context->err.callback)
  24293. _context->err.callback( _error );
  24294. }
  24295. }
  24296. }
  24297. static void REGAL_CALL error_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
  24298. {
  24299. Internal("error_glProgramUniform4ui","()");
  24300. RegalContext *_context = REGAL_GET_CONTEXT();
  24301. RegalAssert(_context);
  24302. DispatchTableGL *_next = _context->dispatcher.error.next();
  24303. RegalAssert(_next);
  24304. GLenum _error = GL_NO_ERROR;
  24305. if (!_context->err.inBeginEnd)
  24306. _error = _next->call(&_next->glGetError)();
  24307. RegalAssert(_error==GL_NO_ERROR);
  24308. _next->call(&_next->glProgramUniform4ui)(program, location, x, y, z, w);
  24309. if (!_context->err.inBeginEnd) {
  24310. _error = _next->call(&_next->glGetError)();
  24311. if (_error!=GL_NO_ERROR) {
  24312. Error("glProgramUniform4ui : ",Token::GLerrorToString(_error));
  24313. #if REGAL_BREAK
  24314. Break::ErrorCB(_error);
  24315. #endif
  24316. if (_context->err.callback)
  24317. _context->err.callback( _error );
  24318. }
  24319. }
  24320. }
  24321. static void REGAL_CALL error_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
  24322. {
  24323. Internal("error_glProgramUniform4uiv","()");
  24324. RegalContext *_context = REGAL_GET_CONTEXT();
  24325. RegalAssert(_context);
  24326. DispatchTableGL *_next = _context->dispatcher.error.next();
  24327. RegalAssert(_next);
  24328. GLenum _error = GL_NO_ERROR;
  24329. if (!_context->err.inBeginEnd)
  24330. _error = _next->call(&_next->glGetError)();
  24331. RegalAssert(_error==GL_NO_ERROR);
  24332. _next->call(&_next->glProgramUniform4uiv)(program, location, count, value);
  24333. if (!_context->err.inBeginEnd) {
  24334. _error = _next->call(&_next->glGetError)();
  24335. if (_error!=GL_NO_ERROR) {
  24336. Error("glProgramUniform4uiv : ",Token::GLerrorToString(_error));
  24337. #if REGAL_BREAK
  24338. Break::ErrorCB(_error);
  24339. #endif
  24340. if (_context->err.callback)
  24341. _context->err.callback( _error );
  24342. }
  24343. }
  24344. }
  24345. static void REGAL_CALL error_glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24346. {
  24347. Internal("error_glProgramUniformMatrix2dv","()");
  24348. RegalContext *_context = REGAL_GET_CONTEXT();
  24349. RegalAssert(_context);
  24350. DispatchTableGL *_next = _context->dispatcher.error.next();
  24351. RegalAssert(_next);
  24352. GLenum _error = GL_NO_ERROR;
  24353. if (!_context->err.inBeginEnd)
  24354. _error = _next->call(&_next->glGetError)();
  24355. RegalAssert(_error==GL_NO_ERROR);
  24356. _next->call(&_next->glProgramUniformMatrix2dv)(program, location, count, transpose, value);
  24357. if (!_context->err.inBeginEnd) {
  24358. _error = _next->call(&_next->glGetError)();
  24359. if (_error!=GL_NO_ERROR) {
  24360. Error("glProgramUniformMatrix2dv : ",Token::GLerrorToString(_error));
  24361. #if REGAL_BREAK
  24362. Break::ErrorCB(_error);
  24363. #endif
  24364. if (_context->err.callback)
  24365. _context->err.callback( _error );
  24366. }
  24367. }
  24368. }
  24369. static void REGAL_CALL error_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24370. {
  24371. Internal("error_glProgramUniformMatrix2fv","()");
  24372. RegalContext *_context = REGAL_GET_CONTEXT();
  24373. RegalAssert(_context);
  24374. DispatchTableGL *_next = _context->dispatcher.error.next();
  24375. RegalAssert(_next);
  24376. GLenum _error = GL_NO_ERROR;
  24377. if (!_context->err.inBeginEnd)
  24378. _error = _next->call(&_next->glGetError)();
  24379. RegalAssert(_error==GL_NO_ERROR);
  24380. _next->call(&_next->glProgramUniformMatrix2fv)(program, location, count, transpose, value);
  24381. if (!_context->err.inBeginEnd) {
  24382. _error = _next->call(&_next->glGetError)();
  24383. if (_error!=GL_NO_ERROR) {
  24384. Error("glProgramUniformMatrix2fv : ",Token::GLerrorToString(_error));
  24385. #if REGAL_BREAK
  24386. Break::ErrorCB(_error);
  24387. #endif
  24388. if (_context->err.callback)
  24389. _context->err.callback( _error );
  24390. }
  24391. }
  24392. }
  24393. static void REGAL_CALL error_glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24394. {
  24395. Internal("error_glProgramUniformMatrix2x3dv","()");
  24396. RegalContext *_context = REGAL_GET_CONTEXT();
  24397. RegalAssert(_context);
  24398. DispatchTableGL *_next = _context->dispatcher.error.next();
  24399. RegalAssert(_next);
  24400. GLenum _error = GL_NO_ERROR;
  24401. if (!_context->err.inBeginEnd)
  24402. _error = _next->call(&_next->glGetError)();
  24403. RegalAssert(_error==GL_NO_ERROR);
  24404. _next->call(&_next->glProgramUniformMatrix2x3dv)(program, location, count, transpose, value);
  24405. if (!_context->err.inBeginEnd) {
  24406. _error = _next->call(&_next->glGetError)();
  24407. if (_error!=GL_NO_ERROR) {
  24408. Error("glProgramUniformMatrix2x3dv : ",Token::GLerrorToString(_error));
  24409. #if REGAL_BREAK
  24410. Break::ErrorCB(_error);
  24411. #endif
  24412. if (_context->err.callback)
  24413. _context->err.callback( _error );
  24414. }
  24415. }
  24416. }
  24417. static void REGAL_CALL error_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24418. {
  24419. Internal("error_glProgramUniformMatrix2x3fv","()");
  24420. RegalContext *_context = REGAL_GET_CONTEXT();
  24421. RegalAssert(_context);
  24422. DispatchTableGL *_next = _context->dispatcher.error.next();
  24423. RegalAssert(_next);
  24424. GLenum _error = GL_NO_ERROR;
  24425. if (!_context->err.inBeginEnd)
  24426. _error = _next->call(&_next->glGetError)();
  24427. RegalAssert(_error==GL_NO_ERROR);
  24428. _next->call(&_next->glProgramUniformMatrix2x3fv)(program, location, count, transpose, value);
  24429. if (!_context->err.inBeginEnd) {
  24430. _error = _next->call(&_next->glGetError)();
  24431. if (_error!=GL_NO_ERROR) {
  24432. Error("glProgramUniformMatrix2x3fv : ",Token::GLerrorToString(_error));
  24433. #if REGAL_BREAK
  24434. Break::ErrorCB(_error);
  24435. #endif
  24436. if (_context->err.callback)
  24437. _context->err.callback( _error );
  24438. }
  24439. }
  24440. }
  24441. static void REGAL_CALL error_glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24442. {
  24443. Internal("error_glProgramUniformMatrix2x4dv","()");
  24444. RegalContext *_context = REGAL_GET_CONTEXT();
  24445. RegalAssert(_context);
  24446. DispatchTableGL *_next = _context->dispatcher.error.next();
  24447. RegalAssert(_next);
  24448. GLenum _error = GL_NO_ERROR;
  24449. if (!_context->err.inBeginEnd)
  24450. _error = _next->call(&_next->glGetError)();
  24451. RegalAssert(_error==GL_NO_ERROR);
  24452. _next->call(&_next->glProgramUniformMatrix2x4dv)(program, location, count, transpose, value);
  24453. if (!_context->err.inBeginEnd) {
  24454. _error = _next->call(&_next->glGetError)();
  24455. if (_error!=GL_NO_ERROR) {
  24456. Error("glProgramUniformMatrix2x4dv : ",Token::GLerrorToString(_error));
  24457. #if REGAL_BREAK
  24458. Break::ErrorCB(_error);
  24459. #endif
  24460. if (_context->err.callback)
  24461. _context->err.callback( _error );
  24462. }
  24463. }
  24464. }
  24465. static void REGAL_CALL error_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24466. {
  24467. Internal("error_glProgramUniformMatrix2x4fv","()");
  24468. RegalContext *_context = REGAL_GET_CONTEXT();
  24469. RegalAssert(_context);
  24470. DispatchTableGL *_next = _context->dispatcher.error.next();
  24471. RegalAssert(_next);
  24472. GLenum _error = GL_NO_ERROR;
  24473. if (!_context->err.inBeginEnd)
  24474. _error = _next->call(&_next->glGetError)();
  24475. RegalAssert(_error==GL_NO_ERROR);
  24476. _next->call(&_next->glProgramUniformMatrix2x4fv)(program, location, count, transpose, value);
  24477. if (!_context->err.inBeginEnd) {
  24478. _error = _next->call(&_next->glGetError)();
  24479. if (_error!=GL_NO_ERROR) {
  24480. Error("glProgramUniformMatrix2x4fv : ",Token::GLerrorToString(_error));
  24481. #if REGAL_BREAK
  24482. Break::ErrorCB(_error);
  24483. #endif
  24484. if (_context->err.callback)
  24485. _context->err.callback( _error );
  24486. }
  24487. }
  24488. }
  24489. static void REGAL_CALL error_glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24490. {
  24491. Internal("error_glProgramUniformMatrix3dv","()");
  24492. RegalContext *_context = REGAL_GET_CONTEXT();
  24493. RegalAssert(_context);
  24494. DispatchTableGL *_next = _context->dispatcher.error.next();
  24495. RegalAssert(_next);
  24496. GLenum _error = GL_NO_ERROR;
  24497. if (!_context->err.inBeginEnd)
  24498. _error = _next->call(&_next->glGetError)();
  24499. RegalAssert(_error==GL_NO_ERROR);
  24500. _next->call(&_next->glProgramUniformMatrix3dv)(program, location, count, transpose, value);
  24501. if (!_context->err.inBeginEnd) {
  24502. _error = _next->call(&_next->glGetError)();
  24503. if (_error!=GL_NO_ERROR) {
  24504. Error("glProgramUniformMatrix3dv : ",Token::GLerrorToString(_error));
  24505. #if REGAL_BREAK
  24506. Break::ErrorCB(_error);
  24507. #endif
  24508. if (_context->err.callback)
  24509. _context->err.callback( _error );
  24510. }
  24511. }
  24512. }
  24513. static void REGAL_CALL error_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24514. {
  24515. Internal("error_glProgramUniformMatrix3fv","()");
  24516. RegalContext *_context = REGAL_GET_CONTEXT();
  24517. RegalAssert(_context);
  24518. DispatchTableGL *_next = _context->dispatcher.error.next();
  24519. RegalAssert(_next);
  24520. GLenum _error = GL_NO_ERROR;
  24521. if (!_context->err.inBeginEnd)
  24522. _error = _next->call(&_next->glGetError)();
  24523. RegalAssert(_error==GL_NO_ERROR);
  24524. _next->call(&_next->glProgramUniformMatrix3fv)(program, location, count, transpose, value);
  24525. if (!_context->err.inBeginEnd) {
  24526. _error = _next->call(&_next->glGetError)();
  24527. if (_error!=GL_NO_ERROR) {
  24528. Error("glProgramUniformMatrix3fv : ",Token::GLerrorToString(_error));
  24529. #if REGAL_BREAK
  24530. Break::ErrorCB(_error);
  24531. #endif
  24532. if (_context->err.callback)
  24533. _context->err.callback( _error );
  24534. }
  24535. }
  24536. }
  24537. static void REGAL_CALL error_glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24538. {
  24539. Internal("error_glProgramUniformMatrix3x2dv","()");
  24540. RegalContext *_context = REGAL_GET_CONTEXT();
  24541. RegalAssert(_context);
  24542. DispatchTableGL *_next = _context->dispatcher.error.next();
  24543. RegalAssert(_next);
  24544. GLenum _error = GL_NO_ERROR;
  24545. if (!_context->err.inBeginEnd)
  24546. _error = _next->call(&_next->glGetError)();
  24547. RegalAssert(_error==GL_NO_ERROR);
  24548. _next->call(&_next->glProgramUniformMatrix3x2dv)(program, location, count, transpose, value);
  24549. if (!_context->err.inBeginEnd) {
  24550. _error = _next->call(&_next->glGetError)();
  24551. if (_error!=GL_NO_ERROR) {
  24552. Error("glProgramUniformMatrix3x2dv : ",Token::GLerrorToString(_error));
  24553. #if REGAL_BREAK
  24554. Break::ErrorCB(_error);
  24555. #endif
  24556. if (_context->err.callback)
  24557. _context->err.callback( _error );
  24558. }
  24559. }
  24560. }
  24561. static void REGAL_CALL error_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24562. {
  24563. Internal("error_glProgramUniformMatrix3x2fv","()");
  24564. RegalContext *_context = REGAL_GET_CONTEXT();
  24565. RegalAssert(_context);
  24566. DispatchTableGL *_next = _context->dispatcher.error.next();
  24567. RegalAssert(_next);
  24568. GLenum _error = GL_NO_ERROR;
  24569. if (!_context->err.inBeginEnd)
  24570. _error = _next->call(&_next->glGetError)();
  24571. RegalAssert(_error==GL_NO_ERROR);
  24572. _next->call(&_next->glProgramUniformMatrix3x2fv)(program, location, count, transpose, value);
  24573. if (!_context->err.inBeginEnd) {
  24574. _error = _next->call(&_next->glGetError)();
  24575. if (_error!=GL_NO_ERROR) {
  24576. Error("glProgramUniformMatrix3x2fv : ",Token::GLerrorToString(_error));
  24577. #if REGAL_BREAK
  24578. Break::ErrorCB(_error);
  24579. #endif
  24580. if (_context->err.callback)
  24581. _context->err.callback( _error );
  24582. }
  24583. }
  24584. }
  24585. static void REGAL_CALL error_glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24586. {
  24587. Internal("error_glProgramUniformMatrix3x4dv","()");
  24588. RegalContext *_context = REGAL_GET_CONTEXT();
  24589. RegalAssert(_context);
  24590. DispatchTableGL *_next = _context->dispatcher.error.next();
  24591. RegalAssert(_next);
  24592. GLenum _error = GL_NO_ERROR;
  24593. if (!_context->err.inBeginEnd)
  24594. _error = _next->call(&_next->glGetError)();
  24595. RegalAssert(_error==GL_NO_ERROR);
  24596. _next->call(&_next->glProgramUniformMatrix3x4dv)(program, location, count, transpose, value);
  24597. if (!_context->err.inBeginEnd) {
  24598. _error = _next->call(&_next->glGetError)();
  24599. if (_error!=GL_NO_ERROR) {
  24600. Error("glProgramUniformMatrix3x4dv : ",Token::GLerrorToString(_error));
  24601. #if REGAL_BREAK
  24602. Break::ErrorCB(_error);
  24603. #endif
  24604. if (_context->err.callback)
  24605. _context->err.callback( _error );
  24606. }
  24607. }
  24608. }
  24609. static void REGAL_CALL error_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24610. {
  24611. Internal("error_glProgramUniformMatrix3x4fv","()");
  24612. RegalContext *_context = REGAL_GET_CONTEXT();
  24613. RegalAssert(_context);
  24614. DispatchTableGL *_next = _context->dispatcher.error.next();
  24615. RegalAssert(_next);
  24616. GLenum _error = GL_NO_ERROR;
  24617. if (!_context->err.inBeginEnd)
  24618. _error = _next->call(&_next->glGetError)();
  24619. RegalAssert(_error==GL_NO_ERROR);
  24620. _next->call(&_next->glProgramUniformMatrix3x4fv)(program, location, count, transpose, value);
  24621. if (!_context->err.inBeginEnd) {
  24622. _error = _next->call(&_next->glGetError)();
  24623. if (_error!=GL_NO_ERROR) {
  24624. Error("glProgramUniformMatrix3x4fv : ",Token::GLerrorToString(_error));
  24625. #if REGAL_BREAK
  24626. Break::ErrorCB(_error);
  24627. #endif
  24628. if (_context->err.callback)
  24629. _context->err.callback( _error );
  24630. }
  24631. }
  24632. }
  24633. static void REGAL_CALL error_glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24634. {
  24635. Internal("error_glProgramUniformMatrix4dv","()");
  24636. RegalContext *_context = REGAL_GET_CONTEXT();
  24637. RegalAssert(_context);
  24638. DispatchTableGL *_next = _context->dispatcher.error.next();
  24639. RegalAssert(_next);
  24640. GLenum _error = GL_NO_ERROR;
  24641. if (!_context->err.inBeginEnd)
  24642. _error = _next->call(&_next->glGetError)();
  24643. RegalAssert(_error==GL_NO_ERROR);
  24644. _next->call(&_next->glProgramUniformMatrix4dv)(program, location, count, transpose, value);
  24645. if (!_context->err.inBeginEnd) {
  24646. _error = _next->call(&_next->glGetError)();
  24647. if (_error!=GL_NO_ERROR) {
  24648. Error("glProgramUniformMatrix4dv : ",Token::GLerrorToString(_error));
  24649. #if REGAL_BREAK
  24650. Break::ErrorCB(_error);
  24651. #endif
  24652. if (_context->err.callback)
  24653. _context->err.callback( _error );
  24654. }
  24655. }
  24656. }
  24657. static void REGAL_CALL error_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24658. {
  24659. Internal("error_glProgramUniformMatrix4fv","()");
  24660. RegalContext *_context = REGAL_GET_CONTEXT();
  24661. RegalAssert(_context);
  24662. DispatchTableGL *_next = _context->dispatcher.error.next();
  24663. RegalAssert(_next);
  24664. GLenum _error = GL_NO_ERROR;
  24665. if (!_context->err.inBeginEnd)
  24666. _error = _next->call(&_next->glGetError)();
  24667. RegalAssert(_error==GL_NO_ERROR);
  24668. _next->call(&_next->glProgramUniformMatrix4fv)(program, location, count, transpose, value);
  24669. if (!_context->err.inBeginEnd) {
  24670. _error = _next->call(&_next->glGetError)();
  24671. if (_error!=GL_NO_ERROR) {
  24672. Error("glProgramUniformMatrix4fv : ",Token::GLerrorToString(_error));
  24673. #if REGAL_BREAK
  24674. Break::ErrorCB(_error);
  24675. #endif
  24676. if (_context->err.callback)
  24677. _context->err.callback( _error );
  24678. }
  24679. }
  24680. }
  24681. static void REGAL_CALL error_glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24682. {
  24683. Internal("error_glProgramUniformMatrix4x2dv","()");
  24684. RegalContext *_context = REGAL_GET_CONTEXT();
  24685. RegalAssert(_context);
  24686. DispatchTableGL *_next = _context->dispatcher.error.next();
  24687. RegalAssert(_next);
  24688. GLenum _error = GL_NO_ERROR;
  24689. if (!_context->err.inBeginEnd)
  24690. _error = _next->call(&_next->glGetError)();
  24691. RegalAssert(_error==GL_NO_ERROR);
  24692. _next->call(&_next->glProgramUniformMatrix4x2dv)(program, location, count, transpose, value);
  24693. if (!_context->err.inBeginEnd) {
  24694. _error = _next->call(&_next->glGetError)();
  24695. if (_error!=GL_NO_ERROR) {
  24696. Error("glProgramUniformMatrix4x2dv : ",Token::GLerrorToString(_error));
  24697. #if REGAL_BREAK
  24698. Break::ErrorCB(_error);
  24699. #endif
  24700. if (_context->err.callback)
  24701. _context->err.callback( _error );
  24702. }
  24703. }
  24704. }
  24705. static void REGAL_CALL error_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24706. {
  24707. Internal("error_glProgramUniformMatrix4x2fv","()");
  24708. RegalContext *_context = REGAL_GET_CONTEXT();
  24709. RegalAssert(_context);
  24710. DispatchTableGL *_next = _context->dispatcher.error.next();
  24711. RegalAssert(_next);
  24712. GLenum _error = GL_NO_ERROR;
  24713. if (!_context->err.inBeginEnd)
  24714. _error = _next->call(&_next->glGetError)();
  24715. RegalAssert(_error==GL_NO_ERROR);
  24716. _next->call(&_next->glProgramUniformMatrix4x2fv)(program, location, count, transpose, value);
  24717. if (!_context->err.inBeginEnd) {
  24718. _error = _next->call(&_next->glGetError)();
  24719. if (_error!=GL_NO_ERROR) {
  24720. Error("glProgramUniformMatrix4x2fv : ",Token::GLerrorToString(_error));
  24721. #if REGAL_BREAK
  24722. Break::ErrorCB(_error);
  24723. #endif
  24724. if (_context->err.callback)
  24725. _context->err.callback( _error );
  24726. }
  24727. }
  24728. }
  24729. static void REGAL_CALL error_glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
  24730. {
  24731. Internal("error_glProgramUniformMatrix4x3dv","()");
  24732. RegalContext *_context = REGAL_GET_CONTEXT();
  24733. RegalAssert(_context);
  24734. DispatchTableGL *_next = _context->dispatcher.error.next();
  24735. RegalAssert(_next);
  24736. GLenum _error = GL_NO_ERROR;
  24737. if (!_context->err.inBeginEnd)
  24738. _error = _next->call(&_next->glGetError)();
  24739. RegalAssert(_error==GL_NO_ERROR);
  24740. _next->call(&_next->glProgramUniformMatrix4x3dv)(program, location, count, transpose, value);
  24741. if (!_context->err.inBeginEnd) {
  24742. _error = _next->call(&_next->glGetError)();
  24743. if (_error!=GL_NO_ERROR) {
  24744. Error("glProgramUniformMatrix4x3dv : ",Token::GLerrorToString(_error));
  24745. #if REGAL_BREAK
  24746. Break::ErrorCB(_error);
  24747. #endif
  24748. if (_context->err.callback)
  24749. _context->err.callback( _error );
  24750. }
  24751. }
  24752. }
  24753. static void REGAL_CALL error_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  24754. {
  24755. Internal("error_glProgramUniformMatrix4x3fv","()");
  24756. RegalContext *_context = REGAL_GET_CONTEXT();
  24757. RegalAssert(_context);
  24758. DispatchTableGL *_next = _context->dispatcher.error.next();
  24759. RegalAssert(_next);
  24760. GLenum _error = GL_NO_ERROR;
  24761. if (!_context->err.inBeginEnd)
  24762. _error = _next->call(&_next->glGetError)();
  24763. RegalAssert(_error==GL_NO_ERROR);
  24764. _next->call(&_next->glProgramUniformMatrix4x3fv)(program, location, count, transpose, value);
  24765. if (!_context->err.inBeginEnd) {
  24766. _error = _next->call(&_next->glGetError)();
  24767. if (_error!=GL_NO_ERROR) {
  24768. Error("glProgramUniformMatrix4x3fv : ",Token::GLerrorToString(_error));
  24769. #if REGAL_BREAK
  24770. Break::ErrorCB(_error);
  24771. #endif
  24772. if (_context->err.callback)
  24773. _context->err.callback( _error );
  24774. }
  24775. }
  24776. }
  24777. static void REGAL_CALL error_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
  24778. {
  24779. Internal("error_glUseProgramStages","()");
  24780. RegalContext *_context = REGAL_GET_CONTEXT();
  24781. RegalAssert(_context);
  24782. DispatchTableGL *_next = _context->dispatcher.error.next();
  24783. RegalAssert(_next);
  24784. GLenum _error = GL_NO_ERROR;
  24785. if (!_context->err.inBeginEnd)
  24786. _error = _next->call(&_next->glGetError)();
  24787. RegalAssert(_error==GL_NO_ERROR);
  24788. _next->call(&_next->glUseProgramStages)(pipeline, stages, program);
  24789. if (!_context->err.inBeginEnd) {
  24790. _error = _next->call(&_next->glGetError)();
  24791. if (_error!=GL_NO_ERROR) {
  24792. Error("glUseProgramStages : ",Token::GLerrorToString(_error));
  24793. #if REGAL_BREAK
  24794. Break::ErrorCB(_error);
  24795. #endif
  24796. if (_context->err.callback)
  24797. _context->err.callback( _error );
  24798. }
  24799. }
  24800. }
  24801. static void REGAL_CALL error_glValidateProgramPipeline(GLuint pipeline)
  24802. {
  24803. Internal("error_glValidateProgramPipeline","()");
  24804. RegalContext *_context = REGAL_GET_CONTEXT();
  24805. RegalAssert(_context);
  24806. DispatchTableGL *_next = _context->dispatcher.error.next();
  24807. RegalAssert(_next);
  24808. GLenum _error = GL_NO_ERROR;
  24809. if (!_context->err.inBeginEnd)
  24810. _error = _next->call(&_next->glGetError)();
  24811. RegalAssert(_error==GL_NO_ERROR);
  24812. _next->call(&_next->glValidateProgramPipeline)(pipeline);
  24813. if (!_context->err.inBeginEnd) {
  24814. _error = _next->call(&_next->glGetError)();
  24815. if (_error!=GL_NO_ERROR) {
  24816. Error("glValidateProgramPipeline : ",Token::GLerrorToString(_error));
  24817. #if REGAL_BREAK
  24818. Break::ErrorCB(_error);
  24819. #endif
  24820. if (_context->err.callback)
  24821. _context->err.callback( _error );
  24822. }
  24823. }
  24824. }
  24825. // GL_ARB_shader_atomic_counters
  24826. static void REGAL_CALL error_glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params)
  24827. {
  24828. Internal("error_glGetActiveAtomicCounterBufferiv","()");
  24829. RegalContext *_context = REGAL_GET_CONTEXT();
  24830. RegalAssert(_context);
  24831. DispatchTableGL *_next = _context->dispatcher.error.next();
  24832. RegalAssert(_next);
  24833. GLenum _error = GL_NO_ERROR;
  24834. if (!_context->err.inBeginEnd)
  24835. _error = _next->call(&_next->glGetError)();
  24836. RegalAssert(_error==GL_NO_ERROR);
  24837. _next->call(&_next->glGetActiveAtomicCounterBufferiv)(program, bufferIndex, pname, params);
  24838. if (!_context->err.inBeginEnd) {
  24839. _error = _next->call(&_next->glGetError)();
  24840. if (_error!=GL_NO_ERROR) {
  24841. Error("glGetActiveAtomicCounterBufferiv : ",Token::GLerrorToString(_error));
  24842. #if REGAL_BREAK
  24843. Break::ErrorCB(_error);
  24844. #endif
  24845. if (_context->err.callback)
  24846. _context->err.callback( _error );
  24847. }
  24848. }
  24849. }
  24850. // GL_ARB_shader_image_load_store
  24851. static void REGAL_CALL error_glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)
  24852. {
  24853. Internal("error_glBindImageTexture","()");
  24854. RegalContext *_context = REGAL_GET_CONTEXT();
  24855. RegalAssert(_context);
  24856. DispatchTableGL *_next = _context->dispatcher.error.next();
  24857. RegalAssert(_next);
  24858. GLenum _error = GL_NO_ERROR;
  24859. if (!_context->err.inBeginEnd)
  24860. _error = _next->call(&_next->glGetError)();
  24861. RegalAssert(_error==GL_NO_ERROR);
  24862. _next->call(&_next->glBindImageTexture)(unit, texture, level, layered, layer, access, format);
  24863. if (!_context->err.inBeginEnd) {
  24864. _error = _next->call(&_next->glGetError)();
  24865. if (_error!=GL_NO_ERROR) {
  24866. Error("glBindImageTexture : ",Token::GLerrorToString(_error));
  24867. #if REGAL_BREAK
  24868. Break::ErrorCB(_error);
  24869. #endif
  24870. if (_context->err.callback)
  24871. _context->err.callback( _error );
  24872. }
  24873. }
  24874. }
  24875. static void REGAL_CALL error_glMemoryBarrier(GLbitfield barriers)
  24876. {
  24877. Internal("error_glMemoryBarrier","()");
  24878. RegalContext *_context = REGAL_GET_CONTEXT();
  24879. RegalAssert(_context);
  24880. DispatchTableGL *_next = _context->dispatcher.error.next();
  24881. RegalAssert(_next);
  24882. GLenum _error = GL_NO_ERROR;
  24883. if (!_context->err.inBeginEnd)
  24884. _error = _next->call(&_next->glGetError)();
  24885. RegalAssert(_error==GL_NO_ERROR);
  24886. _next->call(&_next->glMemoryBarrier)(barriers);
  24887. if (!_context->err.inBeginEnd) {
  24888. _error = _next->call(&_next->glGetError)();
  24889. if (_error!=GL_NO_ERROR) {
  24890. Error("glMemoryBarrier : ",Token::GLerrorToString(_error));
  24891. #if REGAL_BREAK
  24892. Break::ErrorCB(_error);
  24893. #endif
  24894. if (_context->err.callback)
  24895. _context->err.callback( _error );
  24896. }
  24897. }
  24898. }
  24899. // GL_ARB_shader_objects
  24900. static void REGAL_CALL error_glAttachObjectARB(GLhandleARB containerObj, GLhandleARB obj)
  24901. {
  24902. Internal("error_glAttachObjectARB","()");
  24903. RegalContext *_context = REGAL_GET_CONTEXT();
  24904. RegalAssert(_context);
  24905. DispatchTableGL *_next = _context->dispatcher.error.next();
  24906. RegalAssert(_next);
  24907. GLenum _error = GL_NO_ERROR;
  24908. if (!_context->err.inBeginEnd)
  24909. _error = _next->call(&_next->glGetError)();
  24910. RegalAssert(_error==GL_NO_ERROR);
  24911. _next->call(&_next->glAttachObjectARB)(containerObj, obj);
  24912. if (!_context->err.inBeginEnd) {
  24913. _error = _next->call(&_next->glGetError)();
  24914. if (_error!=GL_NO_ERROR) {
  24915. Error("glAttachObjectARB : ",Token::GLerrorToString(_error));
  24916. #if REGAL_BREAK
  24917. Break::ErrorCB(_error);
  24918. #endif
  24919. if (_context->err.callback)
  24920. _context->err.callback( _error );
  24921. }
  24922. }
  24923. }
  24924. static void REGAL_CALL error_glCompileShaderARB(GLhandleARB shaderObj)
  24925. {
  24926. Internal("error_glCompileShaderARB","()");
  24927. RegalContext *_context = REGAL_GET_CONTEXT();
  24928. RegalAssert(_context);
  24929. DispatchTableGL *_next = _context->dispatcher.error.next();
  24930. RegalAssert(_next);
  24931. GLenum _error = GL_NO_ERROR;
  24932. if (!_context->err.inBeginEnd)
  24933. _error = _next->call(&_next->glGetError)();
  24934. RegalAssert(_error==GL_NO_ERROR);
  24935. _next->call(&_next->glCompileShaderARB)(shaderObj);
  24936. if (!_context->err.inBeginEnd) {
  24937. _error = _next->call(&_next->glGetError)();
  24938. if (_error!=GL_NO_ERROR) {
  24939. Error("glCompileShaderARB : ",Token::GLerrorToString(_error));
  24940. #if REGAL_BREAK
  24941. Break::ErrorCB(_error);
  24942. #endif
  24943. if (_context->err.callback)
  24944. _context->err.callback( _error );
  24945. }
  24946. }
  24947. }
  24948. static GLhandleARB REGAL_CALL error_glCreateProgramObjectARB(void)
  24949. {
  24950. Internal("error_glCreateProgramObjectARB","()");
  24951. RegalContext *_context = REGAL_GET_CONTEXT();
  24952. RegalAssert(_context);
  24953. DispatchTableGL *_next = _context->dispatcher.error.next();
  24954. RegalAssert(_next);
  24955. GLenum _error = GL_NO_ERROR;
  24956. if (!_context->err.inBeginEnd)
  24957. _error = _next->call(&_next->glGetError)();
  24958. RegalAssert(_error==GL_NO_ERROR);
  24959. GLhandleARB ret = _next->call(&_next->glCreateProgramObjectARB)();
  24960. if (!_context->err.inBeginEnd) {
  24961. _error = _next->call(&_next->glGetError)();
  24962. if (_error!=GL_NO_ERROR) {
  24963. Error("glCreateProgramObjectARB : ",Token::GLerrorToString(_error));
  24964. #if REGAL_BREAK
  24965. Break::ErrorCB(_error);
  24966. #endif
  24967. if (_context->err.callback)
  24968. _context->err.callback( _error );
  24969. }
  24970. }
  24971. return ret;
  24972. }
  24973. static GLhandleARB REGAL_CALL error_glCreateShaderObjectARB(GLenum shaderType)
  24974. {
  24975. Internal("error_glCreateShaderObjectARB","()");
  24976. RegalContext *_context = REGAL_GET_CONTEXT();
  24977. RegalAssert(_context);
  24978. DispatchTableGL *_next = _context->dispatcher.error.next();
  24979. RegalAssert(_next);
  24980. GLenum _error = GL_NO_ERROR;
  24981. if (!_context->err.inBeginEnd)
  24982. _error = _next->call(&_next->glGetError)();
  24983. RegalAssert(_error==GL_NO_ERROR);
  24984. GLhandleARB ret = _next->call(&_next->glCreateShaderObjectARB)(shaderType);
  24985. if (!_context->err.inBeginEnd) {
  24986. _error = _next->call(&_next->glGetError)();
  24987. if (_error!=GL_NO_ERROR) {
  24988. Error("glCreateShaderObjectARB : ",Token::GLerrorToString(_error));
  24989. #if REGAL_BREAK
  24990. Break::ErrorCB(_error);
  24991. #endif
  24992. if (_context->err.callback)
  24993. _context->err.callback( _error );
  24994. }
  24995. }
  24996. return ret;
  24997. }
  24998. static void REGAL_CALL error_glDeleteObjectARB(GLhandleARB obj)
  24999. {
  25000. Internal("error_glDeleteObjectARB","()");
  25001. RegalContext *_context = REGAL_GET_CONTEXT();
  25002. RegalAssert(_context);
  25003. DispatchTableGL *_next = _context->dispatcher.error.next();
  25004. RegalAssert(_next);
  25005. GLenum _error = GL_NO_ERROR;
  25006. if (!_context->err.inBeginEnd)
  25007. _error = _next->call(&_next->glGetError)();
  25008. RegalAssert(_error==GL_NO_ERROR);
  25009. _next->call(&_next->glDeleteObjectARB)(obj);
  25010. if (!_context->err.inBeginEnd) {
  25011. _error = _next->call(&_next->glGetError)();
  25012. if (_error!=GL_NO_ERROR) {
  25013. Error("glDeleteObjectARB : ",Token::GLerrorToString(_error));
  25014. #if REGAL_BREAK
  25015. Break::ErrorCB(_error);
  25016. #endif
  25017. if (_context->err.callback)
  25018. _context->err.callback( _error );
  25019. }
  25020. }
  25021. }
  25022. static void REGAL_CALL error_glDetachObjectARB(GLhandleARB containerObj, GLhandleARB attachedObj)
  25023. {
  25024. Internal("error_glDetachObjectARB","()");
  25025. RegalContext *_context = REGAL_GET_CONTEXT();
  25026. RegalAssert(_context);
  25027. DispatchTableGL *_next = _context->dispatcher.error.next();
  25028. RegalAssert(_next);
  25029. GLenum _error = GL_NO_ERROR;
  25030. if (!_context->err.inBeginEnd)
  25031. _error = _next->call(&_next->glGetError)();
  25032. RegalAssert(_error==GL_NO_ERROR);
  25033. _next->call(&_next->glDetachObjectARB)(containerObj, attachedObj);
  25034. if (!_context->err.inBeginEnd) {
  25035. _error = _next->call(&_next->glGetError)();
  25036. if (_error!=GL_NO_ERROR) {
  25037. Error("glDetachObjectARB : ",Token::GLerrorToString(_error));
  25038. #if REGAL_BREAK
  25039. Break::ErrorCB(_error);
  25040. #endif
  25041. if (_context->err.callback)
  25042. _context->err.callback( _error );
  25043. }
  25044. }
  25045. }
  25046. static void REGAL_CALL error_glGetActiveUniformARB(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
  25047. {
  25048. Internal("error_glGetActiveUniformARB","()");
  25049. RegalContext *_context = REGAL_GET_CONTEXT();
  25050. RegalAssert(_context);
  25051. DispatchTableGL *_next = _context->dispatcher.error.next();
  25052. RegalAssert(_next);
  25053. GLenum _error = GL_NO_ERROR;
  25054. if (!_context->err.inBeginEnd)
  25055. _error = _next->call(&_next->glGetError)();
  25056. RegalAssert(_error==GL_NO_ERROR);
  25057. _next->call(&_next->glGetActiveUniformARB)(programObj, index, maxLength, length, size, type, name);
  25058. if (!_context->err.inBeginEnd) {
  25059. _error = _next->call(&_next->glGetError)();
  25060. if (_error!=GL_NO_ERROR) {
  25061. Error("glGetActiveUniformARB : ",Token::GLerrorToString(_error));
  25062. #if REGAL_BREAK
  25063. Break::ErrorCB(_error);
  25064. #endif
  25065. if (_context->err.callback)
  25066. _context->err.callback( _error );
  25067. }
  25068. }
  25069. }
  25070. static void REGAL_CALL error_glGetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj)
  25071. {
  25072. Internal("error_glGetAttachedObjectsARB","()");
  25073. RegalContext *_context = REGAL_GET_CONTEXT();
  25074. RegalAssert(_context);
  25075. DispatchTableGL *_next = _context->dispatcher.error.next();
  25076. RegalAssert(_next);
  25077. GLenum _error = GL_NO_ERROR;
  25078. if (!_context->err.inBeginEnd)
  25079. _error = _next->call(&_next->glGetError)();
  25080. RegalAssert(_error==GL_NO_ERROR);
  25081. _next->call(&_next->glGetAttachedObjectsARB)(containerObj, maxCount, count, obj);
  25082. if (!_context->err.inBeginEnd) {
  25083. _error = _next->call(&_next->glGetError)();
  25084. if (_error!=GL_NO_ERROR) {
  25085. Error("glGetAttachedObjectsARB : ",Token::GLerrorToString(_error));
  25086. #if REGAL_BREAK
  25087. Break::ErrorCB(_error);
  25088. #endif
  25089. if (_context->err.callback)
  25090. _context->err.callback( _error );
  25091. }
  25092. }
  25093. }
  25094. static GLhandleARB REGAL_CALL error_glGetHandleARB(GLenum pname)
  25095. {
  25096. Internal("error_glGetHandleARB","()");
  25097. RegalContext *_context = REGAL_GET_CONTEXT();
  25098. RegalAssert(_context);
  25099. DispatchTableGL *_next = _context->dispatcher.error.next();
  25100. RegalAssert(_next);
  25101. GLenum _error = GL_NO_ERROR;
  25102. if (!_context->err.inBeginEnd)
  25103. _error = _next->call(&_next->glGetError)();
  25104. RegalAssert(_error==GL_NO_ERROR);
  25105. GLhandleARB ret = _next->call(&_next->glGetHandleARB)(pname);
  25106. if (!_context->err.inBeginEnd) {
  25107. _error = _next->call(&_next->glGetError)();
  25108. if (_error!=GL_NO_ERROR) {
  25109. Error("glGetHandleARB : ",Token::GLerrorToString(_error));
  25110. #if REGAL_BREAK
  25111. Break::ErrorCB(_error);
  25112. #endif
  25113. if (_context->err.callback)
  25114. _context->err.callback( _error );
  25115. }
  25116. }
  25117. return ret;
  25118. }
  25119. static void REGAL_CALL error_glGetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog)
  25120. {
  25121. Internal("error_glGetInfoLogARB","()");
  25122. RegalContext *_context = REGAL_GET_CONTEXT();
  25123. RegalAssert(_context);
  25124. DispatchTableGL *_next = _context->dispatcher.error.next();
  25125. RegalAssert(_next);
  25126. GLenum _error = GL_NO_ERROR;
  25127. if (!_context->err.inBeginEnd)
  25128. _error = _next->call(&_next->glGetError)();
  25129. RegalAssert(_error==GL_NO_ERROR);
  25130. _next->call(&_next->glGetInfoLogARB)(obj, maxLength, length, infoLog);
  25131. if (!_context->err.inBeginEnd) {
  25132. _error = _next->call(&_next->glGetError)();
  25133. if (_error!=GL_NO_ERROR) {
  25134. Error("glGetInfoLogARB : ",Token::GLerrorToString(_error));
  25135. #if REGAL_BREAK
  25136. Break::ErrorCB(_error);
  25137. #endif
  25138. if (_context->err.callback)
  25139. _context->err.callback( _error );
  25140. }
  25141. }
  25142. }
  25143. static void REGAL_CALL error_glGetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat *params)
  25144. {
  25145. Internal("error_glGetObjectParameterfvARB","()");
  25146. RegalContext *_context = REGAL_GET_CONTEXT();
  25147. RegalAssert(_context);
  25148. DispatchTableGL *_next = _context->dispatcher.error.next();
  25149. RegalAssert(_next);
  25150. GLenum _error = GL_NO_ERROR;
  25151. if (!_context->err.inBeginEnd)
  25152. _error = _next->call(&_next->glGetError)();
  25153. RegalAssert(_error==GL_NO_ERROR);
  25154. _next->call(&_next->glGetObjectParameterfvARB)(obj, pname, params);
  25155. if (!_context->err.inBeginEnd) {
  25156. _error = _next->call(&_next->glGetError)();
  25157. if (_error!=GL_NO_ERROR) {
  25158. Error("glGetObjectParameterfvARB : ",Token::GLerrorToString(_error));
  25159. #if REGAL_BREAK
  25160. Break::ErrorCB(_error);
  25161. #endif
  25162. if (_context->err.callback)
  25163. _context->err.callback( _error );
  25164. }
  25165. }
  25166. }
  25167. static void REGAL_CALL error_glGetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint *params)
  25168. {
  25169. Internal("error_glGetObjectParameterivARB","()");
  25170. RegalContext *_context = REGAL_GET_CONTEXT();
  25171. RegalAssert(_context);
  25172. DispatchTableGL *_next = _context->dispatcher.error.next();
  25173. RegalAssert(_next);
  25174. GLenum _error = GL_NO_ERROR;
  25175. if (!_context->err.inBeginEnd)
  25176. _error = _next->call(&_next->glGetError)();
  25177. RegalAssert(_error==GL_NO_ERROR);
  25178. _next->call(&_next->glGetObjectParameterivARB)(obj, pname, params);
  25179. if (!_context->err.inBeginEnd) {
  25180. _error = _next->call(&_next->glGetError)();
  25181. if (_error!=GL_NO_ERROR) {
  25182. Error("glGetObjectParameterivARB : ",Token::GLerrorToString(_error));
  25183. #if REGAL_BREAK
  25184. Break::ErrorCB(_error);
  25185. #endif
  25186. if (_context->err.callback)
  25187. _context->err.callback( _error );
  25188. }
  25189. }
  25190. }
  25191. static void REGAL_CALL error_glGetShaderSourceARB(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source)
  25192. {
  25193. Internal("error_glGetShaderSourceARB","()");
  25194. RegalContext *_context = REGAL_GET_CONTEXT();
  25195. RegalAssert(_context);
  25196. DispatchTableGL *_next = _context->dispatcher.error.next();
  25197. RegalAssert(_next);
  25198. GLenum _error = GL_NO_ERROR;
  25199. if (!_context->err.inBeginEnd)
  25200. _error = _next->call(&_next->glGetError)();
  25201. RegalAssert(_error==GL_NO_ERROR);
  25202. _next->call(&_next->glGetShaderSourceARB)(obj, maxLength, length, source);
  25203. if (!_context->err.inBeginEnd) {
  25204. _error = _next->call(&_next->glGetError)();
  25205. if (_error!=GL_NO_ERROR) {
  25206. Error("glGetShaderSourceARB : ",Token::GLerrorToString(_error));
  25207. #if REGAL_BREAK
  25208. Break::ErrorCB(_error);
  25209. #endif
  25210. if (_context->err.callback)
  25211. _context->err.callback( _error );
  25212. }
  25213. }
  25214. }
  25215. static GLint REGAL_CALL error_glGetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
  25216. {
  25217. Internal("error_glGetUniformLocationARB","()");
  25218. RegalContext *_context = REGAL_GET_CONTEXT();
  25219. RegalAssert(_context);
  25220. DispatchTableGL *_next = _context->dispatcher.error.next();
  25221. RegalAssert(_next);
  25222. GLenum _error = GL_NO_ERROR;
  25223. if (!_context->err.inBeginEnd)
  25224. _error = _next->call(&_next->glGetError)();
  25225. RegalAssert(_error==GL_NO_ERROR);
  25226. GLint ret = _next->call(&_next->glGetUniformLocationARB)(programObj, name);
  25227. if (!_context->err.inBeginEnd) {
  25228. _error = _next->call(&_next->glGetError)();
  25229. if (_error!=GL_NO_ERROR) {
  25230. Error("glGetUniformLocationARB : ",Token::GLerrorToString(_error));
  25231. #if REGAL_BREAK
  25232. Break::ErrorCB(_error);
  25233. #endif
  25234. if (_context->err.callback)
  25235. _context->err.callback( _error );
  25236. }
  25237. }
  25238. return ret;
  25239. }
  25240. static void REGAL_CALL error_glGetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat *params)
  25241. {
  25242. Internal("error_glGetUniformfvARB","()");
  25243. RegalContext *_context = REGAL_GET_CONTEXT();
  25244. RegalAssert(_context);
  25245. DispatchTableGL *_next = _context->dispatcher.error.next();
  25246. RegalAssert(_next);
  25247. GLenum _error = GL_NO_ERROR;
  25248. if (!_context->err.inBeginEnd)
  25249. _error = _next->call(&_next->glGetError)();
  25250. RegalAssert(_error==GL_NO_ERROR);
  25251. _next->call(&_next->glGetUniformfvARB)(programObj, location, params);
  25252. if (!_context->err.inBeginEnd) {
  25253. _error = _next->call(&_next->glGetError)();
  25254. if (_error!=GL_NO_ERROR) {
  25255. Error("glGetUniformfvARB : ",Token::GLerrorToString(_error));
  25256. #if REGAL_BREAK
  25257. Break::ErrorCB(_error);
  25258. #endif
  25259. if (_context->err.callback)
  25260. _context->err.callback( _error );
  25261. }
  25262. }
  25263. }
  25264. static void REGAL_CALL error_glGetUniformivARB(GLhandleARB programObj, GLint location, GLint *params)
  25265. {
  25266. Internal("error_glGetUniformivARB","()");
  25267. RegalContext *_context = REGAL_GET_CONTEXT();
  25268. RegalAssert(_context);
  25269. DispatchTableGL *_next = _context->dispatcher.error.next();
  25270. RegalAssert(_next);
  25271. GLenum _error = GL_NO_ERROR;
  25272. if (!_context->err.inBeginEnd)
  25273. _error = _next->call(&_next->glGetError)();
  25274. RegalAssert(_error==GL_NO_ERROR);
  25275. _next->call(&_next->glGetUniformivARB)(programObj, location, params);
  25276. if (!_context->err.inBeginEnd) {
  25277. _error = _next->call(&_next->glGetError)();
  25278. if (_error!=GL_NO_ERROR) {
  25279. Error("glGetUniformivARB : ",Token::GLerrorToString(_error));
  25280. #if REGAL_BREAK
  25281. Break::ErrorCB(_error);
  25282. #endif
  25283. if (_context->err.callback)
  25284. _context->err.callback( _error );
  25285. }
  25286. }
  25287. }
  25288. static void REGAL_CALL error_glLinkProgramARB(GLhandleARB programObj)
  25289. {
  25290. Internal("error_glLinkProgramARB","()");
  25291. RegalContext *_context = REGAL_GET_CONTEXT();
  25292. RegalAssert(_context);
  25293. DispatchTableGL *_next = _context->dispatcher.error.next();
  25294. RegalAssert(_next);
  25295. GLenum _error = GL_NO_ERROR;
  25296. if (!_context->err.inBeginEnd)
  25297. _error = _next->call(&_next->glGetError)();
  25298. RegalAssert(_error==GL_NO_ERROR);
  25299. _next->call(&_next->glLinkProgramARB)(programObj);
  25300. if (!_context->err.inBeginEnd) {
  25301. _error = _next->call(&_next->glGetError)();
  25302. if (_error!=GL_NO_ERROR) {
  25303. Error("glLinkProgramARB : ",Token::GLerrorToString(_error));
  25304. #if REGAL_BREAK
  25305. Break::ErrorCB(_error);
  25306. #endif
  25307. if (_context->err.callback)
  25308. _context->err.callback( _error );
  25309. }
  25310. }
  25311. }
  25312. static void REGAL_CALL error_glShaderSourceARB(GLhandleARB shaderObj, GLsizei count, const GLcharARB ** const string, const GLint *length)
  25313. {
  25314. Internal("error_glShaderSourceARB","()");
  25315. RegalContext *_context = REGAL_GET_CONTEXT();
  25316. RegalAssert(_context);
  25317. DispatchTableGL *_next = _context->dispatcher.error.next();
  25318. RegalAssert(_next);
  25319. GLenum _error = GL_NO_ERROR;
  25320. if (!_context->err.inBeginEnd)
  25321. _error = _next->call(&_next->glGetError)();
  25322. RegalAssert(_error==GL_NO_ERROR);
  25323. _next->call(&_next->glShaderSourceARB)(shaderObj, count, string, length);
  25324. if (!_context->err.inBeginEnd) {
  25325. _error = _next->call(&_next->glGetError)();
  25326. if (_error!=GL_NO_ERROR) {
  25327. Error("glShaderSourceARB : ",Token::GLerrorToString(_error));
  25328. #if REGAL_BREAK
  25329. Break::ErrorCB(_error);
  25330. #endif
  25331. if (_context->err.callback)
  25332. _context->err.callback( _error );
  25333. }
  25334. }
  25335. }
  25336. static void REGAL_CALL error_glUniform1fARB(GLint location, GLfloat v0)
  25337. {
  25338. Internal("error_glUniform1fARB","()");
  25339. RegalContext *_context = REGAL_GET_CONTEXT();
  25340. RegalAssert(_context);
  25341. DispatchTableGL *_next = _context->dispatcher.error.next();
  25342. RegalAssert(_next);
  25343. GLenum _error = GL_NO_ERROR;
  25344. if (!_context->err.inBeginEnd)
  25345. _error = _next->call(&_next->glGetError)();
  25346. RegalAssert(_error==GL_NO_ERROR);
  25347. _next->call(&_next->glUniform1fARB)(location, v0);
  25348. if (!_context->err.inBeginEnd) {
  25349. _error = _next->call(&_next->glGetError)();
  25350. if (_error!=GL_NO_ERROR) {
  25351. Error("glUniform1fARB : ",Token::GLerrorToString(_error));
  25352. #if REGAL_BREAK
  25353. Break::ErrorCB(_error);
  25354. #endif
  25355. if (_context->err.callback)
  25356. _context->err.callback( _error );
  25357. }
  25358. }
  25359. }
  25360. static void REGAL_CALL error_glUniform1fvARB(GLint location, GLsizei count, const GLfloat *value)
  25361. {
  25362. Internal("error_glUniform1fvARB","()");
  25363. RegalContext *_context = REGAL_GET_CONTEXT();
  25364. RegalAssert(_context);
  25365. DispatchTableGL *_next = _context->dispatcher.error.next();
  25366. RegalAssert(_next);
  25367. GLenum _error = GL_NO_ERROR;
  25368. if (!_context->err.inBeginEnd)
  25369. _error = _next->call(&_next->glGetError)();
  25370. RegalAssert(_error==GL_NO_ERROR);
  25371. _next->call(&_next->glUniform1fvARB)(location, count, value);
  25372. if (!_context->err.inBeginEnd) {
  25373. _error = _next->call(&_next->glGetError)();
  25374. if (_error!=GL_NO_ERROR) {
  25375. Error("glUniform1fvARB : ",Token::GLerrorToString(_error));
  25376. #if REGAL_BREAK
  25377. Break::ErrorCB(_error);
  25378. #endif
  25379. if (_context->err.callback)
  25380. _context->err.callback( _error );
  25381. }
  25382. }
  25383. }
  25384. static void REGAL_CALL error_glUniform1iARB(GLint location, GLint v0)
  25385. {
  25386. Internal("error_glUniform1iARB","()");
  25387. RegalContext *_context = REGAL_GET_CONTEXT();
  25388. RegalAssert(_context);
  25389. DispatchTableGL *_next = _context->dispatcher.error.next();
  25390. RegalAssert(_next);
  25391. GLenum _error = GL_NO_ERROR;
  25392. if (!_context->err.inBeginEnd)
  25393. _error = _next->call(&_next->glGetError)();
  25394. RegalAssert(_error==GL_NO_ERROR);
  25395. _next->call(&_next->glUniform1iARB)(location, v0);
  25396. if (!_context->err.inBeginEnd) {
  25397. _error = _next->call(&_next->glGetError)();
  25398. if (_error!=GL_NO_ERROR) {
  25399. Error("glUniform1iARB : ",Token::GLerrorToString(_error));
  25400. #if REGAL_BREAK
  25401. Break::ErrorCB(_error);
  25402. #endif
  25403. if (_context->err.callback)
  25404. _context->err.callback( _error );
  25405. }
  25406. }
  25407. }
  25408. static void REGAL_CALL error_glUniform1ivARB(GLint location, GLsizei count, const GLint *value)
  25409. {
  25410. Internal("error_glUniform1ivARB","()");
  25411. RegalContext *_context = REGAL_GET_CONTEXT();
  25412. RegalAssert(_context);
  25413. DispatchTableGL *_next = _context->dispatcher.error.next();
  25414. RegalAssert(_next);
  25415. GLenum _error = GL_NO_ERROR;
  25416. if (!_context->err.inBeginEnd)
  25417. _error = _next->call(&_next->glGetError)();
  25418. RegalAssert(_error==GL_NO_ERROR);
  25419. _next->call(&_next->glUniform1ivARB)(location, count, value);
  25420. if (!_context->err.inBeginEnd) {
  25421. _error = _next->call(&_next->glGetError)();
  25422. if (_error!=GL_NO_ERROR) {
  25423. Error("glUniform1ivARB : ",Token::GLerrorToString(_error));
  25424. #if REGAL_BREAK
  25425. Break::ErrorCB(_error);
  25426. #endif
  25427. if (_context->err.callback)
  25428. _context->err.callback( _error );
  25429. }
  25430. }
  25431. }
  25432. static void REGAL_CALL error_glUniform2fARB(GLint location, GLfloat v0, GLfloat v1)
  25433. {
  25434. Internal("error_glUniform2fARB","()");
  25435. RegalContext *_context = REGAL_GET_CONTEXT();
  25436. RegalAssert(_context);
  25437. DispatchTableGL *_next = _context->dispatcher.error.next();
  25438. RegalAssert(_next);
  25439. GLenum _error = GL_NO_ERROR;
  25440. if (!_context->err.inBeginEnd)
  25441. _error = _next->call(&_next->glGetError)();
  25442. RegalAssert(_error==GL_NO_ERROR);
  25443. _next->call(&_next->glUniform2fARB)(location, v0, v1);
  25444. if (!_context->err.inBeginEnd) {
  25445. _error = _next->call(&_next->glGetError)();
  25446. if (_error!=GL_NO_ERROR) {
  25447. Error("glUniform2fARB : ",Token::GLerrorToString(_error));
  25448. #if REGAL_BREAK
  25449. Break::ErrorCB(_error);
  25450. #endif
  25451. if (_context->err.callback)
  25452. _context->err.callback( _error );
  25453. }
  25454. }
  25455. }
  25456. static void REGAL_CALL error_glUniform2fvARB(GLint location, GLsizei count, const GLfloat *value)
  25457. {
  25458. Internal("error_glUniform2fvARB","()");
  25459. RegalContext *_context = REGAL_GET_CONTEXT();
  25460. RegalAssert(_context);
  25461. DispatchTableGL *_next = _context->dispatcher.error.next();
  25462. RegalAssert(_next);
  25463. GLenum _error = GL_NO_ERROR;
  25464. if (!_context->err.inBeginEnd)
  25465. _error = _next->call(&_next->glGetError)();
  25466. RegalAssert(_error==GL_NO_ERROR);
  25467. _next->call(&_next->glUniform2fvARB)(location, count, value);
  25468. if (!_context->err.inBeginEnd) {
  25469. _error = _next->call(&_next->glGetError)();
  25470. if (_error!=GL_NO_ERROR) {
  25471. Error("glUniform2fvARB : ",Token::GLerrorToString(_error));
  25472. #if REGAL_BREAK
  25473. Break::ErrorCB(_error);
  25474. #endif
  25475. if (_context->err.callback)
  25476. _context->err.callback( _error );
  25477. }
  25478. }
  25479. }
  25480. static void REGAL_CALL error_glUniform2iARB(GLint location, GLint v0, GLint v1)
  25481. {
  25482. Internal("error_glUniform2iARB","()");
  25483. RegalContext *_context = REGAL_GET_CONTEXT();
  25484. RegalAssert(_context);
  25485. DispatchTableGL *_next = _context->dispatcher.error.next();
  25486. RegalAssert(_next);
  25487. GLenum _error = GL_NO_ERROR;
  25488. if (!_context->err.inBeginEnd)
  25489. _error = _next->call(&_next->glGetError)();
  25490. RegalAssert(_error==GL_NO_ERROR);
  25491. _next->call(&_next->glUniform2iARB)(location, v0, v1);
  25492. if (!_context->err.inBeginEnd) {
  25493. _error = _next->call(&_next->glGetError)();
  25494. if (_error!=GL_NO_ERROR) {
  25495. Error("glUniform2iARB : ",Token::GLerrorToString(_error));
  25496. #if REGAL_BREAK
  25497. Break::ErrorCB(_error);
  25498. #endif
  25499. if (_context->err.callback)
  25500. _context->err.callback( _error );
  25501. }
  25502. }
  25503. }
  25504. static void REGAL_CALL error_glUniform2ivARB(GLint location, GLsizei count, const GLint *value)
  25505. {
  25506. Internal("error_glUniform2ivARB","()");
  25507. RegalContext *_context = REGAL_GET_CONTEXT();
  25508. RegalAssert(_context);
  25509. DispatchTableGL *_next = _context->dispatcher.error.next();
  25510. RegalAssert(_next);
  25511. GLenum _error = GL_NO_ERROR;
  25512. if (!_context->err.inBeginEnd)
  25513. _error = _next->call(&_next->glGetError)();
  25514. RegalAssert(_error==GL_NO_ERROR);
  25515. _next->call(&_next->glUniform2ivARB)(location, count, value);
  25516. if (!_context->err.inBeginEnd) {
  25517. _error = _next->call(&_next->glGetError)();
  25518. if (_error!=GL_NO_ERROR) {
  25519. Error("glUniform2ivARB : ",Token::GLerrorToString(_error));
  25520. #if REGAL_BREAK
  25521. Break::ErrorCB(_error);
  25522. #endif
  25523. if (_context->err.callback)
  25524. _context->err.callback( _error );
  25525. }
  25526. }
  25527. }
  25528. static void REGAL_CALL error_glUniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
  25529. {
  25530. Internal("error_glUniform3fARB","()");
  25531. RegalContext *_context = REGAL_GET_CONTEXT();
  25532. RegalAssert(_context);
  25533. DispatchTableGL *_next = _context->dispatcher.error.next();
  25534. RegalAssert(_next);
  25535. GLenum _error = GL_NO_ERROR;
  25536. if (!_context->err.inBeginEnd)
  25537. _error = _next->call(&_next->glGetError)();
  25538. RegalAssert(_error==GL_NO_ERROR);
  25539. _next->call(&_next->glUniform3fARB)(location, v0, v1, v2);
  25540. if (!_context->err.inBeginEnd) {
  25541. _error = _next->call(&_next->glGetError)();
  25542. if (_error!=GL_NO_ERROR) {
  25543. Error("glUniform3fARB : ",Token::GLerrorToString(_error));
  25544. #if REGAL_BREAK
  25545. Break::ErrorCB(_error);
  25546. #endif
  25547. if (_context->err.callback)
  25548. _context->err.callback( _error );
  25549. }
  25550. }
  25551. }
  25552. static void REGAL_CALL error_glUniform3fvARB(GLint location, GLsizei count, const GLfloat *value)
  25553. {
  25554. Internal("error_glUniform3fvARB","()");
  25555. RegalContext *_context = REGAL_GET_CONTEXT();
  25556. RegalAssert(_context);
  25557. DispatchTableGL *_next = _context->dispatcher.error.next();
  25558. RegalAssert(_next);
  25559. GLenum _error = GL_NO_ERROR;
  25560. if (!_context->err.inBeginEnd)
  25561. _error = _next->call(&_next->glGetError)();
  25562. RegalAssert(_error==GL_NO_ERROR);
  25563. _next->call(&_next->glUniform3fvARB)(location, count, value);
  25564. if (!_context->err.inBeginEnd) {
  25565. _error = _next->call(&_next->glGetError)();
  25566. if (_error!=GL_NO_ERROR) {
  25567. Error("glUniform3fvARB : ",Token::GLerrorToString(_error));
  25568. #if REGAL_BREAK
  25569. Break::ErrorCB(_error);
  25570. #endif
  25571. if (_context->err.callback)
  25572. _context->err.callback( _error );
  25573. }
  25574. }
  25575. }
  25576. static void REGAL_CALL error_glUniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
  25577. {
  25578. Internal("error_glUniform3iARB","()");
  25579. RegalContext *_context = REGAL_GET_CONTEXT();
  25580. RegalAssert(_context);
  25581. DispatchTableGL *_next = _context->dispatcher.error.next();
  25582. RegalAssert(_next);
  25583. GLenum _error = GL_NO_ERROR;
  25584. if (!_context->err.inBeginEnd)
  25585. _error = _next->call(&_next->glGetError)();
  25586. RegalAssert(_error==GL_NO_ERROR);
  25587. _next->call(&_next->glUniform3iARB)(location, v0, v1, v2);
  25588. if (!_context->err.inBeginEnd) {
  25589. _error = _next->call(&_next->glGetError)();
  25590. if (_error!=GL_NO_ERROR) {
  25591. Error("glUniform3iARB : ",Token::GLerrorToString(_error));
  25592. #if REGAL_BREAK
  25593. Break::ErrorCB(_error);
  25594. #endif
  25595. if (_context->err.callback)
  25596. _context->err.callback( _error );
  25597. }
  25598. }
  25599. }
  25600. static void REGAL_CALL error_glUniform3ivARB(GLint location, GLsizei count, const GLint *value)
  25601. {
  25602. Internal("error_glUniform3ivARB","()");
  25603. RegalContext *_context = REGAL_GET_CONTEXT();
  25604. RegalAssert(_context);
  25605. DispatchTableGL *_next = _context->dispatcher.error.next();
  25606. RegalAssert(_next);
  25607. GLenum _error = GL_NO_ERROR;
  25608. if (!_context->err.inBeginEnd)
  25609. _error = _next->call(&_next->glGetError)();
  25610. RegalAssert(_error==GL_NO_ERROR);
  25611. _next->call(&_next->glUniform3ivARB)(location, count, value);
  25612. if (!_context->err.inBeginEnd) {
  25613. _error = _next->call(&_next->glGetError)();
  25614. if (_error!=GL_NO_ERROR) {
  25615. Error("glUniform3ivARB : ",Token::GLerrorToString(_error));
  25616. #if REGAL_BREAK
  25617. Break::ErrorCB(_error);
  25618. #endif
  25619. if (_context->err.callback)
  25620. _context->err.callback( _error );
  25621. }
  25622. }
  25623. }
  25624. static void REGAL_CALL error_glUniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
  25625. {
  25626. Internal("error_glUniform4fARB","()");
  25627. RegalContext *_context = REGAL_GET_CONTEXT();
  25628. RegalAssert(_context);
  25629. DispatchTableGL *_next = _context->dispatcher.error.next();
  25630. RegalAssert(_next);
  25631. GLenum _error = GL_NO_ERROR;
  25632. if (!_context->err.inBeginEnd)
  25633. _error = _next->call(&_next->glGetError)();
  25634. RegalAssert(_error==GL_NO_ERROR);
  25635. _next->call(&_next->glUniform4fARB)(location, v0, v1, v2, v3);
  25636. if (!_context->err.inBeginEnd) {
  25637. _error = _next->call(&_next->glGetError)();
  25638. if (_error!=GL_NO_ERROR) {
  25639. Error("glUniform4fARB : ",Token::GLerrorToString(_error));
  25640. #if REGAL_BREAK
  25641. Break::ErrorCB(_error);
  25642. #endif
  25643. if (_context->err.callback)
  25644. _context->err.callback( _error );
  25645. }
  25646. }
  25647. }
  25648. static void REGAL_CALL error_glUniform4fvARB(GLint location, GLsizei count, const GLfloat *value)
  25649. {
  25650. Internal("error_glUniform4fvARB","()");
  25651. RegalContext *_context = REGAL_GET_CONTEXT();
  25652. RegalAssert(_context);
  25653. DispatchTableGL *_next = _context->dispatcher.error.next();
  25654. RegalAssert(_next);
  25655. GLenum _error = GL_NO_ERROR;
  25656. if (!_context->err.inBeginEnd)
  25657. _error = _next->call(&_next->glGetError)();
  25658. RegalAssert(_error==GL_NO_ERROR);
  25659. _next->call(&_next->glUniform4fvARB)(location, count, value);
  25660. if (!_context->err.inBeginEnd) {
  25661. _error = _next->call(&_next->glGetError)();
  25662. if (_error!=GL_NO_ERROR) {
  25663. Error("glUniform4fvARB : ",Token::GLerrorToString(_error));
  25664. #if REGAL_BREAK
  25665. Break::ErrorCB(_error);
  25666. #endif
  25667. if (_context->err.callback)
  25668. _context->err.callback( _error );
  25669. }
  25670. }
  25671. }
  25672. static void REGAL_CALL error_glUniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
  25673. {
  25674. Internal("error_glUniform4iARB","()");
  25675. RegalContext *_context = REGAL_GET_CONTEXT();
  25676. RegalAssert(_context);
  25677. DispatchTableGL *_next = _context->dispatcher.error.next();
  25678. RegalAssert(_next);
  25679. GLenum _error = GL_NO_ERROR;
  25680. if (!_context->err.inBeginEnd)
  25681. _error = _next->call(&_next->glGetError)();
  25682. RegalAssert(_error==GL_NO_ERROR);
  25683. _next->call(&_next->glUniform4iARB)(location, v0, v1, v2, v3);
  25684. if (!_context->err.inBeginEnd) {
  25685. _error = _next->call(&_next->glGetError)();
  25686. if (_error!=GL_NO_ERROR) {
  25687. Error("glUniform4iARB : ",Token::GLerrorToString(_error));
  25688. #if REGAL_BREAK
  25689. Break::ErrorCB(_error);
  25690. #endif
  25691. if (_context->err.callback)
  25692. _context->err.callback( _error );
  25693. }
  25694. }
  25695. }
  25696. static void REGAL_CALL error_glUniform4ivARB(GLint location, GLsizei count, const GLint *value)
  25697. {
  25698. Internal("error_glUniform4ivARB","()");
  25699. RegalContext *_context = REGAL_GET_CONTEXT();
  25700. RegalAssert(_context);
  25701. DispatchTableGL *_next = _context->dispatcher.error.next();
  25702. RegalAssert(_next);
  25703. GLenum _error = GL_NO_ERROR;
  25704. if (!_context->err.inBeginEnd)
  25705. _error = _next->call(&_next->glGetError)();
  25706. RegalAssert(_error==GL_NO_ERROR);
  25707. _next->call(&_next->glUniform4ivARB)(location, count, value);
  25708. if (!_context->err.inBeginEnd) {
  25709. _error = _next->call(&_next->glGetError)();
  25710. if (_error!=GL_NO_ERROR) {
  25711. Error("glUniform4ivARB : ",Token::GLerrorToString(_error));
  25712. #if REGAL_BREAK
  25713. Break::ErrorCB(_error);
  25714. #endif
  25715. if (_context->err.callback)
  25716. _context->err.callback( _error );
  25717. }
  25718. }
  25719. }
  25720. static void REGAL_CALL error_glUniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  25721. {
  25722. Internal("error_glUniformMatrix2fvARB","()");
  25723. RegalContext *_context = REGAL_GET_CONTEXT();
  25724. RegalAssert(_context);
  25725. DispatchTableGL *_next = _context->dispatcher.error.next();
  25726. RegalAssert(_next);
  25727. GLenum _error = GL_NO_ERROR;
  25728. if (!_context->err.inBeginEnd)
  25729. _error = _next->call(&_next->glGetError)();
  25730. RegalAssert(_error==GL_NO_ERROR);
  25731. _next->call(&_next->glUniformMatrix2fvARB)(location, count, transpose, value);
  25732. if (!_context->err.inBeginEnd) {
  25733. _error = _next->call(&_next->glGetError)();
  25734. if (_error!=GL_NO_ERROR) {
  25735. Error("glUniformMatrix2fvARB : ",Token::GLerrorToString(_error));
  25736. #if REGAL_BREAK
  25737. Break::ErrorCB(_error);
  25738. #endif
  25739. if (_context->err.callback)
  25740. _context->err.callback( _error );
  25741. }
  25742. }
  25743. }
  25744. static void REGAL_CALL error_glUniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  25745. {
  25746. Internal("error_glUniformMatrix3fvARB","()");
  25747. RegalContext *_context = REGAL_GET_CONTEXT();
  25748. RegalAssert(_context);
  25749. DispatchTableGL *_next = _context->dispatcher.error.next();
  25750. RegalAssert(_next);
  25751. GLenum _error = GL_NO_ERROR;
  25752. if (!_context->err.inBeginEnd)
  25753. _error = _next->call(&_next->glGetError)();
  25754. RegalAssert(_error==GL_NO_ERROR);
  25755. _next->call(&_next->glUniformMatrix3fvARB)(location, count, transpose, value);
  25756. if (!_context->err.inBeginEnd) {
  25757. _error = _next->call(&_next->glGetError)();
  25758. if (_error!=GL_NO_ERROR) {
  25759. Error("glUniformMatrix3fvARB : ",Token::GLerrorToString(_error));
  25760. #if REGAL_BREAK
  25761. Break::ErrorCB(_error);
  25762. #endif
  25763. if (_context->err.callback)
  25764. _context->err.callback( _error );
  25765. }
  25766. }
  25767. }
  25768. static void REGAL_CALL error_glUniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  25769. {
  25770. Internal("error_glUniformMatrix4fvARB","()");
  25771. RegalContext *_context = REGAL_GET_CONTEXT();
  25772. RegalAssert(_context);
  25773. DispatchTableGL *_next = _context->dispatcher.error.next();
  25774. RegalAssert(_next);
  25775. GLenum _error = GL_NO_ERROR;
  25776. if (!_context->err.inBeginEnd)
  25777. _error = _next->call(&_next->glGetError)();
  25778. RegalAssert(_error==GL_NO_ERROR);
  25779. _next->call(&_next->glUniformMatrix4fvARB)(location, count, transpose, value);
  25780. if (!_context->err.inBeginEnd) {
  25781. _error = _next->call(&_next->glGetError)();
  25782. if (_error!=GL_NO_ERROR) {
  25783. Error("glUniformMatrix4fvARB : ",Token::GLerrorToString(_error));
  25784. #if REGAL_BREAK
  25785. Break::ErrorCB(_error);
  25786. #endif
  25787. if (_context->err.callback)
  25788. _context->err.callback( _error );
  25789. }
  25790. }
  25791. }
  25792. static void REGAL_CALL error_glUseProgramObjectARB(GLhandleARB programObj)
  25793. {
  25794. Internal("error_glUseProgramObjectARB","()");
  25795. RegalContext *_context = REGAL_GET_CONTEXT();
  25796. RegalAssert(_context);
  25797. DispatchTableGL *_next = _context->dispatcher.error.next();
  25798. RegalAssert(_next);
  25799. GLenum _error = GL_NO_ERROR;
  25800. if (!_context->err.inBeginEnd)
  25801. _error = _next->call(&_next->glGetError)();
  25802. RegalAssert(_error==GL_NO_ERROR);
  25803. _next->call(&_next->glUseProgramObjectARB)(programObj);
  25804. if (!_context->err.inBeginEnd) {
  25805. _error = _next->call(&_next->glGetError)();
  25806. if (_error!=GL_NO_ERROR) {
  25807. Error("glUseProgramObjectARB : ",Token::GLerrorToString(_error));
  25808. #if REGAL_BREAK
  25809. Break::ErrorCB(_error);
  25810. #endif
  25811. if (_context->err.callback)
  25812. _context->err.callback( _error );
  25813. }
  25814. }
  25815. }
  25816. static void REGAL_CALL error_glValidateProgramARB(GLhandleARB programObj)
  25817. {
  25818. Internal("error_glValidateProgramARB","()");
  25819. RegalContext *_context = REGAL_GET_CONTEXT();
  25820. RegalAssert(_context);
  25821. DispatchTableGL *_next = _context->dispatcher.error.next();
  25822. RegalAssert(_next);
  25823. GLenum _error = GL_NO_ERROR;
  25824. if (!_context->err.inBeginEnd)
  25825. _error = _next->call(&_next->glGetError)();
  25826. RegalAssert(_error==GL_NO_ERROR);
  25827. _next->call(&_next->glValidateProgramARB)(programObj);
  25828. if (!_context->err.inBeginEnd) {
  25829. _error = _next->call(&_next->glGetError)();
  25830. if (_error!=GL_NO_ERROR) {
  25831. Error("glValidateProgramARB : ",Token::GLerrorToString(_error));
  25832. #if REGAL_BREAK
  25833. Break::ErrorCB(_error);
  25834. #endif
  25835. if (_context->err.callback)
  25836. _context->err.callback( _error );
  25837. }
  25838. }
  25839. }
  25840. // GL_ARB_shader_storage_buffer_object
  25841. static void REGAL_CALL error_glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding)
  25842. {
  25843. Internal("error_glShaderStorageBlockBinding","()");
  25844. RegalContext *_context = REGAL_GET_CONTEXT();
  25845. RegalAssert(_context);
  25846. DispatchTableGL *_next = _context->dispatcher.error.next();
  25847. RegalAssert(_next);
  25848. GLenum _error = GL_NO_ERROR;
  25849. if (!_context->err.inBeginEnd)
  25850. _error = _next->call(&_next->glGetError)();
  25851. RegalAssert(_error==GL_NO_ERROR);
  25852. _next->call(&_next->glShaderStorageBlockBinding)(program, storageBlockIndex, storageBlockBinding);
  25853. if (!_context->err.inBeginEnd) {
  25854. _error = _next->call(&_next->glGetError)();
  25855. if (_error!=GL_NO_ERROR) {
  25856. Error("glShaderStorageBlockBinding : ",Token::GLerrorToString(_error));
  25857. #if REGAL_BREAK
  25858. Break::ErrorCB(_error);
  25859. #endif
  25860. if (_context->err.callback)
  25861. _context->err.callback( _error );
  25862. }
  25863. }
  25864. }
  25865. // GL_ARB_shader_subroutine
  25866. static void REGAL_CALL error_glGetActiveSubroutineName(GLuint program, GLenum shaderType, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)
  25867. {
  25868. Internal("error_glGetActiveSubroutineName","()");
  25869. RegalContext *_context = REGAL_GET_CONTEXT();
  25870. RegalAssert(_context);
  25871. DispatchTableGL *_next = _context->dispatcher.error.next();
  25872. RegalAssert(_next);
  25873. GLenum _error = GL_NO_ERROR;
  25874. if (!_context->err.inBeginEnd)
  25875. _error = _next->call(&_next->glGetError)();
  25876. RegalAssert(_error==GL_NO_ERROR);
  25877. _next->call(&_next->glGetActiveSubroutineName)(program, shaderType, index, bufSize, length, name);
  25878. if (!_context->err.inBeginEnd) {
  25879. _error = _next->call(&_next->glGetError)();
  25880. if (_error!=GL_NO_ERROR) {
  25881. Error("glGetActiveSubroutineName : ",Token::GLerrorToString(_error));
  25882. #if REGAL_BREAK
  25883. Break::ErrorCB(_error);
  25884. #endif
  25885. if (_context->err.callback)
  25886. _context->err.callback( _error );
  25887. }
  25888. }
  25889. }
  25890. static void REGAL_CALL error_glGetActiveSubroutineUniformName(GLuint program, GLenum shaderType, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)
  25891. {
  25892. Internal("error_glGetActiveSubroutineUniformName","()");
  25893. RegalContext *_context = REGAL_GET_CONTEXT();
  25894. RegalAssert(_context);
  25895. DispatchTableGL *_next = _context->dispatcher.error.next();
  25896. RegalAssert(_next);
  25897. GLenum _error = GL_NO_ERROR;
  25898. if (!_context->err.inBeginEnd)
  25899. _error = _next->call(&_next->glGetError)();
  25900. RegalAssert(_error==GL_NO_ERROR);
  25901. _next->call(&_next->glGetActiveSubroutineUniformName)(program, shaderType, index, bufSize, length, name);
  25902. if (!_context->err.inBeginEnd) {
  25903. _error = _next->call(&_next->glGetError)();
  25904. if (_error!=GL_NO_ERROR) {
  25905. Error("glGetActiveSubroutineUniformName : ",Token::GLerrorToString(_error));
  25906. #if REGAL_BREAK
  25907. Break::ErrorCB(_error);
  25908. #endif
  25909. if (_context->err.callback)
  25910. _context->err.callback( _error );
  25911. }
  25912. }
  25913. }
  25914. static void REGAL_CALL error_glGetActiveSubroutineUniformiv(GLuint program, GLenum shaderType, GLuint index, GLenum pname, GLint *values)
  25915. {
  25916. Internal("error_glGetActiveSubroutineUniformiv","()");
  25917. RegalContext *_context = REGAL_GET_CONTEXT();
  25918. RegalAssert(_context);
  25919. DispatchTableGL *_next = _context->dispatcher.error.next();
  25920. RegalAssert(_next);
  25921. GLenum _error = GL_NO_ERROR;
  25922. if (!_context->err.inBeginEnd)
  25923. _error = _next->call(&_next->glGetError)();
  25924. RegalAssert(_error==GL_NO_ERROR);
  25925. _next->call(&_next->glGetActiveSubroutineUniformiv)(program, shaderType, index, pname, values);
  25926. if (!_context->err.inBeginEnd) {
  25927. _error = _next->call(&_next->glGetError)();
  25928. if (_error!=GL_NO_ERROR) {
  25929. Error("glGetActiveSubroutineUniformiv : ",Token::GLerrorToString(_error));
  25930. #if REGAL_BREAK
  25931. Break::ErrorCB(_error);
  25932. #endif
  25933. if (_context->err.callback)
  25934. _context->err.callback( _error );
  25935. }
  25936. }
  25937. }
  25938. static void REGAL_CALL error_glGetProgramStageiv(GLuint program, GLenum shaderType, GLenum pname, GLint *values)
  25939. {
  25940. Internal("error_glGetProgramStageiv","()");
  25941. RegalContext *_context = REGAL_GET_CONTEXT();
  25942. RegalAssert(_context);
  25943. DispatchTableGL *_next = _context->dispatcher.error.next();
  25944. RegalAssert(_next);
  25945. GLenum _error = GL_NO_ERROR;
  25946. if (!_context->err.inBeginEnd)
  25947. _error = _next->call(&_next->glGetError)();
  25948. RegalAssert(_error==GL_NO_ERROR);
  25949. _next->call(&_next->glGetProgramStageiv)(program, shaderType, pname, values);
  25950. if (!_context->err.inBeginEnd) {
  25951. _error = _next->call(&_next->glGetError)();
  25952. if (_error!=GL_NO_ERROR) {
  25953. Error("glGetProgramStageiv : ",Token::GLerrorToString(_error));
  25954. #if REGAL_BREAK
  25955. Break::ErrorCB(_error);
  25956. #endif
  25957. if (_context->err.callback)
  25958. _context->err.callback( _error );
  25959. }
  25960. }
  25961. }
  25962. static void REGAL_CALL error_glGetProgramSubroutineParameteruivNV(GLenum target, GLuint index, GLuint *params)
  25963. {
  25964. Internal("error_glGetProgramSubroutineParameteruivNV","()");
  25965. RegalContext *_context = REGAL_GET_CONTEXT();
  25966. RegalAssert(_context);
  25967. DispatchTableGL *_next = _context->dispatcher.error.next();
  25968. RegalAssert(_next);
  25969. GLenum _error = GL_NO_ERROR;
  25970. if (!_context->err.inBeginEnd)
  25971. _error = _next->call(&_next->glGetError)();
  25972. RegalAssert(_error==GL_NO_ERROR);
  25973. _next->call(&_next->glGetProgramSubroutineParameteruivNV)(target, index, params);
  25974. if (!_context->err.inBeginEnd) {
  25975. _error = _next->call(&_next->glGetError)();
  25976. if (_error!=GL_NO_ERROR) {
  25977. Error("glGetProgramSubroutineParameteruivNV : ",Token::GLerrorToString(_error));
  25978. #if REGAL_BREAK
  25979. Break::ErrorCB(_error);
  25980. #endif
  25981. if (_context->err.callback)
  25982. _context->err.callback( _error );
  25983. }
  25984. }
  25985. }
  25986. static GLuint REGAL_CALL error_glGetSubroutineIndex(GLuint program, GLenum shaderType, const GLchar *name)
  25987. {
  25988. Internal("error_glGetSubroutineIndex","()");
  25989. RegalContext *_context = REGAL_GET_CONTEXT();
  25990. RegalAssert(_context);
  25991. DispatchTableGL *_next = _context->dispatcher.error.next();
  25992. RegalAssert(_next);
  25993. GLenum _error = GL_NO_ERROR;
  25994. if (!_context->err.inBeginEnd)
  25995. _error = _next->call(&_next->glGetError)();
  25996. RegalAssert(_error==GL_NO_ERROR);
  25997. GLuint ret = _next->call(&_next->glGetSubroutineIndex)(program, shaderType, name);
  25998. if (!_context->err.inBeginEnd) {
  25999. _error = _next->call(&_next->glGetError)();
  26000. if (_error!=GL_NO_ERROR) {
  26001. Error("glGetSubroutineIndex : ",Token::GLerrorToString(_error));
  26002. #if REGAL_BREAK
  26003. Break::ErrorCB(_error);
  26004. #endif
  26005. if (_context->err.callback)
  26006. _context->err.callback( _error );
  26007. }
  26008. }
  26009. return ret;
  26010. }
  26011. static GLint REGAL_CALL error_glGetSubroutineUniformLocation(GLuint program, GLenum shaderType, const GLchar *name)
  26012. {
  26013. Internal("error_glGetSubroutineUniformLocation","()");
  26014. RegalContext *_context = REGAL_GET_CONTEXT();
  26015. RegalAssert(_context);
  26016. DispatchTableGL *_next = _context->dispatcher.error.next();
  26017. RegalAssert(_next);
  26018. GLenum _error = GL_NO_ERROR;
  26019. if (!_context->err.inBeginEnd)
  26020. _error = _next->call(&_next->glGetError)();
  26021. RegalAssert(_error==GL_NO_ERROR);
  26022. GLint ret = _next->call(&_next->glGetSubroutineUniformLocation)(program, shaderType, name);
  26023. if (!_context->err.inBeginEnd) {
  26024. _error = _next->call(&_next->glGetError)();
  26025. if (_error!=GL_NO_ERROR) {
  26026. Error("glGetSubroutineUniformLocation : ",Token::GLerrorToString(_error));
  26027. #if REGAL_BREAK
  26028. Break::ErrorCB(_error);
  26029. #endif
  26030. if (_context->err.callback)
  26031. _context->err.callback( _error );
  26032. }
  26033. }
  26034. return ret;
  26035. }
  26036. static void REGAL_CALL error_glGetUniformSubroutineuiv(GLenum shaderType, GLint location, GLuint *params)
  26037. {
  26038. Internal("error_glGetUniformSubroutineuiv","()");
  26039. RegalContext *_context = REGAL_GET_CONTEXT();
  26040. RegalAssert(_context);
  26041. DispatchTableGL *_next = _context->dispatcher.error.next();
  26042. RegalAssert(_next);
  26043. GLenum _error = GL_NO_ERROR;
  26044. if (!_context->err.inBeginEnd)
  26045. _error = _next->call(&_next->glGetError)();
  26046. RegalAssert(_error==GL_NO_ERROR);
  26047. _next->call(&_next->glGetUniformSubroutineuiv)(shaderType, location, params);
  26048. if (!_context->err.inBeginEnd) {
  26049. _error = _next->call(&_next->glGetError)();
  26050. if (_error!=GL_NO_ERROR) {
  26051. Error("glGetUniformSubroutineuiv : ",Token::GLerrorToString(_error));
  26052. #if REGAL_BREAK
  26053. Break::ErrorCB(_error);
  26054. #endif
  26055. if (_context->err.callback)
  26056. _context->err.callback( _error );
  26057. }
  26058. }
  26059. }
  26060. static void REGAL_CALL error_glProgramSubroutineParametersuivNV(GLenum target, GLsizei count, const GLuint *params)
  26061. {
  26062. Internal("error_glProgramSubroutineParametersuivNV","()");
  26063. RegalContext *_context = REGAL_GET_CONTEXT();
  26064. RegalAssert(_context);
  26065. DispatchTableGL *_next = _context->dispatcher.error.next();
  26066. RegalAssert(_next);
  26067. GLenum _error = GL_NO_ERROR;
  26068. if (!_context->err.inBeginEnd)
  26069. _error = _next->call(&_next->glGetError)();
  26070. RegalAssert(_error==GL_NO_ERROR);
  26071. _next->call(&_next->glProgramSubroutineParametersuivNV)(target, count, params);
  26072. if (!_context->err.inBeginEnd) {
  26073. _error = _next->call(&_next->glGetError)();
  26074. if (_error!=GL_NO_ERROR) {
  26075. Error("glProgramSubroutineParametersuivNV : ",Token::GLerrorToString(_error));
  26076. #if REGAL_BREAK
  26077. Break::ErrorCB(_error);
  26078. #endif
  26079. if (_context->err.callback)
  26080. _context->err.callback( _error );
  26081. }
  26082. }
  26083. }
  26084. static void REGAL_CALL error_glUniformSubroutinesuiv(GLenum shaderType, GLsizei count, const GLuint *indices)
  26085. {
  26086. Internal("error_glUniformSubroutinesuiv","()");
  26087. RegalContext *_context = REGAL_GET_CONTEXT();
  26088. RegalAssert(_context);
  26089. DispatchTableGL *_next = _context->dispatcher.error.next();
  26090. RegalAssert(_next);
  26091. GLenum _error = GL_NO_ERROR;
  26092. if (!_context->err.inBeginEnd)
  26093. _error = _next->call(&_next->glGetError)();
  26094. RegalAssert(_error==GL_NO_ERROR);
  26095. _next->call(&_next->glUniformSubroutinesuiv)(shaderType, count, indices);
  26096. if (!_context->err.inBeginEnd) {
  26097. _error = _next->call(&_next->glGetError)();
  26098. if (_error!=GL_NO_ERROR) {
  26099. Error("glUniformSubroutinesuiv : ",Token::GLerrorToString(_error));
  26100. #if REGAL_BREAK
  26101. Break::ErrorCB(_error);
  26102. #endif
  26103. if (_context->err.callback)
  26104. _context->err.callback( _error );
  26105. }
  26106. }
  26107. }
  26108. // GL_ARB_shading_language_include
  26109. static void REGAL_CALL error_glCompileShaderIncludeARB(GLuint shader, GLsizei count, const GLchar **path, const GLint *length)
  26110. {
  26111. Internal("error_glCompileShaderIncludeARB","()");
  26112. RegalContext *_context = REGAL_GET_CONTEXT();
  26113. RegalAssert(_context);
  26114. DispatchTableGL *_next = _context->dispatcher.error.next();
  26115. RegalAssert(_next);
  26116. GLenum _error = GL_NO_ERROR;
  26117. if (!_context->err.inBeginEnd)
  26118. _error = _next->call(&_next->glGetError)();
  26119. RegalAssert(_error==GL_NO_ERROR);
  26120. _next->call(&_next->glCompileShaderIncludeARB)(shader, count, path, length);
  26121. if (!_context->err.inBeginEnd) {
  26122. _error = _next->call(&_next->glGetError)();
  26123. if (_error!=GL_NO_ERROR) {
  26124. Error("glCompileShaderIncludeARB : ",Token::GLerrorToString(_error));
  26125. #if REGAL_BREAK
  26126. Break::ErrorCB(_error);
  26127. #endif
  26128. if (_context->err.callback)
  26129. _context->err.callback( _error );
  26130. }
  26131. }
  26132. }
  26133. static void REGAL_CALL error_glDeleteNamedStringARB(GLint namelen, const GLchar *name)
  26134. {
  26135. Internal("error_glDeleteNamedStringARB","()");
  26136. RegalContext *_context = REGAL_GET_CONTEXT();
  26137. RegalAssert(_context);
  26138. DispatchTableGL *_next = _context->dispatcher.error.next();
  26139. RegalAssert(_next);
  26140. GLenum _error = GL_NO_ERROR;
  26141. if (!_context->err.inBeginEnd)
  26142. _error = _next->call(&_next->glGetError)();
  26143. RegalAssert(_error==GL_NO_ERROR);
  26144. _next->call(&_next->glDeleteNamedStringARB)(namelen, name);
  26145. if (!_context->err.inBeginEnd) {
  26146. _error = _next->call(&_next->glGetError)();
  26147. if (_error!=GL_NO_ERROR) {
  26148. Error("glDeleteNamedStringARB : ",Token::GLerrorToString(_error));
  26149. #if REGAL_BREAK
  26150. Break::ErrorCB(_error);
  26151. #endif
  26152. if (_context->err.callback)
  26153. _context->err.callback( _error );
  26154. }
  26155. }
  26156. }
  26157. static void REGAL_CALL error_glGetNamedStringARB(GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string)
  26158. {
  26159. Internal("error_glGetNamedStringARB","()");
  26160. RegalContext *_context = REGAL_GET_CONTEXT();
  26161. RegalAssert(_context);
  26162. DispatchTableGL *_next = _context->dispatcher.error.next();
  26163. RegalAssert(_next);
  26164. GLenum _error = GL_NO_ERROR;
  26165. if (!_context->err.inBeginEnd)
  26166. _error = _next->call(&_next->glGetError)();
  26167. RegalAssert(_error==GL_NO_ERROR);
  26168. _next->call(&_next->glGetNamedStringARB)(namelen, name, bufSize, stringlen, string);
  26169. if (!_context->err.inBeginEnd) {
  26170. _error = _next->call(&_next->glGetError)();
  26171. if (_error!=GL_NO_ERROR) {
  26172. Error("glGetNamedStringARB : ",Token::GLerrorToString(_error));
  26173. #if REGAL_BREAK
  26174. Break::ErrorCB(_error);
  26175. #endif
  26176. if (_context->err.callback)
  26177. _context->err.callback( _error );
  26178. }
  26179. }
  26180. }
  26181. static void REGAL_CALL error_glGetNamedStringivARB(GLint namelen, const GLchar *name, GLenum pname, GLint *params)
  26182. {
  26183. Internal("error_glGetNamedStringivARB","()");
  26184. RegalContext *_context = REGAL_GET_CONTEXT();
  26185. RegalAssert(_context);
  26186. DispatchTableGL *_next = _context->dispatcher.error.next();
  26187. RegalAssert(_next);
  26188. GLenum _error = GL_NO_ERROR;
  26189. if (!_context->err.inBeginEnd)
  26190. _error = _next->call(&_next->glGetError)();
  26191. RegalAssert(_error==GL_NO_ERROR);
  26192. _next->call(&_next->glGetNamedStringivARB)(namelen, name, pname, params);
  26193. if (!_context->err.inBeginEnd) {
  26194. _error = _next->call(&_next->glGetError)();
  26195. if (_error!=GL_NO_ERROR) {
  26196. Error("glGetNamedStringivARB : ",Token::GLerrorToString(_error));
  26197. #if REGAL_BREAK
  26198. Break::ErrorCB(_error);
  26199. #endif
  26200. if (_context->err.callback)
  26201. _context->err.callback( _error );
  26202. }
  26203. }
  26204. }
  26205. static GLboolean REGAL_CALL error_glIsNamedStringARB(GLint namelen, const GLchar *name)
  26206. {
  26207. Internal("error_glIsNamedStringARB","()");
  26208. RegalContext *_context = REGAL_GET_CONTEXT();
  26209. RegalAssert(_context);
  26210. DispatchTableGL *_next = _context->dispatcher.error.next();
  26211. RegalAssert(_next);
  26212. GLenum _error = GL_NO_ERROR;
  26213. if (!_context->err.inBeginEnd)
  26214. _error = _next->call(&_next->glGetError)();
  26215. RegalAssert(_error==GL_NO_ERROR);
  26216. GLboolean ret = _next->call(&_next->glIsNamedStringARB)(namelen, name);
  26217. if (!_context->err.inBeginEnd) {
  26218. _error = _next->call(&_next->glGetError)();
  26219. if (_error!=GL_NO_ERROR) {
  26220. Error("glIsNamedStringARB : ",Token::GLerrorToString(_error));
  26221. #if REGAL_BREAK
  26222. Break::ErrorCB(_error);
  26223. #endif
  26224. if (_context->err.callback)
  26225. _context->err.callback( _error );
  26226. }
  26227. }
  26228. return ret;
  26229. }
  26230. static void REGAL_CALL error_glNamedStringARB(GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string)
  26231. {
  26232. Internal("error_glNamedStringARB","()");
  26233. RegalContext *_context = REGAL_GET_CONTEXT();
  26234. RegalAssert(_context);
  26235. DispatchTableGL *_next = _context->dispatcher.error.next();
  26236. RegalAssert(_next);
  26237. GLenum _error = GL_NO_ERROR;
  26238. if (!_context->err.inBeginEnd)
  26239. _error = _next->call(&_next->glGetError)();
  26240. RegalAssert(_error==GL_NO_ERROR);
  26241. _next->call(&_next->glNamedStringARB)(type, namelen, name, stringlen, string);
  26242. if (!_context->err.inBeginEnd) {
  26243. _error = _next->call(&_next->glGetError)();
  26244. if (_error!=GL_NO_ERROR) {
  26245. Error("glNamedStringARB : ",Token::GLerrorToString(_error));
  26246. #if REGAL_BREAK
  26247. Break::ErrorCB(_error);
  26248. #endif
  26249. if (_context->err.callback)
  26250. _context->err.callback( _error );
  26251. }
  26252. }
  26253. }
  26254. // GL_ARB_sparse_texture
  26255. static void REGAL_CALL error_glTexPageCommitmentARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit)
  26256. {
  26257. Internal("error_glTexPageCommitmentARB","()");
  26258. RegalContext *_context = REGAL_GET_CONTEXT();
  26259. RegalAssert(_context);
  26260. DispatchTableGL *_next = _context->dispatcher.error.next();
  26261. RegalAssert(_next);
  26262. GLenum _error = GL_NO_ERROR;
  26263. if (!_context->err.inBeginEnd)
  26264. _error = _next->call(&_next->glGetError)();
  26265. RegalAssert(_error==GL_NO_ERROR);
  26266. _next->call(&_next->glTexPageCommitmentARB)(target, level, xoffset, yoffset, zoffset, width, height, depth, commit);
  26267. if (!_context->err.inBeginEnd) {
  26268. _error = _next->call(&_next->glGetError)();
  26269. if (_error!=GL_NO_ERROR) {
  26270. Error("glTexPageCommitmentARB : ",Token::GLerrorToString(_error));
  26271. #if REGAL_BREAK
  26272. Break::ErrorCB(_error);
  26273. #endif
  26274. if (_context->err.callback)
  26275. _context->err.callback( _error );
  26276. }
  26277. }
  26278. }
  26279. static void REGAL_CALL error_glTexturePageCommitmentEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit)
  26280. {
  26281. Internal("error_glTexturePageCommitmentEXT","()");
  26282. RegalContext *_context = REGAL_GET_CONTEXT();
  26283. RegalAssert(_context);
  26284. DispatchTableGL *_next = _context->dispatcher.error.next();
  26285. RegalAssert(_next);
  26286. GLenum _error = GL_NO_ERROR;
  26287. if (!_context->err.inBeginEnd)
  26288. _error = _next->call(&_next->glGetError)();
  26289. RegalAssert(_error==GL_NO_ERROR);
  26290. _next->call(&_next->glTexturePageCommitmentEXT)(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, commit);
  26291. if (!_context->err.inBeginEnd) {
  26292. _error = _next->call(&_next->glGetError)();
  26293. if (_error!=GL_NO_ERROR) {
  26294. Error("glTexturePageCommitmentEXT : ",Token::GLerrorToString(_error));
  26295. #if REGAL_BREAK
  26296. Break::ErrorCB(_error);
  26297. #endif
  26298. if (_context->err.callback)
  26299. _context->err.callback( _error );
  26300. }
  26301. }
  26302. }
  26303. // GL_ARB_sync
  26304. static GLenum REGAL_CALL error_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
  26305. {
  26306. Internal("error_glClientWaitSync","()");
  26307. RegalContext *_context = REGAL_GET_CONTEXT();
  26308. RegalAssert(_context);
  26309. DispatchTableGL *_next = _context->dispatcher.error.next();
  26310. RegalAssert(_next);
  26311. GLenum _error = GL_NO_ERROR;
  26312. if (!_context->err.inBeginEnd)
  26313. _error = _next->call(&_next->glGetError)();
  26314. RegalAssert(_error==GL_NO_ERROR);
  26315. GLenum ret = _next->call(&_next->glClientWaitSync)(sync, flags, timeout);
  26316. if (!_context->err.inBeginEnd) {
  26317. _error = _next->call(&_next->glGetError)();
  26318. if (_error!=GL_NO_ERROR) {
  26319. Error("glClientWaitSync : ",Token::GLerrorToString(_error));
  26320. #if REGAL_BREAK
  26321. Break::ErrorCB(_error);
  26322. #endif
  26323. if (_context->err.callback)
  26324. _context->err.callback( _error );
  26325. }
  26326. }
  26327. return ret;
  26328. }
  26329. static void REGAL_CALL error_glDeleteSync(GLsync sync)
  26330. {
  26331. Internal("error_glDeleteSync","()");
  26332. RegalContext *_context = REGAL_GET_CONTEXT();
  26333. RegalAssert(_context);
  26334. DispatchTableGL *_next = _context->dispatcher.error.next();
  26335. RegalAssert(_next);
  26336. GLenum _error = GL_NO_ERROR;
  26337. if (!_context->err.inBeginEnd)
  26338. _error = _next->call(&_next->glGetError)();
  26339. RegalAssert(_error==GL_NO_ERROR);
  26340. _next->call(&_next->glDeleteSync)(sync);
  26341. if (!_context->err.inBeginEnd) {
  26342. _error = _next->call(&_next->glGetError)();
  26343. if (_error!=GL_NO_ERROR) {
  26344. Error("glDeleteSync : ",Token::GLerrorToString(_error));
  26345. #if REGAL_BREAK
  26346. Break::ErrorCB(_error);
  26347. #endif
  26348. if (_context->err.callback)
  26349. _context->err.callback( _error );
  26350. }
  26351. }
  26352. }
  26353. static GLsync REGAL_CALL error_glFenceSync(GLenum condition, GLbitfield flags)
  26354. {
  26355. Internal("error_glFenceSync","()");
  26356. RegalContext *_context = REGAL_GET_CONTEXT();
  26357. RegalAssert(_context);
  26358. DispatchTableGL *_next = _context->dispatcher.error.next();
  26359. RegalAssert(_next);
  26360. GLenum _error = GL_NO_ERROR;
  26361. if (!_context->err.inBeginEnd)
  26362. _error = _next->call(&_next->glGetError)();
  26363. RegalAssert(_error==GL_NO_ERROR);
  26364. GLsync ret = _next->call(&_next->glFenceSync)(condition, flags);
  26365. if (!_context->err.inBeginEnd) {
  26366. _error = _next->call(&_next->glGetError)();
  26367. if (_error!=GL_NO_ERROR) {
  26368. Error("glFenceSync : ",Token::GLerrorToString(_error));
  26369. #if REGAL_BREAK
  26370. Break::ErrorCB(_error);
  26371. #endif
  26372. if (_context->err.callback)
  26373. _context->err.callback( _error );
  26374. }
  26375. }
  26376. return ret;
  26377. }
  26378. static void REGAL_CALL error_glGetInteger64v(GLenum pname, GLint64 *params)
  26379. {
  26380. Internal("error_glGetInteger64v","()");
  26381. RegalContext *_context = REGAL_GET_CONTEXT();
  26382. RegalAssert(_context);
  26383. DispatchTableGL *_next = _context->dispatcher.error.next();
  26384. RegalAssert(_next);
  26385. GLenum _error = GL_NO_ERROR;
  26386. if (!_context->err.inBeginEnd)
  26387. _error = _next->call(&_next->glGetError)();
  26388. RegalAssert(_error==GL_NO_ERROR);
  26389. _next->call(&_next->glGetInteger64v)(pname, params);
  26390. if (!_context->err.inBeginEnd) {
  26391. _error = _next->call(&_next->glGetError)();
  26392. if (_error!=GL_NO_ERROR) {
  26393. Error("glGetInteger64v : ",Token::GLerrorToString(_error));
  26394. #if REGAL_BREAK
  26395. Break::ErrorCB(_error);
  26396. #endif
  26397. if (_context->err.callback)
  26398. _context->err.callback( _error );
  26399. }
  26400. }
  26401. }
  26402. static void REGAL_CALL error_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
  26403. {
  26404. Internal("error_glGetSynciv","()");
  26405. RegalContext *_context = REGAL_GET_CONTEXT();
  26406. RegalAssert(_context);
  26407. DispatchTableGL *_next = _context->dispatcher.error.next();
  26408. RegalAssert(_next);
  26409. GLenum _error = GL_NO_ERROR;
  26410. if (!_context->err.inBeginEnd)
  26411. _error = _next->call(&_next->glGetError)();
  26412. RegalAssert(_error==GL_NO_ERROR);
  26413. _next->call(&_next->glGetSynciv)(sync, pname, bufSize, length, values);
  26414. if (!_context->err.inBeginEnd) {
  26415. _error = _next->call(&_next->glGetError)();
  26416. if (_error!=GL_NO_ERROR) {
  26417. Error("glGetSynciv : ",Token::GLerrorToString(_error));
  26418. #if REGAL_BREAK
  26419. Break::ErrorCB(_error);
  26420. #endif
  26421. if (_context->err.callback)
  26422. _context->err.callback( _error );
  26423. }
  26424. }
  26425. }
  26426. static GLboolean REGAL_CALL error_glIsSync(GLsync sync)
  26427. {
  26428. Internal("error_glIsSync","()");
  26429. RegalContext *_context = REGAL_GET_CONTEXT();
  26430. RegalAssert(_context);
  26431. DispatchTableGL *_next = _context->dispatcher.error.next();
  26432. RegalAssert(_next);
  26433. GLenum _error = GL_NO_ERROR;
  26434. if (!_context->err.inBeginEnd)
  26435. _error = _next->call(&_next->glGetError)();
  26436. RegalAssert(_error==GL_NO_ERROR);
  26437. GLboolean ret = _next->call(&_next->glIsSync)(sync);
  26438. if (!_context->err.inBeginEnd) {
  26439. _error = _next->call(&_next->glGetError)();
  26440. if (_error!=GL_NO_ERROR) {
  26441. Error("glIsSync : ",Token::GLerrorToString(_error));
  26442. #if REGAL_BREAK
  26443. Break::ErrorCB(_error);
  26444. #endif
  26445. if (_context->err.callback)
  26446. _context->err.callback( _error );
  26447. }
  26448. }
  26449. return ret;
  26450. }
  26451. static void REGAL_CALL error_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
  26452. {
  26453. Internal("error_glWaitSync","()");
  26454. RegalContext *_context = REGAL_GET_CONTEXT();
  26455. RegalAssert(_context);
  26456. DispatchTableGL *_next = _context->dispatcher.error.next();
  26457. RegalAssert(_next);
  26458. GLenum _error = GL_NO_ERROR;
  26459. if (!_context->err.inBeginEnd)
  26460. _error = _next->call(&_next->glGetError)();
  26461. RegalAssert(_error==GL_NO_ERROR);
  26462. _next->call(&_next->glWaitSync)(sync, flags, timeout);
  26463. if (!_context->err.inBeginEnd) {
  26464. _error = _next->call(&_next->glGetError)();
  26465. if (_error!=GL_NO_ERROR) {
  26466. Error("glWaitSync : ",Token::GLerrorToString(_error));
  26467. #if REGAL_BREAK
  26468. Break::ErrorCB(_error);
  26469. #endif
  26470. if (_context->err.callback)
  26471. _context->err.callback( _error );
  26472. }
  26473. }
  26474. }
  26475. // GL_ARB_tessellation_shader
  26476. static void REGAL_CALL error_glPatchParameterfv(GLenum pname, const GLfloat *values)
  26477. {
  26478. Internal("error_glPatchParameterfv","()");
  26479. RegalContext *_context = REGAL_GET_CONTEXT();
  26480. RegalAssert(_context);
  26481. DispatchTableGL *_next = _context->dispatcher.error.next();
  26482. RegalAssert(_next);
  26483. GLenum _error = GL_NO_ERROR;
  26484. if (!_context->err.inBeginEnd)
  26485. _error = _next->call(&_next->glGetError)();
  26486. RegalAssert(_error==GL_NO_ERROR);
  26487. _next->call(&_next->glPatchParameterfv)(pname, values);
  26488. if (!_context->err.inBeginEnd) {
  26489. _error = _next->call(&_next->glGetError)();
  26490. if (_error!=GL_NO_ERROR) {
  26491. Error("glPatchParameterfv : ",Token::GLerrorToString(_error));
  26492. #if REGAL_BREAK
  26493. Break::ErrorCB(_error);
  26494. #endif
  26495. if (_context->err.callback)
  26496. _context->err.callback( _error );
  26497. }
  26498. }
  26499. }
  26500. static void REGAL_CALL error_glPatchParameteri(GLenum pname, GLint value)
  26501. {
  26502. Internal("error_glPatchParameteri","()");
  26503. RegalContext *_context = REGAL_GET_CONTEXT();
  26504. RegalAssert(_context);
  26505. DispatchTableGL *_next = _context->dispatcher.error.next();
  26506. RegalAssert(_next);
  26507. GLenum _error = GL_NO_ERROR;
  26508. if (!_context->err.inBeginEnd)
  26509. _error = _next->call(&_next->glGetError)();
  26510. RegalAssert(_error==GL_NO_ERROR);
  26511. _next->call(&_next->glPatchParameteri)(pname, value);
  26512. if (!_context->err.inBeginEnd) {
  26513. _error = _next->call(&_next->glGetError)();
  26514. if (_error!=GL_NO_ERROR) {
  26515. Error("glPatchParameteri : ",Token::GLerrorToString(_error));
  26516. #if REGAL_BREAK
  26517. Break::ErrorCB(_error);
  26518. #endif
  26519. if (_context->err.callback)
  26520. _context->err.callback( _error );
  26521. }
  26522. }
  26523. }
  26524. // GL_ARB_texture_buffer_object
  26525. static void REGAL_CALL error_glTexBufferARB(GLenum target, GLenum internalformat, GLuint buffer)
  26526. {
  26527. Internal("error_glTexBufferARB","()");
  26528. RegalContext *_context = REGAL_GET_CONTEXT();
  26529. RegalAssert(_context);
  26530. DispatchTableGL *_next = _context->dispatcher.error.next();
  26531. RegalAssert(_next);
  26532. GLenum _error = GL_NO_ERROR;
  26533. if (!_context->err.inBeginEnd)
  26534. _error = _next->call(&_next->glGetError)();
  26535. RegalAssert(_error==GL_NO_ERROR);
  26536. _next->call(&_next->glTexBufferARB)(target, internalformat, buffer);
  26537. if (!_context->err.inBeginEnd) {
  26538. _error = _next->call(&_next->glGetError)();
  26539. if (_error!=GL_NO_ERROR) {
  26540. Error("glTexBufferARB : ",Token::GLerrorToString(_error));
  26541. #if REGAL_BREAK
  26542. Break::ErrorCB(_error);
  26543. #endif
  26544. if (_context->err.callback)
  26545. _context->err.callback( _error );
  26546. }
  26547. }
  26548. }
  26549. // GL_ARB_texture_buffer_range
  26550. static void REGAL_CALL error_glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)
  26551. {
  26552. Internal("error_glTexBufferRange","()");
  26553. RegalContext *_context = REGAL_GET_CONTEXT();
  26554. RegalAssert(_context);
  26555. DispatchTableGL *_next = _context->dispatcher.error.next();
  26556. RegalAssert(_next);
  26557. GLenum _error = GL_NO_ERROR;
  26558. if (!_context->err.inBeginEnd)
  26559. _error = _next->call(&_next->glGetError)();
  26560. RegalAssert(_error==GL_NO_ERROR);
  26561. _next->call(&_next->glTexBufferRange)(target, internalformat, buffer, offset, size);
  26562. if (!_context->err.inBeginEnd) {
  26563. _error = _next->call(&_next->glGetError)();
  26564. if (_error!=GL_NO_ERROR) {
  26565. Error("glTexBufferRange : ",Token::GLerrorToString(_error));
  26566. #if REGAL_BREAK
  26567. Break::ErrorCB(_error);
  26568. #endif
  26569. if (_context->err.callback)
  26570. _context->err.callback( _error );
  26571. }
  26572. }
  26573. }
  26574. static void REGAL_CALL error_glTextureBufferRangeEXT(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)
  26575. {
  26576. Internal("error_glTextureBufferRangeEXT","()");
  26577. RegalContext *_context = REGAL_GET_CONTEXT();
  26578. RegalAssert(_context);
  26579. DispatchTableGL *_next = _context->dispatcher.error.next();
  26580. RegalAssert(_next);
  26581. GLenum _error = GL_NO_ERROR;
  26582. if (!_context->err.inBeginEnd)
  26583. _error = _next->call(&_next->glGetError)();
  26584. RegalAssert(_error==GL_NO_ERROR);
  26585. _next->call(&_next->glTextureBufferRangeEXT)(texture, target, internalformat, buffer, offset, size);
  26586. if (!_context->err.inBeginEnd) {
  26587. _error = _next->call(&_next->glGetError)();
  26588. if (_error!=GL_NO_ERROR) {
  26589. Error("glTextureBufferRangeEXT : ",Token::GLerrorToString(_error));
  26590. #if REGAL_BREAK
  26591. Break::ErrorCB(_error);
  26592. #endif
  26593. if (_context->err.callback)
  26594. _context->err.callback( _error );
  26595. }
  26596. }
  26597. }
  26598. // GL_ARB_texture_compression
  26599. static void REGAL_CALL error_glCompressedTexImage1DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
  26600. {
  26601. Internal("error_glCompressedTexImage1DARB","()");
  26602. RegalContext *_context = REGAL_GET_CONTEXT();
  26603. RegalAssert(_context);
  26604. DispatchTableGL *_next = _context->dispatcher.error.next();
  26605. RegalAssert(_next);
  26606. GLenum _error = GL_NO_ERROR;
  26607. if (!_context->err.inBeginEnd)
  26608. _error = _next->call(&_next->glGetError)();
  26609. RegalAssert(_error==GL_NO_ERROR);
  26610. _next->call(&_next->glCompressedTexImage1DARB)(target, level, internalformat, width, border, imageSize, data);
  26611. if (!_context->err.inBeginEnd) {
  26612. _error = _next->call(&_next->glGetError)();
  26613. if (_error!=GL_NO_ERROR) {
  26614. Error("glCompressedTexImage1DARB : ",Token::GLerrorToString(_error));
  26615. #if REGAL_BREAK
  26616. Break::ErrorCB(_error);
  26617. #endif
  26618. if (_context->err.callback)
  26619. _context->err.callback( _error );
  26620. }
  26621. }
  26622. }
  26623. static void REGAL_CALL error_glCompressedTexImage2DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
  26624. {
  26625. Internal("error_glCompressedTexImage2DARB","()");
  26626. RegalContext *_context = REGAL_GET_CONTEXT();
  26627. RegalAssert(_context);
  26628. DispatchTableGL *_next = _context->dispatcher.error.next();
  26629. RegalAssert(_next);
  26630. GLenum _error = GL_NO_ERROR;
  26631. if (!_context->err.inBeginEnd)
  26632. _error = _next->call(&_next->glGetError)();
  26633. RegalAssert(_error==GL_NO_ERROR);
  26634. _next->call(&_next->glCompressedTexImage2DARB)(target, level, internalformat, width, height, border, imageSize, data);
  26635. if (!_context->err.inBeginEnd) {
  26636. _error = _next->call(&_next->glGetError)();
  26637. if (_error!=GL_NO_ERROR) {
  26638. Error("glCompressedTexImage2DARB : ",Token::GLerrorToString(_error));
  26639. #if REGAL_BREAK
  26640. Break::ErrorCB(_error);
  26641. #endif
  26642. if (_context->err.callback)
  26643. _context->err.callback( _error );
  26644. }
  26645. }
  26646. }
  26647. static void REGAL_CALL error_glCompressedTexImage3DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
  26648. {
  26649. Internal("error_glCompressedTexImage3DARB","()");
  26650. RegalContext *_context = REGAL_GET_CONTEXT();
  26651. RegalAssert(_context);
  26652. DispatchTableGL *_next = _context->dispatcher.error.next();
  26653. RegalAssert(_next);
  26654. GLenum _error = GL_NO_ERROR;
  26655. if (!_context->err.inBeginEnd)
  26656. _error = _next->call(&_next->glGetError)();
  26657. RegalAssert(_error==GL_NO_ERROR);
  26658. _next->call(&_next->glCompressedTexImage3DARB)(target, level, internalformat, width, height, depth, border, imageSize, data);
  26659. if (!_context->err.inBeginEnd) {
  26660. _error = _next->call(&_next->glGetError)();
  26661. if (_error!=GL_NO_ERROR) {
  26662. Error("glCompressedTexImage3DARB : ",Token::GLerrorToString(_error));
  26663. #if REGAL_BREAK
  26664. Break::ErrorCB(_error);
  26665. #endif
  26666. if (_context->err.callback)
  26667. _context->err.callback( _error );
  26668. }
  26669. }
  26670. }
  26671. static void REGAL_CALL error_glCompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
  26672. {
  26673. Internal("error_glCompressedTexSubImage1DARB","()");
  26674. RegalContext *_context = REGAL_GET_CONTEXT();
  26675. RegalAssert(_context);
  26676. DispatchTableGL *_next = _context->dispatcher.error.next();
  26677. RegalAssert(_next);
  26678. GLenum _error = GL_NO_ERROR;
  26679. if (!_context->err.inBeginEnd)
  26680. _error = _next->call(&_next->glGetError)();
  26681. RegalAssert(_error==GL_NO_ERROR);
  26682. _next->call(&_next->glCompressedTexSubImage1DARB)(target, level, xoffset, width, format, imageSize, data);
  26683. if (!_context->err.inBeginEnd) {
  26684. _error = _next->call(&_next->glGetError)();
  26685. if (_error!=GL_NO_ERROR) {
  26686. Error("glCompressedTexSubImage1DARB : ",Token::GLerrorToString(_error));
  26687. #if REGAL_BREAK
  26688. Break::ErrorCB(_error);
  26689. #endif
  26690. if (_context->err.callback)
  26691. _context->err.callback( _error );
  26692. }
  26693. }
  26694. }
  26695. static void REGAL_CALL error_glCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
  26696. {
  26697. Internal("error_glCompressedTexSubImage2DARB","()");
  26698. RegalContext *_context = REGAL_GET_CONTEXT();
  26699. RegalAssert(_context);
  26700. DispatchTableGL *_next = _context->dispatcher.error.next();
  26701. RegalAssert(_next);
  26702. GLenum _error = GL_NO_ERROR;
  26703. if (!_context->err.inBeginEnd)
  26704. _error = _next->call(&_next->glGetError)();
  26705. RegalAssert(_error==GL_NO_ERROR);
  26706. _next->call(&_next->glCompressedTexSubImage2DARB)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
  26707. if (!_context->err.inBeginEnd) {
  26708. _error = _next->call(&_next->glGetError)();
  26709. if (_error!=GL_NO_ERROR) {
  26710. Error("glCompressedTexSubImage2DARB : ",Token::GLerrorToString(_error));
  26711. #if REGAL_BREAK
  26712. Break::ErrorCB(_error);
  26713. #endif
  26714. if (_context->err.callback)
  26715. _context->err.callback( _error );
  26716. }
  26717. }
  26718. }
  26719. static void REGAL_CALL error_glCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
  26720. {
  26721. Internal("error_glCompressedTexSubImage3DARB","()");
  26722. RegalContext *_context = REGAL_GET_CONTEXT();
  26723. RegalAssert(_context);
  26724. DispatchTableGL *_next = _context->dispatcher.error.next();
  26725. RegalAssert(_next);
  26726. GLenum _error = GL_NO_ERROR;
  26727. if (!_context->err.inBeginEnd)
  26728. _error = _next->call(&_next->glGetError)();
  26729. RegalAssert(_error==GL_NO_ERROR);
  26730. _next->call(&_next->glCompressedTexSubImage3DARB)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
  26731. if (!_context->err.inBeginEnd) {
  26732. _error = _next->call(&_next->glGetError)();
  26733. if (_error!=GL_NO_ERROR) {
  26734. Error("glCompressedTexSubImage3DARB : ",Token::GLerrorToString(_error));
  26735. #if REGAL_BREAK
  26736. Break::ErrorCB(_error);
  26737. #endif
  26738. if (_context->err.callback)
  26739. _context->err.callback( _error );
  26740. }
  26741. }
  26742. }
  26743. static void REGAL_CALL error_glGetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img)
  26744. {
  26745. Internal("error_glGetCompressedTexImageARB","()");
  26746. RegalContext *_context = REGAL_GET_CONTEXT();
  26747. RegalAssert(_context);
  26748. DispatchTableGL *_next = _context->dispatcher.error.next();
  26749. RegalAssert(_next);
  26750. GLenum _error = GL_NO_ERROR;
  26751. if (!_context->err.inBeginEnd)
  26752. _error = _next->call(&_next->glGetError)();
  26753. RegalAssert(_error==GL_NO_ERROR);
  26754. _next->call(&_next->glGetCompressedTexImageARB)(target, lod, img);
  26755. if (!_context->err.inBeginEnd) {
  26756. _error = _next->call(&_next->glGetError)();
  26757. if (_error!=GL_NO_ERROR) {
  26758. Error("glGetCompressedTexImageARB : ",Token::GLerrorToString(_error));
  26759. #if REGAL_BREAK
  26760. Break::ErrorCB(_error);
  26761. #endif
  26762. if (_context->err.callback)
  26763. _context->err.callback( _error );
  26764. }
  26765. }
  26766. }
  26767. // GL_ARB_texture_multisample
  26768. static void REGAL_CALL error_glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
  26769. {
  26770. Internal("error_glGetMultisamplefv","()");
  26771. RegalContext *_context = REGAL_GET_CONTEXT();
  26772. RegalAssert(_context);
  26773. DispatchTableGL *_next = _context->dispatcher.error.next();
  26774. RegalAssert(_next);
  26775. GLenum _error = GL_NO_ERROR;
  26776. if (!_context->err.inBeginEnd)
  26777. _error = _next->call(&_next->glGetError)();
  26778. RegalAssert(_error==GL_NO_ERROR);
  26779. _next->call(&_next->glGetMultisamplefv)(pname, index, val);
  26780. if (!_context->err.inBeginEnd) {
  26781. _error = _next->call(&_next->glGetError)();
  26782. if (_error!=GL_NO_ERROR) {
  26783. Error("glGetMultisamplefv : ",Token::GLerrorToString(_error));
  26784. #if REGAL_BREAK
  26785. Break::ErrorCB(_error);
  26786. #endif
  26787. if (_context->err.callback)
  26788. _context->err.callback( _error );
  26789. }
  26790. }
  26791. }
  26792. static void REGAL_CALL error_glSampleMaski(GLuint index, GLbitfield mask)
  26793. {
  26794. Internal("error_glSampleMaski","()");
  26795. RegalContext *_context = REGAL_GET_CONTEXT();
  26796. RegalAssert(_context);
  26797. DispatchTableGL *_next = _context->dispatcher.error.next();
  26798. RegalAssert(_next);
  26799. GLenum _error = GL_NO_ERROR;
  26800. if (!_context->err.inBeginEnd)
  26801. _error = _next->call(&_next->glGetError)();
  26802. RegalAssert(_error==GL_NO_ERROR);
  26803. _next->call(&_next->glSampleMaski)(index, mask);
  26804. if (!_context->err.inBeginEnd) {
  26805. _error = _next->call(&_next->glGetError)();
  26806. if (_error!=GL_NO_ERROR) {
  26807. Error("glSampleMaski : ",Token::GLerrorToString(_error));
  26808. #if REGAL_BREAK
  26809. Break::ErrorCB(_error);
  26810. #endif
  26811. if (_context->err.callback)
  26812. _context->err.callback( _error );
  26813. }
  26814. }
  26815. }
  26816. static void REGAL_CALL error_glTexImage2DMultisample(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
  26817. {
  26818. Internal("error_glTexImage2DMultisample","()");
  26819. RegalContext *_context = REGAL_GET_CONTEXT();
  26820. RegalAssert(_context);
  26821. DispatchTableGL *_next = _context->dispatcher.error.next();
  26822. RegalAssert(_next);
  26823. GLenum _error = GL_NO_ERROR;
  26824. if (!_context->err.inBeginEnd)
  26825. _error = _next->call(&_next->glGetError)();
  26826. RegalAssert(_error==GL_NO_ERROR);
  26827. _next->call(&_next->glTexImage2DMultisample)(target, samples, internalformat, width, height, fixedsamplelocations);
  26828. if (!_context->err.inBeginEnd) {
  26829. _error = _next->call(&_next->glGetError)();
  26830. if (_error!=GL_NO_ERROR) {
  26831. Error("glTexImage2DMultisample : ",Token::GLerrorToString(_error));
  26832. #if REGAL_BREAK
  26833. Break::ErrorCB(_error);
  26834. #endif
  26835. if (_context->err.callback)
  26836. _context->err.callback( _error );
  26837. }
  26838. }
  26839. }
  26840. static void REGAL_CALL error_glTexImage3DMultisample(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
  26841. {
  26842. Internal("error_glTexImage3DMultisample","()");
  26843. RegalContext *_context = REGAL_GET_CONTEXT();
  26844. RegalAssert(_context);
  26845. DispatchTableGL *_next = _context->dispatcher.error.next();
  26846. RegalAssert(_next);
  26847. GLenum _error = GL_NO_ERROR;
  26848. if (!_context->err.inBeginEnd)
  26849. _error = _next->call(&_next->glGetError)();
  26850. RegalAssert(_error==GL_NO_ERROR);
  26851. _next->call(&_next->glTexImage3DMultisample)(target, samples, internalformat, width, height, depth, fixedsamplelocations);
  26852. if (!_context->err.inBeginEnd) {
  26853. _error = _next->call(&_next->glGetError)();
  26854. if (_error!=GL_NO_ERROR) {
  26855. Error("glTexImage3DMultisample : ",Token::GLerrorToString(_error));
  26856. #if REGAL_BREAK
  26857. Break::ErrorCB(_error);
  26858. #endif
  26859. if (_context->err.callback)
  26860. _context->err.callback( _error );
  26861. }
  26862. }
  26863. }
  26864. // GL_ARB_texture_storage
  26865. static void REGAL_CALL error_glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
  26866. {
  26867. Internal("error_glTexStorage1D","()");
  26868. RegalContext *_context = REGAL_GET_CONTEXT();
  26869. RegalAssert(_context);
  26870. DispatchTableGL *_next = _context->dispatcher.error.next();
  26871. RegalAssert(_next);
  26872. GLenum _error = GL_NO_ERROR;
  26873. if (!_context->err.inBeginEnd)
  26874. _error = _next->call(&_next->glGetError)();
  26875. RegalAssert(_error==GL_NO_ERROR);
  26876. _next->call(&_next->glTexStorage1D)(target, levels, internalformat, width);
  26877. if (!_context->err.inBeginEnd) {
  26878. _error = _next->call(&_next->glGetError)();
  26879. if (_error!=GL_NO_ERROR) {
  26880. Error("glTexStorage1D : ",Token::GLerrorToString(_error));
  26881. #if REGAL_BREAK
  26882. Break::ErrorCB(_error);
  26883. #endif
  26884. if (_context->err.callback)
  26885. _context->err.callback( _error );
  26886. }
  26887. }
  26888. }
  26889. static void REGAL_CALL error_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
  26890. {
  26891. Internal("error_glTexStorage2D","()");
  26892. RegalContext *_context = REGAL_GET_CONTEXT();
  26893. RegalAssert(_context);
  26894. DispatchTableGL *_next = _context->dispatcher.error.next();
  26895. RegalAssert(_next);
  26896. GLenum _error = GL_NO_ERROR;
  26897. if (!_context->err.inBeginEnd)
  26898. _error = _next->call(&_next->glGetError)();
  26899. RegalAssert(_error==GL_NO_ERROR);
  26900. _next->call(&_next->glTexStorage2D)(target, levels, internalformat, width, height);
  26901. if (!_context->err.inBeginEnd) {
  26902. _error = _next->call(&_next->glGetError)();
  26903. if (_error!=GL_NO_ERROR) {
  26904. Error("glTexStorage2D : ",Token::GLerrorToString(_error));
  26905. #if REGAL_BREAK
  26906. Break::ErrorCB(_error);
  26907. #endif
  26908. if (_context->err.callback)
  26909. _context->err.callback( _error );
  26910. }
  26911. }
  26912. }
  26913. static void REGAL_CALL error_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
  26914. {
  26915. Internal("error_glTexStorage3D","()");
  26916. RegalContext *_context = REGAL_GET_CONTEXT();
  26917. RegalAssert(_context);
  26918. DispatchTableGL *_next = _context->dispatcher.error.next();
  26919. RegalAssert(_next);
  26920. GLenum _error = GL_NO_ERROR;
  26921. if (!_context->err.inBeginEnd)
  26922. _error = _next->call(&_next->glGetError)();
  26923. RegalAssert(_error==GL_NO_ERROR);
  26924. _next->call(&_next->glTexStorage3D)(target, levels, internalformat, width, height, depth);
  26925. if (!_context->err.inBeginEnd) {
  26926. _error = _next->call(&_next->glGetError)();
  26927. if (_error!=GL_NO_ERROR) {
  26928. Error("glTexStorage3D : ",Token::GLerrorToString(_error));
  26929. #if REGAL_BREAK
  26930. Break::ErrorCB(_error);
  26931. #endif
  26932. if (_context->err.callback)
  26933. _context->err.callback( _error );
  26934. }
  26935. }
  26936. }
  26937. static void REGAL_CALL error_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
  26938. {
  26939. Internal("error_glTextureStorage1DEXT","()");
  26940. RegalContext *_context = REGAL_GET_CONTEXT();
  26941. RegalAssert(_context);
  26942. DispatchTableGL *_next = _context->dispatcher.error.next();
  26943. RegalAssert(_next);
  26944. GLenum _error = GL_NO_ERROR;
  26945. if (!_context->err.inBeginEnd)
  26946. _error = _next->call(&_next->glGetError)();
  26947. RegalAssert(_error==GL_NO_ERROR);
  26948. _next->call(&_next->glTextureStorage1DEXT)(texture, target, levels, internalformat, width);
  26949. if (!_context->err.inBeginEnd) {
  26950. _error = _next->call(&_next->glGetError)();
  26951. if (_error!=GL_NO_ERROR) {
  26952. Error("glTextureStorage1DEXT : ",Token::GLerrorToString(_error));
  26953. #if REGAL_BREAK
  26954. Break::ErrorCB(_error);
  26955. #endif
  26956. if (_context->err.callback)
  26957. _context->err.callback( _error );
  26958. }
  26959. }
  26960. }
  26961. static void REGAL_CALL error_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
  26962. {
  26963. Internal("error_glTextureStorage2DEXT","()");
  26964. RegalContext *_context = REGAL_GET_CONTEXT();
  26965. RegalAssert(_context);
  26966. DispatchTableGL *_next = _context->dispatcher.error.next();
  26967. RegalAssert(_next);
  26968. GLenum _error = GL_NO_ERROR;
  26969. if (!_context->err.inBeginEnd)
  26970. _error = _next->call(&_next->glGetError)();
  26971. RegalAssert(_error==GL_NO_ERROR);
  26972. _next->call(&_next->glTextureStorage2DEXT)(texture, target, levels, internalformat, width, height);
  26973. if (!_context->err.inBeginEnd) {
  26974. _error = _next->call(&_next->glGetError)();
  26975. if (_error!=GL_NO_ERROR) {
  26976. Error("glTextureStorage2DEXT : ",Token::GLerrorToString(_error));
  26977. #if REGAL_BREAK
  26978. Break::ErrorCB(_error);
  26979. #endif
  26980. if (_context->err.callback)
  26981. _context->err.callback( _error );
  26982. }
  26983. }
  26984. }
  26985. static void REGAL_CALL error_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
  26986. {
  26987. Internal("error_glTextureStorage3DEXT","()");
  26988. RegalContext *_context = REGAL_GET_CONTEXT();
  26989. RegalAssert(_context);
  26990. DispatchTableGL *_next = _context->dispatcher.error.next();
  26991. RegalAssert(_next);
  26992. GLenum _error = GL_NO_ERROR;
  26993. if (!_context->err.inBeginEnd)
  26994. _error = _next->call(&_next->glGetError)();
  26995. RegalAssert(_error==GL_NO_ERROR);
  26996. _next->call(&_next->glTextureStorage3DEXT)(texture, target, levels, internalformat, width, height, depth);
  26997. if (!_context->err.inBeginEnd) {
  26998. _error = _next->call(&_next->glGetError)();
  26999. if (_error!=GL_NO_ERROR) {
  27000. Error("glTextureStorage3DEXT : ",Token::GLerrorToString(_error));
  27001. #if REGAL_BREAK
  27002. Break::ErrorCB(_error);
  27003. #endif
  27004. if (_context->err.callback)
  27005. _context->err.callback( _error );
  27006. }
  27007. }
  27008. }
  27009. // GL_ARB_texture_storage_multisample
  27010. static void REGAL_CALL error_glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
  27011. {
  27012. Internal("error_glTexStorage2DMultisample","()");
  27013. RegalContext *_context = REGAL_GET_CONTEXT();
  27014. RegalAssert(_context);
  27015. DispatchTableGL *_next = _context->dispatcher.error.next();
  27016. RegalAssert(_next);
  27017. GLenum _error = GL_NO_ERROR;
  27018. if (!_context->err.inBeginEnd)
  27019. _error = _next->call(&_next->glGetError)();
  27020. RegalAssert(_error==GL_NO_ERROR);
  27021. _next->call(&_next->glTexStorage2DMultisample)(target, samples, internalformat, width, height, fixedsamplelocations);
  27022. if (!_context->err.inBeginEnd) {
  27023. _error = _next->call(&_next->glGetError)();
  27024. if (_error!=GL_NO_ERROR) {
  27025. Error("glTexStorage2DMultisample : ",Token::GLerrorToString(_error));
  27026. #if REGAL_BREAK
  27027. Break::ErrorCB(_error);
  27028. #endif
  27029. if (_context->err.callback)
  27030. _context->err.callback( _error );
  27031. }
  27032. }
  27033. }
  27034. static void REGAL_CALL error_glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
  27035. {
  27036. Internal("error_glTexStorage3DMultisample","()");
  27037. RegalContext *_context = REGAL_GET_CONTEXT();
  27038. RegalAssert(_context);
  27039. DispatchTableGL *_next = _context->dispatcher.error.next();
  27040. RegalAssert(_next);
  27041. GLenum _error = GL_NO_ERROR;
  27042. if (!_context->err.inBeginEnd)
  27043. _error = _next->call(&_next->glGetError)();
  27044. RegalAssert(_error==GL_NO_ERROR);
  27045. _next->call(&_next->glTexStorage3DMultisample)(target, samples, internalformat, width, height, depth, fixedsamplelocations);
  27046. if (!_context->err.inBeginEnd) {
  27047. _error = _next->call(&_next->glGetError)();
  27048. if (_error!=GL_NO_ERROR) {
  27049. Error("glTexStorage3DMultisample : ",Token::GLerrorToString(_error));
  27050. #if REGAL_BREAK
  27051. Break::ErrorCB(_error);
  27052. #endif
  27053. if (_context->err.callback)
  27054. _context->err.callback( _error );
  27055. }
  27056. }
  27057. }
  27058. static void REGAL_CALL error_glTextureStorage2DMultisampleEXT(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
  27059. {
  27060. Internal("error_glTextureStorage2DMultisampleEXT","()");
  27061. RegalContext *_context = REGAL_GET_CONTEXT();
  27062. RegalAssert(_context);
  27063. DispatchTableGL *_next = _context->dispatcher.error.next();
  27064. RegalAssert(_next);
  27065. GLenum _error = GL_NO_ERROR;
  27066. if (!_context->err.inBeginEnd)
  27067. _error = _next->call(&_next->glGetError)();
  27068. RegalAssert(_error==GL_NO_ERROR);
  27069. _next->call(&_next->glTextureStorage2DMultisampleEXT)(texture, target, samples, internalformat, width, height, fixedsamplelocations);
  27070. if (!_context->err.inBeginEnd) {
  27071. _error = _next->call(&_next->glGetError)();
  27072. if (_error!=GL_NO_ERROR) {
  27073. Error("glTextureStorage2DMultisampleEXT : ",Token::GLerrorToString(_error));
  27074. #if REGAL_BREAK
  27075. Break::ErrorCB(_error);
  27076. #endif
  27077. if (_context->err.callback)
  27078. _context->err.callback( _error );
  27079. }
  27080. }
  27081. }
  27082. static void REGAL_CALL error_glTextureStorage3DMultisampleEXT(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
  27083. {
  27084. Internal("error_glTextureStorage3DMultisampleEXT","()");
  27085. RegalContext *_context = REGAL_GET_CONTEXT();
  27086. RegalAssert(_context);
  27087. DispatchTableGL *_next = _context->dispatcher.error.next();
  27088. RegalAssert(_next);
  27089. GLenum _error = GL_NO_ERROR;
  27090. if (!_context->err.inBeginEnd)
  27091. _error = _next->call(&_next->glGetError)();
  27092. RegalAssert(_error==GL_NO_ERROR);
  27093. _next->call(&_next->glTextureStorage3DMultisampleEXT)(texture, target, samples, internalformat, width, height, depth, fixedsamplelocations);
  27094. if (!_context->err.inBeginEnd) {
  27095. _error = _next->call(&_next->glGetError)();
  27096. if (_error!=GL_NO_ERROR) {
  27097. Error("glTextureStorage3DMultisampleEXT : ",Token::GLerrorToString(_error));
  27098. #if REGAL_BREAK
  27099. Break::ErrorCB(_error);
  27100. #endif
  27101. if (_context->err.callback)
  27102. _context->err.callback( _error );
  27103. }
  27104. }
  27105. }
  27106. // GL_ARB_texture_view
  27107. static void REGAL_CALL error_glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)
  27108. {
  27109. Internal("error_glTextureView","()");
  27110. RegalContext *_context = REGAL_GET_CONTEXT();
  27111. RegalAssert(_context);
  27112. DispatchTableGL *_next = _context->dispatcher.error.next();
  27113. RegalAssert(_next);
  27114. GLenum _error = GL_NO_ERROR;
  27115. if (!_context->err.inBeginEnd)
  27116. _error = _next->call(&_next->glGetError)();
  27117. RegalAssert(_error==GL_NO_ERROR);
  27118. _next->call(&_next->glTextureView)(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
  27119. if (!_context->err.inBeginEnd) {
  27120. _error = _next->call(&_next->glGetError)();
  27121. if (_error!=GL_NO_ERROR) {
  27122. Error("glTextureView : ",Token::GLerrorToString(_error));
  27123. #if REGAL_BREAK
  27124. Break::ErrorCB(_error);
  27125. #endif
  27126. if (_context->err.callback)
  27127. _context->err.callback( _error );
  27128. }
  27129. }
  27130. }
  27131. // GL_ARB_timer_query
  27132. static void REGAL_CALL error_glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params)
  27133. {
  27134. Internal("error_glGetQueryObjecti64v","()");
  27135. RegalContext *_context = REGAL_GET_CONTEXT();
  27136. RegalAssert(_context);
  27137. DispatchTableGL *_next = _context->dispatcher.error.next();
  27138. RegalAssert(_next);
  27139. GLenum _error = GL_NO_ERROR;
  27140. if (!_context->err.inBeginEnd)
  27141. _error = _next->call(&_next->glGetError)();
  27142. RegalAssert(_error==GL_NO_ERROR);
  27143. _next->call(&_next->glGetQueryObjecti64v)(id, pname, params);
  27144. if (!_context->err.inBeginEnd) {
  27145. _error = _next->call(&_next->glGetError)();
  27146. if (_error!=GL_NO_ERROR) {
  27147. Error("glGetQueryObjecti64v : ",Token::GLerrorToString(_error));
  27148. #if REGAL_BREAK
  27149. Break::ErrorCB(_error);
  27150. #endif
  27151. if (_context->err.callback)
  27152. _context->err.callback( _error );
  27153. }
  27154. }
  27155. }
  27156. static void REGAL_CALL error_glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
  27157. {
  27158. Internal("error_glGetQueryObjectui64v","()");
  27159. RegalContext *_context = REGAL_GET_CONTEXT();
  27160. RegalAssert(_context);
  27161. DispatchTableGL *_next = _context->dispatcher.error.next();
  27162. RegalAssert(_next);
  27163. GLenum _error = GL_NO_ERROR;
  27164. if (!_context->err.inBeginEnd)
  27165. _error = _next->call(&_next->glGetError)();
  27166. RegalAssert(_error==GL_NO_ERROR);
  27167. _next->call(&_next->glGetQueryObjectui64v)(id, pname, params);
  27168. if (!_context->err.inBeginEnd) {
  27169. _error = _next->call(&_next->glGetError)();
  27170. if (_error!=GL_NO_ERROR) {
  27171. Error("glGetQueryObjectui64v : ",Token::GLerrorToString(_error));
  27172. #if REGAL_BREAK
  27173. Break::ErrorCB(_error);
  27174. #endif
  27175. if (_context->err.callback)
  27176. _context->err.callback( _error );
  27177. }
  27178. }
  27179. }
  27180. static void REGAL_CALL error_glQueryCounter(GLuint id, GLenum target)
  27181. {
  27182. Internal("error_glQueryCounter","()");
  27183. RegalContext *_context = REGAL_GET_CONTEXT();
  27184. RegalAssert(_context);
  27185. DispatchTableGL *_next = _context->dispatcher.error.next();
  27186. RegalAssert(_next);
  27187. GLenum _error = GL_NO_ERROR;
  27188. if (!_context->err.inBeginEnd)
  27189. _error = _next->call(&_next->glGetError)();
  27190. RegalAssert(_error==GL_NO_ERROR);
  27191. _next->call(&_next->glQueryCounter)(id, target);
  27192. if (!_context->err.inBeginEnd) {
  27193. _error = _next->call(&_next->glGetError)();
  27194. if (_error!=GL_NO_ERROR) {
  27195. Error("glQueryCounter : ",Token::GLerrorToString(_error));
  27196. #if REGAL_BREAK
  27197. Break::ErrorCB(_error);
  27198. #endif
  27199. if (_context->err.callback)
  27200. _context->err.callback( _error );
  27201. }
  27202. }
  27203. }
  27204. // GL_ARB_transform_feedback2
  27205. static void REGAL_CALL error_glBindTransformFeedback(GLenum target, GLuint id)
  27206. {
  27207. Internal("error_glBindTransformFeedback","()");
  27208. RegalContext *_context = REGAL_GET_CONTEXT();
  27209. RegalAssert(_context);
  27210. DispatchTableGL *_next = _context->dispatcher.error.next();
  27211. RegalAssert(_next);
  27212. GLenum _error = GL_NO_ERROR;
  27213. if (!_context->err.inBeginEnd)
  27214. _error = _next->call(&_next->glGetError)();
  27215. RegalAssert(_error==GL_NO_ERROR);
  27216. _next->call(&_next->glBindTransformFeedback)(target, id);
  27217. if (!_context->err.inBeginEnd) {
  27218. _error = _next->call(&_next->glGetError)();
  27219. if (_error!=GL_NO_ERROR) {
  27220. Error("glBindTransformFeedback : ",Token::GLerrorToString(_error));
  27221. #if REGAL_BREAK
  27222. Break::ErrorCB(_error);
  27223. #endif
  27224. if (_context->err.callback)
  27225. _context->err.callback( _error );
  27226. }
  27227. }
  27228. }
  27229. static void REGAL_CALL error_glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
  27230. {
  27231. Internal("error_glDeleteTransformFeedbacks","()");
  27232. RegalContext *_context = REGAL_GET_CONTEXT();
  27233. RegalAssert(_context);
  27234. DispatchTableGL *_next = _context->dispatcher.error.next();
  27235. RegalAssert(_next);
  27236. GLenum _error = GL_NO_ERROR;
  27237. if (!_context->err.inBeginEnd)
  27238. _error = _next->call(&_next->glGetError)();
  27239. RegalAssert(_error==GL_NO_ERROR);
  27240. _next->call(&_next->glDeleteTransformFeedbacks)(n, ids);
  27241. if (!_context->err.inBeginEnd) {
  27242. _error = _next->call(&_next->glGetError)();
  27243. if (_error!=GL_NO_ERROR) {
  27244. Error("glDeleteTransformFeedbacks : ",Token::GLerrorToString(_error));
  27245. #if REGAL_BREAK
  27246. Break::ErrorCB(_error);
  27247. #endif
  27248. if (_context->err.callback)
  27249. _context->err.callback( _error );
  27250. }
  27251. }
  27252. }
  27253. static void REGAL_CALL error_glDrawTransformFeedback(GLenum mode, GLuint name)
  27254. {
  27255. Internal("error_glDrawTransformFeedback","()");
  27256. RegalContext *_context = REGAL_GET_CONTEXT();
  27257. RegalAssert(_context);
  27258. DispatchTableGL *_next = _context->dispatcher.error.next();
  27259. RegalAssert(_next);
  27260. GLenum _error = GL_NO_ERROR;
  27261. if (!_context->err.inBeginEnd)
  27262. _error = _next->call(&_next->glGetError)();
  27263. RegalAssert(_error==GL_NO_ERROR);
  27264. _next->call(&_next->glDrawTransformFeedback)(mode, name);
  27265. if (!_context->err.inBeginEnd) {
  27266. _error = _next->call(&_next->glGetError)();
  27267. if (_error!=GL_NO_ERROR) {
  27268. Error("glDrawTransformFeedback : ",Token::GLerrorToString(_error));
  27269. #if REGAL_BREAK
  27270. Break::ErrorCB(_error);
  27271. #endif
  27272. if (_context->err.callback)
  27273. _context->err.callback( _error );
  27274. }
  27275. }
  27276. }
  27277. static void REGAL_CALL error_glGenTransformFeedbacks(GLsizei n, GLuint *ids)
  27278. {
  27279. Internal("error_glGenTransformFeedbacks","()");
  27280. RegalContext *_context = REGAL_GET_CONTEXT();
  27281. RegalAssert(_context);
  27282. DispatchTableGL *_next = _context->dispatcher.error.next();
  27283. RegalAssert(_next);
  27284. GLenum _error = GL_NO_ERROR;
  27285. if (!_context->err.inBeginEnd)
  27286. _error = _next->call(&_next->glGetError)();
  27287. RegalAssert(_error==GL_NO_ERROR);
  27288. _next->call(&_next->glGenTransformFeedbacks)(n, ids);
  27289. if (!_context->err.inBeginEnd) {
  27290. _error = _next->call(&_next->glGetError)();
  27291. if (_error!=GL_NO_ERROR) {
  27292. Error("glGenTransformFeedbacks : ",Token::GLerrorToString(_error));
  27293. #if REGAL_BREAK
  27294. Break::ErrorCB(_error);
  27295. #endif
  27296. if (_context->err.callback)
  27297. _context->err.callback( _error );
  27298. }
  27299. }
  27300. }
  27301. static GLboolean REGAL_CALL error_glIsTransformFeedback(GLuint id)
  27302. {
  27303. Internal("error_glIsTransformFeedback","()");
  27304. RegalContext *_context = REGAL_GET_CONTEXT();
  27305. RegalAssert(_context);
  27306. DispatchTableGL *_next = _context->dispatcher.error.next();
  27307. RegalAssert(_next);
  27308. GLenum _error = GL_NO_ERROR;
  27309. if (!_context->err.inBeginEnd)
  27310. _error = _next->call(&_next->glGetError)();
  27311. RegalAssert(_error==GL_NO_ERROR);
  27312. GLboolean ret = _next->call(&_next->glIsTransformFeedback)(id);
  27313. if (!_context->err.inBeginEnd) {
  27314. _error = _next->call(&_next->glGetError)();
  27315. if (_error!=GL_NO_ERROR) {
  27316. Error("glIsTransformFeedback : ",Token::GLerrorToString(_error));
  27317. #if REGAL_BREAK
  27318. Break::ErrorCB(_error);
  27319. #endif
  27320. if (_context->err.callback)
  27321. _context->err.callback( _error );
  27322. }
  27323. }
  27324. return ret;
  27325. }
  27326. static void REGAL_CALL error_glPauseTransformFeedback(void)
  27327. {
  27328. Internal("error_glPauseTransformFeedback","()");
  27329. RegalContext *_context = REGAL_GET_CONTEXT();
  27330. RegalAssert(_context);
  27331. DispatchTableGL *_next = _context->dispatcher.error.next();
  27332. RegalAssert(_next);
  27333. GLenum _error = GL_NO_ERROR;
  27334. if (!_context->err.inBeginEnd)
  27335. _error = _next->call(&_next->glGetError)();
  27336. RegalAssert(_error==GL_NO_ERROR);
  27337. _next->call(&_next->glPauseTransformFeedback)();
  27338. if (!_context->err.inBeginEnd) {
  27339. _error = _next->call(&_next->glGetError)();
  27340. if (_error!=GL_NO_ERROR) {
  27341. Error("glPauseTransformFeedback : ",Token::GLerrorToString(_error));
  27342. #if REGAL_BREAK
  27343. Break::ErrorCB(_error);
  27344. #endif
  27345. if (_context->err.callback)
  27346. _context->err.callback( _error );
  27347. }
  27348. }
  27349. }
  27350. static void REGAL_CALL error_glResumeTransformFeedback(void)
  27351. {
  27352. Internal("error_glResumeTransformFeedback","()");
  27353. RegalContext *_context = REGAL_GET_CONTEXT();
  27354. RegalAssert(_context);
  27355. DispatchTableGL *_next = _context->dispatcher.error.next();
  27356. RegalAssert(_next);
  27357. GLenum _error = GL_NO_ERROR;
  27358. if (!_context->err.inBeginEnd)
  27359. _error = _next->call(&_next->glGetError)();
  27360. RegalAssert(_error==GL_NO_ERROR);
  27361. _next->call(&_next->glResumeTransformFeedback)();
  27362. if (!_context->err.inBeginEnd) {
  27363. _error = _next->call(&_next->glGetError)();
  27364. if (_error!=GL_NO_ERROR) {
  27365. Error("glResumeTransformFeedback : ",Token::GLerrorToString(_error));
  27366. #if REGAL_BREAK
  27367. Break::ErrorCB(_error);
  27368. #endif
  27369. if (_context->err.callback)
  27370. _context->err.callback( _error );
  27371. }
  27372. }
  27373. }
  27374. // GL_ARB_transform_feedback3
  27375. static void REGAL_CALL error_glBeginQueryIndexed(GLenum target, GLuint index, GLuint id)
  27376. {
  27377. Internal("error_glBeginQueryIndexed","()");
  27378. RegalContext *_context = REGAL_GET_CONTEXT();
  27379. RegalAssert(_context);
  27380. DispatchTableGL *_next = _context->dispatcher.error.next();
  27381. RegalAssert(_next);
  27382. GLenum _error = GL_NO_ERROR;
  27383. if (!_context->err.inBeginEnd)
  27384. _error = _next->call(&_next->glGetError)();
  27385. RegalAssert(_error==GL_NO_ERROR);
  27386. _next->call(&_next->glBeginQueryIndexed)(target, index, id);
  27387. if (!_context->err.inBeginEnd) {
  27388. _error = _next->call(&_next->glGetError)();
  27389. if (_error!=GL_NO_ERROR) {
  27390. Error("glBeginQueryIndexed : ",Token::GLerrorToString(_error));
  27391. #if REGAL_BREAK
  27392. Break::ErrorCB(_error);
  27393. #endif
  27394. if (_context->err.callback)
  27395. _context->err.callback( _error );
  27396. }
  27397. }
  27398. }
  27399. static void REGAL_CALL error_glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream)
  27400. {
  27401. Internal("error_glDrawTransformFeedbackStream","()");
  27402. RegalContext *_context = REGAL_GET_CONTEXT();
  27403. RegalAssert(_context);
  27404. DispatchTableGL *_next = _context->dispatcher.error.next();
  27405. RegalAssert(_next);
  27406. GLenum _error = GL_NO_ERROR;
  27407. if (!_context->err.inBeginEnd)
  27408. _error = _next->call(&_next->glGetError)();
  27409. RegalAssert(_error==GL_NO_ERROR);
  27410. _next->call(&_next->glDrawTransformFeedbackStream)(mode, id, stream);
  27411. if (!_context->err.inBeginEnd) {
  27412. _error = _next->call(&_next->glGetError)();
  27413. if (_error!=GL_NO_ERROR) {
  27414. Error("glDrawTransformFeedbackStream : ",Token::GLerrorToString(_error));
  27415. #if REGAL_BREAK
  27416. Break::ErrorCB(_error);
  27417. #endif
  27418. if (_context->err.callback)
  27419. _context->err.callback( _error );
  27420. }
  27421. }
  27422. }
  27423. static void REGAL_CALL error_glEndQueryIndexed(GLenum target, GLuint index)
  27424. {
  27425. Internal("error_glEndQueryIndexed","()");
  27426. RegalContext *_context = REGAL_GET_CONTEXT();
  27427. RegalAssert(_context);
  27428. DispatchTableGL *_next = _context->dispatcher.error.next();
  27429. RegalAssert(_next);
  27430. GLenum _error = GL_NO_ERROR;
  27431. if (!_context->err.inBeginEnd)
  27432. _error = _next->call(&_next->glGetError)();
  27433. RegalAssert(_error==GL_NO_ERROR);
  27434. _next->call(&_next->glEndQueryIndexed)(target, index);
  27435. if (!_context->err.inBeginEnd) {
  27436. _error = _next->call(&_next->glGetError)();
  27437. if (_error!=GL_NO_ERROR) {
  27438. Error("glEndQueryIndexed : ",Token::GLerrorToString(_error));
  27439. #if REGAL_BREAK
  27440. Break::ErrorCB(_error);
  27441. #endif
  27442. if (_context->err.callback)
  27443. _context->err.callback( _error );
  27444. }
  27445. }
  27446. }
  27447. static void REGAL_CALL error_glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params)
  27448. {
  27449. Internal("error_glGetQueryIndexediv","()");
  27450. RegalContext *_context = REGAL_GET_CONTEXT();
  27451. RegalAssert(_context);
  27452. DispatchTableGL *_next = _context->dispatcher.error.next();
  27453. RegalAssert(_next);
  27454. GLenum _error = GL_NO_ERROR;
  27455. if (!_context->err.inBeginEnd)
  27456. _error = _next->call(&_next->glGetError)();
  27457. RegalAssert(_error==GL_NO_ERROR);
  27458. _next->call(&_next->glGetQueryIndexediv)(target, index, pname, params);
  27459. if (!_context->err.inBeginEnd) {
  27460. _error = _next->call(&_next->glGetError)();
  27461. if (_error!=GL_NO_ERROR) {
  27462. Error("glGetQueryIndexediv : ",Token::GLerrorToString(_error));
  27463. #if REGAL_BREAK
  27464. Break::ErrorCB(_error);
  27465. #endif
  27466. if (_context->err.callback)
  27467. _context->err.callback( _error );
  27468. }
  27469. }
  27470. }
  27471. // GL_ARB_transform_feedback_instanced
  27472. static void REGAL_CALL error_glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei primcount)
  27473. {
  27474. Internal("error_glDrawTransformFeedbackInstanced","()");
  27475. RegalContext *_context = REGAL_GET_CONTEXT();
  27476. RegalAssert(_context);
  27477. DispatchTableGL *_next = _context->dispatcher.error.next();
  27478. RegalAssert(_next);
  27479. GLenum _error = GL_NO_ERROR;
  27480. if (!_context->err.inBeginEnd)
  27481. _error = _next->call(&_next->glGetError)();
  27482. RegalAssert(_error==GL_NO_ERROR);
  27483. _next->call(&_next->glDrawTransformFeedbackInstanced)(mode, id, primcount);
  27484. if (!_context->err.inBeginEnd) {
  27485. _error = _next->call(&_next->glGetError)();
  27486. if (_error!=GL_NO_ERROR) {
  27487. Error("glDrawTransformFeedbackInstanced : ",Token::GLerrorToString(_error));
  27488. #if REGAL_BREAK
  27489. Break::ErrorCB(_error);
  27490. #endif
  27491. if (_context->err.callback)
  27492. _context->err.callback( _error );
  27493. }
  27494. }
  27495. }
  27496. static void REGAL_CALL error_glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei primcount)
  27497. {
  27498. Internal("error_glDrawTransformFeedbackStreamInstanced","()");
  27499. RegalContext *_context = REGAL_GET_CONTEXT();
  27500. RegalAssert(_context);
  27501. DispatchTableGL *_next = _context->dispatcher.error.next();
  27502. RegalAssert(_next);
  27503. GLenum _error = GL_NO_ERROR;
  27504. if (!_context->err.inBeginEnd)
  27505. _error = _next->call(&_next->glGetError)();
  27506. RegalAssert(_error==GL_NO_ERROR);
  27507. _next->call(&_next->glDrawTransformFeedbackStreamInstanced)(mode, id, stream, primcount);
  27508. if (!_context->err.inBeginEnd) {
  27509. _error = _next->call(&_next->glGetError)();
  27510. if (_error!=GL_NO_ERROR) {
  27511. Error("glDrawTransformFeedbackStreamInstanced : ",Token::GLerrorToString(_error));
  27512. #if REGAL_BREAK
  27513. Break::ErrorCB(_error);
  27514. #endif
  27515. if (_context->err.callback)
  27516. _context->err.callback( _error );
  27517. }
  27518. }
  27519. }
  27520. // GL_ARB_transpose_matrix
  27521. static void REGAL_CALL error_glLoadTransposeMatrixdARB(const GLdouble *m)
  27522. {
  27523. Internal("error_glLoadTransposeMatrixdARB","()");
  27524. RegalContext *_context = REGAL_GET_CONTEXT();
  27525. RegalAssert(_context);
  27526. DispatchTableGL *_next = _context->dispatcher.error.next();
  27527. RegalAssert(_next);
  27528. GLenum _error = GL_NO_ERROR;
  27529. if (!_context->err.inBeginEnd)
  27530. _error = _next->call(&_next->glGetError)();
  27531. RegalAssert(_error==GL_NO_ERROR);
  27532. _next->call(&_next->glLoadTransposeMatrixdARB)(m);
  27533. if (!_context->err.inBeginEnd) {
  27534. _error = _next->call(&_next->glGetError)();
  27535. if (_error!=GL_NO_ERROR) {
  27536. Error("glLoadTransposeMatrixdARB : ",Token::GLerrorToString(_error));
  27537. #if REGAL_BREAK
  27538. Break::ErrorCB(_error);
  27539. #endif
  27540. if (_context->err.callback)
  27541. _context->err.callback( _error );
  27542. }
  27543. }
  27544. }
  27545. static void REGAL_CALL error_glLoadTransposeMatrixfARB(const GLfloat *m)
  27546. {
  27547. Internal("error_glLoadTransposeMatrixfARB","()");
  27548. RegalContext *_context = REGAL_GET_CONTEXT();
  27549. RegalAssert(_context);
  27550. DispatchTableGL *_next = _context->dispatcher.error.next();
  27551. RegalAssert(_next);
  27552. GLenum _error = GL_NO_ERROR;
  27553. if (!_context->err.inBeginEnd)
  27554. _error = _next->call(&_next->glGetError)();
  27555. RegalAssert(_error==GL_NO_ERROR);
  27556. _next->call(&_next->glLoadTransposeMatrixfARB)(m);
  27557. if (!_context->err.inBeginEnd) {
  27558. _error = _next->call(&_next->glGetError)();
  27559. if (_error!=GL_NO_ERROR) {
  27560. Error("glLoadTransposeMatrixfARB : ",Token::GLerrorToString(_error));
  27561. #if REGAL_BREAK
  27562. Break::ErrorCB(_error);
  27563. #endif
  27564. if (_context->err.callback)
  27565. _context->err.callback( _error );
  27566. }
  27567. }
  27568. }
  27569. static void REGAL_CALL error_glMultTransposeMatrixdARB(const GLdouble *m)
  27570. {
  27571. Internal("error_glMultTransposeMatrixdARB","()");
  27572. RegalContext *_context = REGAL_GET_CONTEXT();
  27573. RegalAssert(_context);
  27574. DispatchTableGL *_next = _context->dispatcher.error.next();
  27575. RegalAssert(_next);
  27576. GLenum _error = GL_NO_ERROR;
  27577. if (!_context->err.inBeginEnd)
  27578. _error = _next->call(&_next->glGetError)();
  27579. RegalAssert(_error==GL_NO_ERROR);
  27580. _next->call(&_next->glMultTransposeMatrixdARB)(m);
  27581. if (!_context->err.inBeginEnd) {
  27582. _error = _next->call(&_next->glGetError)();
  27583. if (_error!=GL_NO_ERROR) {
  27584. Error("glMultTransposeMatrixdARB : ",Token::GLerrorToString(_error));
  27585. #if REGAL_BREAK
  27586. Break::ErrorCB(_error);
  27587. #endif
  27588. if (_context->err.callback)
  27589. _context->err.callback( _error );
  27590. }
  27591. }
  27592. }
  27593. static void REGAL_CALL error_glMultTransposeMatrixfARB(const GLfloat *m)
  27594. {
  27595. Internal("error_glMultTransposeMatrixfARB","()");
  27596. RegalContext *_context = REGAL_GET_CONTEXT();
  27597. RegalAssert(_context);
  27598. DispatchTableGL *_next = _context->dispatcher.error.next();
  27599. RegalAssert(_next);
  27600. GLenum _error = GL_NO_ERROR;
  27601. if (!_context->err.inBeginEnd)
  27602. _error = _next->call(&_next->glGetError)();
  27603. RegalAssert(_error==GL_NO_ERROR);
  27604. _next->call(&_next->glMultTransposeMatrixfARB)(m);
  27605. if (!_context->err.inBeginEnd) {
  27606. _error = _next->call(&_next->glGetError)();
  27607. if (_error!=GL_NO_ERROR) {
  27608. Error("glMultTransposeMatrixfARB : ",Token::GLerrorToString(_error));
  27609. #if REGAL_BREAK
  27610. Break::ErrorCB(_error);
  27611. #endif
  27612. if (_context->err.callback)
  27613. _context->err.callback( _error );
  27614. }
  27615. }
  27616. }
  27617. // GL_ARB_uniform_buffer_object
  27618. static void REGAL_CALL error_glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
  27619. {
  27620. Internal("error_glBindBufferBase","()");
  27621. RegalContext *_context = REGAL_GET_CONTEXT();
  27622. RegalAssert(_context);
  27623. DispatchTableGL *_next = _context->dispatcher.error.next();
  27624. RegalAssert(_next);
  27625. GLenum _error = GL_NO_ERROR;
  27626. if (!_context->err.inBeginEnd)
  27627. _error = _next->call(&_next->glGetError)();
  27628. RegalAssert(_error==GL_NO_ERROR);
  27629. _next->call(&_next->glBindBufferBase)(target, index, buffer);
  27630. if (!_context->err.inBeginEnd) {
  27631. _error = _next->call(&_next->glGetError)();
  27632. if (_error!=GL_NO_ERROR) {
  27633. Error("glBindBufferBase : ",Token::GLerrorToString(_error));
  27634. #if REGAL_BREAK
  27635. Break::ErrorCB(_error);
  27636. #endif
  27637. if (_context->err.callback)
  27638. _context->err.callback( _error );
  27639. }
  27640. }
  27641. }
  27642. static void REGAL_CALL error_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
  27643. {
  27644. Internal("error_glBindBufferRange","()");
  27645. RegalContext *_context = REGAL_GET_CONTEXT();
  27646. RegalAssert(_context);
  27647. DispatchTableGL *_next = _context->dispatcher.error.next();
  27648. RegalAssert(_next);
  27649. GLenum _error = GL_NO_ERROR;
  27650. if (!_context->err.inBeginEnd)
  27651. _error = _next->call(&_next->glGetError)();
  27652. RegalAssert(_error==GL_NO_ERROR);
  27653. _next->call(&_next->glBindBufferRange)(target, index, buffer, offset, size);
  27654. if (!_context->err.inBeginEnd) {
  27655. _error = _next->call(&_next->glGetError)();
  27656. if (_error!=GL_NO_ERROR) {
  27657. Error("glBindBufferRange : ",Token::GLerrorToString(_error));
  27658. #if REGAL_BREAK
  27659. Break::ErrorCB(_error);
  27660. #endif
  27661. if (_context->err.callback)
  27662. _context->err.callback( _error );
  27663. }
  27664. }
  27665. }
  27666. static void REGAL_CALL error_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
  27667. {
  27668. Internal("error_glGetActiveUniformBlockName","()");
  27669. RegalContext *_context = REGAL_GET_CONTEXT();
  27670. RegalAssert(_context);
  27671. DispatchTableGL *_next = _context->dispatcher.error.next();
  27672. RegalAssert(_next);
  27673. GLenum _error = GL_NO_ERROR;
  27674. if (!_context->err.inBeginEnd)
  27675. _error = _next->call(&_next->glGetError)();
  27676. RegalAssert(_error==GL_NO_ERROR);
  27677. _next->call(&_next->glGetActiveUniformBlockName)(program, uniformBlockIndex, bufSize, length, uniformBlockName);
  27678. if (!_context->err.inBeginEnd) {
  27679. _error = _next->call(&_next->glGetError)();
  27680. if (_error!=GL_NO_ERROR) {
  27681. Error("glGetActiveUniformBlockName : ",Token::GLerrorToString(_error));
  27682. #if REGAL_BREAK
  27683. Break::ErrorCB(_error);
  27684. #endif
  27685. if (_context->err.callback)
  27686. _context->err.callback( _error );
  27687. }
  27688. }
  27689. }
  27690. static void REGAL_CALL error_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
  27691. {
  27692. Internal("error_glGetActiveUniformBlockiv","()");
  27693. RegalContext *_context = REGAL_GET_CONTEXT();
  27694. RegalAssert(_context);
  27695. DispatchTableGL *_next = _context->dispatcher.error.next();
  27696. RegalAssert(_next);
  27697. GLenum _error = GL_NO_ERROR;
  27698. if (!_context->err.inBeginEnd)
  27699. _error = _next->call(&_next->glGetError)();
  27700. RegalAssert(_error==GL_NO_ERROR);
  27701. _next->call(&_next->glGetActiveUniformBlockiv)(program, uniformBlockIndex, pname, params);
  27702. if (!_context->err.inBeginEnd) {
  27703. _error = _next->call(&_next->glGetError)();
  27704. if (_error!=GL_NO_ERROR) {
  27705. Error("glGetActiveUniformBlockiv : ",Token::GLerrorToString(_error));
  27706. #if REGAL_BREAK
  27707. Break::ErrorCB(_error);
  27708. #endif
  27709. if (_context->err.callback)
  27710. _context->err.callback( _error );
  27711. }
  27712. }
  27713. }
  27714. static void REGAL_CALL error_glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName)
  27715. {
  27716. Internal("error_glGetActiveUniformName","()");
  27717. RegalContext *_context = REGAL_GET_CONTEXT();
  27718. RegalAssert(_context);
  27719. DispatchTableGL *_next = _context->dispatcher.error.next();
  27720. RegalAssert(_next);
  27721. GLenum _error = GL_NO_ERROR;
  27722. if (!_context->err.inBeginEnd)
  27723. _error = _next->call(&_next->glGetError)();
  27724. RegalAssert(_error==GL_NO_ERROR);
  27725. _next->call(&_next->glGetActiveUniformName)(program, uniformIndex, bufSize, length, uniformName);
  27726. if (!_context->err.inBeginEnd) {
  27727. _error = _next->call(&_next->glGetError)();
  27728. if (_error!=GL_NO_ERROR) {
  27729. Error("glGetActiveUniformName : ",Token::GLerrorToString(_error));
  27730. #if REGAL_BREAK
  27731. Break::ErrorCB(_error);
  27732. #endif
  27733. if (_context->err.callback)
  27734. _context->err.callback( _error );
  27735. }
  27736. }
  27737. }
  27738. static void REGAL_CALL error_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
  27739. {
  27740. Internal("error_glGetActiveUniformsiv","()");
  27741. RegalContext *_context = REGAL_GET_CONTEXT();
  27742. RegalAssert(_context);
  27743. DispatchTableGL *_next = _context->dispatcher.error.next();
  27744. RegalAssert(_next);
  27745. GLenum _error = GL_NO_ERROR;
  27746. if (!_context->err.inBeginEnd)
  27747. _error = _next->call(&_next->glGetError)();
  27748. RegalAssert(_error==GL_NO_ERROR);
  27749. _next->call(&_next->glGetActiveUniformsiv)(program, uniformCount, uniformIndices, pname, params);
  27750. if (!_context->err.inBeginEnd) {
  27751. _error = _next->call(&_next->glGetError)();
  27752. if (_error!=GL_NO_ERROR) {
  27753. Error("glGetActiveUniformsiv : ",Token::GLerrorToString(_error));
  27754. #if REGAL_BREAK
  27755. Break::ErrorCB(_error);
  27756. #endif
  27757. if (_context->err.callback)
  27758. _context->err.callback( _error );
  27759. }
  27760. }
  27761. }
  27762. static void REGAL_CALL error_glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
  27763. {
  27764. Internal("error_glGetIntegeri_v","()");
  27765. RegalContext *_context = REGAL_GET_CONTEXT();
  27766. RegalAssert(_context);
  27767. DispatchTableGL *_next = _context->dispatcher.error.next();
  27768. RegalAssert(_next);
  27769. GLenum _error = GL_NO_ERROR;
  27770. if (!_context->err.inBeginEnd)
  27771. _error = _next->call(&_next->glGetError)();
  27772. RegalAssert(_error==GL_NO_ERROR);
  27773. _next->call(&_next->glGetIntegeri_v)(target, index, data);
  27774. if (!_context->err.inBeginEnd) {
  27775. _error = _next->call(&_next->glGetError)();
  27776. if (_error!=GL_NO_ERROR) {
  27777. Error("glGetIntegeri_v : ",Token::GLerrorToString(_error));
  27778. #if REGAL_BREAK
  27779. Break::ErrorCB(_error);
  27780. #endif
  27781. if (_context->err.callback)
  27782. _context->err.callback( _error );
  27783. }
  27784. }
  27785. }
  27786. static GLuint REGAL_CALL error_glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
  27787. {
  27788. Internal("error_glGetUniformBlockIndex","()");
  27789. RegalContext *_context = REGAL_GET_CONTEXT();
  27790. RegalAssert(_context);
  27791. DispatchTableGL *_next = _context->dispatcher.error.next();
  27792. RegalAssert(_next);
  27793. GLenum _error = GL_NO_ERROR;
  27794. if (!_context->err.inBeginEnd)
  27795. _error = _next->call(&_next->glGetError)();
  27796. RegalAssert(_error==GL_NO_ERROR);
  27797. GLuint ret = _next->call(&_next->glGetUniformBlockIndex)(program, uniformBlockName);
  27798. if (!_context->err.inBeginEnd) {
  27799. _error = _next->call(&_next->glGetError)();
  27800. if (_error!=GL_NO_ERROR) {
  27801. Error("glGetUniformBlockIndex : ",Token::GLerrorToString(_error));
  27802. #if REGAL_BREAK
  27803. Break::ErrorCB(_error);
  27804. #endif
  27805. if (_context->err.callback)
  27806. _context->err.callback( _error );
  27807. }
  27808. }
  27809. return ret;
  27810. }
  27811. static void REGAL_CALL error_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar * const *uniformNames, GLuint *uniformIndices)
  27812. {
  27813. Internal("error_glGetUniformIndices","()");
  27814. RegalContext *_context = REGAL_GET_CONTEXT();
  27815. RegalAssert(_context);
  27816. DispatchTableGL *_next = _context->dispatcher.error.next();
  27817. RegalAssert(_next);
  27818. GLenum _error = GL_NO_ERROR;
  27819. if (!_context->err.inBeginEnd)
  27820. _error = _next->call(&_next->glGetError)();
  27821. RegalAssert(_error==GL_NO_ERROR);
  27822. _next->call(&_next->glGetUniformIndices)(program, uniformCount, uniformNames, uniformIndices);
  27823. if (!_context->err.inBeginEnd) {
  27824. _error = _next->call(&_next->glGetError)();
  27825. if (_error!=GL_NO_ERROR) {
  27826. Error("glGetUniformIndices : ",Token::GLerrorToString(_error));
  27827. #if REGAL_BREAK
  27828. Break::ErrorCB(_error);
  27829. #endif
  27830. if (_context->err.callback)
  27831. _context->err.callback( _error );
  27832. }
  27833. }
  27834. }
  27835. static void REGAL_CALL error_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
  27836. {
  27837. Internal("error_glUniformBlockBinding","()");
  27838. RegalContext *_context = REGAL_GET_CONTEXT();
  27839. RegalAssert(_context);
  27840. DispatchTableGL *_next = _context->dispatcher.error.next();
  27841. RegalAssert(_next);
  27842. GLenum _error = GL_NO_ERROR;
  27843. if (!_context->err.inBeginEnd)
  27844. _error = _next->call(&_next->glGetError)();
  27845. RegalAssert(_error==GL_NO_ERROR);
  27846. _next->call(&_next->glUniformBlockBinding)(program, uniformBlockIndex, uniformBlockBinding);
  27847. if (!_context->err.inBeginEnd) {
  27848. _error = _next->call(&_next->glGetError)();
  27849. if (_error!=GL_NO_ERROR) {
  27850. Error("glUniformBlockBinding : ",Token::GLerrorToString(_error));
  27851. #if REGAL_BREAK
  27852. Break::ErrorCB(_error);
  27853. #endif
  27854. if (_context->err.callback)
  27855. _context->err.callback( _error );
  27856. }
  27857. }
  27858. }
  27859. // GL_ARB_vertex_array_object
  27860. static void REGAL_CALL error_glBindVertexArray(GLuint array)
  27861. {
  27862. Internal("error_glBindVertexArray","()");
  27863. RegalContext *_context = REGAL_GET_CONTEXT();
  27864. RegalAssert(_context);
  27865. DispatchTableGL *_next = _context->dispatcher.error.next();
  27866. RegalAssert(_next);
  27867. GLenum _error = GL_NO_ERROR;
  27868. if (!_context->err.inBeginEnd)
  27869. _error = _next->call(&_next->glGetError)();
  27870. RegalAssert(_error==GL_NO_ERROR);
  27871. _next->call(&_next->glBindVertexArray)(array);
  27872. if (!_context->err.inBeginEnd) {
  27873. _error = _next->call(&_next->glGetError)();
  27874. if (_error!=GL_NO_ERROR) {
  27875. Error("glBindVertexArray : ",Token::GLerrorToString(_error));
  27876. #if REGAL_BREAK
  27877. Break::ErrorCB(_error);
  27878. #endif
  27879. if (_context->err.callback)
  27880. _context->err.callback( _error );
  27881. }
  27882. }
  27883. }
  27884. static void REGAL_CALL error_glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
  27885. {
  27886. Internal("error_glDeleteVertexArrays","()");
  27887. RegalContext *_context = REGAL_GET_CONTEXT();
  27888. RegalAssert(_context);
  27889. DispatchTableGL *_next = _context->dispatcher.error.next();
  27890. RegalAssert(_next);
  27891. GLenum _error = GL_NO_ERROR;
  27892. if (!_context->err.inBeginEnd)
  27893. _error = _next->call(&_next->glGetError)();
  27894. RegalAssert(_error==GL_NO_ERROR);
  27895. _next->call(&_next->glDeleteVertexArrays)(n, arrays);
  27896. if (!_context->err.inBeginEnd) {
  27897. _error = _next->call(&_next->glGetError)();
  27898. if (_error!=GL_NO_ERROR) {
  27899. Error("glDeleteVertexArrays : ",Token::GLerrorToString(_error));
  27900. #if REGAL_BREAK
  27901. Break::ErrorCB(_error);
  27902. #endif
  27903. if (_context->err.callback)
  27904. _context->err.callback( _error );
  27905. }
  27906. }
  27907. }
  27908. static void REGAL_CALL error_glGenVertexArrays(GLsizei n, GLuint *arrays)
  27909. {
  27910. Internal("error_glGenVertexArrays","()");
  27911. RegalContext *_context = REGAL_GET_CONTEXT();
  27912. RegalAssert(_context);
  27913. DispatchTableGL *_next = _context->dispatcher.error.next();
  27914. RegalAssert(_next);
  27915. GLenum _error = GL_NO_ERROR;
  27916. if (!_context->err.inBeginEnd)
  27917. _error = _next->call(&_next->glGetError)();
  27918. RegalAssert(_error==GL_NO_ERROR);
  27919. _next->call(&_next->glGenVertexArrays)(n, arrays);
  27920. if (!_context->err.inBeginEnd) {
  27921. _error = _next->call(&_next->glGetError)();
  27922. if (_error!=GL_NO_ERROR) {
  27923. Error("glGenVertexArrays : ",Token::GLerrorToString(_error));
  27924. #if REGAL_BREAK
  27925. Break::ErrorCB(_error);
  27926. #endif
  27927. if (_context->err.callback)
  27928. _context->err.callback( _error );
  27929. }
  27930. }
  27931. }
  27932. static GLboolean REGAL_CALL error_glIsVertexArray(GLuint array)
  27933. {
  27934. Internal("error_glIsVertexArray","()");
  27935. RegalContext *_context = REGAL_GET_CONTEXT();
  27936. RegalAssert(_context);
  27937. DispatchTableGL *_next = _context->dispatcher.error.next();
  27938. RegalAssert(_next);
  27939. GLenum _error = GL_NO_ERROR;
  27940. if (!_context->err.inBeginEnd)
  27941. _error = _next->call(&_next->glGetError)();
  27942. RegalAssert(_error==GL_NO_ERROR);
  27943. GLboolean ret = _next->call(&_next->glIsVertexArray)(array);
  27944. if (!_context->err.inBeginEnd) {
  27945. _error = _next->call(&_next->glGetError)();
  27946. if (_error!=GL_NO_ERROR) {
  27947. Error("glIsVertexArray : ",Token::GLerrorToString(_error));
  27948. #if REGAL_BREAK
  27949. Break::ErrorCB(_error);
  27950. #endif
  27951. if (_context->err.callback)
  27952. _context->err.callback( _error );
  27953. }
  27954. }
  27955. return ret;
  27956. }
  27957. // GL_ARB_vertex_attrib_64bit
  27958. static void REGAL_CALL error_glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params)
  27959. {
  27960. Internal("error_glGetVertexAttribLdv","()");
  27961. RegalContext *_context = REGAL_GET_CONTEXT();
  27962. RegalAssert(_context);
  27963. DispatchTableGL *_next = _context->dispatcher.error.next();
  27964. RegalAssert(_next);
  27965. GLenum _error = GL_NO_ERROR;
  27966. if (!_context->err.inBeginEnd)
  27967. _error = _next->call(&_next->glGetError)();
  27968. RegalAssert(_error==GL_NO_ERROR);
  27969. _next->call(&_next->glGetVertexAttribLdv)(index, pname, params);
  27970. if (!_context->err.inBeginEnd) {
  27971. _error = _next->call(&_next->glGetError)();
  27972. if (_error!=GL_NO_ERROR) {
  27973. Error("glGetVertexAttribLdv : ",Token::GLerrorToString(_error));
  27974. #if REGAL_BREAK
  27975. Break::ErrorCB(_error);
  27976. #endif
  27977. if (_context->err.callback)
  27978. _context->err.callback( _error );
  27979. }
  27980. }
  27981. }
  27982. static void REGAL_CALL error_glVertexAttribL1d(GLuint index, GLdouble x)
  27983. {
  27984. Internal("error_glVertexAttribL1d","()");
  27985. RegalContext *_context = REGAL_GET_CONTEXT();
  27986. RegalAssert(_context);
  27987. DispatchTableGL *_next = _context->dispatcher.error.next();
  27988. RegalAssert(_next);
  27989. GLenum _error = GL_NO_ERROR;
  27990. if (!_context->err.inBeginEnd)
  27991. _error = _next->call(&_next->glGetError)();
  27992. RegalAssert(_error==GL_NO_ERROR);
  27993. _next->call(&_next->glVertexAttribL1d)(index, x);
  27994. if (!_context->err.inBeginEnd) {
  27995. _error = _next->call(&_next->glGetError)();
  27996. if (_error!=GL_NO_ERROR) {
  27997. Error("glVertexAttribL1d : ",Token::GLerrorToString(_error));
  27998. #if REGAL_BREAK
  27999. Break::ErrorCB(_error);
  28000. #endif
  28001. if (_context->err.callback)
  28002. _context->err.callback( _error );
  28003. }
  28004. }
  28005. }
  28006. static void REGAL_CALL error_glVertexAttribL1dv(GLuint index, const GLdouble *v)
  28007. {
  28008. Internal("error_glVertexAttribL1dv","()");
  28009. RegalContext *_context = REGAL_GET_CONTEXT();
  28010. RegalAssert(_context);
  28011. DispatchTableGL *_next = _context->dispatcher.error.next();
  28012. RegalAssert(_next);
  28013. GLenum _error = GL_NO_ERROR;
  28014. if (!_context->err.inBeginEnd)
  28015. _error = _next->call(&_next->glGetError)();
  28016. RegalAssert(_error==GL_NO_ERROR);
  28017. _next->call(&_next->glVertexAttribL1dv)(index, v);
  28018. if (!_context->err.inBeginEnd) {
  28019. _error = _next->call(&_next->glGetError)();
  28020. if (_error!=GL_NO_ERROR) {
  28021. Error("glVertexAttribL1dv : ",Token::GLerrorToString(_error));
  28022. #if REGAL_BREAK
  28023. Break::ErrorCB(_error);
  28024. #endif
  28025. if (_context->err.callback)
  28026. _context->err.callback( _error );
  28027. }
  28028. }
  28029. }
  28030. static void REGAL_CALL error_glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
  28031. {
  28032. Internal("error_glVertexAttribL2d","()");
  28033. RegalContext *_context = REGAL_GET_CONTEXT();
  28034. RegalAssert(_context);
  28035. DispatchTableGL *_next = _context->dispatcher.error.next();
  28036. RegalAssert(_next);
  28037. GLenum _error = GL_NO_ERROR;
  28038. if (!_context->err.inBeginEnd)
  28039. _error = _next->call(&_next->glGetError)();
  28040. RegalAssert(_error==GL_NO_ERROR);
  28041. _next->call(&_next->glVertexAttribL2d)(index, x, y);
  28042. if (!_context->err.inBeginEnd) {
  28043. _error = _next->call(&_next->glGetError)();
  28044. if (_error!=GL_NO_ERROR) {
  28045. Error("glVertexAttribL2d : ",Token::GLerrorToString(_error));
  28046. #if REGAL_BREAK
  28047. Break::ErrorCB(_error);
  28048. #endif
  28049. if (_context->err.callback)
  28050. _context->err.callback( _error );
  28051. }
  28052. }
  28053. }
  28054. static void REGAL_CALL error_glVertexAttribL2dv(GLuint index, const GLdouble *v)
  28055. {
  28056. Internal("error_glVertexAttribL2dv","()");
  28057. RegalContext *_context = REGAL_GET_CONTEXT();
  28058. RegalAssert(_context);
  28059. DispatchTableGL *_next = _context->dispatcher.error.next();
  28060. RegalAssert(_next);
  28061. GLenum _error = GL_NO_ERROR;
  28062. if (!_context->err.inBeginEnd)
  28063. _error = _next->call(&_next->glGetError)();
  28064. RegalAssert(_error==GL_NO_ERROR);
  28065. _next->call(&_next->glVertexAttribL2dv)(index, v);
  28066. if (!_context->err.inBeginEnd) {
  28067. _error = _next->call(&_next->glGetError)();
  28068. if (_error!=GL_NO_ERROR) {
  28069. Error("glVertexAttribL2dv : ",Token::GLerrorToString(_error));
  28070. #if REGAL_BREAK
  28071. Break::ErrorCB(_error);
  28072. #endif
  28073. if (_context->err.callback)
  28074. _context->err.callback( _error );
  28075. }
  28076. }
  28077. }
  28078. static void REGAL_CALL error_glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
  28079. {
  28080. Internal("error_glVertexAttribL3d","()");
  28081. RegalContext *_context = REGAL_GET_CONTEXT();
  28082. RegalAssert(_context);
  28083. DispatchTableGL *_next = _context->dispatcher.error.next();
  28084. RegalAssert(_next);
  28085. GLenum _error = GL_NO_ERROR;
  28086. if (!_context->err.inBeginEnd)
  28087. _error = _next->call(&_next->glGetError)();
  28088. RegalAssert(_error==GL_NO_ERROR);
  28089. _next->call(&_next->glVertexAttribL3d)(index, x, y, z);
  28090. if (!_context->err.inBeginEnd) {
  28091. _error = _next->call(&_next->glGetError)();
  28092. if (_error!=GL_NO_ERROR) {
  28093. Error("glVertexAttribL3d : ",Token::GLerrorToString(_error));
  28094. #if REGAL_BREAK
  28095. Break::ErrorCB(_error);
  28096. #endif
  28097. if (_context->err.callback)
  28098. _context->err.callback( _error );
  28099. }
  28100. }
  28101. }
  28102. static void REGAL_CALL error_glVertexAttribL3dv(GLuint index, const GLdouble *v)
  28103. {
  28104. Internal("error_glVertexAttribL3dv","()");
  28105. RegalContext *_context = REGAL_GET_CONTEXT();
  28106. RegalAssert(_context);
  28107. DispatchTableGL *_next = _context->dispatcher.error.next();
  28108. RegalAssert(_next);
  28109. GLenum _error = GL_NO_ERROR;
  28110. if (!_context->err.inBeginEnd)
  28111. _error = _next->call(&_next->glGetError)();
  28112. RegalAssert(_error==GL_NO_ERROR);
  28113. _next->call(&_next->glVertexAttribL3dv)(index, v);
  28114. if (!_context->err.inBeginEnd) {
  28115. _error = _next->call(&_next->glGetError)();
  28116. if (_error!=GL_NO_ERROR) {
  28117. Error("glVertexAttribL3dv : ",Token::GLerrorToString(_error));
  28118. #if REGAL_BREAK
  28119. Break::ErrorCB(_error);
  28120. #endif
  28121. if (_context->err.callback)
  28122. _context->err.callback( _error );
  28123. }
  28124. }
  28125. }
  28126. static void REGAL_CALL error_glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  28127. {
  28128. Internal("error_glVertexAttribL4d","()");
  28129. RegalContext *_context = REGAL_GET_CONTEXT();
  28130. RegalAssert(_context);
  28131. DispatchTableGL *_next = _context->dispatcher.error.next();
  28132. RegalAssert(_next);
  28133. GLenum _error = GL_NO_ERROR;
  28134. if (!_context->err.inBeginEnd)
  28135. _error = _next->call(&_next->glGetError)();
  28136. RegalAssert(_error==GL_NO_ERROR);
  28137. _next->call(&_next->glVertexAttribL4d)(index, x, y, z, w);
  28138. if (!_context->err.inBeginEnd) {
  28139. _error = _next->call(&_next->glGetError)();
  28140. if (_error!=GL_NO_ERROR) {
  28141. Error("glVertexAttribL4d : ",Token::GLerrorToString(_error));
  28142. #if REGAL_BREAK
  28143. Break::ErrorCB(_error);
  28144. #endif
  28145. if (_context->err.callback)
  28146. _context->err.callback( _error );
  28147. }
  28148. }
  28149. }
  28150. static void REGAL_CALL error_glVertexAttribL4dv(GLuint index, const GLdouble *v)
  28151. {
  28152. Internal("error_glVertexAttribL4dv","()");
  28153. RegalContext *_context = REGAL_GET_CONTEXT();
  28154. RegalAssert(_context);
  28155. DispatchTableGL *_next = _context->dispatcher.error.next();
  28156. RegalAssert(_next);
  28157. GLenum _error = GL_NO_ERROR;
  28158. if (!_context->err.inBeginEnd)
  28159. _error = _next->call(&_next->glGetError)();
  28160. RegalAssert(_error==GL_NO_ERROR);
  28161. _next->call(&_next->glVertexAttribL4dv)(index, v);
  28162. if (!_context->err.inBeginEnd) {
  28163. _error = _next->call(&_next->glGetError)();
  28164. if (_error!=GL_NO_ERROR) {
  28165. Error("glVertexAttribL4dv : ",Token::GLerrorToString(_error));
  28166. #if REGAL_BREAK
  28167. Break::ErrorCB(_error);
  28168. #endif
  28169. if (_context->err.callback)
  28170. _context->err.callback( _error );
  28171. }
  28172. }
  28173. }
  28174. static void REGAL_CALL error_glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  28175. {
  28176. Internal("error_glVertexAttribLPointer","()");
  28177. RegalContext *_context = REGAL_GET_CONTEXT();
  28178. RegalAssert(_context);
  28179. DispatchTableGL *_next = _context->dispatcher.error.next();
  28180. RegalAssert(_next);
  28181. GLenum _error = GL_NO_ERROR;
  28182. if (!_context->err.inBeginEnd)
  28183. _error = _next->call(&_next->glGetError)();
  28184. RegalAssert(_error==GL_NO_ERROR);
  28185. _next->call(&_next->glVertexAttribLPointer)(index, size, type, stride, pointer);
  28186. if (!_context->err.inBeginEnd) {
  28187. _error = _next->call(&_next->glGetError)();
  28188. if (_error!=GL_NO_ERROR) {
  28189. Error("glVertexAttribLPointer : ",Token::GLerrorToString(_error));
  28190. #if REGAL_BREAK
  28191. Break::ErrorCB(_error);
  28192. #endif
  28193. if (_context->err.callback)
  28194. _context->err.callback( _error );
  28195. }
  28196. }
  28197. }
  28198. // GL_ARB_vertex_attrib_binding
  28199. static void REGAL_CALL error_glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
  28200. {
  28201. Internal("error_glBindVertexBuffer","()");
  28202. RegalContext *_context = REGAL_GET_CONTEXT();
  28203. RegalAssert(_context);
  28204. DispatchTableGL *_next = _context->dispatcher.error.next();
  28205. RegalAssert(_next);
  28206. GLenum _error = GL_NO_ERROR;
  28207. if (!_context->err.inBeginEnd)
  28208. _error = _next->call(&_next->glGetError)();
  28209. RegalAssert(_error==GL_NO_ERROR);
  28210. _next->call(&_next->glBindVertexBuffer)(bindingindex, buffer, offset, stride);
  28211. if (!_context->err.inBeginEnd) {
  28212. _error = _next->call(&_next->glGetError)();
  28213. if (_error!=GL_NO_ERROR) {
  28214. Error("glBindVertexBuffer : ",Token::GLerrorToString(_error));
  28215. #if REGAL_BREAK
  28216. Break::ErrorCB(_error);
  28217. #endif
  28218. if (_context->err.callback)
  28219. _context->err.callback( _error );
  28220. }
  28221. }
  28222. }
  28223. static void REGAL_CALL error_glVertexArrayBindVertexBufferEXT(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
  28224. {
  28225. Internal("error_glVertexArrayBindVertexBufferEXT","()");
  28226. RegalContext *_context = REGAL_GET_CONTEXT();
  28227. RegalAssert(_context);
  28228. DispatchTableGL *_next = _context->dispatcher.error.next();
  28229. RegalAssert(_next);
  28230. GLenum _error = GL_NO_ERROR;
  28231. if (!_context->err.inBeginEnd)
  28232. _error = _next->call(&_next->glGetError)();
  28233. RegalAssert(_error==GL_NO_ERROR);
  28234. _next->call(&_next->glVertexArrayBindVertexBufferEXT)(vaobj, bindingindex, buffer, offset, stride);
  28235. if (!_context->err.inBeginEnd) {
  28236. _error = _next->call(&_next->glGetError)();
  28237. if (_error!=GL_NO_ERROR) {
  28238. Error("glVertexArrayBindVertexBufferEXT : ",Token::GLerrorToString(_error));
  28239. #if REGAL_BREAK
  28240. Break::ErrorCB(_error);
  28241. #endif
  28242. if (_context->err.callback)
  28243. _context->err.callback( _error );
  28244. }
  28245. }
  28246. }
  28247. static void REGAL_CALL error_glVertexArrayVertexAttribBindingEXT(GLuint vaobj, GLuint attribindex, GLuint bindingindex)
  28248. {
  28249. Internal("error_glVertexArrayVertexAttribBindingEXT","()");
  28250. RegalContext *_context = REGAL_GET_CONTEXT();
  28251. RegalAssert(_context);
  28252. DispatchTableGL *_next = _context->dispatcher.error.next();
  28253. RegalAssert(_next);
  28254. GLenum _error = GL_NO_ERROR;
  28255. if (!_context->err.inBeginEnd)
  28256. _error = _next->call(&_next->glGetError)();
  28257. RegalAssert(_error==GL_NO_ERROR);
  28258. _next->call(&_next->glVertexArrayVertexAttribBindingEXT)(vaobj, attribindex, bindingindex);
  28259. if (!_context->err.inBeginEnd) {
  28260. _error = _next->call(&_next->glGetError)();
  28261. if (_error!=GL_NO_ERROR) {
  28262. Error("glVertexArrayVertexAttribBindingEXT : ",Token::GLerrorToString(_error));
  28263. #if REGAL_BREAK
  28264. Break::ErrorCB(_error);
  28265. #endif
  28266. if (_context->err.callback)
  28267. _context->err.callback( _error );
  28268. }
  28269. }
  28270. }
  28271. static void REGAL_CALL error_glVertexArrayVertexAttribFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
  28272. {
  28273. Internal("error_glVertexArrayVertexAttribFormatEXT","()");
  28274. RegalContext *_context = REGAL_GET_CONTEXT();
  28275. RegalAssert(_context);
  28276. DispatchTableGL *_next = _context->dispatcher.error.next();
  28277. RegalAssert(_next);
  28278. GLenum _error = GL_NO_ERROR;
  28279. if (!_context->err.inBeginEnd)
  28280. _error = _next->call(&_next->glGetError)();
  28281. RegalAssert(_error==GL_NO_ERROR);
  28282. _next->call(&_next->glVertexArrayVertexAttribFormatEXT)(vaobj, attribindex, size, type, normalized, relativeoffset);
  28283. if (!_context->err.inBeginEnd) {
  28284. _error = _next->call(&_next->glGetError)();
  28285. if (_error!=GL_NO_ERROR) {
  28286. Error("glVertexArrayVertexAttribFormatEXT : ",Token::GLerrorToString(_error));
  28287. #if REGAL_BREAK
  28288. Break::ErrorCB(_error);
  28289. #endif
  28290. if (_context->err.callback)
  28291. _context->err.callback( _error );
  28292. }
  28293. }
  28294. }
  28295. static void REGAL_CALL error_glVertexArrayVertexAttribIFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
  28296. {
  28297. Internal("error_glVertexArrayVertexAttribIFormatEXT","()");
  28298. RegalContext *_context = REGAL_GET_CONTEXT();
  28299. RegalAssert(_context);
  28300. DispatchTableGL *_next = _context->dispatcher.error.next();
  28301. RegalAssert(_next);
  28302. GLenum _error = GL_NO_ERROR;
  28303. if (!_context->err.inBeginEnd)
  28304. _error = _next->call(&_next->glGetError)();
  28305. RegalAssert(_error==GL_NO_ERROR);
  28306. _next->call(&_next->glVertexArrayVertexAttribIFormatEXT)(vaobj, attribindex, size, type, relativeoffset);
  28307. if (!_context->err.inBeginEnd) {
  28308. _error = _next->call(&_next->glGetError)();
  28309. if (_error!=GL_NO_ERROR) {
  28310. Error("glVertexArrayVertexAttribIFormatEXT : ",Token::GLerrorToString(_error));
  28311. #if REGAL_BREAK
  28312. Break::ErrorCB(_error);
  28313. #endif
  28314. if (_context->err.callback)
  28315. _context->err.callback( _error );
  28316. }
  28317. }
  28318. }
  28319. static void REGAL_CALL error_glVertexArrayVertexAttribLFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
  28320. {
  28321. Internal("error_glVertexArrayVertexAttribLFormatEXT","()");
  28322. RegalContext *_context = REGAL_GET_CONTEXT();
  28323. RegalAssert(_context);
  28324. DispatchTableGL *_next = _context->dispatcher.error.next();
  28325. RegalAssert(_next);
  28326. GLenum _error = GL_NO_ERROR;
  28327. if (!_context->err.inBeginEnd)
  28328. _error = _next->call(&_next->glGetError)();
  28329. RegalAssert(_error==GL_NO_ERROR);
  28330. _next->call(&_next->glVertexArrayVertexAttribLFormatEXT)(vaobj, attribindex, size, type, relativeoffset);
  28331. if (!_context->err.inBeginEnd) {
  28332. _error = _next->call(&_next->glGetError)();
  28333. if (_error!=GL_NO_ERROR) {
  28334. Error("glVertexArrayVertexAttribLFormatEXT : ",Token::GLerrorToString(_error));
  28335. #if REGAL_BREAK
  28336. Break::ErrorCB(_error);
  28337. #endif
  28338. if (_context->err.callback)
  28339. _context->err.callback( _error );
  28340. }
  28341. }
  28342. }
  28343. static void REGAL_CALL error_glVertexArrayVertexBindingDivisorEXT(GLuint vaobj, GLuint bindingindex, GLuint divisor)
  28344. {
  28345. Internal("error_glVertexArrayVertexBindingDivisorEXT","()");
  28346. RegalContext *_context = REGAL_GET_CONTEXT();
  28347. RegalAssert(_context);
  28348. DispatchTableGL *_next = _context->dispatcher.error.next();
  28349. RegalAssert(_next);
  28350. GLenum _error = GL_NO_ERROR;
  28351. if (!_context->err.inBeginEnd)
  28352. _error = _next->call(&_next-