PageRenderTime 605ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 4ms

/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

Large files files are truncated, but you can click here to view the full file

  1. /* NOTE: Do not edit this file, it is generated by a script:
  2. Export.py --api gl 4.4 --api wgl 4.4 --api glx 4.4 --api cgl 1.4 --api egl 1.0 --outdir .
  3. */
  4. /*
  5. Copyright (c) 2011-2013 NVIDIA Corporation
  6. Copyright (c) 2011-2013 Cass Everitt
  7. Copyright (c) 2012-2013 Scott Nations
  8. Copyright (c) 2012 Mathias Schott
  9. Copyright (c) 2012-2013 Nigel Stewart
  10. Copyright (c) 2012-2013 Google Inc.
  11. All rights reserved.
  12. Redistribution and use in source and binary forms, with or without modification,
  13. are permitted provided that the following conditions are met:
  14. Redistributions of source code must retain the above copyright notice, this
  15. list of conditions and the following disclaimer.
  16. Redistributions in binary form must reproduce the above copyright notice,
  17. this list of conditions and the following disclaimer in the documentation
  18. and/or other materials provided with the distribution.
  19. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  20. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  22. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  23. INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  24. BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  26. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  27. OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  28. OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. /*
  31. Intended formatting conventions:
  32. $ astyle --style=allman --indent=spaces=2 --indent-switches
  33. */
  34. #include "pch.h" /* For MS precompiled header support */
  35. #include "RegalUtil.h"
  36. #if REGAL_ERROR
  37. REGAL_GLOBAL_BEGIN
  38. #include <string>
  39. using namespace std;
  40. #include "RegalLog.h"
  41. #include "RegalBreak.h"
  42. #include "RegalPush.h"
  43. #include "RegalToken.h"
  44. #include "RegalHelper.h"
  45. #include "RegalPrivate.h"
  46. #include "RegalContext.h"
  47. REGAL_GLOBAL_END
  48. REGAL_NAMESPACE_BEGIN
  49. using namespace ::REGAL_NAMESPACE_INTERNAL::Logging;
  50. using namespace ::REGAL_NAMESPACE_INTERNAL::Token;
  51. // GL_VERSION_1_0
  52. static void REGAL_CALL error_glAccum(GLenum op, GLfloat value)
  53. {
  54. Internal("error_glAccum","()");
  55. RegalContext *_context = REGAL_GET_CONTEXT();
  56. RegalAssert(_context);
  57. DispatchTableGL *_next = _context->dispatcher.error.next();
  58. RegalAssert(_next);
  59. GLenum _error = GL_NO_ERROR;
  60. if (!_context->err.inBeginEnd)
  61. _error = _next->call(&_next->glGetError)();
  62. RegalAssert(_error==GL_NO_ERROR);
  63. _next->call(&_next->glAccum)(op, value);
  64. if (!_context->err.inBeginEnd) {
  65. _error = _next->call(&_next->glGetError)();
  66. if (_error!=GL_NO_ERROR) {
  67. Error("glAccum : ",Token::GLerrorToString(_error));
  68. #if REGAL_BREAK
  69. Break::ErrorCB(_error);
  70. #endif
  71. if (_context->err.callback)
  72. _context->err.callback( _error );
  73. }
  74. }
  75. }
  76. static void REGAL_CALL error_glAlphaFunc(GLenum func, GLclampf ref)
  77. {
  78. Internal("error_glAlphaFunc","()");
  79. RegalContext *_context = REGAL_GET_CONTEXT();
  80. RegalAssert(_context);
  81. DispatchTableGL *_next = _context->dispatcher.error.next();
  82. RegalAssert(_next);
  83. GLenum _error = GL_NO_ERROR;
  84. if (!_context->err.inBeginEnd)
  85. _error = _next->call(&_next->glGetError)();
  86. RegalAssert(_error==GL_NO_ERROR);
  87. _next->call(&_next->glAlphaFunc)(func, ref);
  88. if (!_context->err.inBeginEnd) {
  89. _error = _next->call(&_next->glGetError)();
  90. if (_error!=GL_NO_ERROR) {
  91. Error("glAlphaFunc : ",Token::GLerrorToString(_error));
  92. #if REGAL_BREAK
  93. Break::ErrorCB(_error);
  94. #endif
  95. if (_context->err.callback)
  96. _context->err.callback( _error );
  97. }
  98. }
  99. }
  100. static void REGAL_CALL error_glBegin(GLenum mode)
  101. {
  102. Internal("error_glBegin","()");
  103. RegalContext *_context = REGAL_GET_CONTEXT();
  104. RegalAssert(_context);
  105. DispatchTableGL *_next = _context->dispatcher.error.next();
  106. RegalAssert(_next);
  107. GLenum _error = GL_NO_ERROR;
  108. if (!_context->err.inBeginEnd)
  109. _error = _next->call(&_next->glGetError)();
  110. RegalAssert(_error==GL_NO_ERROR);
  111. _context->err.inBeginEnd = true;
  112. _next->call(&_next->glBegin)(mode);
  113. if (!_context->err.inBeginEnd) {
  114. _error = _next->call(&_next->glGetError)();
  115. if (_error!=GL_NO_ERROR) {
  116. Error("glBegin : ",Token::GLerrorToString(_error));
  117. #if REGAL_BREAK
  118. Break::ErrorCB(_error);
  119. #endif
  120. if (_context->err.callback)
  121. _context->err.callback( _error );
  122. }
  123. }
  124. }
  125. static void REGAL_CALL error_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
  126. {
  127. Internal("error_glBitmap","()");
  128. RegalContext *_context = REGAL_GET_CONTEXT();
  129. RegalAssert(_context);
  130. DispatchTableGL *_next = _context->dispatcher.error.next();
  131. RegalAssert(_next);
  132. GLenum _error = GL_NO_ERROR;
  133. if (!_context->err.inBeginEnd)
  134. _error = _next->call(&_next->glGetError)();
  135. RegalAssert(_error==GL_NO_ERROR);
  136. _next->call(&_next->glBitmap)(width, height, xorig, yorig, xmove, ymove, bitmap);
  137. if (!_context->err.inBeginEnd) {
  138. _error = _next->call(&_next->glGetError)();
  139. if (_error!=GL_NO_ERROR) {
  140. Error("glBitmap : ",Token::GLerrorToString(_error));
  141. #if REGAL_BREAK
  142. Break::ErrorCB(_error);
  143. #endif
  144. if (_context->err.callback)
  145. _context->err.callback( _error );
  146. }
  147. }
  148. }
  149. static void REGAL_CALL error_glBlendFunc(GLenum sfactor, GLenum dfactor)
  150. {
  151. Internal("error_glBlendFunc","()");
  152. RegalContext *_context = REGAL_GET_CONTEXT();
  153. RegalAssert(_context);
  154. DispatchTableGL *_next = _context->dispatcher.error.next();
  155. RegalAssert(_next);
  156. GLenum _error = GL_NO_ERROR;
  157. if (!_context->err.inBeginEnd)
  158. _error = _next->call(&_next->glGetError)();
  159. RegalAssert(_error==GL_NO_ERROR);
  160. _next->call(&_next->glBlendFunc)(sfactor, dfactor);
  161. if (!_context->err.inBeginEnd) {
  162. _error = _next->call(&_next->glGetError)();
  163. if (_error!=GL_NO_ERROR) {
  164. Error("glBlendFunc : ",Token::GLerrorToString(_error));
  165. #if REGAL_BREAK
  166. Break::ErrorCB(_error);
  167. #endif
  168. if (_context->err.callback)
  169. _context->err.callback( _error );
  170. }
  171. }
  172. }
  173. static void REGAL_CALL error_glCallList(GLuint list)
  174. {
  175. Internal("error_glCallList","()");
  176. RegalContext *_context = REGAL_GET_CONTEXT();
  177. RegalAssert(_context);
  178. DispatchTableGL *_next = _context->dispatcher.error.next();
  179. RegalAssert(_next);
  180. GLenum _error = GL_NO_ERROR;
  181. if (!_context->err.inBeginEnd)
  182. _error = _next->call(&_next->glGetError)();
  183. RegalAssert(_error==GL_NO_ERROR);
  184. _next->call(&_next->glCallList)(list);
  185. if (!_context->err.inBeginEnd) {
  186. _error = _next->call(&_next->glGetError)();
  187. if (_error!=GL_NO_ERROR) {
  188. Error("glCallList : ",Token::GLerrorToString(_error));
  189. #if REGAL_BREAK
  190. Break::ErrorCB(_error);
  191. #endif
  192. if (_context->err.callback)
  193. _context->err.callback( _error );
  194. }
  195. }
  196. }
  197. static void REGAL_CALL error_glCallLists(GLsizei n, GLenum type, const GLvoid *lists)
  198. {
  199. Internal("error_glCallLists","()");
  200. RegalContext *_context = REGAL_GET_CONTEXT();
  201. RegalAssert(_context);
  202. DispatchTableGL *_next = _context->dispatcher.error.next();
  203. RegalAssert(_next);
  204. GLenum _error = GL_NO_ERROR;
  205. if (!_context->err.inBeginEnd)
  206. _error = _next->call(&_next->glGetError)();
  207. RegalAssert(_error==GL_NO_ERROR);
  208. _next->call(&_next->glCallLists)(n, type, lists);
  209. if (!_context->err.inBeginEnd) {
  210. _error = _next->call(&_next->glGetError)();
  211. if (_error!=GL_NO_ERROR) {
  212. Error("glCallLists : ",Token::GLerrorToString(_error));
  213. #if REGAL_BREAK
  214. Break::ErrorCB(_error);
  215. #endif
  216. if (_context->err.callback)
  217. _context->err.callback( _error );
  218. }
  219. }
  220. }
  221. static void REGAL_CALL error_glClear(GLbitfield mask)
  222. {
  223. Internal("error_glClear","()");
  224. RegalContext *_context = REGAL_GET_CONTEXT();
  225. RegalAssert(_context);
  226. DispatchTableGL *_next = _context->dispatcher.error.next();
  227. RegalAssert(_next);
  228. GLenum _error = GL_NO_ERROR;
  229. if (!_context->err.inBeginEnd)
  230. _error = _next->call(&_next->glGetError)();
  231. RegalAssert(_error==GL_NO_ERROR);
  232. _next->call(&_next->glClear)(mask);
  233. if (!_context->err.inBeginEnd) {
  234. _error = _next->call(&_next->glGetError)();
  235. if (_error!=GL_NO_ERROR) {
  236. Error("glClear : ",Token::GLerrorToString(_error));
  237. #if REGAL_BREAK
  238. Break::ErrorCB(_error);
  239. #endif
  240. if (_context->err.callback)
  241. _context->err.callback( _error );
  242. }
  243. }
  244. }
  245. static void REGAL_CALL error_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  246. {
  247. Internal("error_glClearAccum","()");
  248. RegalContext *_context = REGAL_GET_CONTEXT();
  249. RegalAssert(_context);
  250. DispatchTableGL *_next = _context->dispatcher.error.next();
  251. RegalAssert(_next);
  252. GLenum _error = GL_NO_ERROR;
  253. if (!_context->err.inBeginEnd)
  254. _error = _next->call(&_next->glGetError)();
  255. RegalAssert(_error==GL_NO_ERROR);
  256. _next->call(&_next->glClearAccum)(red, green, blue, alpha);
  257. if (!_context->err.inBeginEnd) {
  258. _error = _next->call(&_next->glGetError)();
  259. if (_error!=GL_NO_ERROR) {
  260. Error("glClearAccum : ",Token::GLerrorToString(_error));
  261. #if REGAL_BREAK
  262. Break::ErrorCB(_error);
  263. #endif
  264. if (_context->err.callback)
  265. _context->err.callback( _error );
  266. }
  267. }
  268. }
  269. static void REGAL_CALL error_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  270. {
  271. Internal("error_glClearColor","()");
  272. RegalContext *_context = REGAL_GET_CONTEXT();
  273. RegalAssert(_context);
  274. DispatchTableGL *_next = _context->dispatcher.error.next();
  275. RegalAssert(_next);
  276. GLenum _error = GL_NO_ERROR;
  277. if (!_context->err.inBeginEnd)
  278. _error = _next->call(&_next->glGetError)();
  279. RegalAssert(_error==GL_NO_ERROR);
  280. _next->call(&_next->glClearColor)(red, green, blue, alpha);
  281. if (!_context->err.inBeginEnd) {
  282. _error = _next->call(&_next->glGetError)();
  283. if (_error!=GL_NO_ERROR) {
  284. Error("glClearColor : ",Token::GLerrorToString(_error));
  285. #if REGAL_BREAK
  286. Break::ErrorCB(_error);
  287. #endif
  288. if (_context->err.callback)
  289. _context->err.callback( _error );
  290. }
  291. }
  292. }
  293. static void REGAL_CALL error_glClearDepth(GLclampd depth)
  294. {
  295. Internal("error_glClearDepth","()");
  296. RegalContext *_context = REGAL_GET_CONTEXT();
  297. RegalAssert(_context);
  298. DispatchTableGL *_next = _context->dispatcher.error.next();
  299. RegalAssert(_next);
  300. GLenum _error = GL_NO_ERROR;
  301. if (!_context->err.inBeginEnd)
  302. _error = _next->call(&_next->glGetError)();
  303. RegalAssert(_error==GL_NO_ERROR);
  304. _next->call(&_next->glClearDepth)(depth);
  305. if (!_context->err.inBeginEnd) {
  306. _error = _next->call(&_next->glGetError)();
  307. if (_error!=GL_NO_ERROR) {
  308. Error("glClearDepth : ",Token::GLerrorToString(_error));
  309. #if REGAL_BREAK
  310. Break::ErrorCB(_error);
  311. #endif
  312. if (_context->err.callback)
  313. _context->err.callback( _error );
  314. }
  315. }
  316. }
  317. static void REGAL_CALL error_glClearIndex(GLfloat c)
  318. {
  319. Internal("error_glClearIndex","()");
  320. RegalContext *_context = REGAL_GET_CONTEXT();
  321. RegalAssert(_context);
  322. DispatchTableGL *_next = _context->dispatcher.error.next();
  323. RegalAssert(_next);
  324. GLenum _error = GL_NO_ERROR;
  325. if (!_context->err.inBeginEnd)
  326. _error = _next->call(&_next->glGetError)();
  327. RegalAssert(_error==GL_NO_ERROR);
  328. _next->call(&_next->glClearIndex)(c);
  329. if (!_context->err.inBeginEnd) {
  330. _error = _next->call(&_next->glGetError)();
  331. if (_error!=GL_NO_ERROR) {
  332. Error("glClearIndex : ",Token::GLerrorToString(_error));
  333. #if REGAL_BREAK
  334. Break::ErrorCB(_error);
  335. #endif
  336. if (_context->err.callback)
  337. _context->err.callback( _error );
  338. }
  339. }
  340. }
  341. static void REGAL_CALL error_glClearStencil(GLint s)
  342. {
  343. Internal("error_glClearStencil","()");
  344. RegalContext *_context = REGAL_GET_CONTEXT();
  345. RegalAssert(_context);
  346. DispatchTableGL *_next = _context->dispatcher.error.next();
  347. RegalAssert(_next);
  348. GLenum _error = GL_NO_ERROR;
  349. if (!_context->err.inBeginEnd)
  350. _error = _next->call(&_next->glGetError)();
  351. RegalAssert(_error==GL_NO_ERROR);
  352. _next->call(&_next->glClearStencil)(s);
  353. if (!_context->err.inBeginEnd) {
  354. _error = _next->call(&_next->glGetError)();
  355. if (_error!=GL_NO_ERROR) {
  356. Error("glClearStencil : ",Token::GLerrorToString(_error));
  357. #if REGAL_BREAK
  358. Break::ErrorCB(_error);
  359. #endif
  360. if (_context->err.callback)
  361. _context->err.callback( _error );
  362. }
  363. }
  364. }
  365. static void REGAL_CALL error_glClipPlane(GLenum plane, const GLdouble *equation)
  366. {
  367. Internal("error_glClipPlane","()");
  368. RegalContext *_context = REGAL_GET_CONTEXT();
  369. RegalAssert(_context);
  370. DispatchTableGL *_next = _context->dispatcher.error.next();
  371. RegalAssert(_next);
  372. GLenum _error = GL_NO_ERROR;
  373. if (!_context->err.inBeginEnd)
  374. _error = _next->call(&_next->glGetError)();
  375. RegalAssert(_error==GL_NO_ERROR);
  376. _next->call(&_next->glClipPlane)(plane, equation);
  377. if (!_context->err.inBeginEnd) {
  378. _error = _next->call(&_next->glGetError)();
  379. if (_error!=GL_NO_ERROR) {
  380. Error("glClipPlane : ",Token::GLerrorToString(_error));
  381. #if REGAL_BREAK
  382. Break::ErrorCB(_error);
  383. #endif
  384. if (_context->err.callback)
  385. _context->err.callback( _error );
  386. }
  387. }
  388. }
  389. static void REGAL_CALL error_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
  390. {
  391. Internal("error_glColor3b","()");
  392. RegalContext *_context = REGAL_GET_CONTEXT();
  393. RegalAssert(_context);
  394. DispatchTableGL *_next = _context->dispatcher.error.next();
  395. RegalAssert(_next);
  396. GLenum _error = GL_NO_ERROR;
  397. if (!_context->err.inBeginEnd)
  398. _error = _next->call(&_next->glGetError)();
  399. RegalAssert(_error==GL_NO_ERROR);
  400. _next->call(&_next->glColor3b)(red, green, blue);
  401. if (!_context->err.inBeginEnd) {
  402. _error = _next->call(&_next->glGetError)();
  403. if (_error!=GL_NO_ERROR) {
  404. Error("glColor3b : ",Token::GLerrorToString(_error));
  405. #if REGAL_BREAK
  406. Break::ErrorCB(_error);
  407. #endif
  408. if (_context->err.callback)
  409. _context->err.callback( _error );
  410. }
  411. }
  412. }
  413. static void REGAL_CALL error_glColor3bv(const GLbyte *v)
  414. {
  415. Internal("error_glColor3bv","()");
  416. RegalContext *_context = REGAL_GET_CONTEXT();
  417. RegalAssert(_context);
  418. DispatchTableGL *_next = _context->dispatcher.error.next();
  419. RegalAssert(_next);
  420. GLenum _error = GL_NO_ERROR;
  421. if (!_context->err.inBeginEnd)
  422. _error = _next->call(&_next->glGetError)();
  423. RegalAssert(_error==GL_NO_ERROR);
  424. _next->call(&_next->glColor3bv)(v);
  425. if (!_context->err.inBeginEnd) {
  426. _error = _next->call(&_next->glGetError)();
  427. if (_error!=GL_NO_ERROR) {
  428. Error("glColor3bv : ",Token::GLerrorToString(_error));
  429. #if REGAL_BREAK
  430. Break::ErrorCB(_error);
  431. #endif
  432. if (_context->err.callback)
  433. _context->err.callback( _error );
  434. }
  435. }
  436. }
  437. static void REGAL_CALL error_glColor3d(GLdouble red, GLdouble green, GLdouble blue)
  438. {
  439. Internal("error_glColor3d","()");
  440. RegalContext *_context = REGAL_GET_CONTEXT();
  441. RegalAssert(_context);
  442. DispatchTableGL *_next = _context->dispatcher.error.next();
  443. RegalAssert(_next);
  444. GLenum _error = GL_NO_ERROR;
  445. if (!_context->err.inBeginEnd)
  446. _error = _next->call(&_next->glGetError)();
  447. RegalAssert(_error==GL_NO_ERROR);
  448. _next->call(&_next->glColor3d)(red, green, blue);
  449. if (!_context->err.inBeginEnd) {
  450. _error = _next->call(&_next->glGetError)();
  451. if (_error!=GL_NO_ERROR) {
  452. Error("glColor3d : ",Token::GLerrorToString(_error));
  453. #if REGAL_BREAK
  454. Break::ErrorCB(_error);
  455. #endif
  456. if (_context->err.callback)
  457. _context->err.callback( _error );
  458. }
  459. }
  460. }
  461. static void REGAL_CALL error_glColor3dv(const GLdouble *v)
  462. {
  463. Internal("error_glColor3dv","()");
  464. RegalContext *_context = REGAL_GET_CONTEXT();
  465. RegalAssert(_context);
  466. DispatchTableGL *_next = _context->dispatcher.error.next();
  467. RegalAssert(_next);
  468. GLenum _error = GL_NO_ERROR;
  469. if (!_context->err.inBeginEnd)
  470. _error = _next->call(&_next->glGetError)();
  471. RegalAssert(_error==GL_NO_ERROR);
  472. _next->call(&_next->glColor3dv)(v);
  473. if (!_context->err.inBeginEnd) {
  474. _error = _next->call(&_next->glGetError)();
  475. if (_error!=GL_NO_ERROR) {
  476. Error("glColor3dv : ",Token::GLerrorToString(_error));
  477. #if REGAL_BREAK
  478. Break::ErrorCB(_error);
  479. #endif
  480. if (_context->err.callback)
  481. _context->err.callback( _error );
  482. }
  483. }
  484. }
  485. static void REGAL_CALL error_glColor3f(GLfloat red, GLfloat green, GLfloat blue)
  486. {
  487. Internal("error_glColor3f","()");
  488. RegalContext *_context = REGAL_GET_CONTEXT();
  489. RegalAssert(_context);
  490. DispatchTableGL *_next = _context->dispatcher.error.next();
  491. RegalAssert(_next);
  492. GLenum _error = GL_NO_ERROR;
  493. if (!_context->err.inBeginEnd)
  494. _error = _next->call(&_next->glGetError)();
  495. RegalAssert(_error==GL_NO_ERROR);
  496. _next->call(&_next->glColor3f)(red, green, blue);
  497. if (!_context->err.inBeginEnd) {
  498. _error = _next->call(&_next->glGetError)();
  499. if (_error!=GL_NO_ERROR) {
  500. Error("glColor3f : ",Token::GLerrorToString(_error));
  501. #if REGAL_BREAK
  502. Break::ErrorCB(_error);
  503. #endif
  504. if (_context->err.callback)
  505. _context->err.callback( _error );
  506. }
  507. }
  508. }
  509. static void REGAL_CALL error_glColor3fv(const GLfloat *v)
  510. {
  511. Internal("error_glColor3fv","()");
  512. RegalContext *_context = REGAL_GET_CONTEXT();
  513. RegalAssert(_context);
  514. DispatchTableGL *_next = _context->dispatcher.error.next();
  515. RegalAssert(_next);
  516. GLenum _error = GL_NO_ERROR;
  517. if (!_context->err.inBeginEnd)
  518. _error = _next->call(&_next->glGetError)();
  519. RegalAssert(_error==GL_NO_ERROR);
  520. _next->call(&_next->glColor3fv)(v);
  521. if (!_context->err.inBeginEnd) {
  522. _error = _next->call(&_next->glGetError)();
  523. if (_error!=GL_NO_ERROR) {
  524. Error("glColor3fv : ",Token::GLerrorToString(_error));
  525. #if REGAL_BREAK
  526. Break::ErrorCB(_error);
  527. #endif
  528. if (_context->err.callback)
  529. _context->err.callback( _error );
  530. }
  531. }
  532. }
  533. static void REGAL_CALL error_glColor3i(GLint red, GLint green, GLint blue)
  534. {
  535. Internal("error_glColor3i","()");
  536. RegalContext *_context = REGAL_GET_CONTEXT();
  537. RegalAssert(_context);
  538. DispatchTableGL *_next = _context->dispatcher.error.next();
  539. RegalAssert(_next);
  540. GLenum _error = GL_NO_ERROR;
  541. if (!_context->err.inBeginEnd)
  542. _error = _next->call(&_next->glGetError)();
  543. RegalAssert(_error==GL_NO_ERROR);
  544. _next->call(&_next->glColor3i)(red, green, blue);
  545. if (!_context->err.inBeginEnd) {
  546. _error = _next->call(&_next->glGetError)();
  547. if (_error!=GL_NO_ERROR) {
  548. Error("glColor3i : ",Token::GLerrorToString(_error));
  549. #if REGAL_BREAK
  550. Break::ErrorCB(_error);
  551. #endif
  552. if (_context->err.callback)
  553. _context->err.callback( _error );
  554. }
  555. }
  556. }
  557. static void REGAL_CALL error_glColor3iv(const GLint *v)
  558. {
  559. Internal("error_glColor3iv","()");
  560. RegalContext *_context = REGAL_GET_CONTEXT();
  561. RegalAssert(_context);
  562. DispatchTableGL *_next = _context->dispatcher.error.next();
  563. RegalAssert(_next);
  564. GLenum _error = GL_NO_ERROR;
  565. if (!_context->err.inBeginEnd)
  566. _error = _next->call(&_next->glGetError)();
  567. RegalAssert(_error==GL_NO_ERROR);
  568. _next->call(&_next->glColor3iv)(v);
  569. if (!_context->err.inBeginEnd) {
  570. _error = _next->call(&_next->glGetError)();
  571. if (_error!=GL_NO_ERROR) {
  572. Error("glColor3iv : ",Token::GLerrorToString(_error));
  573. #if REGAL_BREAK
  574. Break::ErrorCB(_error);
  575. #endif
  576. if (_context->err.callback)
  577. _context->err.callback( _error );
  578. }
  579. }
  580. }
  581. static void REGAL_CALL error_glColor3s(GLshort red, GLshort green, GLshort blue)
  582. {
  583. Internal("error_glColor3s","()");
  584. RegalContext *_context = REGAL_GET_CONTEXT();
  585. RegalAssert(_context);
  586. DispatchTableGL *_next = _context->dispatcher.error.next();
  587. RegalAssert(_next);
  588. GLenum _error = GL_NO_ERROR;
  589. if (!_context->err.inBeginEnd)
  590. _error = _next->call(&_next->glGetError)();
  591. RegalAssert(_error==GL_NO_ERROR);
  592. _next->call(&_next->glColor3s)(red, green, blue);
  593. if (!_context->err.inBeginEnd) {
  594. _error = _next->call(&_next->glGetError)();
  595. if (_error!=GL_NO_ERROR) {
  596. Error("glColor3s : ",Token::GLerrorToString(_error));
  597. #if REGAL_BREAK
  598. Break::ErrorCB(_error);
  599. #endif
  600. if (_context->err.callback)
  601. _context->err.callback( _error );
  602. }
  603. }
  604. }
  605. static void REGAL_CALL error_glColor3sv(const GLshort *v)
  606. {
  607. Internal("error_glColor3sv","()");
  608. RegalContext *_context = REGAL_GET_CONTEXT();
  609. RegalAssert(_context);
  610. DispatchTableGL *_next = _context->dispatcher.error.next();
  611. RegalAssert(_next);
  612. GLenum _error = GL_NO_ERROR;
  613. if (!_context->err.inBeginEnd)
  614. _error = _next->call(&_next->glGetError)();
  615. RegalAssert(_error==GL_NO_ERROR);
  616. _next->call(&_next->glColor3sv)(v);
  617. if (!_context->err.inBeginEnd) {
  618. _error = _next->call(&_next->glGetError)();
  619. if (_error!=GL_NO_ERROR) {
  620. Error("glColor3sv : ",Token::GLerrorToString(_error));
  621. #if REGAL_BREAK
  622. Break::ErrorCB(_error);
  623. #endif
  624. if (_context->err.callback)
  625. _context->err.callback( _error );
  626. }
  627. }
  628. }
  629. static void REGAL_CALL error_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
  630. {
  631. Internal("error_glColor3ub","()");
  632. RegalContext *_context = REGAL_GET_CONTEXT();
  633. RegalAssert(_context);
  634. DispatchTableGL *_next = _context->dispatcher.error.next();
  635. RegalAssert(_next);
  636. GLenum _error = GL_NO_ERROR;
  637. if (!_context->err.inBeginEnd)
  638. _error = _next->call(&_next->glGetError)();
  639. RegalAssert(_error==GL_NO_ERROR);
  640. _next->call(&_next->glColor3ub)(red, green, blue);
  641. if (!_context->err.inBeginEnd) {
  642. _error = _next->call(&_next->glGetError)();
  643. if (_error!=GL_NO_ERROR) {
  644. Error("glColor3ub : ",Token::GLerrorToString(_error));
  645. #if REGAL_BREAK
  646. Break::ErrorCB(_error);
  647. #endif
  648. if (_context->err.callback)
  649. _context->err.callback( _error );
  650. }
  651. }
  652. }
  653. static void REGAL_CALL error_glColor3ubv(const GLubyte *v)
  654. {
  655. Internal("error_glColor3ubv","()");
  656. RegalContext *_context = REGAL_GET_CONTEXT();
  657. RegalAssert(_context);
  658. DispatchTableGL *_next = _context->dispatcher.error.next();
  659. RegalAssert(_next);
  660. GLenum _error = GL_NO_ERROR;
  661. if (!_context->err.inBeginEnd)
  662. _error = _next->call(&_next->glGetError)();
  663. RegalAssert(_error==GL_NO_ERROR);
  664. _next->call(&_next->glColor3ubv)(v);
  665. if (!_context->err.inBeginEnd) {
  666. _error = _next->call(&_next->glGetError)();
  667. if (_error!=GL_NO_ERROR) {
  668. Error("glColor3ubv : ",Token::GLerrorToString(_error));
  669. #if REGAL_BREAK
  670. Break::ErrorCB(_error);
  671. #endif
  672. if (_context->err.callback)
  673. _context->err.callback( _error );
  674. }
  675. }
  676. }
  677. static void REGAL_CALL error_glColor3ui(GLuint red, GLuint green, GLuint blue)
  678. {
  679. Internal("error_glColor3ui","()");
  680. RegalContext *_context = REGAL_GET_CONTEXT();
  681. RegalAssert(_context);
  682. DispatchTableGL *_next = _context->dispatcher.error.next();
  683. RegalAssert(_next);
  684. GLenum _error = GL_NO_ERROR;
  685. if (!_context->err.inBeginEnd)
  686. _error = _next->call(&_next->glGetError)();
  687. RegalAssert(_error==GL_NO_ERROR);
  688. _next->call(&_next->glColor3ui)(red, green, blue);
  689. if (!_context->err.inBeginEnd) {
  690. _error = _next->call(&_next->glGetError)();
  691. if (_error!=GL_NO_ERROR) {
  692. Error("glColor3ui : ",Token::GLerrorToString(_error));
  693. #if REGAL_BREAK
  694. Break::ErrorCB(_error);
  695. #endif
  696. if (_context->err.callback)
  697. _context->err.callback( _error );
  698. }
  699. }
  700. }
  701. static void REGAL_CALL error_glColor3uiv(const GLuint *v)
  702. {
  703. Internal("error_glColor3uiv","()");
  704. RegalContext *_context = REGAL_GET_CONTEXT();
  705. RegalAssert(_context);
  706. DispatchTableGL *_next = _context->dispatcher.error.next();
  707. RegalAssert(_next);
  708. GLenum _error = GL_NO_ERROR;
  709. if (!_context->err.inBeginEnd)
  710. _error = _next->call(&_next->glGetError)();
  711. RegalAssert(_error==GL_NO_ERROR);
  712. _next->call(&_next->glColor3uiv)(v);
  713. if (!_context->err.inBeginEnd) {
  714. _error = _next->call(&_next->glGetError)();
  715. if (_error!=GL_NO_ERROR) {
  716. Error("glColor3uiv : ",Token::GLerrorToString(_error));
  717. #if REGAL_BREAK
  718. Break::ErrorCB(_error);
  719. #endif
  720. if (_context->err.callback)
  721. _context->err.callback( _error );
  722. }
  723. }
  724. }
  725. static void REGAL_CALL error_glColor3us(GLushort red, GLushort green, GLushort blue)
  726. {
  727. Internal("error_glColor3us","()");
  728. RegalContext *_context = REGAL_GET_CONTEXT();
  729. RegalAssert(_context);
  730. DispatchTableGL *_next = _context->dispatcher.error.next();
  731. RegalAssert(_next);
  732. GLenum _error = GL_NO_ERROR;
  733. if (!_context->err.inBeginEnd)
  734. _error = _next->call(&_next->glGetError)();
  735. RegalAssert(_error==GL_NO_ERROR);
  736. _next->call(&_next->glColor3us)(red, green, blue);
  737. if (!_context->err.inBeginEnd) {
  738. _error = _next->call(&_next->glGetError)();
  739. if (_error!=GL_NO_ERROR) {
  740. Error("glColor3us : ",Token::GLerrorToString(_error));
  741. #if REGAL_BREAK
  742. Break::ErrorCB(_error);
  743. #endif
  744. if (_context->err.callback)
  745. _context->err.callback( _error );
  746. }
  747. }
  748. }
  749. static void REGAL_CALL error_glColor3usv(const GLushort *v)
  750. {
  751. Internal("error_glColor3usv","()");
  752. RegalContext *_context = REGAL_GET_CONTEXT();
  753. RegalAssert(_context);
  754. DispatchTableGL *_next = _context->dispatcher.error.next();
  755. RegalAssert(_next);
  756. GLenum _error = GL_NO_ERROR;
  757. if (!_context->err.inBeginEnd)
  758. _error = _next->call(&_next->glGetError)();
  759. RegalAssert(_error==GL_NO_ERROR);
  760. _next->call(&_next->glColor3usv)(v);
  761. if (!_context->err.inBeginEnd) {
  762. _error = _next->call(&_next->glGetError)();
  763. if (_error!=GL_NO_ERROR) {
  764. Error("glColor3usv : ",Token::GLerrorToString(_error));
  765. #if REGAL_BREAK
  766. Break::ErrorCB(_error);
  767. #endif
  768. if (_context->err.callback)
  769. _context->err.callback( _error );
  770. }
  771. }
  772. }
  773. static void REGAL_CALL error_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
  774. {
  775. Internal("error_glColor4b","()");
  776. RegalContext *_context = REGAL_GET_CONTEXT();
  777. RegalAssert(_context);
  778. DispatchTableGL *_next = _context->dispatcher.error.next();
  779. RegalAssert(_next);
  780. GLenum _error = GL_NO_ERROR;
  781. if (!_context->err.inBeginEnd)
  782. _error = _next->call(&_next->glGetError)();
  783. RegalAssert(_error==GL_NO_ERROR);
  784. _next->call(&_next->glColor4b)(red, green, blue, alpha);
  785. if (!_context->err.inBeginEnd) {
  786. _error = _next->call(&_next->glGetError)();
  787. if (_error!=GL_NO_ERROR) {
  788. Error("glColor4b : ",Token::GLerrorToString(_error));
  789. #if REGAL_BREAK
  790. Break::ErrorCB(_error);
  791. #endif
  792. if (_context->err.callback)
  793. _context->err.callback( _error );
  794. }
  795. }
  796. }
  797. static void REGAL_CALL error_glColor4bv(const GLbyte *v)
  798. {
  799. Internal("error_glColor4bv","()");
  800. RegalContext *_context = REGAL_GET_CONTEXT();
  801. RegalAssert(_context);
  802. DispatchTableGL *_next = _context->dispatcher.error.next();
  803. RegalAssert(_next);
  804. GLenum _error = GL_NO_ERROR;
  805. if (!_context->err.inBeginEnd)
  806. _error = _next->call(&_next->glGetError)();
  807. RegalAssert(_error==GL_NO_ERROR);
  808. _next->call(&_next->glColor4bv)(v);
  809. if (!_context->err.inBeginEnd) {
  810. _error = _next->call(&_next->glGetError)();
  811. if (_error!=GL_NO_ERROR) {
  812. Error("glColor4bv : ",Token::GLerrorToString(_error));
  813. #if REGAL_BREAK
  814. Break::ErrorCB(_error);
  815. #endif
  816. if (_context->err.callback)
  817. _context->err.callback( _error );
  818. }
  819. }
  820. }
  821. static void REGAL_CALL error_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
  822. {
  823. Internal("error_glColor4d","()");
  824. RegalContext *_context = REGAL_GET_CONTEXT();
  825. RegalAssert(_context);
  826. DispatchTableGL *_next = _context->dispatcher.error.next();
  827. RegalAssert(_next);
  828. GLenum _error = GL_NO_ERROR;
  829. if (!_context->err.inBeginEnd)
  830. _error = _next->call(&_next->glGetError)();
  831. RegalAssert(_error==GL_NO_ERROR);
  832. _next->call(&_next->glColor4d)(red, green, blue, alpha);
  833. if (!_context->err.inBeginEnd) {
  834. _error = _next->call(&_next->glGetError)();
  835. if (_error!=GL_NO_ERROR) {
  836. Error("glColor4d : ",Token::GLerrorToString(_error));
  837. #if REGAL_BREAK
  838. Break::ErrorCB(_error);
  839. #endif
  840. if (_context->err.callback)
  841. _context->err.callback( _error );
  842. }
  843. }
  844. }
  845. static void REGAL_CALL error_glColor4dv(const GLdouble *v)
  846. {
  847. Internal("error_glColor4dv","()");
  848. RegalContext *_context = REGAL_GET_CONTEXT();
  849. RegalAssert(_context);
  850. DispatchTableGL *_next = _context->dispatcher.error.next();
  851. RegalAssert(_next);
  852. GLenum _error = GL_NO_ERROR;
  853. if (!_context->err.inBeginEnd)
  854. _error = _next->call(&_next->glGetError)();
  855. RegalAssert(_error==GL_NO_ERROR);
  856. _next->call(&_next->glColor4dv)(v);
  857. if (!_context->err.inBeginEnd) {
  858. _error = _next->call(&_next->glGetError)();
  859. if (_error!=GL_NO_ERROR) {
  860. Error("glColor4dv : ",Token::GLerrorToString(_error));
  861. #if REGAL_BREAK
  862. Break::ErrorCB(_error);
  863. #endif
  864. if (_context->err.callback)
  865. _context->err.callback( _error );
  866. }
  867. }
  868. }
  869. static void REGAL_CALL error_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  870. {
  871. Internal("error_glColor4f","()");
  872. RegalContext *_context = REGAL_GET_CONTEXT();
  873. RegalAssert(_context);
  874. DispatchTableGL *_next = _context->dispatcher.error.next();
  875. RegalAssert(_next);
  876. GLenum _error = GL_NO_ERROR;
  877. if (!_context->err.inBeginEnd)
  878. _error = _next->call(&_next->glGetError)();
  879. RegalAssert(_error==GL_NO_ERROR);
  880. _next->call(&_next->glColor4f)(red, green, blue, alpha);
  881. if (!_context->err.inBeginEnd) {
  882. _error = _next->call(&_next->glGetError)();
  883. if (_error!=GL_NO_ERROR) {
  884. Error("glColor4f : ",Token::GLerrorToString(_error));
  885. #if REGAL_BREAK
  886. Break::ErrorCB(_error);
  887. #endif
  888. if (_context->err.callback)
  889. _context->err.callback( _error );
  890. }
  891. }
  892. }
  893. static void REGAL_CALL error_glColor4fv(const GLfloat *v)
  894. {
  895. Internal("error_glColor4fv","()");
  896. RegalContext *_context = REGAL_GET_CONTEXT();
  897. RegalAssert(_context);
  898. DispatchTableGL *_next = _context->dispatcher.error.next();
  899. RegalAssert(_next);
  900. GLenum _error = GL_NO_ERROR;
  901. if (!_context->err.inBeginEnd)
  902. _error = _next->call(&_next->glGetError)();
  903. RegalAssert(_error==GL_NO_ERROR);
  904. _next->call(&_next->glColor4fv)(v);
  905. if (!_context->err.inBeginEnd) {
  906. _error = _next->call(&_next->glGetError)();
  907. if (_error!=GL_NO_ERROR) {
  908. Error("glColor4fv : ",Token::GLerrorToString(_error));
  909. #if REGAL_BREAK
  910. Break::ErrorCB(_error);
  911. #endif
  912. if (_context->err.callback)
  913. _context->err.callback( _error );
  914. }
  915. }
  916. }
  917. static void REGAL_CALL error_glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
  918. {
  919. Internal("error_glColor4i","()");
  920. RegalContext *_context = REGAL_GET_CONTEXT();
  921. RegalAssert(_context);
  922. DispatchTableGL *_next = _context->dispatcher.error.next();
  923. RegalAssert(_next);
  924. GLenum _error = GL_NO_ERROR;
  925. if (!_context->err.inBeginEnd)
  926. _error = _next->call(&_next->glGetError)();
  927. RegalAssert(_error==GL_NO_ERROR);
  928. _next->call(&_next->glColor4i)(red, green, blue, alpha);
  929. if (!_context->err.inBeginEnd) {
  930. _error = _next->call(&_next->glGetError)();
  931. if (_error!=GL_NO_ERROR) {
  932. Error("glColor4i : ",Token::GLerrorToString(_error));
  933. #if REGAL_BREAK
  934. Break::ErrorCB(_error);
  935. #endif
  936. if (_context->err.callback)
  937. _context->err.callback( _error );
  938. }
  939. }
  940. }
  941. static void REGAL_CALL error_glColor4iv(const GLint *v)
  942. {
  943. Internal("error_glColor4iv","()");
  944. RegalContext *_context = REGAL_GET_CONTEXT();
  945. RegalAssert(_context);
  946. DispatchTableGL *_next = _context->dispatcher.error.next();
  947. RegalAssert(_next);
  948. GLenum _error = GL_NO_ERROR;
  949. if (!_context->err.inBeginEnd)
  950. _error = _next->call(&_next->glGetError)();
  951. RegalAssert(_error==GL_NO_ERROR);
  952. _next->call(&_next->glColor4iv)(v);
  953. if (!_context->err.inBeginEnd) {
  954. _error = _next->call(&_next->glGetError)();
  955. if (_error!=GL_NO_ERROR) {
  956. Error("glColor4iv : ",Token::GLerrorToString(_error));
  957. #if REGAL_BREAK
  958. Break::ErrorCB(_error);
  959. #endif
  960. if (_context->err.callback)
  961. _context->err.callback( _error );
  962. }
  963. }
  964. }
  965. static void REGAL_CALL error_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
  966. {
  967. Internal("error_glColor4s","()");
  968. RegalContext *_context = REGAL_GET_CONTEXT();
  969. RegalAssert(_context);
  970. DispatchTableGL *_next = _context->dispatcher.error.next();
  971. RegalAssert(_next);
  972. GLenum _error = GL_NO_ERROR;
  973. if (!_context->err.inBeginEnd)
  974. _error = _next->call(&_next->glGetError)();
  975. RegalAssert(_error==GL_NO_ERROR);
  976. _next->call(&_next->glColor4s)(red, green, blue, alpha);
  977. if (!_context->err.inBeginEnd) {
  978. _error = _next->call(&_next->glGetError)();
  979. if (_error!=GL_NO_ERROR) {
  980. Error("glColor4s : ",Token::GLerrorToString(_error));
  981. #if REGAL_BREAK
  982. Break::ErrorCB(_error);
  983. #endif
  984. if (_context->err.callback)
  985. _context->err.callback( _error );
  986. }
  987. }
  988. }
  989. static void REGAL_CALL error_glColor4sv(const GLshort *v)
  990. {
  991. Internal("error_glColor4sv","()");
  992. RegalContext *_context = REGAL_GET_CONTEXT();
  993. RegalAssert(_context);
  994. DispatchTableGL *_next = _context->dispatcher.error.next();
  995. RegalAssert(_next);
  996. GLenum _error = GL_NO_ERROR;
  997. if (!_context->err.inBeginEnd)
  998. _error = _next->call(&_next->glGetError)();
  999. RegalAssert(_error==GL_NO_ERROR);
  1000. _next->call(&_next->glColor4sv)(v);
  1001. if (!_context->err.inBeginEnd) {
  1002. _error = _next->call(&_next->glGetError)();
  1003. if (_error!=GL_NO_ERROR) {
  1004. Error("glColor4sv : ",Token::GLerrorToString(_error));
  1005. #if REGAL_BREAK
  1006. Break::ErrorCB(_error);
  1007. #endif
  1008. if (_context->err.callback)
  1009. _context->err.callback( _error );
  1010. }
  1011. }
  1012. }
  1013. static void REGAL_CALL error_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
  1014. {
  1015. Internal("error_glColor4ub","()");
  1016. RegalContext *_context = REGAL_GET_CONTEXT();
  1017. RegalAssert(_context);
  1018. DispatchTableGL *_next = _context->dispatcher.error.next();
  1019. RegalAssert(_next);
  1020. GLenum _error = GL_NO_ERROR;
  1021. if (!_context->err.inBeginEnd)
  1022. _error = _next->call(&_next->glGetError)();
  1023. RegalAssert(_error==GL_NO_ERROR);
  1024. _next->call(&_next->glColor4ub)(red, green, blue, alpha);
  1025. if (!_context->err.inBeginEnd) {
  1026. _error = _next->call(&_next->glGetError)();
  1027. if (_error!=GL_NO_ERROR) {
  1028. Error("glColor4ub : ",Token::GLerrorToString(_error));
  1029. #if REGAL_BREAK
  1030. Break::ErrorCB(_error);
  1031. #endif
  1032. if (_context->err.callback)
  1033. _context->err.callback( _error );
  1034. }
  1035. }
  1036. }
  1037. static void REGAL_CALL error_glColor4ubv(const GLubyte *v)
  1038. {
  1039. Internal("error_glColor4ubv","()");
  1040. RegalContext *_context = REGAL_GET_CONTEXT();
  1041. RegalAssert(_context);
  1042. DispatchTableGL *_next = _context->dispatcher.error.next();
  1043. RegalAssert(_next);
  1044. GLenum _error = GL_NO_ERROR;
  1045. if (!_context->err.inBeginEnd)
  1046. _error = _next->call(&_next->glGetError)();
  1047. RegalAssert(_error==GL_NO_ERROR);
  1048. _next->call(&_next->glColor4ubv)(v);
  1049. if (!_context->err.inBeginEnd) {
  1050. _error = _next->call(&_next->glGetError)();
  1051. if (_error!=GL_NO_ERROR) {
  1052. Error("glColor4ubv : ",Token::GLerrorToString(_error));
  1053. #if REGAL_BREAK
  1054. Break::ErrorCB(_error);
  1055. #endif
  1056. if (_context->err.callback)
  1057. _context->err.callback( _error );
  1058. }
  1059. }
  1060. }
  1061. static void REGAL_CALL error_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
  1062. {
  1063. Internal("error_glColor4ui","()");
  1064. RegalContext *_context = REGAL_GET_CONTEXT();
  1065. RegalAssert(_context);
  1066. DispatchTableGL *_next = _context->dispatcher.error.next();
  1067. RegalAssert(_next);
  1068. GLenum _error = GL_NO_ERROR;
  1069. if (!_context->err.inBeginEnd)
  1070. _error = _next->call(&_next->glGetError)();
  1071. RegalAssert(_error==GL_NO_ERROR);
  1072. _next->call(&_next->glColor4ui)(red, green, blue, alpha);
  1073. if (!_context->err.inBeginEnd) {
  1074. _error = _next->call(&_next->glGetError)();
  1075. if (_error!=GL_NO_ERROR) {
  1076. Error("glColor4ui : ",Token::GLerrorToString(_error));
  1077. #if REGAL_BREAK
  1078. Break::ErrorCB(_error);
  1079. #endif
  1080. if (_context->err.callback)
  1081. _context->err.callback( _error );
  1082. }
  1083. }
  1084. }
  1085. static void REGAL_CALL error_glColor4uiv(const GLuint *v)
  1086. {
  1087. Internal("error_glColor4uiv","()");
  1088. RegalContext *_context = REGAL_GET_CONTEXT();
  1089. RegalAssert(_context);
  1090. DispatchTableGL *_next = _context->dispatcher.error.next();
  1091. RegalAssert(_next);
  1092. GLenum _error = GL_NO_ERROR;
  1093. if (!_context->err.inBeginEnd)
  1094. _error = _next->call(&_next->glGetError)();
  1095. RegalAssert(_error==GL_NO_ERROR);
  1096. _next->call(&_next->glColor4uiv)(v);
  1097. if (!_context->err.inBeginEnd) {
  1098. _error = _next->call(&_next->glGetError)();
  1099. if (_error!=GL_NO_ERROR) {
  1100. Error("glColor4uiv : ",Token::GLerrorToString(_error));
  1101. #if REGAL_BREAK
  1102. Break::ErrorCB(_error);
  1103. #endif
  1104. if (_context->err.callback)
  1105. _context->err.callback( _error );
  1106. }
  1107. }
  1108. }
  1109. static void REGAL_CALL error_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
  1110. {
  1111. Internal("error_glColor4us","()");
  1112. RegalContext *_context = REGAL_GET_CONTEXT();
  1113. RegalAssert(_context);
  1114. DispatchTableGL *_next = _context->dispatcher.error.next();
  1115. RegalAssert(_next);
  1116. GLenum _error = GL_NO_ERROR;
  1117. if (!_context->err.inBeginEnd)
  1118. _error = _next->call(&_next->glGetError)();
  1119. RegalAssert(_error==GL_NO_ERROR);
  1120. _next->call(&_next->glColor4us)(red, green, blue, alpha);
  1121. if (!_context->err.inBeginEnd) {
  1122. _error = _next->call(&_next->glGetError)();
  1123. if (_error!=GL_NO_ERROR) {
  1124. Error("glColor4us : ",Token::GLerrorToString(_error));
  1125. #if REGAL_BREAK
  1126. Break::ErrorCB(_error);
  1127. #endif
  1128. if (_context->err.callback)
  1129. _context->err.callback( _error );
  1130. }
  1131. }
  1132. }
  1133. static void REGAL_CALL error_glColor4usv(const GLushort *v)
  1134. {
  1135. Internal("error_glColor4usv","()");
  1136. RegalContext *_context = REGAL_GET_CONTEXT();
  1137. RegalAssert(_context);
  1138. DispatchTableGL *_next = _context->dispatcher.error.next();
  1139. RegalAssert(_next);
  1140. GLenum _error = GL_NO_ERROR;
  1141. if (!_context->err.inBeginEnd)
  1142. _error = _next->call(&_next->glGetError)();
  1143. RegalAssert(_error==GL_NO_ERROR);
  1144. _next->call(&_next->glColor4usv)(v);
  1145. if (!_context->err.inBeginEnd) {
  1146. _error = _next->call(&_next->glGetError)();
  1147. if (_error!=GL_NO_ERROR) {
  1148. Error("glColor4usv : ",Token::GLerrorToString(_error));
  1149. #if REGAL_BREAK
  1150. Break::ErrorCB(_error);
  1151. #endif
  1152. if (_context->err.callback)
  1153. _context->err.callback( _error );
  1154. }
  1155. }
  1156. }
  1157. static void REGAL_CALL error_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
  1158. {
  1159. Internal("error_glColorMask","()");
  1160. RegalContext *_context = REGAL_GET_CONTEXT();
  1161. RegalAssert(_context);
  1162. DispatchTableGL *_next = _context->dispatcher.error.next();
  1163. RegalAssert(_next);
  1164. GLenum _error = GL_NO_ERROR;
  1165. if (!_context->err.inBeginEnd)
  1166. _error = _next->call(&_next->glGetError)();
  1167. RegalAssert(_error==GL_NO_ERROR);
  1168. _next->call(&_next->glColorMask)(red, green, blue, alpha);
  1169. if (!_context->err.inBeginEnd) {
  1170. _error = _next->call(&_next->glGetError)();
  1171. if (_error!=GL_NO_ERROR) {
  1172. Error("glColorMask : ",Token::GLerrorToString(_error));
  1173. #if REGAL_BREAK
  1174. Break::ErrorCB(_error);
  1175. #endif
  1176. if (_context->err.callback)
  1177. _context->err.callback( _error );
  1178. }
  1179. }
  1180. }
  1181. static void REGAL_CALL error_glColorMaterial(GLenum face, GLenum mode)
  1182. {
  1183. Internal("error_glColorMaterial","()");
  1184. RegalContext *_context = REGAL_GET_CONTEXT();
  1185. RegalAssert(_context);
  1186. DispatchTableGL *_next = _context->dispatcher.error.next();
  1187. RegalAssert(_next);
  1188. GLenum _error = GL_NO_ERROR;
  1189. if (!_context->err.inBeginEnd)
  1190. _error = _next->call(&_next->glGetError)();
  1191. RegalAssert(_error==GL_NO_ERROR);
  1192. _next->call(&_next->glColorMaterial)(face, mode);
  1193. if (!_context->err.inBeginEnd) {
  1194. _error = _next->call(&_next->glGetError)();
  1195. if (_error!=GL_NO_ERROR) {
  1196. Error("glColorMaterial : ",Token::GLerrorToString(_error));
  1197. #if REGAL_BREAK
  1198. Break::ErrorCB(_error);
  1199. #endif
  1200. if (_context->err.callback)
  1201. _context->err.callback( _error );
  1202. }
  1203. }
  1204. }
  1205. static void REGAL_CALL error_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
  1206. {
  1207. Internal("error_glCopyPixels","()");
  1208. RegalContext *_context = REGAL_GET_CONTEXT();
  1209. RegalAssert(_context);
  1210. DispatchTableGL *_next = _context->dispatcher.error.next();
  1211. RegalAssert(_next);
  1212. GLenum _error = GL_NO_ERROR;
  1213. if (!_context->err.inBeginEnd)
  1214. _error = _next->call(&_next->glGetError)();
  1215. RegalAssert(_error==GL_NO_ERROR);
  1216. _next->call(&_next->glCopyPixels)(x, y, width, height, type);
  1217. if (!_context->err.inBeginEnd) {
  1218. _error = _next->call(&_next->glGetError)();
  1219. if (_error!=GL_NO_ERROR) {
  1220. Error("glCopyPixels : ",Token::GLerrorToString(_error));
  1221. #if REGAL_BREAK
  1222. Break::ErrorCB(_error);
  1223. #endif
  1224. if (_context->err.callback)
  1225. _context->err.callback( _error );
  1226. }
  1227. }
  1228. }
  1229. static void REGAL_CALL error_glCullFace(GLenum mode)
  1230. {
  1231. Internal("error_glCullFace","()");
  1232. RegalContext *_context = REGAL_GET_CONTEXT();
  1233. RegalAssert(_context);
  1234. DispatchTableGL *_next = _context->dispatcher.error.next();
  1235. RegalAssert(_next);
  1236. GLenum _error = GL_NO_ERROR;
  1237. if (!_context->err.inBeginEnd)
  1238. _error = _next->call(&_next->glGetError)();
  1239. RegalAssert(_error==GL_NO_ERROR);
  1240. _next->call(&_next->glCullFace)(mode);
  1241. if (!_context->err.inBeginEnd) {
  1242. _error = _next->call(&_next->glGetError)();
  1243. if (_error!=GL_NO_ERROR) {
  1244. Error("glCullFace : ",Token::GLerrorToString(_error));
  1245. #if REGAL_BREAK
  1246. Break::ErrorCB(_error);
  1247. #endif
  1248. if (_context->err.callback)
  1249. _context->err.callback( _error );
  1250. }
  1251. }
  1252. }
  1253. static void REGAL_CALL error_glDeleteLists(GLuint list, GLsizei range)
  1254. {
  1255. Internal("error_glDeleteLists","()");
  1256. RegalContext *_context = REGAL_GET_CONTEXT();
  1257. RegalAssert(_context);
  1258. DispatchTableGL *_next = _context->dispatcher.error.next();
  1259. RegalAssert(_next);
  1260. GLenum _error = GL_NO_ERROR;
  1261. if (!_context->err.inBeginEnd)
  1262. _error = _next->call(&_next->glGetError)();
  1263. RegalAssert(_error==GL_NO_ERROR);
  1264. _next->call(&_next->glDeleteLists)(list, range);
  1265. if (!_context->err.inBeginEnd) {
  1266. _error = _next->call(&_next->glGetError)();
  1267. if (_error!=GL_NO_ERROR) {
  1268. Error("glDeleteLists : ",Token::GLerrorToString(_error));
  1269. #if REGAL_BREAK
  1270. Break::ErrorCB(_error);
  1271. #endif
  1272. if (_context->err.callback)
  1273. _context->err.callback( _error );
  1274. }
  1275. }
  1276. }
  1277. static void REGAL_CALL error_glDepthFunc(GLenum func)
  1278. {
  1279. Internal("error_glDepthFunc","()");
  1280. RegalContext *_context = REGAL_GET_CONTEXT();
  1281. RegalAssert(_context);
  1282. DispatchTableGL *_next = _context->dispatcher.error.next();
  1283. RegalAssert(_next);
  1284. GLenum _error = GL_NO_ERROR;
  1285. if (!_context->err.inBeginEnd)
  1286. _error = _next->call(&_next->glGetError)();
  1287. RegalAssert(_error==GL_NO_ERROR);
  1288. _next->call(&_next->glDepthFunc)(func);
  1289. if (!_context->err.inBeginEnd) {
  1290. _error = _next->call(&_next->glGetError)();
  1291. if (_error!=GL_NO_ERROR) {
  1292. Error("glDepthFunc : ",Token::GLerrorToString(_error));
  1293. #if REGAL_BREAK
  1294. Break::ErrorCB(_error);
  1295. #endif
  1296. if (_context->err.callback)
  1297. _context->err.callback( _error );
  1298. }
  1299. }
  1300. }
  1301. static void REGAL_CALL error_glDepthMask(GLboolean flag)
  1302. {
  1303. Internal("error_glDepthMask","()");
  1304. RegalContext *_context = REGAL_GET_CONTEXT();
  1305. RegalAssert(_context);
  1306. DispatchTableGL *_next = _context->dispatcher.error.next();
  1307. RegalAssert(_next);
  1308. GLenum _error = GL_NO_ERROR;
  1309. if (!_context->err.inBeginEnd)
  1310. _error = _next->call(&_next->glGetError)();
  1311. RegalAssert(_error==GL_NO_ERROR);
  1312. _next->call(&_next->glDepthMask)(flag);
  1313. if (!_context->err.inBeginEnd) {
  1314. _error = _next->call(&_next->glGetError)();
  1315. if (_error!=GL_NO_ERROR) {
  1316. Error("glDepthMask : ",Token::GLerrorToString(_error));
  1317. #if REGAL_BREAK
  1318. Break::ErrorCB(_error);
  1319. #endif
  1320. if (_context->err.callback)
  1321. _context->err.callback( _error );
  1322. }
  1323. }
  1324. }
  1325. static void REGAL_CALL error_glDepthRange(GLclampd zNear, GLclampd zFar)
  1326. {
  1327. Internal("error_glDepthRange","()");
  1328. RegalContext *_context = REGAL_GET_CONTEXT();
  1329. RegalAssert(_context);
  1330. DispatchTableGL *_next = _context->dispatcher.error.next();
  1331. RegalAssert(_next);
  1332. GLenum _error = GL_NO_ERROR;
  1333. if (!_context->err.inBeginEnd)
  1334. _error = _next->call(&_next->glGetError)();
  1335. RegalAssert(_error==GL_NO_ERROR);
  1336. _next->call(&_next->glDepthRange)(zNear, zFar);
  1337. if (!_context->err.inBeginEnd) {
  1338. _error = _next->call(&_next->glGetError)();
  1339. if (_error!=GL_NO_ERROR) {
  1340. Error("glDepthRange : ",Token::GLerrorToString(_error));
  1341. #if REGAL_BREAK
  1342. Break::ErrorCB(_error);
  1343. #endif
  1344. if (_context->err.callback)
  1345. _context->err.callback( _error );
  1346. }
  1347. }
  1348. }
  1349. static void REGAL_CALL error_glDisable(GLenum cap)
  1350. {
  1351. Internal("error_glDisable","()");
  1352. RegalContext *_context = REGAL_GET_CONTEXT();
  1353. RegalAssert(_context);
  1354. DispatchTableGL *_next = _context->dispatcher.error.next();
  1355. RegalAssert(_next);
  1356. GLenum _error = GL_NO_ERROR;
  1357. if (!_context->err.inBeginEnd)
  1358. _error = _next->call(&_next->glGetError)();
  1359. RegalAssert(_error==GL_NO_ERROR);
  1360. _next->call(&_next->glDisable)(cap);
  1361. if (!_context->err.inBeginEnd) {
  1362. _error = _next->call(&_next->glGetError)();
  1363. if (_error!=GL_NO_ERROR) {
  1364. Error("glDisable : ",Token::GLerrorToString(_error));
  1365. #if REGAL_BREAK
  1366. Break::ErrorCB(_error);
  1367. #endif
  1368. if (_context->err.callback)
  1369. _context->err.callback( _error );
  1370. }
  1371. }
  1372. }
  1373. static void REGAL_CALL error_glDrawBuffer(GLenum mode)
  1374. {
  1375. Internal("error_glDrawBuffer","()");
  1376. RegalContext *_context = REGAL_GET_CONTEXT();
  1377. RegalAssert(_context);
  1378. DispatchTableGL *_next = _context->dispatcher.error.next();
  1379. RegalAssert(_next);
  1380. GLenum _error = GL_NO_ERROR;
  1381. if (!_context->err.inBeginEnd)
  1382. _error = _next->call(&_next->glGetError)();
  1383. RegalAssert(_error==GL_NO_ERROR);
  1384. _next->call(&_next->glDrawBuffer)(mode);
  1385. if (!_context->err.inBeginEnd) {
  1386. _error = _next->call(&_next->glGetError)();
  1387. if (_error!=GL_NO_ERROR) {
  1388. Error("glDrawBuffer : ",Token::GLerrorToString(_error));
  1389. #if REGAL_BREAK
  1390. Break::ErrorCB(_error);
  1391. #endif
  1392. if (_context->err.callback)
  1393. _context->err.callback( _error );
  1394. }
  1395. }
  1396. }
  1397. static void REGAL_CALL error_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
  1398. {
  1399. Internal("error_glDrawPixels","()");
  1400. RegalContext *_context = REGAL_GET_CONTEXT();
  1401. RegalAssert(_context);
  1402. DispatchTableGL *_next = _context->dispatcher.error.next();
  1403. RegalAssert(_next);
  1404. GLenum _error = GL_NO_ERROR;
  1405. if (!_context->err.inBeginEnd)
  1406. _error = _next->call(&_next->glGetError)();
  1407. RegalAssert(_error==GL_NO_ERROR);
  1408. _next->call(&_next->glDrawPixels)(width, height, format, type, pixels);
  1409. if (!_context->err.inBeginEnd) {
  1410. _error = _next->call(&_next->glGetError)();
  1411. if (_error!=GL_NO_ERROR) {
  1412. Error("glDrawPixels : ",Token::GLerrorToString(_error));
  1413. #if REGAL_BREAK
  1414. Break::ErrorCB(_error);
  1415. #endif
  1416. if (_context->err.callback)
  1417. _context->err.callback( _error );
  1418. }
  1419. }
  1420. }
  1421. static void REGAL_CALL error_glEdgeFlag(GLboolean flag)
  1422. {
  1423. Internal("error_glEdgeFlag","()");
  1424. RegalContext *_context = REGAL_GET_CONTEXT();
  1425. RegalAssert(_context);
  1426. DispatchTableGL *_next = _context->dispatcher.error.next();
  1427. RegalAssert(_next);
  1428. GLenum _error = GL_NO_ERROR;
  1429. if (!_context->err.inBeginEnd)
  1430. _error = _next->call(&_next->glGetError)();
  1431. RegalAssert(_error==GL_NO_ERROR);
  1432. _next->call(&_next->glEdgeFlag)(flag);
  1433. if (!_context->err.inBeginEnd) {
  1434. _error = _next->call(&_next->glGetError)();
  1435. if (_error!=GL_NO_ERROR) {
  1436. Error("glEdgeFlag : ",Token::GLerrorToString(_error));
  1437. #if REGAL_BREAK
  1438. Break::ErrorCB(_error);
  1439. #endif
  1440. if (_context->err.callback)
  1441. _context->err.callback( _error );
  1442. }
  1443. }
  1444. }
  1445. static void REGAL_CALL error_glEdgeFlagv(const GLboolean *flag)
  1446. {
  1447. Internal("error_glEdgeFlagv","()");
  1448. RegalContext *_context = REGAL_GET_CONTEXT();
  1449. RegalAssert(_context);
  1450. DispatchTableGL *_next = _context->dispatcher.error.next();
  1451. RegalAssert(_next);
  1452. GLenum _error = GL_NO_ERROR;
  1453. if (!_context->err.inBeginEnd)
  1454. _error = _next->call(&_next->glGetError)();
  1455. RegalAssert(_error==GL_NO_ERROR);
  1456. _next->call(&_next->glEdgeFlagv)(flag);
  1457. if (!_context->err.inBeginEnd) {
  1458. _error = _next->call(&_next->glGetError)();
  1459. if (_error!=GL_NO_ERROR) {
  1460. Error("glEdgeFlagv : ",Token::GLerrorToString(_error));
  1461. #if REGAL_BREAK
  1462. Break::ErrorCB(_error);
  1463. #endif
  1464. if (_context->err.callback)
  1465. _context->err.callback( _error );
  1466. }
  1467. }
  1468. }
  1469. static void REGAL_CALL error_glEnable(GLenum cap)
  1470. {
  1471. Internal("error_glEnable","()");
  1472. RegalContext *_context = REGAL_GET_CONTEXT();
  1473. RegalAssert(_context);
  1474. DispatchTableGL *_next = _context->dispatcher.error.next();
  1475. RegalAssert(_next);
  1476. GLenum _error = GL_NO_ERROR;
  1477. if (!_context->err.inBeginEnd)
  1478. _error = _next->call(&_next->glGetError)();
  1479. RegalAssert(_error==GL_NO_ERROR);
  1480. _next->call(&_next->glEnable)(cap);
  1481. if (!_context->err.inBeginEnd) {
  1482. _error = _next->call(&_next->glGetError)();
  1483. if (_error!=GL_NO_ERROR) {
  1484. Error("glEnable : ",Token::GLerrorToString(_error));
  1485. #if REGAL_BREAK
  1486. Break::ErrorCB(_error);
  1487. #endif
  1488. if (_context->err.callback)
  1489. _context->err.callback( _error );

Large files files are truncated, but you can click here to view the full file