PageRenderTime 162ms CodeModel.GetById 12ms app.highlight 129ms 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

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

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