Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

macosx_qgl.h

Go to the documentation of this file.
00001 /*
00002 ===========================================================================
00003 Copyright (C) 1999-2005 Id Software, Inc.
00004 
00005 This file is part of Quake III Arena source code.
00006 
00007 Quake III Arena source code is free software; you can redistribute it
00008 and/or modify it under the terms of the GNU General Public License as
00009 published by the Free Software Foundation; either version 2 of the License,
00010 or (at your option) any later version.
00011 
00012 Quake III Arena source code is distributed in the hope that it will be
00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Foobar; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 ===========================================================================
00021 */
00022 /**** This file is autogenerated.  Run GenerateQGL.pl to update it ****/
00023 
00024 #ifdef QGL_LOG_GL_CALLS
00025 extern unsigned int QGLLogGLCalls;
00026 extern FILE *QGLDebugFile(void);
00027 #endif
00028 
00029 extern void QGLCheckError(const char *message);
00030 extern unsigned int QGLBeginStarted;
00031 
00032 // This has to be done to avoid infinite recursion between our glGetError wrapper and QGLCheckError()
00033 static inline GLenum _glGetError(void) {
00034     return glGetError();
00035 }
00036 
00037 // void glAccum (GLenum op, GLfloat value);
00038 static inline void qglAccum(GLenum op, GLfloat value)
00039 {
00040 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00041     if (QGLLogGLCalls)
00042         fprintf(QGLDebugFile(), "glAccum(op=%lu, value=%f)\n", op, value);
00043 #endif
00044     glAccum(op, value);
00045 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00046     if (!QGLBeginStarted)
00047         QGLCheckError("glAccum");
00048 #endif
00049 }
00050 
00051 // void glAlphaFunc (GLenum func, GLclampf ref);
00052 static inline void qglAlphaFunc(GLenum func, GLclampf ref)
00053 {
00054 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00055     if (QGLLogGLCalls)
00056         fprintf(QGLDebugFile(), "glAlphaFunc(func=%lu, ref=%f)\n", func, ref);
00057 #endif
00058     glAlphaFunc(func, ref);
00059 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00060     if (!QGLBeginStarted)
00061         QGLCheckError("glAlphaFunc");
00062 #endif
00063 }
00064 
00065 // GLboolean glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences);
00066 static inline GLboolean qglAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
00067 {
00068     GLboolean returnValue;
00069 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00070     if (QGLLogGLCalls)
00071         fprintf(QGLDebugFile(), "glAreTexturesResident(n=%ld, textures=%p, residences=%p)\n", n, textures, residences);
00072 #endif
00073     returnValue = glAreTexturesResident(n, textures, residences);
00074 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00075     if (!QGLBeginStarted)
00076         QGLCheckError("glAreTexturesResident");
00077 #endif
00078     return returnValue;
00079 }
00080 
00081 // void glArrayElement (GLint i);
00082 static inline void qglArrayElement(GLint i)
00083 {
00084 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00085     if (QGLLogGLCalls)
00086         fprintf(QGLDebugFile(), "glArrayElement(i=%ld)\n", i);
00087 #endif
00088     glArrayElement(i);
00089 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00090     if (!QGLBeginStarted)
00091         QGLCheckError("glArrayElement");
00092 #endif
00093 }
00094 
00095 // void glBegin (GLenum mode);
00096 static inline void qglBegin(GLenum mode)
00097 {
00098 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00099     if (QGLLogGLCalls)
00100         fprintf(QGLDebugFile(), "glBegin(mode=%lu)\n", mode);
00101 #endif
00102     glBegin(mode);
00103 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00104     QGLBeginStarted++;
00105     if (!QGLBeginStarted)
00106         QGLCheckError("glBegin");
00107 #endif
00108 }
00109 
00110 // void glBindTexture (GLenum target, GLuint texture);
00111 static inline void qglBindTexture(GLenum target, GLuint texture)
00112 {
00113 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00114     if (QGLLogGLCalls)
00115         fprintf(QGLDebugFile(), "glBindTexture(target=%lu, texture=%lu)\n", target, texture);
00116 #endif
00117     glBindTexture(target, texture);
00118 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00119     if (!QGLBeginStarted)
00120         QGLCheckError("glBindTexture");
00121 #endif
00122 }
00123 
00124 // void glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
00125 static inline void qglBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
00126 {
00127 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00128     if (QGLLogGLCalls)
00129         fprintf(QGLDebugFile(), "glBitmap(width=%ld, height=%ld, xorig=%f, yorig=%f, xmove=%f, ymove=%f, bitmap=%p)\n", width, height, xorig, yorig, xmove, ymove, bitmap);
00130 #endif
00131     glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
00132 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00133     if (!QGLBeginStarted)
00134         QGLCheckError("glBitmap");
00135 #endif
00136 }
00137 
00138 // void glBlendFunc (GLenum sfactor, GLenum dfactor);
00139 static inline void qglBlendFunc(GLenum sfactor, GLenum dfactor)
00140 {
00141 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00142     if (QGLLogGLCalls)
00143         fprintf(QGLDebugFile(), "glBlendFunc(sfactor=%lu, dfactor=%lu)\n", sfactor, dfactor);
00144 #endif
00145     glBlendFunc(sfactor, dfactor);
00146 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00147     if (!QGLBeginStarted)
00148         QGLCheckError("glBlendFunc");
00149 #endif
00150 }
00151 
00152 // void glCallList (GLuint list);
00153 static inline void qglCallList(GLuint list)
00154 {
00155 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00156     if (QGLLogGLCalls)
00157         fprintf(QGLDebugFile(), "glCallList(list=%lu)\n", list);
00158 #endif
00159     glCallList(list);
00160 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00161     if (!QGLBeginStarted)
00162         QGLCheckError("glCallList");
00163 #endif
00164 }
00165 
00166 // void glCallLists (GLsizei n, GLenum type, const GLvoid *lists);
00167 static inline void qglCallLists(GLsizei n, GLenum type, const GLvoid *lists)
00168 {
00169 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00170     if (QGLLogGLCalls)
00171         fprintf(QGLDebugFile(), "glCallLists(n=%ld, type=%lu, lists=%p)\n", n, type, lists);
00172 #endif
00173     glCallLists(n, type, lists);
00174 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00175     if (!QGLBeginStarted)
00176         QGLCheckError("glCallLists");
00177 #endif
00178 }
00179 
00180 // void glClear (GLbitfield mask);
00181 static inline void qglClear(GLbitfield mask)
00182 {
00183 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00184     if (QGLLogGLCalls)
00185         fprintf(QGLDebugFile(), "glClear(mask=%lu)\n", mask);
00186 #endif
00187     glClear(mask);
00188 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00189     if (!QGLBeginStarted)
00190         QGLCheckError("glClear");
00191 #endif
00192 }
00193 
00194 // void glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
00195 static inline void qglClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
00196 {
00197 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00198     if (QGLLogGLCalls)
00199         fprintf(QGLDebugFile(), "glClearAccum(red=%f, green=%f, blue=%f, alpha=%f)\n", red, green, blue, alpha);
00200 #endif
00201     glClearAccum(red, green, blue, alpha);
00202 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00203     if (!QGLBeginStarted)
00204         QGLCheckError("glClearAccum");
00205 #endif
00206 }
00207 
00208 // void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
00209 static inline void qglClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
00210 {
00211 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00212     if (QGLLogGLCalls)
00213         fprintf(QGLDebugFile(), "glClearColor(red=%f, green=%f, blue=%f, alpha=%f)\n", red, green, blue, alpha);
00214 #endif
00215     glClearColor(red, green, blue, alpha);
00216 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00217     if (!QGLBeginStarted)
00218         QGLCheckError("glClearColor");
00219 #endif
00220 }
00221 
00222 // void glClearDepth (GLclampd depth);
00223 static inline void qglClearDepth(GLclampd depth)
00224 {
00225 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00226     if (QGLLogGLCalls)
00227         fprintf(QGLDebugFile(), "glClearDepth(depth=%f)\n", depth);
00228 #endif
00229     glClearDepth(depth);
00230 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00231     if (!QGLBeginStarted)
00232         QGLCheckError("glClearDepth");
00233 #endif
00234 }
00235 
00236 // void glClearIndex (GLfloat c);
00237 static inline void qglClearIndex(GLfloat c)
00238 {
00239 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00240     if (QGLLogGLCalls)
00241         fprintf(QGLDebugFile(), "glClearIndex(c=%f)\n", c);
00242 #endif
00243     glClearIndex(c);
00244 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00245     if (!QGLBeginStarted)
00246         QGLCheckError("glClearIndex");
00247 #endif
00248 }
00249 
00250 // void glClearStencil (GLint s);
00251 static inline void qglClearStencil(GLint s)
00252 {
00253 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00254     if (QGLLogGLCalls)
00255         fprintf(QGLDebugFile(), "glClearStencil(s=%ld)\n", s);
00256 #endif
00257     glClearStencil(s);
00258 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00259     if (!QGLBeginStarted)
00260         QGLCheckError("glClearStencil");
00261 #endif
00262 }
00263 
00264 // void glClipPlane (GLenum plane, const GLdouble *equation);
00265 static inline void qglClipPlane(GLenum plane, const GLdouble *equation)
00266 {
00267 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00268     if (QGLLogGLCalls)
00269         fprintf(QGLDebugFile(), "glClipPlane(plane=%lu, equation=%p)\n", plane, equation);
00270 #endif
00271     glClipPlane(plane, equation);
00272 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00273     if (!QGLBeginStarted)
00274         QGLCheckError("glClipPlane");
00275 #endif
00276 }
00277 
00278 // void glColor3b (GLbyte red, GLbyte green, GLbyte blue);
00279 static inline void qglColor3b(GLbyte red, GLbyte green, GLbyte blue)
00280 {
00281 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00282     if (QGLLogGLCalls)
00283         fprintf(QGLDebugFile(), "glColor3b(red=%d, green=%d, blue=%d)\n", red, green, blue);
00284 #endif
00285     glColor3b(red, green, blue);
00286 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00287     if (!QGLBeginStarted)
00288         QGLCheckError("glColor3b");
00289 #endif
00290 }
00291 
00292 // void glColor3bv (const GLbyte *v);
00293 static inline void qglColor3bv(const GLbyte *v)
00294 {
00295 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00296     if (QGLLogGLCalls)
00297         fprintf(QGLDebugFile(), "glColor3bv(v=%p)\n", v);
00298 #endif
00299     glColor3bv(v);
00300 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00301     if (!QGLBeginStarted)
00302         QGLCheckError("glColor3bv");
00303 #endif
00304 }
00305 
00306 // void glColor3d (GLdouble red, GLdouble green, GLdouble blue);
00307 static inline void qglColor3d(GLdouble red, GLdouble green, GLdouble blue)
00308 {
00309 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00310     if (QGLLogGLCalls)
00311         fprintf(QGLDebugFile(), "glColor3d(red=%f, green=%f, blue=%f)\n", red, green, blue);
00312 #endif
00313     glColor3d(red, green, blue);
00314 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00315     if (!QGLBeginStarted)
00316         QGLCheckError("glColor3d");
00317 #endif
00318 }
00319 
00320 // void glColor3dv (const GLdouble *v);
00321 static inline void qglColor3dv(const GLdouble *v)
00322 {
00323 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00324     if (QGLLogGLCalls)
00325         fprintf(QGLDebugFile(), "glColor3dv(v=%p)\n", v);
00326 #endif
00327     glColor3dv(v);
00328 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00329     if (!QGLBeginStarted)
00330         QGLCheckError("glColor3dv");
00331 #endif
00332 }
00333 
00334 // void glColor3f (GLfloat red, GLfloat green, GLfloat blue);
00335 static inline void qglColor3f(GLfloat red, GLfloat green, GLfloat blue)
00336 {
00337 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00338     if (QGLLogGLCalls)
00339         fprintf(QGLDebugFile(), "glColor3f(red=%f, green=%f, blue=%f)\n", red, green, blue);
00340 #endif
00341     glColor3f(red, green, blue);
00342 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00343     if (!QGLBeginStarted)
00344         QGLCheckError("glColor3f");
00345 #endif
00346 }
00347 
00348 // void glColor3fv (const GLfloat *v);
00349 static inline void qglColor3fv(const GLfloat *v)
00350 {
00351 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00352     if (QGLLogGLCalls)
00353         fprintf(QGLDebugFile(), "glColor3fv(v=%p)\n", v);
00354 #endif
00355     glColor3fv(v);
00356 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00357     if (!QGLBeginStarted)
00358         QGLCheckError("glColor3fv");
00359 #endif
00360 }
00361 
00362 // void glColor3i (GLint red, GLint green, GLint blue);
00363 static inline void qglColor3i(GLint red, GLint green, GLint blue)
00364 {
00365 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00366     if (QGLLogGLCalls)
00367         fprintf(QGLDebugFile(), "glColor3i(red=%ld, green=%ld, blue=%ld)\n", red, green, blue);
00368 #endif
00369     glColor3i(red, green, blue);
00370 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00371     if (!QGLBeginStarted)
00372         QGLCheckError("glColor3i");
00373 #endif
00374 }
00375 
00376 // void glColor3iv (const GLint *v);
00377 static inline void qglColor3iv(const GLint *v)
00378 {
00379 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00380     if (QGLLogGLCalls)
00381         fprintf(QGLDebugFile(), "glColor3iv(v=%p)\n", v);
00382 #endif
00383     glColor3iv(v);
00384 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00385     if (!QGLBeginStarted)
00386         QGLCheckError("glColor3iv");
00387 #endif
00388 }
00389 
00390 // void glColor3s (GLshort red, GLshort green, GLshort blue);
00391 static inline void qglColor3s(GLshort red, GLshort green, GLshort blue)
00392 {
00393 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00394     if (QGLLogGLCalls)
00395         fprintf(QGLDebugFile(), "glColor3s(red=%d, green=%d, blue=%d)\n", red, green, blue);
00396 #endif
00397     glColor3s(red, green, blue);
00398 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00399     if (!QGLBeginStarted)
00400         QGLCheckError("glColor3s");
00401 #endif
00402 }
00403 
00404 // void glColor3sv (const GLshort *v);
00405 static inline void qglColor3sv(const GLshort *v)
00406 {
00407 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00408     if (QGLLogGLCalls)
00409         fprintf(QGLDebugFile(), "glColor3sv(v=%p)\n", v);
00410 #endif
00411     glColor3sv(v);
00412 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00413     if (!QGLBeginStarted)
00414         QGLCheckError("glColor3sv");
00415 #endif
00416 }
00417 
00418 // void glColor3ub (GLubyte red, GLubyte green, GLubyte blue);
00419 static inline void qglColor3ub(GLubyte red, GLubyte green, GLubyte blue)
00420 {
00421 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00422     if (QGLLogGLCalls)
00423         fprintf(QGLDebugFile(), "glColor3ub(red=%u, green=%u, blue=%u)\n", red, green, blue);
00424 #endif
00425     glColor3ub(red, green, blue);
00426 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00427     if (!QGLBeginStarted)
00428         QGLCheckError("glColor3ub");
00429 #endif
00430 }
00431 
00432 // void glColor3ubv (const GLubyte *v);
00433 static inline void qglColor3ubv(const GLubyte *v)
00434 {
00435 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00436     if (QGLLogGLCalls)
00437         fprintf(QGLDebugFile(), "glColor3ubv(v=%p)\n", v);
00438 #endif
00439     glColor3ubv(v);
00440 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00441     if (!QGLBeginStarted)
00442         QGLCheckError("glColor3ubv");
00443 #endif
00444 }
00445 
00446 // void glColor3ui (GLuint red, GLuint green, GLuint blue);
00447 static inline void qglColor3ui(GLuint red, GLuint green, GLuint blue)
00448 {
00449 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00450     if (QGLLogGLCalls)
00451         fprintf(QGLDebugFile(), "glColor3ui(red=%lu, green=%lu, blue=%lu)\n", red, green, blue);
00452 #endif
00453     glColor3ui(red, green, blue);
00454 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00455     if (!QGLBeginStarted)
00456         QGLCheckError("glColor3ui");
00457 #endif
00458 }
00459 
00460 // void glColor3uiv (const GLuint *v);
00461 static inline void qglColor3uiv(const GLuint *v)
00462 {
00463 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00464     if (QGLLogGLCalls)
00465         fprintf(QGLDebugFile(), "glColor3uiv(v=%p)\n", v);
00466 #endif
00467     glColor3uiv(v);
00468 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00469     if (!QGLBeginStarted)
00470         QGLCheckError("glColor3uiv");
00471 #endif
00472 }
00473 
00474 // void glColor3us (GLushort red, GLushort green, GLushort blue);
00475 static inline void qglColor3us(GLushort red, GLushort green, GLushort blue)
00476 {
00477 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00478     if (QGLLogGLCalls)
00479         fprintf(QGLDebugFile(), "glColor3us(red=%u, green=%u, blue=%u)\n", red, green, blue);
00480 #endif
00481     glColor3us(red, green, blue);
00482 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00483     if (!QGLBeginStarted)
00484         QGLCheckError("glColor3us");
00485 #endif
00486 }
00487 
00488 // void glColor3usv (const GLushort *v);
00489 static inline void qglColor3usv(const GLushort *v)
00490 {
00491 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00492     if (QGLLogGLCalls)
00493         fprintf(QGLDebugFile(), "glColor3usv(v=%p)\n", v);
00494 #endif
00495     glColor3usv(v);
00496 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00497     if (!QGLBeginStarted)
00498         QGLCheckError("glColor3usv");
00499 #endif
00500 }
00501 
00502 // void glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
00503 static inline void qglColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
00504 {
00505 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00506     if (QGLLogGLCalls)
00507         fprintf(QGLDebugFile(), "glColor4b(red=%d, green=%d, blue=%d, alpha=%d)\n", red, green, blue, alpha);
00508 #endif
00509     glColor4b(red, green, blue, alpha);
00510 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00511     if (!QGLBeginStarted)
00512         QGLCheckError("glColor4b");
00513 #endif
00514 }
00515 
00516 // void glColor4bv (const GLbyte *v);
00517 static inline void qglColor4bv(const GLbyte *v)
00518 {
00519 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00520     if (QGLLogGLCalls)
00521         fprintf(QGLDebugFile(), "glColor4bv(v=%p)\n", v);
00522 #endif
00523     glColor4bv(v);
00524 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00525     if (!QGLBeginStarted)
00526         QGLCheckError("glColor4bv");
00527 #endif
00528 }
00529 
00530 // void glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
00531 static inline void qglColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
00532 {
00533 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00534     if (QGLLogGLCalls)
00535         fprintf(QGLDebugFile(), "glColor4d(red=%f, green=%f, blue=%f, alpha=%f)\n", red, green, blue, alpha);
00536 #endif
00537     glColor4d(red, green, blue, alpha);
00538 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00539     if (!QGLBeginStarted)
00540         QGLCheckError("glColor4d");
00541 #endif
00542 }
00543 
00544 // void glColor4dv (const GLdouble *v);
00545 static inline void qglColor4dv(const GLdouble *v)
00546 {
00547 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00548     if (QGLLogGLCalls)
00549         fprintf(QGLDebugFile(), "glColor4dv(v=%p)\n", v);
00550 #endif
00551     glColor4dv(v);
00552 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00553     if (!QGLBeginStarted)
00554         QGLCheckError("glColor4dv");
00555 #endif
00556 }
00557 
00558 // void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
00559 static inline void qglColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
00560 {
00561 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00562     if (QGLLogGLCalls)
00563         fprintf(QGLDebugFile(), "glColor4f(red=%f, green=%f, blue=%f, alpha=%f)\n", red, green, blue, alpha);
00564 #endif
00565     glColor4f(red, green, blue, alpha);
00566 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00567     if (!QGLBeginStarted)
00568         QGLCheckError("glColor4f");
00569 #endif
00570 }
00571 
00572 // void glColor4fv (const GLfloat *v);
00573 static inline void qglColor4fv(const GLfloat *v)
00574 {
00575 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00576     if (QGLLogGLCalls)
00577         fprintf(QGLDebugFile(), "glColor4fv(v=%p)\n", v);
00578 #endif
00579     glColor4fv(v);
00580 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00581     if (!QGLBeginStarted)
00582         QGLCheckError("glColor4fv");
00583 #endif
00584 }
00585 
00586 // void glColor4i (GLint red, GLint green, GLint blue, GLint alpha);
00587 static inline void qglColor4i(GLint red, GLint green, GLint blue, GLint alpha)
00588 {
00589 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00590     if (QGLLogGLCalls)
00591         fprintf(QGLDebugFile(), "glColor4i(red=%ld, green=%ld, blue=%ld, alpha=%ld)\n", red, green, blue, alpha);
00592 #endif
00593     glColor4i(red, green, blue, alpha);
00594 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00595     if (!QGLBeginStarted)
00596         QGLCheckError("glColor4i");
00597 #endif
00598 }
00599 
00600 // void glColor4iv (const GLint *v);
00601 static inline void qglColor4iv(const GLint *v)
00602 {
00603 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00604     if (QGLLogGLCalls)
00605         fprintf(QGLDebugFile(), "glColor4iv(v=%p)\n", v);
00606 #endif
00607     glColor4iv(v);
00608 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00609     if (!QGLBeginStarted)
00610         QGLCheckError("glColor4iv");
00611 #endif
00612 }
00613 
00614 // void glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha);
00615 static inline void qglColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
00616 {
00617 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00618     if (QGLLogGLCalls)
00619         fprintf(QGLDebugFile(), "glColor4s(red=%d, green=%d, blue=%d, alpha=%d)\n", red, green, blue, alpha);
00620 #endif
00621     glColor4s(red, green, blue, alpha);
00622 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00623     if (!QGLBeginStarted)
00624         QGLCheckError("glColor4s");
00625 #endif
00626 }
00627 
00628 // void glColor4sv (const GLshort *v);
00629 static inline void qglColor4sv(const GLshort *v)
00630 {
00631 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00632     if (QGLLogGLCalls)
00633         fprintf(QGLDebugFile(), "glColor4sv(v=%p)\n", v);
00634 #endif
00635     glColor4sv(v);
00636 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00637     if (!QGLBeginStarted)
00638         QGLCheckError("glColor4sv");
00639 #endif
00640 }
00641 
00642 // void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
00643 static inline void qglColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
00644 {
00645 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00646     if (QGLLogGLCalls)
00647         fprintf(QGLDebugFile(), "glColor4ub(red=%u, green=%u, blue=%u, alpha=%u)\n", red, green, blue, alpha);
00648 #endif
00649     glColor4ub(red, green, blue, alpha);
00650 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00651     if (!QGLBeginStarted)
00652         QGLCheckError("glColor4ub");
00653 #endif
00654 }
00655 
00656 // void glColor4ubv (const GLubyte *v);
00657 static inline void qglColor4ubv(const GLubyte *v)
00658 {
00659 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00660     if (QGLLogGLCalls)
00661         fprintf(QGLDebugFile(), "glColor4ubv(v=%p)\n", v);
00662 #endif
00663     glColor4ubv(v);
00664 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00665     if (!QGLBeginStarted)
00666         QGLCheckError("glColor4ubv");
00667 #endif
00668 }
00669 
00670 // void glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha);
00671 static inline void qglColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
00672 {
00673 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00674     if (QGLLogGLCalls)
00675         fprintf(QGLDebugFile(), "glColor4ui(red=%lu, green=%lu, blue=%lu, alpha=%lu)\n", red, green, blue, alpha);
00676 #endif
00677     glColor4ui(red, green, blue, alpha);
00678 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00679     if (!QGLBeginStarted)
00680         QGLCheckError("glColor4ui");
00681 #endif
00682 }
00683 
00684 // void glColor4uiv (const GLuint *v);
00685 static inline void qglColor4uiv(const GLuint *v)
00686 {
00687 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00688     if (QGLLogGLCalls)
00689         fprintf(QGLDebugFile(), "glColor4uiv(v=%p)\n", v);
00690 #endif
00691     glColor4uiv(v);
00692 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00693     if (!QGLBeginStarted)
00694         QGLCheckError("glColor4uiv");
00695 #endif
00696 }
00697 
00698 // void glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha);
00699 static inline void qglColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
00700 {
00701 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00702     if (QGLLogGLCalls)
00703         fprintf(QGLDebugFile(), "glColor4us(red=%u, green=%u, blue=%u, alpha=%u)\n", red, green, blue, alpha);
00704 #endif
00705     glColor4us(red, green, blue, alpha);
00706 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00707     if (!QGLBeginStarted)
00708         QGLCheckError("glColor4us");
00709 #endif
00710 }
00711 
00712 // void glColor4usv (const GLushort *v);
00713 static inline void qglColor4usv(const GLushort *v)
00714 {
00715 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00716     if (QGLLogGLCalls)
00717         fprintf(QGLDebugFile(), "glColor4usv(v=%p)\n", v);
00718 #endif
00719     glColor4usv(v);
00720 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00721     if (!QGLBeginStarted)
00722         QGLCheckError("glColor4usv");
00723 #endif
00724 }
00725 
00726 // void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
00727 static inline void qglColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
00728 {
00729 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00730     if (QGLLogGLCalls)
00731         fprintf(QGLDebugFile(), "glColorMask(red=%u, green=%u, blue=%u, alpha=%u)\n", red, green, blue, alpha);
00732 #endif
00733     glColorMask(red, green, blue, alpha);
00734 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00735     if (!QGLBeginStarted)
00736         QGLCheckError("glColorMask");
00737 #endif
00738 }
00739 
00740 // void glColorMaterial (GLenum face, GLenum mode);
00741 static inline void qglColorMaterial(GLenum face, GLenum mode)
00742 {
00743 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00744     if (QGLLogGLCalls)
00745         fprintf(QGLDebugFile(), "glColorMaterial(face=%lu, mode=%lu)\n", face, mode);
00746 #endif
00747     glColorMaterial(face, mode);
00748 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00749     if (!QGLBeginStarted)
00750         QGLCheckError("glColorMaterial");
00751 #endif
00752 }
00753 
00754 // void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
00755 static inline void qglColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
00756 {
00757 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00758     if (QGLLogGLCalls)
00759         fprintf(QGLDebugFile(), "glColorPointer(size=%ld, type=%lu, stride=%ld, pointer=%p)\n", size, type, stride, pointer);
00760 #endif
00761     glColorPointer(size, type, stride, pointer);
00762 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00763     if (!QGLBeginStarted)
00764         QGLCheckError("glColorPointer");
00765 #endif
00766 }
00767 
00768 // void glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
00769 static inline void qglCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
00770 {
00771 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00772     if (QGLLogGLCalls)
00773         fprintf(QGLDebugFile(), "glCopyPixels(x=%ld, y=%ld, width=%ld, height=%ld, type=%lu)\n", x, y, width, height, type);
00774 #endif
00775     glCopyPixels(x, y, width, height, type);
00776 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00777     if (!QGLBeginStarted)
00778         QGLCheckError("glCopyPixels");
00779 #endif
00780 }
00781 
00782 // void glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
00783 static inline void qglCopyTexImage1D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border)
00784 {
00785 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00786     if (QGLLogGLCalls)
00787         fprintf(QGLDebugFile(), "glCopyTexImage1D(target=%lu, level=%ld, internalFormat=%lu, x=%ld, y=%ld, width=%ld, border=%ld)\n", target, level, internalFormat, x, y, width, border);
00788 #endif
00789     glCopyTexImage1D(target, level, internalFormat, x, y, width, border);
00790 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00791     if (!QGLBeginStarted)
00792         QGLCheckError("glCopyTexImage1D");
00793 #endif
00794 }
00795 
00796 // void glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
00797 static inline void qglCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
00798 {
00799 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00800     if (QGLLogGLCalls)
00801         fprintf(QGLDebugFile(), "glCopyTexImage2D(target=%lu, level=%ld, internalFormat=%lu, x=%ld, y=%ld, width=%ld, height=%ld, border=%ld)\n", target, level, internalFormat, x, y, width, height, border);
00802 #endif
00803     glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border);
00804 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00805     if (!QGLBeginStarted)
00806         QGLCheckError("glCopyTexImage2D");
00807 #endif
00808 }
00809 
00810 // void glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
00811 static inline void qglCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
00812 {
00813 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00814     if (QGLLogGLCalls)
00815         fprintf(QGLDebugFile(), "glCopyTexSubImage1D(target=%lu, level=%ld, xoffset=%ld, x=%ld, y=%ld, width=%ld)\n", target, level, xoffset, x, y, width);
00816 #endif
00817     glCopyTexSubImage1D(target, level, xoffset, x, y, width);
00818 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00819     if (!QGLBeginStarted)
00820         QGLCheckError("glCopyTexSubImage1D");
00821 #endif
00822 }
00823 
00824 // void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
00825 static inline void qglCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
00826 {
00827 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00828     if (QGLLogGLCalls)
00829         fprintf(QGLDebugFile(), "glCopyTexSubImage2D(target=%lu, level=%ld, xoffset=%ld, yoffset=%ld, x=%ld, y=%ld, width=%ld, height=%ld)\n", target, level, xoffset, yoffset, x, y, width, height);
00830 #endif
00831     glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
00832 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00833     if (!QGLBeginStarted)
00834         QGLCheckError("glCopyTexSubImage2D");
00835 #endif
00836 }
00837 
00838 // void glCullFace (GLenum mode);
00839 static inline void qglCullFace(GLenum mode)
00840 {
00841 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00842     if (QGLLogGLCalls)
00843         fprintf(QGLDebugFile(), "glCullFace(mode=%lu)\n", mode);
00844 #endif
00845     glCullFace(mode);
00846 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00847     if (!QGLBeginStarted)
00848         QGLCheckError("glCullFace");
00849 #endif
00850 }
00851 
00852 // void glDeleteLists (GLuint list, GLsizei range);
00853 static inline void qglDeleteLists(GLuint list, GLsizei range)
00854 {
00855 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00856     if (QGLLogGLCalls)
00857         fprintf(QGLDebugFile(), "glDeleteLists(list=%lu, range=%ld)\n", list, range);
00858 #endif
00859     glDeleteLists(list, range);
00860 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00861     if (!QGLBeginStarted)
00862         QGLCheckError("glDeleteLists");
00863 #endif
00864 }
00865 
00866 // void glDeleteTextures (GLsizei n, const GLuint *textures);
00867 static inline void qglDeleteTextures(GLsizei n, const GLuint *textures)
00868 {
00869 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00870     if (QGLLogGLCalls)
00871         fprintf(QGLDebugFile(), "glDeleteTextures(n=%ld, textures=%p)\n", n, textures);
00872 #endif
00873     glDeleteTextures(n, textures);
00874 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00875     if (!QGLBeginStarted)
00876         QGLCheckError("glDeleteTextures");
00877 #endif
00878 }
00879 
00880 // void glDepthFunc (GLenum func);
00881 static inline void qglDepthFunc(GLenum func)
00882 {
00883 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00884     if (QGLLogGLCalls)
00885         fprintf(QGLDebugFile(), "glDepthFunc(func=%lu)\n", func);
00886 #endif
00887     glDepthFunc(func);
00888 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00889     if (!QGLBeginStarted)
00890         QGLCheckError("glDepthFunc");
00891 #endif
00892 }
00893 
00894 // void glDepthMask (GLboolean flag);
00895 static inline void qglDepthMask(GLboolean flag)
00896 {
00897 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00898     if (QGLLogGLCalls)
00899         fprintf(QGLDebugFile(), "glDepthMask(flag=%u)\n", flag);
00900 #endif
00901     glDepthMask(flag);
00902 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00903     if (!QGLBeginStarted)
00904         QGLCheckError("glDepthMask");
00905 #endif
00906 }
00907 
00908 // void glDepthRange (GLclampd zNear, GLclampd zFar);
00909 static inline void qglDepthRange(GLclampd zNear, GLclampd zFar)
00910 {
00911 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00912     if (QGLLogGLCalls)
00913         fprintf(QGLDebugFile(), "glDepthRange(zNear=%f, zFar=%f)\n", zNear, zFar);
00914 #endif
00915     glDepthRange(zNear, zFar);
00916 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00917     if (!QGLBeginStarted)
00918         QGLCheckError("glDepthRange");
00919 #endif
00920 }
00921 
00922 // void glDisable (GLenum cap);
00923 static inline void qglDisable(GLenum cap)
00924 {
00925 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00926     if (QGLLogGLCalls)
00927         fprintf(QGLDebugFile(), "glDisable(cap=%lu)\n", cap);
00928 #endif
00929     glDisable(cap);
00930 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00931     if (!QGLBeginStarted)
00932         QGLCheckError("glDisable");
00933 #endif
00934 }
00935 
00936 // void glDisableClientState (GLenum array);
00937 static inline void qglDisableClientState(GLenum array)
00938 {
00939 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00940     if (QGLLogGLCalls)
00941         fprintf(QGLDebugFile(), "glDisableClientState(array=%lu)\n", array);
00942 #endif
00943     glDisableClientState(array);
00944 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00945     if (!QGLBeginStarted)
00946         QGLCheckError("glDisableClientState");
00947 #endif
00948 }
00949 
00950 // void glDrawArrays (GLenum mode, GLint first, GLsizei count);
00951 static inline void qglDrawArrays(GLenum mode, GLint first, GLsizei count)
00952 {
00953 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00954     if (QGLLogGLCalls)
00955         fprintf(QGLDebugFile(), "glDrawArrays(mode=%lu, first=%ld, count=%ld)\n", mode, first, count);
00956 #endif
00957     glDrawArrays(mode, first, count);
00958 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00959     if (!QGLBeginStarted)
00960         QGLCheckError("glDrawArrays");
00961 #endif
00962 }
00963 
00964 // void glDrawBuffer (GLenum mode);
00965 static inline void qglDrawBuffer(GLenum mode)
00966 {
00967 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00968     if (QGLLogGLCalls)
00969         fprintf(QGLDebugFile(), "glDrawBuffer(mode=%lu)\n", mode);
00970 #endif
00971     glDrawBuffer(mode);
00972 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00973     if (!QGLBeginStarted)
00974         QGLCheckError("glDrawBuffer");
00975 #endif
00976 }
00977 
00978 // void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
00979 static inline void qglDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
00980 {
00981 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00982     if (QGLLogGLCalls)
00983         fprintf(QGLDebugFile(), "glDrawElements(mode=%lu, count=%ld, type=%lu, indices=%p)\n", mode, count, type, indices);
00984 #endif
00985     glDrawElements(mode, count, type, indices);
00986 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
00987     if (!QGLBeginStarted)
00988         QGLCheckError("glDrawElements");
00989 #endif
00990 }
00991 
00992 // void glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
00993 static inline void qglDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
00994 {
00995 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
00996     if (QGLLogGLCalls)
00997         fprintf(QGLDebugFile(), "glDrawPixels(width=%ld, height=%ld, format=%lu, type=%lu, pixels=%p)\n", width, height, format, type, pixels);
00998 #endif
00999     glDrawPixels(width, height, format, type, pixels);
01000 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01001     if (!QGLBeginStarted)
01002         QGLCheckError("glDrawPixels");
01003 #endif
01004 }
01005 
01006 // void glEdgeFlag (GLboolean flag);
01007 static inline void qglEdgeFlag(GLboolean flag)
01008 {
01009 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01010     if (QGLLogGLCalls)
01011         fprintf(QGLDebugFile(), "glEdgeFlag(flag=%u)\n", flag);
01012 #endif
01013     glEdgeFlag(flag);
01014 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01015     if (!QGLBeginStarted)
01016         QGLCheckError("glEdgeFlag");
01017 #endif
01018 }
01019 
01020 // void glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer);
01021 static inline void qglEdgeFlagPointer(GLsizei stride, const GLvoid *pointer)
01022 {
01023 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01024     if (QGLLogGLCalls)
01025         fprintf(QGLDebugFile(), "glEdgeFlagPointer(stride=%ld, pointer=%p)\n", stride, pointer);
01026 #endif
01027     glEdgeFlagPointer(stride, pointer);
01028 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01029     if (!QGLBeginStarted)
01030         QGLCheckError("glEdgeFlagPointer");
01031 #endif
01032 }
01033 
01034 // void glEdgeFlagv (const GLboolean *flag);
01035 static inline void qglEdgeFlagv(const GLboolean *flag)
01036 {
01037 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01038     if (QGLLogGLCalls)
01039         fprintf(QGLDebugFile(), "glEdgeFlagv(flag=%p)\n", flag);
01040 #endif
01041     glEdgeFlagv(flag);
01042 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01043     if (!QGLBeginStarted)
01044         QGLCheckError("glEdgeFlagv");
01045 #endif
01046 }
01047 
01048 // void glEnable (GLenum cap);
01049 static inline void qglEnable(GLenum cap)
01050 {
01051 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01052     if (QGLLogGLCalls)
01053         fprintf(QGLDebugFile(), "glEnable(cap=%lu)\n", cap);
01054 #endif
01055     glEnable(cap);
01056 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01057     if (!QGLBeginStarted)
01058         QGLCheckError("glEnable");
01059 #endif
01060 }
01061 
01062 // void glEnableClientState (GLenum array);
01063 static inline void qglEnableClientState(GLenum array)
01064 {
01065 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01066     if (QGLLogGLCalls)
01067         fprintf(QGLDebugFile(), "glEnableClientState(array=%lu)\n", array);
01068 #endif
01069     glEnableClientState(array);
01070 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01071     if (!QGLBeginStarted)
01072         QGLCheckError("glEnableClientState");
01073 #endif
01074 }
01075 
01076 // void glEnd (void);
01077 static inline void qglEnd(void)
01078 {
01079 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01080     if (QGLLogGLCalls)
01081         fprintf(QGLDebugFile(), "glEnd(void)\n");
01082 #endif
01083     glEnd();
01084 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01085     QGLBeginStarted--;
01086     if (!QGLBeginStarted)
01087         QGLCheckError("glEnd");
01088 #endif
01089 }
01090 
01091 // void glEndList (void);
01092 static inline void qglEndList(void)
01093 {
01094 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01095     if (QGLLogGLCalls)
01096         fprintf(QGLDebugFile(), "glEndList(void)\n");
01097 #endif
01098     glEndList();
01099 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01100     if (!QGLBeginStarted)
01101         QGLCheckError("glEndList");
01102 #endif
01103 }
01104 
01105 // void glEvalCoord1d (GLdouble u);
01106 static inline void qglEvalCoord1d(GLdouble u)
01107 {
01108 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01109     if (QGLLogGLCalls)
01110         fprintf(QGLDebugFile(), "glEvalCoord1d(u=%f)\n", u);
01111 #endif
01112     glEvalCoord1d(u);
01113 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01114     if (!QGLBeginStarted)
01115         QGLCheckError("glEvalCoord1d");
01116 #endif
01117 }
01118 
01119 // void glEvalCoord1dv (const GLdouble *u);
01120 static inline void qglEvalCoord1dv(const GLdouble *u)
01121 {
01122 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01123     if (QGLLogGLCalls)
01124         fprintf(QGLDebugFile(), "glEvalCoord1dv(u=%p)\n", u);
01125 #endif
01126     glEvalCoord1dv(u);
01127 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01128     if (!QGLBeginStarted)
01129         QGLCheckError("glEvalCoord1dv");
01130 #endif
01131 }
01132 
01133 // void glEvalCoord1f (GLfloat u);
01134 static inline void qglEvalCoord1f(GLfloat u)
01135 {
01136 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01137     if (QGLLogGLCalls)
01138         fprintf(QGLDebugFile(), "glEvalCoord1f(u=%f)\n", u);
01139 #endif
01140     glEvalCoord1f(u);
01141 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01142     if (!QGLBeginStarted)
01143         QGLCheckError("glEvalCoord1f");
01144 #endif
01145 }
01146 
01147 // void glEvalCoord1fv (const GLfloat *u);
01148 static inline void qglEvalCoord1fv(const GLfloat *u)
01149 {
01150 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01151     if (QGLLogGLCalls)
01152         fprintf(QGLDebugFile(), "glEvalCoord1fv(u=%p)\n", u);
01153 #endif
01154     glEvalCoord1fv(u);
01155 #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
01156     if (!QGLBeginStarted)
01157         QGLCheckError("glEvalCoord1fv");
01158 #endif
01159 }
01160 
01161 // void glEvalCoord2d (GLdouble u, GLdouble v);
01162 static inline void qglEvalCoord2d(GLdouble u, GLdouble v)
01163 {
01164 #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
01165     if (QGLLogGLCal