PageRenderTime 78ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 2ms

/src/regal/RegalDispatchError.cpp

https://bitbucket.org/nigels_com/regal
C++ | 15310 lines | 14632 code | 631 blank | 47 comment | 2431 complexity | c991d608f374cecd00c7f4d6810ff70d MD5 | raw file
Possible License(s): BSD-3-Clause, JSON, LGPL-3.0
  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) {