iphone_qgl.h 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413
  1. /**** This file is autogenerated. Run GenerateQGL.pl to update it ****/
  2. /*
  3. Copyright (C) 2009 Id Software, Inc.
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15. */
  16. #ifndef _IPHONE_QGL_H_
  17. #define _IPHONE_QGL_H_
  18. #ifdef QGL_LOG_GL_CALLS
  19. extern unsigned int QGLLogGLCalls;
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. FILE *QGLDebugFile(void);
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. #endif
  28. #include "iphone_qgl_enumerants.h"
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. void QGLCheckError(const char *message);
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. extern unsigned int QGLBeginStarted;
  37. // This has to be done to avoid infinite recursion between our glGetError wrapper and QGLCheckError()
  38. static inline GLenum _glGetError(void) {
  39. return glGetError();
  40. }
  41. // void glAlphaFunc (GLenum func, GLclampf ref);
  42. static inline void qglAlphaFunc(GLenum func, GLclampf ref)
  43. {
  44. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  45. if (QGLLogGLCalls)
  46. fprintf(QGLDebugFile(), "glAlphaFunc(func=%s, ref=%f)\n", StringFromGLEnumerant( func ), ref);
  47. #endif
  48. glAlphaFunc(func, ref);
  49. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  50. if (!QGLBeginStarted)
  51. QGLCheckError("glAlphaFunc");
  52. #endif
  53. }
  54. // void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  55. static inline void qglClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  56. {
  57. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  58. if (QGLLogGLCalls)
  59. fprintf(QGLDebugFile(), "glClearColor(red=%f, green=%f, blue=%f, alpha=%f)\n", red, green, blue, alpha);
  60. #endif
  61. glClearColor(red, green, blue, alpha);
  62. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  63. if (!QGLBeginStarted)
  64. QGLCheckError("glClearColor");
  65. #endif
  66. }
  67. // void glClearDepthf (GLclampf depth);
  68. static inline void qglClearDepthf(GLclampf depth)
  69. {
  70. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  71. if (QGLLogGLCalls)
  72. fprintf(QGLDebugFile(), "glClearDepthf(depth=%f)\n", depth);
  73. #endif
  74. glClearDepthf(depth);
  75. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  76. if (!QGLBeginStarted)
  77. QGLCheckError("glClearDepthf");
  78. #endif
  79. }
  80. // void glClipPlanef (GLenum plane, const GLfloat *equation);
  81. static inline void qglClipPlanef(GLenum plane, const GLfloat *equation)
  82. {
  83. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  84. if (QGLLogGLCalls)
  85. fprintf(QGLDebugFile(), "glClipPlanef(plane=%s, equation=%p)\n", StringFromGLEnumerant( plane ), equation);
  86. #endif
  87. glClipPlanef(plane, equation);
  88. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  89. if (!QGLBeginStarted)
  90. QGLCheckError("glClipPlanef");
  91. #endif
  92. }
  93. // void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  94. // void glDepthRangef (GLclampf zNear, GLclampf zFar);
  95. static inline void qglDepthRangef(GLclampf zNear, GLclampf zFar)
  96. {
  97. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  98. if (QGLLogGLCalls)
  99. fprintf(QGLDebugFile(), "glDepthRangef(zNear=%f, zFar=%f)\n", zNear, zFar);
  100. #endif
  101. glDepthRangef(zNear, zFar);
  102. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  103. if (!QGLBeginStarted)
  104. QGLCheckError("glDepthRangef");
  105. #endif
  106. }
  107. // void glFogf (GLenum pname, GLfloat param);
  108. static inline void qglFogf(GLenum pname, GLfloat param)
  109. {
  110. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  111. if (QGLLogGLCalls)
  112. fprintf(QGLDebugFile(), "glFogf(pname=%s, param=%f)\n", StringFromGLEnumerant( pname ), param);
  113. #endif
  114. glFogf(pname, param);
  115. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  116. if (!QGLBeginStarted)
  117. QGLCheckError("glFogf");
  118. #endif
  119. }
  120. // void glFogfv (GLenum pname, const GLfloat *params);
  121. static inline void qglFogfv(GLenum pname, const GLfloat *params)
  122. {
  123. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  124. if (QGLLogGLCalls)
  125. fprintf(QGLDebugFile(), "glFogfv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  126. #endif
  127. glFogfv(pname, params);
  128. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  129. if (!QGLBeginStarted)
  130. QGLCheckError("glFogfv");
  131. #endif
  132. }
  133. // void glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
  134. static inline void qglFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
  135. {
  136. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  137. if (QGLLogGLCalls)
  138. fprintf(QGLDebugFile(), "glFrustumf(left=%f, right=%f, bottom=%f, top=%f, zNear=%f, zFar=%f)\n", left, right, bottom, top, zNear, zFar);
  139. #endif
  140. glFrustumf(left, right, bottom, top, zNear, zFar);
  141. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  142. if (!QGLBeginStarted)
  143. QGLCheckError("glFrustumf");
  144. #endif
  145. }
  146. // void glGetClipPlanef (GLenum pname, GLfloat *equation);
  147. static inline void qglGetClipPlanef(GLenum pname, GLfloat *equation)
  148. {
  149. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  150. if (QGLLogGLCalls)
  151. fprintf(QGLDebugFile(), "glGetClipPlanef(pname=%s, equation=%p)\n", StringFromGLEnumerant( pname ), equation);
  152. #endif
  153. glGetClipPlanef(pname, equation);
  154. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  155. if (!QGLBeginStarted)
  156. QGLCheckError("glGetClipPlanef");
  157. #endif
  158. }
  159. // void glGetFloatv (GLenum pname, GLfloat *params);
  160. static inline void qglGetFloatv(GLenum pname, GLfloat *params)
  161. {
  162. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  163. if (QGLLogGLCalls)
  164. fprintf(QGLDebugFile(), "glGetFloatv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  165. #endif
  166. glGetFloatv(pname, params);
  167. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  168. if (!QGLBeginStarted)
  169. QGLCheckError("glGetFloatv");
  170. #endif
  171. }
  172. // void glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
  173. static inline void qglGetLightfv(GLenum light, GLenum pname, GLfloat *params)
  174. {
  175. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  176. if (QGLLogGLCalls)
  177. fprintf(QGLDebugFile(), "glGetLightfv(light=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), params);
  178. #endif
  179. glGetLightfv(light, pname, params);
  180. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  181. if (!QGLBeginStarted)
  182. QGLCheckError("glGetLightfv");
  183. #endif
  184. }
  185. // void glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
  186. static inline void qglGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
  187. {
  188. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  189. if (QGLLogGLCalls)
  190. fprintf(QGLDebugFile(), "glGetMaterialfv(face=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), params);
  191. #endif
  192. glGetMaterialfv(face, pname, params);
  193. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  194. if (!QGLBeginStarted)
  195. QGLCheckError("glGetMaterialfv");
  196. #endif
  197. }
  198. // void glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params);
  199. static inline void qglGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params)
  200. {
  201. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  202. if (QGLLogGLCalls)
  203. fprintf(QGLDebugFile(), "glGetTexEnvfv(env=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( env ), StringFromGLEnumerant( pname ), params);
  204. #endif
  205. glGetTexEnvfv(env, pname, params);
  206. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  207. if (!QGLBeginStarted)
  208. QGLCheckError("glGetTexEnvfv");
  209. #endif
  210. }
  211. // void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
  212. static inline void qglGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
  213. {
  214. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  215. if (QGLLogGLCalls)
  216. fprintf(QGLDebugFile(), "glGetTexParameterfv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  217. #endif
  218. glGetTexParameterfv(target, pname, params);
  219. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  220. if (!QGLBeginStarted)
  221. QGLCheckError("glGetTexParameterfv");
  222. #endif
  223. }
  224. // void glLightModelf (GLenum pname, GLfloat param);
  225. static inline void qglLightModelf(GLenum pname, GLfloat param)
  226. {
  227. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  228. if (QGLLogGLCalls)
  229. fprintf(QGLDebugFile(), "glLightModelf(pname=%s, param=%f)\n", StringFromGLEnumerant( pname ), param);
  230. #endif
  231. glLightModelf(pname, param);
  232. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  233. if (!QGLBeginStarted)
  234. QGLCheckError("glLightModelf");
  235. #endif
  236. }
  237. // void glLightModelfv (GLenum pname, const GLfloat *params);
  238. static inline void qglLightModelfv(GLenum pname, const GLfloat *params)
  239. {
  240. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  241. if (QGLLogGLCalls)
  242. fprintf(QGLDebugFile(), "glLightModelfv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  243. #endif
  244. glLightModelfv(pname, params);
  245. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  246. if (!QGLBeginStarted)
  247. QGLCheckError("glLightModelfv");
  248. #endif
  249. }
  250. // void glLightf (GLenum light, GLenum pname, GLfloat param);
  251. static inline void qglLightf(GLenum light, GLenum pname, GLfloat param)
  252. {
  253. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  254. if (QGLLogGLCalls)
  255. fprintf(QGLDebugFile(), "glLightf(light=%s, pname=%s, param=%f)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), param);
  256. #endif
  257. glLightf(light, pname, param);
  258. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  259. if (!QGLBeginStarted)
  260. QGLCheckError("glLightf");
  261. #endif
  262. }
  263. // void glLightfv (GLenum light, GLenum pname, const GLfloat *params);
  264. static inline void qglLightfv(GLenum light, GLenum pname, const GLfloat *params)
  265. {
  266. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  267. if (QGLLogGLCalls)
  268. fprintf(QGLDebugFile(), "glLightfv(light=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), params);
  269. #endif
  270. glLightfv(light, pname, params);
  271. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  272. if (!QGLBeginStarted)
  273. QGLCheckError("glLightfv");
  274. #endif
  275. }
  276. // void glLineWidth (GLfloat width);
  277. static inline void qglLineWidth(GLfloat width)
  278. {
  279. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  280. if (QGLLogGLCalls)
  281. fprintf(QGLDebugFile(), "glLineWidth(width=%f)\n", width);
  282. #endif
  283. glLineWidth(width);
  284. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  285. if (!QGLBeginStarted)
  286. QGLCheckError("glLineWidth");
  287. #endif
  288. }
  289. // void glLoadMatrixf (const GLfloat *m);
  290. static inline void qglLoadMatrixf(const GLfloat *m)
  291. {
  292. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  293. if (QGLLogGLCalls)
  294. fprintf(QGLDebugFile(), "glLoadMatrixf(m=%p)\n", m);
  295. #endif
  296. glLoadMatrixf(m);
  297. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  298. if (!QGLBeginStarted)
  299. QGLCheckError("glLoadMatrixf");
  300. #endif
  301. }
  302. // void glMaterialf (GLenum face, GLenum pname, GLfloat param);
  303. static inline void qglMaterialf(GLenum face, GLenum pname, GLfloat param)
  304. {
  305. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  306. if (QGLLogGLCalls)
  307. fprintf(QGLDebugFile(), "glMaterialf(face=%s, pname=%s, param=%f)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), param);
  308. #endif
  309. glMaterialf(face, pname, param);
  310. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  311. if (!QGLBeginStarted)
  312. QGLCheckError("glMaterialf");
  313. #endif
  314. }
  315. // void glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
  316. static inline void qglMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
  317. {
  318. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  319. if (QGLLogGLCalls)
  320. fprintf(QGLDebugFile(), "glMaterialfv(face=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), params);
  321. #endif
  322. glMaterialfv(face, pname, params);
  323. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  324. if (!QGLBeginStarted)
  325. QGLCheckError("glMaterialfv");
  326. #endif
  327. }
  328. // void glMultMatrixf (const GLfloat *m);
  329. static inline void qglMultMatrixf(const GLfloat *m)
  330. {
  331. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  332. if (QGLLogGLCalls)
  333. fprintf(QGLDebugFile(), "glMultMatrixf(m=%p)\n", m);
  334. #endif
  335. glMultMatrixf(m);
  336. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  337. if (!QGLBeginStarted)
  338. QGLCheckError("glMultMatrixf");
  339. #endif
  340. }
  341. // void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
  342. static inline void qglMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  343. {
  344. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  345. if (QGLLogGLCalls)
  346. fprintf(QGLDebugFile(), "glMultiTexCoord4f(target=%s, s=%f, t=%f, r=%f, q=%f)\n", StringFromGLEnumerant( target ), s, t, r, q);
  347. #endif
  348. glMultiTexCoord4f(target, s, t, r, q);
  349. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  350. if (!QGLBeginStarted)
  351. QGLCheckError("glMultiTexCoord4f");
  352. #endif
  353. }
  354. // void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
  355. static inline void qglNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
  356. {
  357. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  358. if (QGLLogGLCalls)
  359. fprintf(QGLDebugFile(), "glNormal3f(nx=%f, ny=%f, nz=%f)\n", nx, ny, nz);
  360. #endif
  361. glNormal3f(nx, ny, nz);
  362. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  363. if (!QGLBeginStarted)
  364. QGLCheckError("glNormal3f");
  365. #endif
  366. }
  367. // void glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
  368. static inline void qglOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
  369. {
  370. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  371. if (QGLLogGLCalls)
  372. fprintf(QGLDebugFile(), "glOrthof(left=%f, right=%f, bottom=%f, top=%f, zNear=%f, zFar=%f)\n", left, right, bottom, top, zNear, zFar);
  373. #endif
  374. glOrthof(left, right, bottom, top, zNear, zFar);
  375. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  376. if (!QGLBeginStarted)
  377. QGLCheckError("glOrthof");
  378. #endif
  379. }
  380. // void glPointParameterf (GLenum pname, GLfloat param);
  381. static inline void qglPointParameterf(GLenum pname, GLfloat param)
  382. {
  383. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  384. if (QGLLogGLCalls)
  385. fprintf(QGLDebugFile(), "glPointParameterf(pname=%s, param=%f)\n", StringFromGLEnumerant( pname ), param);
  386. #endif
  387. glPointParameterf(pname, param);
  388. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  389. if (!QGLBeginStarted)
  390. QGLCheckError("glPointParameterf");
  391. #endif
  392. }
  393. // void glPointParameterfv (GLenum pname, const GLfloat *params);
  394. static inline void qglPointParameterfv(GLenum pname, const GLfloat *params)
  395. {
  396. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  397. if (QGLLogGLCalls)
  398. fprintf(QGLDebugFile(), "glPointParameterfv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  399. #endif
  400. glPointParameterfv(pname, params);
  401. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  402. if (!QGLBeginStarted)
  403. QGLCheckError("glPointParameterfv");
  404. #endif
  405. }
  406. // void glPointSize (GLfloat size);
  407. static inline void qglPointSize(GLfloat size)
  408. {
  409. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  410. if (QGLLogGLCalls)
  411. fprintf(QGLDebugFile(), "glPointSize(size=%f)\n", size);
  412. #endif
  413. glPointSize(size);
  414. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  415. if (!QGLBeginStarted)
  416. QGLCheckError("glPointSize");
  417. #endif
  418. }
  419. // void glPolygonOffset (GLfloat factor, GLfloat units);
  420. static inline void qglPolygonOffset(GLfloat factor, GLfloat units)
  421. {
  422. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  423. if (QGLLogGLCalls)
  424. fprintf(QGLDebugFile(), "glPolygonOffset(factor=%f, units=%f)\n", factor, units);
  425. #endif
  426. glPolygonOffset(factor, units);
  427. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  428. if (!QGLBeginStarted)
  429. QGLCheckError("glPolygonOffset");
  430. #endif
  431. }
  432. // void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
  433. static inline void qglRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
  434. {
  435. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  436. if (QGLLogGLCalls)
  437. fprintf(QGLDebugFile(), "glRotatef(angle=%f, x=%f, y=%f, z=%f)\n", angle, x, y, z);
  438. #endif
  439. glRotatef(angle, x, y, z);
  440. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  441. if (!QGLBeginStarted)
  442. QGLCheckError("glRotatef");
  443. #endif
  444. }
  445. // void glScalef (GLfloat x, GLfloat y, GLfloat z);
  446. static inline void qglScalef(GLfloat x, GLfloat y, GLfloat z)
  447. {
  448. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  449. if (QGLLogGLCalls)
  450. fprintf(QGLDebugFile(), "glScalef(x=%f, y=%f, z=%f)\n", x, y, z);
  451. #endif
  452. glScalef(x, y, z);
  453. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  454. if (!QGLBeginStarted)
  455. QGLCheckError("glScalef");
  456. #endif
  457. }
  458. // void glTexEnvf (GLenum target, GLenum pname, GLfloat param);
  459. static inline void qglTexEnvf(GLenum target, GLenum pname, GLfloat param)
  460. {
  461. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  462. if (QGLLogGLCalls)
  463. fprintf(QGLDebugFile(), "glTexEnvf(target=%s, pname=%s, param=%f)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param);
  464. #endif
  465. glTexEnvf(target, pname, param);
  466. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  467. if (!QGLBeginStarted)
  468. QGLCheckError("glTexEnvf");
  469. #endif
  470. }
  471. // void glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
  472. static inline void qglTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
  473. {
  474. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  475. if (QGLLogGLCalls)
  476. fprintf(QGLDebugFile(), "glTexEnvfv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  477. #endif
  478. glTexEnvfv(target, pname, params);
  479. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  480. if (!QGLBeginStarted)
  481. QGLCheckError("glTexEnvfv");
  482. #endif
  483. }
  484. // void glTexParameterf (GLenum target, GLenum pname, GLfloat param);
  485. static inline void qglTexParameterf(GLenum target, GLenum pname, GLfloat param)
  486. {
  487. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  488. if (QGLLogGLCalls)
  489. fprintf(QGLDebugFile(), "glTexParameterf(target=%s, pname=%s, param=%f)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param);
  490. #endif
  491. glTexParameterf(target, pname, param);
  492. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  493. if (!QGLBeginStarted)
  494. QGLCheckError("glTexParameterf");
  495. #endif
  496. }
  497. // void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
  498. static inline void qglTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
  499. {
  500. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  501. if (QGLLogGLCalls)
  502. fprintf(QGLDebugFile(), "glTexParameterfv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  503. #endif
  504. glTexParameterfv(target, pname, params);
  505. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  506. if (!QGLBeginStarted)
  507. QGLCheckError("glTexParameterfv");
  508. #endif
  509. }
  510. // void glTranslatef (GLfloat x, GLfloat y, GLfloat z);
  511. static inline void qglTranslatef(GLfloat x, GLfloat y, GLfloat z)
  512. {
  513. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  514. if (QGLLogGLCalls)
  515. fprintf(QGLDebugFile(), "glTranslatef(x=%f, y=%f, z=%f)\n", x, y, z);
  516. #endif
  517. glTranslatef(x, y, z);
  518. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  519. if (!QGLBeginStarted)
  520. QGLCheckError("glTranslatef");
  521. #endif
  522. }
  523. // void glActiveTexture (GLenum texture);
  524. static inline void qglActiveTexture(GLenum texture)
  525. {
  526. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  527. if (QGLLogGLCalls)
  528. fprintf(QGLDebugFile(), "glActiveTexture(texture=%s)\n", StringFromGLEnumerant( texture ));
  529. #endif
  530. glActiveTexture(texture);
  531. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  532. if (!QGLBeginStarted)
  533. QGLCheckError("glActiveTexture");
  534. #endif
  535. }
  536. // void glAlphaFuncx (GLenum func, GLclampx ref);
  537. static inline void qglAlphaFuncx(GLenum func, GLclampx ref)
  538. {
  539. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  540. if (QGLLogGLCalls)
  541. fprintf(QGLDebugFile(), "glAlphaFuncx(func=%s, ref=%ld)\n", StringFromGLEnumerant( func ), ref);
  542. #endif
  543. glAlphaFuncx(func, ref);
  544. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  545. if (!QGLBeginStarted)
  546. QGLCheckError("glAlphaFuncx");
  547. #endif
  548. }
  549. // void glBindBuffer (GLenum target, GLuint buffer);
  550. static inline void qglBindBuffer(GLenum target, GLuint buffer)
  551. {
  552. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  553. if (QGLLogGLCalls)
  554. fprintf(QGLDebugFile(), "glBindBuffer(target=%s, buffer=%lu)\n", StringFromGLEnumerant( target ), buffer);
  555. #endif
  556. glBindBuffer(target, buffer);
  557. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  558. if (!QGLBeginStarted)
  559. QGLCheckError("glBindBuffer");
  560. #endif
  561. }
  562. // void glBindTexture (GLenum target, GLuint texture);
  563. static inline void qglBindTexture(GLenum target, GLuint texture)
  564. {
  565. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  566. if (QGLLogGLCalls)
  567. fprintf(QGLDebugFile(), "glBindTexture(target=%s, texture=%lu)\n", StringFromGLEnumerant( target ), texture);
  568. #endif
  569. glBindTexture(target, texture);
  570. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  571. if (!QGLBeginStarted)
  572. QGLCheckError("glBindTexture");
  573. #endif
  574. }
  575. // void glBlendFunc (GLenum sfactor, GLenum dfactor);
  576. static inline void qglBlendFunc(GLenum sfactor, GLenum dfactor)
  577. {
  578. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  579. if (QGLLogGLCalls)
  580. fprintf(QGLDebugFile(), "glBlendFunc(sfactor=%s, dfactor=%s)\n", StringFromGLEnumerant( sfactor ), StringFromGLEnumerant( dfactor ));
  581. #endif
  582. glBlendFunc(sfactor, dfactor);
  583. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  584. if (!QGLBeginStarted)
  585. QGLCheckError("glBlendFunc");
  586. #endif
  587. }
  588. // void glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
  589. static inline void qglBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
  590. {
  591. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  592. if (QGLLogGLCalls)
  593. fprintf(QGLDebugFile(), "glBufferData(target=%s, size=%ld, data=%p, usage=%s)\n", StringFromGLEnumerant( target ), size, data, StringFromGLEnumerant( usage ));
  594. #endif
  595. glBufferData(target, size, data, usage);
  596. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  597. if (!QGLBeginStarted)
  598. QGLCheckError("glBufferData");
  599. #endif
  600. }
  601. // void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
  602. static inline void qglBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
  603. {
  604. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  605. if (QGLLogGLCalls)
  606. fprintf(QGLDebugFile(), "glBufferSubData(target=%s, offset=%ld, size=%ld, data=%p)\n", StringFromGLEnumerant( target ), offset, size, data);
  607. #endif
  608. glBufferSubData(target, offset, size, data);
  609. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  610. if (!QGLBeginStarted)
  611. QGLCheckError("glBufferSubData");
  612. #endif
  613. }
  614. // void glClear (GLbitfield mask);
  615. static inline void qglClear(GLbitfield mask)
  616. {
  617. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  618. if (QGLLogGLCalls)
  619. fprintf(QGLDebugFile(), "glClear(mask=%lu)\n", mask);
  620. #endif
  621. glClear(mask);
  622. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  623. if (!QGLBeginStarted)
  624. QGLCheckError("glClear");
  625. #endif
  626. }
  627. // void glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
  628. static inline void qglClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
  629. {
  630. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  631. if (QGLLogGLCalls)
  632. fprintf(QGLDebugFile(), "glClearColorx(red=%ld, green=%ld, blue=%ld, alpha=%ld)\n", red, green, blue, alpha);
  633. #endif
  634. glClearColorx(red, green, blue, alpha);
  635. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  636. if (!QGLBeginStarted)
  637. QGLCheckError("glClearColorx");
  638. #endif
  639. }
  640. // void glClearDepthx (GLclampx depth);
  641. static inline void qglClearDepthx(GLclampx depth)
  642. {
  643. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  644. if (QGLLogGLCalls)
  645. fprintf(QGLDebugFile(), "glClearDepthx(depth=%ld)\n", depth);
  646. #endif
  647. glClearDepthx(depth);
  648. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  649. if (!QGLBeginStarted)
  650. QGLCheckError("glClearDepthx");
  651. #endif
  652. }
  653. // void glClearStencil (GLint s);
  654. static inline void qglClearStencil(GLint s)
  655. {
  656. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  657. if (QGLLogGLCalls)
  658. fprintf(QGLDebugFile(), "glClearStencil(s=%ld)\n", s);
  659. #endif
  660. glClearStencil(s);
  661. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  662. if (!QGLBeginStarted)
  663. QGLCheckError("glClearStencil");
  664. #endif
  665. }
  666. // void glClientActiveTexture (GLenum texture);
  667. static inline void qglClientActiveTexture(GLenum texture)
  668. {
  669. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  670. if (QGLLogGLCalls)
  671. fprintf(QGLDebugFile(), "glClientActiveTexture(texture=%s)\n", StringFromGLEnumerant( texture ));
  672. #endif
  673. glClientActiveTexture(texture);
  674. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  675. if (!QGLBeginStarted)
  676. QGLCheckError("glClientActiveTexture");
  677. #endif
  678. }
  679. // void glClipPlanex (GLenum plane, const GLfixed *equation);
  680. static inline void qglClipPlanex(GLenum plane, const GLfixed *equation)
  681. {
  682. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  683. if (QGLLogGLCalls)
  684. fprintf(QGLDebugFile(), "glClipPlanex(plane=%s, equation=%p)\n", StringFromGLEnumerant( plane ), equation);
  685. #endif
  686. glClipPlanex(plane, equation);
  687. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  688. if (!QGLBeginStarted)
  689. QGLCheckError("glClipPlanex");
  690. #endif
  691. }
  692. // void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
  693. static inline void qglColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
  694. {
  695. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  696. if (QGLLogGLCalls)
  697. fprintf(QGLDebugFile(), "glColor4ub(red=%u, green=%u, blue=%u, alpha=%u)\n", red, green, blue, alpha);
  698. #endif
  699. glColor4ub(red, green, blue, alpha);
  700. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  701. if (!QGLBeginStarted)
  702. QGLCheckError("glColor4ub");
  703. #endif
  704. }
  705. // void glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
  706. static inline void qglColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
  707. {
  708. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  709. if (QGLLogGLCalls)
  710. fprintf(QGLDebugFile(), "glColor4x(red=%ld, green=%ld, blue=%ld, alpha=%ld)\n", red, green, blue, alpha);
  711. #endif
  712. glColor4x(red, green, blue, alpha);
  713. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  714. if (!QGLBeginStarted)
  715. QGLCheckError("glColor4x");
  716. #endif
  717. }
  718. // void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  719. static inline void qglColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
  720. {
  721. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  722. if (QGLLogGLCalls)
  723. fprintf(QGLDebugFile(), "glColorMask(red=%u, green=%u, blue=%u, alpha=%u)\n", red, green, blue, alpha);
  724. #endif
  725. glColorMask(red, green, blue, alpha);
  726. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  727. if (!QGLBeginStarted)
  728. QGLCheckError("glColorMask");
  729. #endif
  730. }
  731. // void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  732. static inline void qglColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  733. {
  734. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  735. if (QGLLogGLCalls)
  736. fprintf(QGLDebugFile(), "glColorPointer(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer);
  737. #endif
  738. glColorPointer(size, type, stride, pointer);
  739. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  740. if (!QGLBeginStarted)
  741. QGLCheckError("glColorPointer");
  742. #endif
  743. }
  744. // void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
  745. static inline void qglCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
  746. {
  747. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  748. if (QGLLogGLCalls)
  749. fprintf(QGLDebugFile(), "glCompressedTexImage2D(target=%s, level=%ld, internalformat=%s, width=%ld, height=%ld, border=%ld, imageSize=%ld, data=%p)\n", StringFromGLEnumerant( target ), level, StringFromGLEnumerant( internalformat ), width, height, border, imageSize, data);
  750. #endif
  751. glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
  752. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  753. if (!QGLBeginStarted)
  754. QGLCheckError("glCompressedTexImage2D");
  755. #endif
  756. }
  757. // void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
  758. static inline void qglCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
  759. {
  760. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  761. if (QGLLogGLCalls)
  762. fprintf(QGLDebugFile(), "glCompressedTexSubImage2D(target=%s, level=%ld, xoffset=%ld, yoffset=%ld, width=%ld, height=%ld, format=%s, imageSize=%ld, data=%p)\n", StringFromGLEnumerant( target ), level, xoffset, yoffset, width, height, StringFromGLEnumerant( format ), imageSize, data);
  763. #endif
  764. glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
  765. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  766. if (!QGLBeginStarted)
  767. QGLCheckError("glCompressedTexSubImage2D");
  768. #endif
  769. }
  770. // void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  771. static inline void qglCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
  772. {
  773. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  774. if (QGLLogGLCalls)
  775. fprintf(QGLDebugFile(), "glCopyTexImage2D(target=%s, level=%ld, internalformat=%s, x=%ld, y=%ld, width=%ld, height=%ld, border=%ld)\n", StringFromGLEnumerant( target ), level, StringFromGLEnumerant( internalformat ), x, y, width, height, border);
  776. #endif
  777. glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
  778. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  779. if (!QGLBeginStarted)
  780. QGLCheckError("glCopyTexImage2D");
  781. #endif
  782. }
  783. // void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  784. static inline void qglCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  785. {
  786. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  787. if (QGLLogGLCalls)
  788. fprintf(QGLDebugFile(), "glCopyTexSubImage2D(target=%s, level=%ld, xoffset=%ld, yoffset=%ld, x=%ld, y=%ld, width=%ld, height=%ld)\n", StringFromGLEnumerant( target ), level, xoffset, yoffset, x, y, width, height);
  789. #endif
  790. glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
  791. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  792. if (!QGLBeginStarted)
  793. QGLCheckError("glCopyTexSubImage2D");
  794. #endif
  795. }
  796. // void glCullFace (GLenum mode);
  797. static inline void qglCullFace(GLenum mode)
  798. {
  799. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  800. if (QGLLogGLCalls)
  801. fprintf(QGLDebugFile(), "glCullFace(mode=%s)\n", StringFromGLEnumerant( mode ));
  802. #endif
  803. glCullFace(mode);
  804. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  805. if (!QGLBeginStarted)
  806. QGLCheckError("glCullFace");
  807. #endif
  808. }
  809. // void glDeleteBuffers (GLsizei n, const GLuint *buffers);
  810. static inline void qglDeleteBuffers(GLsizei n, const GLuint *buffers)
  811. {
  812. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  813. if (QGLLogGLCalls)
  814. fprintf(QGLDebugFile(), "glDeleteBuffers(n=%ld, buffers=%p)\n", n, buffers);
  815. #endif
  816. glDeleteBuffers(n, buffers);
  817. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  818. if (!QGLBeginStarted)
  819. QGLCheckError("glDeleteBuffers");
  820. #endif
  821. }
  822. // void glDeleteTextures (GLsizei n, const GLuint *textures);
  823. static inline void qglDeleteTextures(GLsizei n, const GLuint *textures)
  824. {
  825. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  826. if (QGLLogGLCalls)
  827. fprintf(QGLDebugFile(), "glDeleteTextures(n=%ld, textures=%p)\n", n, textures);
  828. #endif
  829. glDeleteTextures(n, textures);
  830. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  831. if (!QGLBeginStarted)
  832. QGLCheckError("glDeleteTextures");
  833. #endif
  834. }
  835. // void glDepthFunc (GLenum func);
  836. static inline void qglDepthFunc(GLenum func)
  837. {
  838. func = GL_ALWAYS;
  839. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  840. if (QGLLogGLCalls)
  841. fprintf(QGLDebugFile(), "glDepthFunc(func=%s)\n", StringFromGLEnumerant( func ));
  842. #endif
  843. glDepthFunc(func);
  844. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  845. if (!QGLBeginStarted)
  846. QGLCheckError("glDepthFunc");
  847. #endif
  848. }
  849. // void glDepthMask (GLboolean flag);
  850. static inline void qglDepthMask(GLboolean flag)
  851. {
  852. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  853. if (QGLLogGLCalls)
  854. fprintf(QGLDebugFile(), "glDepthMask(flag=%u)\n", flag);
  855. #endif
  856. glDepthMask(flag);
  857. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  858. if (!QGLBeginStarted)
  859. QGLCheckError("glDepthMask");
  860. #endif
  861. }
  862. // void glDepthRangex (GLclampx zNear, GLclampx zFar);
  863. static inline void qglDepthRangex(GLclampx zNear, GLclampx zFar)
  864. {
  865. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  866. if (QGLLogGLCalls)
  867. fprintf(QGLDebugFile(), "glDepthRangex(zNear=%ld, zFar=%ld)\n", zNear, zFar);
  868. #endif
  869. glDepthRangex(zNear, zFar);
  870. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  871. if (!QGLBeginStarted)
  872. QGLCheckError("glDepthRangex");
  873. #endif
  874. }
  875. // void glDisable (GLenum cap);
  876. static inline void qglDisable(GLenum cap)
  877. {
  878. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  879. if (QGLLogGLCalls)
  880. fprintf(QGLDebugFile(), "glDisable(cap=%s)\n", StringFromGLEnumerant( cap ));
  881. #endif
  882. glDisable(cap);
  883. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  884. if (!QGLBeginStarted)
  885. QGLCheckError("glDisable");
  886. #endif
  887. }
  888. // void glDisableClientState (GLenum array);
  889. static inline void qglDisableClientState(GLenum array)
  890. {
  891. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  892. if (QGLLogGLCalls)
  893. fprintf(QGLDebugFile(), "glDisableClientState(array=%s)\n", StringFromGLEnumerant( array ));
  894. #endif
  895. glDisableClientState(array);
  896. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  897. if (!QGLBeginStarted)
  898. QGLCheckError("glDisableClientState");
  899. #endif
  900. }
  901. // void glDrawArrays (GLenum mode, GLint first, GLsizei count);
  902. static inline void qglDrawArrays(GLenum mode, GLint first, GLsizei count)
  903. {
  904. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  905. if (QGLLogGLCalls)
  906. fprintf(QGLDebugFile(), "glDrawArrays(mode=%s, first=%ld, count=%ld)\n", StringFromGLEnumerant( mode ), first, count);
  907. #endif
  908. glDrawArrays(mode, first, count);
  909. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  910. if (!QGLBeginStarted)
  911. QGLCheckError("glDrawArrays");
  912. #endif
  913. }
  914. // void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
  915. static inline void qglDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
  916. {
  917. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  918. if (QGLLogGLCalls)
  919. fprintf(QGLDebugFile(), "glDrawElements(mode=%s, count=%ld, type=%s, indices=%p)\n", StringFromGLEnumerant( mode ), count, StringFromGLEnumerant( type ), indices);
  920. #endif
  921. glDrawElements(mode, count, type, indices);
  922. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  923. if (!QGLBeginStarted)
  924. QGLCheckError("glDrawElements");
  925. #endif
  926. }
  927. // void glEnable (GLenum cap);
  928. static inline void qglEnable(GLenum cap)
  929. {
  930. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  931. if (QGLLogGLCalls)
  932. fprintf(QGLDebugFile(), "glEnable(cap=%s)\n", StringFromGLEnumerant( cap ));
  933. #endif
  934. glEnable(cap);
  935. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  936. if (!QGLBeginStarted)
  937. QGLCheckError("glEnable");
  938. #endif
  939. }
  940. // void glEnableClientState (GLenum array);
  941. static inline void qglEnableClientState(GLenum array)
  942. {
  943. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  944. if (QGLLogGLCalls)
  945. fprintf(QGLDebugFile(), "glEnableClientState(array=%s)\n", StringFromGLEnumerant( array ));
  946. #endif
  947. glEnableClientState(array);
  948. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  949. if (!QGLBeginStarted)
  950. QGLCheckError("glEnableClientState");
  951. #endif
  952. }
  953. // void glFinish (void);
  954. static inline void qglFinish(void)
  955. {
  956. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  957. if (QGLLogGLCalls)
  958. fprintf(QGLDebugFile(), "glFinish(void)\n");
  959. #endif
  960. glFinish();
  961. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  962. if (!QGLBeginStarted)
  963. QGLCheckError("glFinish");
  964. #endif
  965. }
  966. // void glFlush (void);
  967. static inline void qglFlush(void)
  968. {
  969. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  970. if (QGLLogGLCalls)
  971. fprintf(QGLDebugFile(), "glFlush(void)\n");
  972. #endif
  973. glFlush();
  974. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  975. if (!QGLBeginStarted)
  976. QGLCheckError("glFlush");
  977. #endif
  978. }
  979. // void glFogx (GLenum pname, GLfixed param);
  980. static inline void qglFogx(GLenum pname, GLfixed param)
  981. {
  982. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  983. if (QGLLogGLCalls)
  984. fprintf(QGLDebugFile(), "glFogx(pname=%s, param=%ld)\n", StringFromGLEnumerant( pname ), param);
  985. #endif
  986. glFogx(pname, param);
  987. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  988. if (!QGLBeginStarted)
  989. QGLCheckError("glFogx");
  990. #endif
  991. }
  992. // void glFogxv (GLenum pname, const GLfixed *params);
  993. static inline void qglFogxv(GLenum pname, const GLfixed *params)
  994. {
  995. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  996. if (QGLLogGLCalls)
  997. fprintf(QGLDebugFile(), "glFogxv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  998. #endif
  999. glFogxv(pname, params);
  1000. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1001. if (!QGLBeginStarted)
  1002. QGLCheckError("glFogxv");
  1003. #endif
  1004. }
  1005. // void glFrontFace (GLenum mode);
  1006. static inline void qglFrontFace(GLenum mode)
  1007. {
  1008. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1009. if (QGLLogGLCalls)
  1010. fprintf(QGLDebugFile(), "glFrontFace(mode=%s)\n", StringFromGLEnumerant( mode ));
  1011. #endif
  1012. glFrontFace(mode);
  1013. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1014. if (!QGLBeginStarted)
  1015. QGLCheckError("glFrontFace");
  1016. #endif
  1017. }
  1018. // void glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
  1019. static inline void qglFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
  1020. {
  1021. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1022. if (QGLLogGLCalls)
  1023. fprintf(QGLDebugFile(), "glFrustumx(left=%ld, right=%ld, bottom=%ld, top=%ld, zNear=%ld, zFar=%ld)\n", left, right, bottom, top, zNear, zFar);
  1024. #endif
  1025. glFrustumx(left, right, bottom, top, zNear, zFar);
  1026. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1027. if (!QGLBeginStarted)
  1028. QGLCheckError("glFrustumx");
  1029. #endif
  1030. }
  1031. // void glGetBooleanv (GLenum pname, GLboolean *params);
  1032. static inline void qglGetBooleanv(GLenum pname, GLboolean *params)
  1033. {
  1034. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1035. if (QGLLogGLCalls)
  1036. fprintf(QGLDebugFile(), "glGetBooleanv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  1037. #endif
  1038. glGetBooleanv(pname, params);
  1039. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1040. if (!QGLBeginStarted)
  1041. QGLCheckError("glGetBooleanv");
  1042. #endif
  1043. }
  1044. // void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
  1045. static inline void qglGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
  1046. {
  1047. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1048. if (QGLLogGLCalls)
  1049. fprintf(QGLDebugFile(), "glGetBufferParameteriv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  1050. #endif
  1051. glGetBufferParameteriv(target, pname, params);
  1052. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1053. if (!QGLBeginStarted)
  1054. QGLCheckError("glGetBufferParameteriv");
  1055. #endif
  1056. }
  1057. // void glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
  1058. static inline void qglGetClipPlanex(GLenum pname, GLfixed eqn[4])
  1059. {
  1060. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1061. if (QGLLogGLCalls)
  1062. fprintf(QGLDebugFile(), "glGetClipPlanex(pname=%s, eqn=%ld)\n", StringFromGLEnumerant( pname ), eqn);
  1063. #endif
  1064. glGetClipPlanex(pname, eqn);
  1065. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1066. if (!QGLBeginStarted)
  1067. QGLCheckError("glGetClipPlanex");
  1068. #endif
  1069. }
  1070. // void glGenBuffers (GLsizei n, GLuint *buffers);
  1071. static inline void qglGenBuffers(GLsizei n, GLuint *buffers)
  1072. {
  1073. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1074. if (QGLLogGLCalls)
  1075. fprintf(QGLDebugFile(), "glGenBuffers(n=%ld, buffers=%p)\n", n, buffers);
  1076. #endif
  1077. glGenBuffers(n, buffers);
  1078. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1079. if (!QGLBeginStarted)
  1080. QGLCheckError("glGenBuffers");
  1081. #endif
  1082. }
  1083. // void glGenTextures (GLsizei n, GLuint *textures);
  1084. static inline void qglGenTextures(GLsizei n, GLuint *textures)
  1085. {
  1086. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1087. if (QGLLogGLCalls)
  1088. fprintf(QGLDebugFile(), "glGenTextures(n=%ld, textures=%p)\n", n, textures);
  1089. #endif
  1090. glGenTextures(n, textures);
  1091. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1092. if (!QGLBeginStarted)
  1093. QGLCheckError("glGenTextures");
  1094. #endif
  1095. }
  1096. // GLenum glGetError (void);
  1097. static inline GLenum qglGetError(void)
  1098. {
  1099. GLenum returnValue;
  1100. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1101. if (QGLLogGLCalls)
  1102. fprintf(QGLDebugFile(), "glGetError(void)\n");
  1103. #endif
  1104. returnValue = glGetError();
  1105. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1106. if (!QGLBeginStarted)
  1107. QGLCheckError("glGetError");
  1108. #endif
  1109. return returnValue;
  1110. }
  1111. // void glGetFixedv (GLenum pname, GLfixed *params);
  1112. static inline void qglGetFixedv(GLenum pname, GLfixed *params)
  1113. {
  1114. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1115. if (QGLLogGLCalls)
  1116. fprintf(QGLDebugFile(), "glGetFixedv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  1117. #endif
  1118. glGetFixedv(pname, params);
  1119. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1120. if (!QGLBeginStarted)
  1121. QGLCheckError("glGetFixedv");
  1122. #endif
  1123. }
  1124. // void glGetIntegerv (GLenum pname, GLint *params);
  1125. static inline void qglGetIntegerv(GLenum pname, GLint *params)
  1126. {
  1127. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1128. if (QGLLogGLCalls)
  1129. fprintf(QGLDebugFile(), "glGetIntegerv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  1130. #endif
  1131. glGetIntegerv(pname, params);
  1132. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1133. if (!QGLBeginStarted)
  1134. QGLCheckError("glGetIntegerv");
  1135. #endif
  1136. }
  1137. // void glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
  1138. static inline void qglGetLightxv(GLenum light, GLenum pname, GLfixed *params)
  1139. {
  1140. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1141. if (QGLLogGLCalls)
  1142. fprintf(QGLDebugFile(), "glGetLightxv(light=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), params);
  1143. #endif
  1144. glGetLightxv(light, pname, params);
  1145. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1146. if (!QGLBeginStarted)
  1147. QGLCheckError("glGetLightxv");
  1148. #endif
  1149. }
  1150. // void glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
  1151. static inline void qglGetMaterialxv(GLenum face, GLenum pname, GLfixed *params)
  1152. {
  1153. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1154. if (QGLLogGLCalls)
  1155. fprintf(QGLDebugFile(), "glGetMaterialxv(face=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), params);
  1156. #endif
  1157. glGetMaterialxv(face, pname, params);
  1158. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1159. if (!QGLBeginStarted)
  1160. QGLCheckError("glGetMaterialxv");
  1161. #endif
  1162. }
  1163. // void glGetPointerv (GLenum pname, void **params);
  1164. static inline void qglGetPointerv(GLenum pname, void **params)
  1165. {
  1166. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1167. if (QGLLogGLCalls)
  1168. fprintf(QGLDebugFile(), "glGetPointerv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  1169. #endif
  1170. glGetPointerv(pname, params);
  1171. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1172. if (!QGLBeginStarted)
  1173. QGLCheckError("glGetPointerv");
  1174. #endif
  1175. }
  1176. // const GLubyte * glGetString (GLenum name);
  1177. static inline const GLubyte * qglGetString(GLenum name)
  1178. {
  1179. const GLubyte * returnValue;
  1180. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1181. if (QGLLogGLCalls)
  1182. fprintf(QGLDebugFile(), "glGetString(name=%s)\n", StringFromGLEnumerant( name ));
  1183. #endif
  1184. returnValue = glGetString(name);
  1185. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1186. if (!QGLBeginStarted)
  1187. QGLCheckError("glGetString");
  1188. #endif
  1189. return returnValue;
  1190. }
  1191. // void glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
  1192. static inline void qglGetTexEnviv(GLenum env, GLenum pname, GLint *params)
  1193. {
  1194. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1195. if (QGLLogGLCalls)
  1196. fprintf(QGLDebugFile(), "glGetTexEnviv(env=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( env ), StringFromGLEnumerant( pname ), params);
  1197. #endif
  1198. glGetTexEnviv(env, pname, params);
  1199. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1200. if (!QGLBeginStarted)
  1201. QGLCheckError("glGetTexEnviv");
  1202. #endif
  1203. }
  1204. // void glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
  1205. static inline void qglGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params)
  1206. {
  1207. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1208. if (QGLLogGLCalls)
  1209. fprintf(QGLDebugFile(), "glGetTexEnvxv(env=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( env ), StringFromGLEnumerant( pname ), params);
  1210. #endif
  1211. glGetTexEnvxv(env, pname, params);
  1212. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1213. if (!QGLBeginStarted)
  1214. QGLCheckError("glGetTexEnvxv");
  1215. #endif
  1216. }
  1217. // void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
  1218. static inline void qglGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
  1219. {
  1220. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1221. if (QGLLogGLCalls)
  1222. fprintf(QGLDebugFile(), "glGetTexParameteriv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  1223. #endif
  1224. glGetTexParameteriv(target, pname, params);
  1225. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1226. if (!QGLBeginStarted)
  1227. QGLCheckError("glGetTexParameteriv");
  1228. #endif
  1229. }
  1230. // void glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
  1231. static inline void qglGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params)
  1232. {
  1233. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1234. if (QGLLogGLCalls)
  1235. fprintf(QGLDebugFile(), "glGetTexParameterxv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  1236. #endif
  1237. glGetTexParameterxv(target, pname, params);
  1238. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1239. if (!QGLBeginStarted)
  1240. QGLCheckError("glGetTexParameterxv");
  1241. #endif
  1242. }
  1243. // void glHint (GLenum target, GLenum mode);
  1244. static inline void qglHint(GLenum target, GLenum mode)
  1245. {
  1246. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1247. if (QGLLogGLCalls)
  1248. fprintf(QGLDebugFile(), "glHint(target=%s, mode=%s)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( mode ));
  1249. #endif
  1250. glHint(target, mode);
  1251. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1252. if (!QGLBeginStarted)
  1253. QGLCheckError("glHint");
  1254. #endif
  1255. }
  1256. // GLboolean glIsBuffer (GLuint buffer);
  1257. static inline GLboolean qglIsBuffer(GLuint buffer)
  1258. {
  1259. GLboolean returnValue;
  1260. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1261. if (QGLLogGLCalls)
  1262. fprintf(QGLDebugFile(), "glIsBuffer(buffer=%lu)\n", buffer);
  1263. #endif
  1264. returnValue = glIsBuffer(buffer);
  1265. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1266. if (!QGLBeginStarted)
  1267. QGLCheckError("glIsBuffer");
  1268. #endif
  1269. return returnValue;
  1270. }
  1271. // GLboolean glIsEnabled (GLenum cap);
  1272. static inline GLboolean qglIsEnabled(GLenum cap)
  1273. {
  1274. GLboolean returnValue;
  1275. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1276. if (QGLLogGLCalls)
  1277. fprintf(QGLDebugFile(), "glIsEnabled(cap=%s)\n", StringFromGLEnumerant( cap ));
  1278. #endif
  1279. returnValue = glIsEnabled(cap);
  1280. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1281. if (!QGLBeginStarted)
  1282. QGLCheckError("glIsEnabled");
  1283. #endif
  1284. return returnValue;
  1285. }
  1286. // GLboolean glIsTexture (GLuint texture);
  1287. static inline GLboolean qglIsTexture(GLuint texture)
  1288. {
  1289. GLboolean returnValue;
  1290. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1291. if (QGLLogGLCalls)
  1292. fprintf(QGLDebugFile(), "glIsTexture(texture=%lu)\n", texture);
  1293. #endif
  1294. returnValue = glIsTexture(texture);
  1295. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1296. if (!QGLBeginStarted)
  1297. QGLCheckError("glIsTexture");
  1298. #endif
  1299. return returnValue;
  1300. }
  1301. // void glLightModelx (GLenum pname, GLfixed param);
  1302. static inline void qglLightModelx(GLenum pname, GLfixed param)
  1303. {
  1304. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1305. if (QGLLogGLCalls)
  1306. fprintf(QGLDebugFile(), "glLightModelx(pname=%s, param=%ld)\n", StringFromGLEnumerant( pname ), param);
  1307. #endif
  1308. glLightModelx(pname, param);
  1309. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1310. if (!QGLBeginStarted)
  1311. QGLCheckError("glLightModelx");
  1312. #endif
  1313. }
  1314. // void glLightModelxv (GLenum pname, const GLfixed *params);
  1315. static inline void qglLightModelxv(GLenum pname, const GLfixed *params)
  1316. {
  1317. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1318. if (QGLLogGLCalls)
  1319. fprintf(QGLDebugFile(), "glLightModelxv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  1320. #endif
  1321. glLightModelxv(pname, params);
  1322. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1323. if (!QGLBeginStarted)
  1324. QGLCheckError("glLightModelxv");
  1325. #endif
  1326. }
  1327. // void glLightx (GLenum light, GLenum pname, GLfixed param);
  1328. static inline void qglLightx(GLenum light, GLenum pname, GLfixed param)
  1329. {
  1330. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1331. if (QGLLogGLCalls)
  1332. fprintf(QGLDebugFile(), "glLightx(light=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), param);
  1333. #endif
  1334. glLightx(light, pname, param);
  1335. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1336. if (!QGLBeginStarted)
  1337. QGLCheckError("glLightx");
  1338. #endif
  1339. }
  1340. // void glLightxv (GLenum light, GLenum pname, const GLfixed *params);
  1341. static inline void qglLightxv(GLenum light, GLenum pname, const GLfixed *params)
  1342. {
  1343. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1344. if (QGLLogGLCalls)
  1345. fprintf(QGLDebugFile(), "glLightxv(light=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( light ), StringFromGLEnumerant( pname ), params);
  1346. #endif
  1347. glLightxv(light, pname, params);
  1348. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1349. if (!QGLBeginStarted)
  1350. QGLCheckError("glLightxv");
  1351. #endif
  1352. }
  1353. // void glLineWidthx (GLfixed width);
  1354. static inline void qglLineWidthx(GLfixed width)
  1355. {
  1356. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1357. if (QGLLogGLCalls)
  1358. fprintf(QGLDebugFile(), "glLineWidthx(width=%ld)\n", width);
  1359. #endif
  1360. glLineWidthx(width);
  1361. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1362. if (!QGLBeginStarted)
  1363. QGLCheckError("glLineWidthx");
  1364. #endif
  1365. }
  1366. // void glLoadIdentity (void);
  1367. static inline void qglLoadIdentity(void)
  1368. {
  1369. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1370. if (QGLLogGLCalls)
  1371. fprintf(QGLDebugFile(), "glLoadIdentity(void)\n");
  1372. #endif
  1373. glLoadIdentity();
  1374. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1375. if (!QGLBeginStarted)
  1376. QGLCheckError("glLoadIdentity");
  1377. #endif
  1378. }
  1379. // void glLoadMatrixx (const GLfixed *m);
  1380. static inline void qglLoadMatrixx(const GLfixed *m)
  1381. {
  1382. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1383. if (QGLLogGLCalls)
  1384. fprintf(QGLDebugFile(), "glLoadMatrixx(m=%p)\n", m);
  1385. #endif
  1386. glLoadMatrixx(m);
  1387. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1388. if (!QGLBeginStarted)
  1389. QGLCheckError("glLoadMatrixx");
  1390. #endif
  1391. }
  1392. // void glLogicOp (GLenum opcode);
  1393. static inline void qglLogicOp(GLenum opcode)
  1394. {
  1395. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1396. if (QGLLogGLCalls)
  1397. fprintf(QGLDebugFile(), "glLogicOp(opcode=%s)\n", StringFromGLEnumerant( opcode ));
  1398. #endif
  1399. glLogicOp(opcode);
  1400. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1401. if (!QGLBeginStarted)
  1402. QGLCheckError("glLogicOp");
  1403. #endif
  1404. }
  1405. // void glMaterialx (GLenum face, GLenum pname, GLfixed param);
  1406. static inline void qglMaterialx(GLenum face, GLenum pname, GLfixed param)
  1407. {
  1408. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1409. if (QGLLogGLCalls)
  1410. fprintf(QGLDebugFile(), "glMaterialx(face=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), param);
  1411. #endif
  1412. glMaterialx(face, pname, param);
  1413. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1414. if (!QGLBeginStarted)
  1415. QGLCheckError("glMaterialx");
  1416. #endif
  1417. }
  1418. // void glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
  1419. static inline void qglMaterialxv(GLenum face, GLenum pname, const GLfixed *params)
  1420. {
  1421. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1422. if (QGLLogGLCalls)
  1423. fprintf(QGLDebugFile(), "glMaterialxv(face=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( face ), StringFromGLEnumerant( pname ), params);
  1424. #endif
  1425. glMaterialxv(face, pname, params);
  1426. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1427. if (!QGLBeginStarted)
  1428. QGLCheckError("glMaterialxv");
  1429. #endif
  1430. }
  1431. // void glMatrixMode (GLenum mode);
  1432. static inline void qglMatrixMode(GLenum mode)
  1433. {
  1434. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1435. if (QGLLogGLCalls)
  1436. fprintf(QGLDebugFile(), "glMatrixMode(mode=%s)\n", StringFromGLEnumerant( mode ));
  1437. #endif
  1438. glMatrixMode(mode);
  1439. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1440. if (!QGLBeginStarted)
  1441. QGLCheckError("glMatrixMode");
  1442. #endif
  1443. }
  1444. // void glMultMatrixx (const GLfixed *m);
  1445. static inline void qglMultMatrixx(const GLfixed *m)
  1446. {
  1447. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1448. if (QGLLogGLCalls)
  1449. fprintf(QGLDebugFile(), "glMultMatrixx(m=%p)\n", m);
  1450. #endif
  1451. glMultMatrixx(m);
  1452. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1453. if (!QGLBeginStarted)
  1454. QGLCheckError("glMultMatrixx");
  1455. #endif
  1456. }
  1457. // void glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
  1458. static inline void qglMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
  1459. {
  1460. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1461. if (QGLLogGLCalls)
  1462. fprintf(QGLDebugFile(), "glMultiTexCoord4x(target=%s, s=%ld, t=%ld, r=%ld, q=%ld)\n", StringFromGLEnumerant( target ), s, t, r, q);
  1463. #endif
  1464. glMultiTexCoord4x(target, s, t, r, q);
  1465. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1466. if (!QGLBeginStarted)
  1467. QGLCheckError("glMultiTexCoord4x");
  1468. #endif
  1469. }
  1470. // void glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
  1471. static inline void qglNormal3x(GLfixed nx, GLfixed ny, GLfixed nz)
  1472. {
  1473. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1474. if (QGLLogGLCalls)
  1475. fprintf(QGLDebugFile(), "glNormal3x(nx=%ld, ny=%ld, nz=%ld)\n", nx, ny, nz);
  1476. #endif
  1477. glNormal3x(nx, ny, nz);
  1478. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1479. if (!QGLBeginStarted)
  1480. QGLCheckError("glNormal3x");
  1481. #endif
  1482. }
  1483. // void glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
  1484. static inline void qglNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
  1485. {
  1486. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1487. if (QGLLogGLCalls)
  1488. fprintf(QGLDebugFile(), "glNormalPointer(type=%s, stride=%ld, pointer=%p)\n", StringFromGLEnumerant( type ), stride, pointer);
  1489. #endif
  1490. glNormalPointer(type, stride, pointer);
  1491. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1492. if (!QGLBeginStarted)
  1493. QGLCheckError("glNormalPointer");
  1494. #endif
  1495. }
  1496. // void glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
  1497. static inline void qglOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
  1498. {
  1499. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1500. if (QGLLogGLCalls)
  1501. fprintf(QGLDebugFile(), "glOrthox(left=%ld, right=%ld, bottom=%ld, top=%ld, zNear=%ld, zFar=%ld)\n", left, right, bottom, top, zNear, zFar);
  1502. #endif
  1503. glOrthox(left, right, bottom, top, zNear, zFar);
  1504. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1505. if (!QGLBeginStarted)
  1506. QGLCheckError("glOrthox");
  1507. #endif
  1508. }
  1509. // void glPixelStorei (GLenum pname, GLint param);
  1510. static inline void qglPixelStorei(GLenum pname, GLint param)
  1511. {
  1512. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1513. if (QGLLogGLCalls)
  1514. fprintf(QGLDebugFile(), "glPixelStorei(pname=%s, param=%ld)\n", StringFromGLEnumerant( pname ), param);
  1515. #endif
  1516. glPixelStorei(pname, param);
  1517. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1518. if (!QGLBeginStarted)
  1519. QGLCheckError("glPixelStorei");
  1520. #endif
  1521. }
  1522. // void glPointParameterx (GLenum pname, GLfixed param);
  1523. static inline void qglPointParameterx(GLenum pname, GLfixed param)
  1524. {
  1525. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1526. if (QGLLogGLCalls)
  1527. fprintf(QGLDebugFile(), "glPointParameterx(pname=%s, param=%ld)\n", StringFromGLEnumerant( pname ), param);
  1528. #endif
  1529. glPointParameterx(pname, param);
  1530. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1531. if (!QGLBeginStarted)
  1532. QGLCheckError("glPointParameterx");
  1533. #endif
  1534. }
  1535. // void glPointParameterxv (GLenum pname, const GLfixed *params);
  1536. static inline void qglPointParameterxv(GLenum pname, const GLfixed *params)
  1537. {
  1538. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1539. if (QGLLogGLCalls)
  1540. fprintf(QGLDebugFile(), "glPointParameterxv(pname=%s, params=%p)\n", StringFromGLEnumerant( pname ), params);
  1541. #endif
  1542. glPointParameterxv(pname, params);
  1543. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1544. if (!QGLBeginStarted)
  1545. QGLCheckError("glPointParameterxv");
  1546. #endif
  1547. }
  1548. // void glPointSizex (GLfixed size);
  1549. static inline void qglPointSizex(GLfixed size)
  1550. {
  1551. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1552. if (QGLLogGLCalls)
  1553. fprintf(QGLDebugFile(), "glPointSizex(size=%ld)\n", size);
  1554. #endif
  1555. glPointSizex(size);
  1556. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1557. if (!QGLBeginStarted)
  1558. QGLCheckError("glPointSizex");
  1559. #endif
  1560. }
  1561. // void glPolygonOffsetx (GLfixed factor, GLfixed units);
  1562. static inline void qglPolygonOffsetx(GLfixed factor, GLfixed units)
  1563. {
  1564. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1565. if (QGLLogGLCalls)
  1566. fprintf(QGLDebugFile(), "glPolygonOffsetx(factor=%ld, units=%ld)\n", factor, units);
  1567. #endif
  1568. glPolygonOffsetx(factor, units);
  1569. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1570. if (!QGLBeginStarted)
  1571. QGLCheckError("glPolygonOffsetx");
  1572. #endif
  1573. }
  1574. // void glPopMatrix (void);
  1575. static inline void qglPopMatrix(void)
  1576. {
  1577. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1578. if (QGLLogGLCalls)
  1579. fprintf(QGLDebugFile(), "glPopMatrix(void)\n");
  1580. #endif
  1581. glPopMatrix();
  1582. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1583. if (!QGLBeginStarted)
  1584. QGLCheckError("glPopMatrix");
  1585. #endif
  1586. }
  1587. // void glPushMatrix (void);
  1588. static inline void qglPushMatrix(void)
  1589. {
  1590. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1591. if (QGLLogGLCalls)
  1592. fprintf(QGLDebugFile(), "glPushMatrix(void)\n");
  1593. #endif
  1594. glPushMatrix();
  1595. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1596. if (!QGLBeginStarted)
  1597. QGLCheckError("glPushMatrix");
  1598. #endif
  1599. }
  1600. // void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
  1601. static inline void qglReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
  1602. {
  1603. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1604. if (QGLLogGLCalls)
  1605. fprintf(QGLDebugFile(), "glReadPixels(x=%ld, y=%ld, width=%ld, height=%ld, format=%s, type=%s, pixels=%p)\n", x, y, width, height, StringFromGLEnumerant( format ), StringFromGLEnumerant( type ), pixels);
  1606. #endif
  1607. glReadPixels(x, y, width, height, format, type, pixels);
  1608. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1609. if (!QGLBeginStarted)
  1610. QGLCheckError("glReadPixels");
  1611. #endif
  1612. }
  1613. // void glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
  1614. static inline void qglRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
  1615. {
  1616. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1617. if (QGLLogGLCalls)
  1618. fprintf(QGLDebugFile(), "glRotatex(angle=%ld, x=%ld, y=%ld, z=%ld)\n", angle, x, y, z);
  1619. #endif
  1620. glRotatex(angle, x, y, z);
  1621. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1622. if (!QGLBeginStarted)
  1623. QGLCheckError("glRotatex");
  1624. #endif
  1625. }
  1626. // void glSampleCoverage (GLclampf value, GLboolean invert);
  1627. static inline void qglSampleCoverage(GLclampf value, GLboolean invert)
  1628. {
  1629. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1630. if (QGLLogGLCalls)
  1631. fprintf(QGLDebugFile(), "glSampleCoverage(value=%f, invert=%u)\n", value, invert);
  1632. #endif
  1633. glSampleCoverage(value, invert);
  1634. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1635. if (!QGLBeginStarted)
  1636. QGLCheckError("glSampleCoverage");
  1637. #endif
  1638. }
  1639. // void glSampleCoveragex (GLclampx value, GLboolean invert);
  1640. static inline void qglSampleCoveragex(GLclampx value, GLboolean invert)
  1641. {
  1642. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1643. if (QGLLogGLCalls)
  1644. fprintf(QGLDebugFile(), "glSampleCoveragex(value=%ld, invert=%u)\n", value, invert);
  1645. #endif
  1646. glSampleCoveragex(value, invert);
  1647. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1648. if (!QGLBeginStarted)
  1649. QGLCheckError("glSampleCoveragex");
  1650. #endif
  1651. }
  1652. // void glScalex (GLfixed x, GLfixed y, GLfixed z);
  1653. static inline void qglScalex(GLfixed x, GLfixed y, GLfixed z)
  1654. {
  1655. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1656. if (QGLLogGLCalls)
  1657. fprintf(QGLDebugFile(), "glScalex(x=%ld, y=%ld, z=%ld)\n", x, y, z);
  1658. #endif
  1659. glScalex(x, y, z);
  1660. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1661. if (!QGLBeginStarted)
  1662. QGLCheckError("glScalex");
  1663. #endif
  1664. }
  1665. // void glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
  1666. static inline void qglScissor(GLint x, GLint y, GLsizei width, GLsizei height)
  1667. {
  1668. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1669. if (QGLLogGLCalls)
  1670. fprintf(QGLDebugFile(), "glScissor(x=%ld, y=%ld, width=%ld, height=%ld)\n", x, y, width, height);
  1671. #endif
  1672. // fixme
  1673. int vidHeight = 320;
  1674. glScissor(vidHeight - y - height, x, height, width);
  1675. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1676. if (!QGLBeginStarted)
  1677. QGLCheckError("glScissor");
  1678. #endif
  1679. }
  1680. // void glShadeModel (GLenum mode);
  1681. static inline void qglShadeModel(GLenum mode)
  1682. {
  1683. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1684. if (QGLLogGLCalls)
  1685. fprintf(QGLDebugFile(), "glShadeModel(mode=%s)\n", StringFromGLEnumerant( mode ));
  1686. #endif
  1687. glShadeModel(mode);
  1688. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1689. if (!QGLBeginStarted)
  1690. QGLCheckError("glShadeModel");
  1691. #endif
  1692. }
  1693. // void glStencilFunc (GLenum func, GLint ref, GLuint mask);
  1694. static inline void qglStencilFunc(GLenum func, GLint ref, GLuint mask)
  1695. {
  1696. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1697. if (QGLLogGLCalls)
  1698. fprintf(QGLDebugFile(), "glStencilFunc(func=%s, ref=%ld, mask=%lu)\n", StringFromGLEnumerant( func ), ref, mask);
  1699. #endif
  1700. glStencilFunc(func, ref, mask);
  1701. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1702. if (!QGLBeginStarted)
  1703. QGLCheckError("glStencilFunc");
  1704. #endif
  1705. }
  1706. // void glStencilMask (GLuint mask);
  1707. static inline void qglStencilMask(GLuint mask)
  1708. {
  1709. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1710. if (QGLLogGLCalls)
  1711. fprintf(QGLDebugFile(), "glStencilMask(mask=%lu)\n", mask);
  1712. #endif
  1713. glStencilMask(mask);
  1714. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1715. if (!QGLBeginStarted)
  1716. QGLCheckError("glStencilMask");
  1717. #endif
  1718. }
  1719. // void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
  1720. static inline void qglStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
  1721. {
  1722. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1723. if (QGLLogGLCalls)
  1724. fprintf(QGLDebugFile(), "glStencilOp(fail=%s, zfail=%s, zpass=%s)\n", StringFromGLEnumerant( fail ), StringFromGLEnumerant( zfail ), StringFromGLEnumerant( zpass ));
  1725. #endif
  1726. glStencilOp(fail, zfail, zpass);
  1727. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1728. if (!QGLBeginStarted)
  1729. QGLCheckError("glStencilOp");
  1730. #endif
  1731. }
  1732. // void glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  1733. static inline void qglTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  1734. {
  1735. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1736. if (QGLLogGLCalls)
  1737. fprintf(QGLDebugFile(), "glTexCoordPointer(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer);
  1738. #endif
  1739. glTexCoordPointer(size, type, stride, pointer);
  1740. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1741. if (!QGLBeginStarted)
  1742. QGLCheckError("glTexCoordPointer");
  1743. #endif
  1744. }
  1745. // void glTexEnvi (GLenum target, GLenum pname, GLint param);
  1746. static inline void qglTexEnvi(GLenum target, GLenum pname, GLint param)
  1747. {
  1748. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1749. if (QGLLogGLCalls)
  1750. fprintf(QGLDebugFile(), "glTexEnvi(target=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param);
  1751. #endif
  1752. glTexEnvi(target, pname, param);
  1753. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1754. if (!QGLBeginStarted)
  1755. QGLCheckError("glTexEnvi");
  1756. #endif
  1757. }
  1758. // void glTexEnvx (GLenum target, GLenum pname, GLfixed param);
  1759. static inline void qglTexEnvx(GLenum target, GLenum pname, GLfixed param)
  1760. {
  1761. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1762. if (QGLLogGLCalls)
  1763. fprintf(QGLDebugFile(), "glTexEnvx(target=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param);
  1764. #endif
  1765. glTexEnvx(target, pname, param);
  1766. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1767. if (!QGLBeginStarted)
  1768. QGLCheckError("glTexEnvx");
  1769. #endif
  1770. }
  1771. // void glTexEnviv (GLenum target, GLenum pname, const GLint *params);
  1772. static inline void qglTexEnviv(GLenum target, GLenum pname, const GLint *params)
  1773. {
  1774. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1775. if (QGLLogGLCalls)
  1776. fprintf(QGLDebugFile(), "glTexEnviv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  1777. #endif
  1778. glTexEnviv(target, pname, params);
  1779. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1780. if (!QGLBeginStarted)
  1781. QGLCheckError("glTexEnviv");
  1782. #endif
  1783. }
  1784. // void glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
  1785. static inline void qglTexEnvxv(GLenum target, GLenum pname, const GLfixed *params)
  1786. {
  1787. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1788. if (QGLLogGLCalls)
  1789. fprintf(QGLDebugFile(), "glTexEnvxv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  1790. #endif
  1791. glTexEnvxv(target, pname, params);
  1792. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1793. if (!QGLBeginStarted)
  1794. QGLCheckError("glTexEnvxv");
  1795. #endif
  1796. }
  1797. // void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  1798. static inline void qglTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
  1799. {
  1800. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1801. if (QGLLogGLCalls)
  1802. fprintf(QGLDebugFile(), "glTexImage2D(target=%s, level=%ld, internalformat=%ld, width=%ld, height=%ld, border=%ld, format=%s, type=%s, pixels=%p)\n", StringFromGLEnumerant( target ), level, internalformat, width, height, border, StringFromGLEnumerant( format ), StringFromGLEnumerant( type ), pixels);
  1803. #endif
  1804. glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
  1805. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1806. if (!QGLBeginStarted)
  1807. QGLCheckError("glTexImage2D");
  1808. #endif
  1809. }
  1810. // void glTexParameteri (GLenum target, GLenum pname, GLint param);
  1811. static inline void qglTexParameteri(GLenum target, GLenum pname, GLint param)
  1812. {
  1813. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1814. if (QGLLogGLCalls)
  1815. fprintf(QGLDebugFile(), "glTexParameteri(target=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param);
  1816. #endif
  1817. glTexParameteri(target, pname, param);
  1818. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1819. if (!QGLBeginStarted)
  1820. QGLCheckError("glTexParameteri");
  1821. #endif
  1822. }
  1823. // void glTexParameterx (GLenum target, GLenum pname, GLfixed param);
  1824. static inline void qglTexParameterx(GLenum target, GLenum pname, GLfixed param)
  1825. {
  1826. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1827. if (QGLLogGLCalls)
  1828. fprintf(QGLDebugFile(), "glTexParameterx(target=%s, pname=%s, param=%ld)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), param);
  1829. #endif
  1830. glTexParameterx(target, pname, param);
  1831. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1832. if (!QGLBeginStarted)
  1833. QGLCheckError("glTexParameterx");
  1834. #endif
  1835. }
  1836. // void glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
  1837. static inline void qglTexParameteriv(GLenum target, GLenum pname, const GLint *params)
  1838. {
  1839. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1840. if (QGLLogGLCalls)
  1841. fprintf(QGLDebugFile(), "glTexParameteriv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  1842. #endif
  1843. glTexParameteriv(target, pname, params);
  1844. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1845. if (!QGLBeginStarted)
  1846. QGLCheckError("glTexParameteriv");
  1847. #endif
  1848. }
  1849. // void glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
  1850. static inline void qglTexParameterxv(GLenum target, GLenum pname, const GLfixed *params)
  1851. {
  1852. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1853. if (QGLLogGLCalls)
  1854. fprintf(QGLDebugFile(), "glTexParameterxv(target=%s, pname=%s, params=%p)\n", StringFromGLEnumerant( target ), StringFromGLEnumerant( pname ), params);
  1855. #endif
  1856. glTexParameterxv(target, pname, params);
  1857. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1858. if (!QGLBeginStarted)
  1859. QGLCheckError("glTexParameterxv");
  1860. #endif
  1861. }
  1862. // void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  1863. static inline void qglTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
  1864. {
  1865. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1866. if (QGLLogGLCalls)
  1867. fprintf(QGLDebugFile(), "glTexSubImage2D(target=%s, level=%ld, xoffset=%ld, yoffset=%ld, width=%ld, height=%ld, format=%s, type=%s, pixels=%p)\n", StringFromGLEnumerant( target ), level, xoffset, yoffset, width, height, StringFromGLEnumerant( format ), StringFromGLEnumerant( type ), pixels);
  1868. #endif
  1869. glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
  1870. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1871. if (!QGLBeginStarted)
  1872. QGLCheckError("glTexSubImage2D");
  1873. #endif
  1874. }
  1875. // void glTranslatex (GLfixed x, GLfixed y, GLfixed z);
  1876. static inline void qglTranslatex(GLfixed x, GLfixed y, GLfixed z)
  1877. {
  1878. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1879. if (QGLLogGLCalls)
  1880. fprintf(QGLDebugFile(), "glTranslatex(x=%ld, y=%ld, z=%ld)\n", x, y, z);
  1881. #endif
  1882. glTranslatex(x, y, z);
  1883. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1884. if (!QGLBeginStarted)
  1885. QGLCheckError("glTranslatex");
  1886. #endif
  1887. }
  1888. // void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  1889. static inline void qglVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  1890. {
  1891. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1892. if (QGLLogGLCalls)
  1893. fprintf(QGLDebugFile(), "glVertexPointer(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer);
  1894. #endif
  1895. glVertexPointer(size, type, stride, pointer);
  1896. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1897. if (!QGLBeginStarted)
  1898. QGLCheckError("glVertexPointer");
  1899. #endif
  1900. }
  1901. // void glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
  1902. static inline void qglViewport(GLint x, GLint y, GLsizei width, GLsizei height)
  1903. {
  1904. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1905. if (QGLLogGLCalls)
  1906. fprintf(QGLDebugFile(), "glViewport(x=%ld, y=%ld, width=%ld, height=%ld)\n", x, y, width, height);
  1907. #endif
  1908. //extern glconfig_t glConfig;
  1909. int vidHeight = 320;
  1910. glViewport(vidHeight - y - height, x, height, width);
  1911. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1912. if (!QGLBeginStarted)
  1913. QGLCheckError("glViewport");
  1914. #endif
  1915. }
  1916. // void glCurrentPaletteMatrixOES (GLuint matrixpaletteindex);
  1917. static inline void qglCurrentPaletteMatrixOES(GLuint matrixpaletteindex)
  1918. {
  1919. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1920. if (QGLLogGLCalls)
  1921. fprintf(QGLDebugFile(), "glCurrentPaletteMatrixOES(matrixpaletteindex=%lu)\n", matrixpaletteindex);
  1922. #endif
  1923. glCurrentPaletteMatrixOES(matrixpaletteindex);
  1924. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1925. if (!QGLBeginStarted)
  1926. QGLCheckError("glCurrentPaletteMatrixOES");
  1927. #endif
  1928. }
  1929. // void glLoadPaletteFromModelViewMatrixOES (void);
  1930. static inline void qglLoadPaletteFromModelViewMatrixOES(void)
  1931. {
  1932. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1933. if (QGLLogGLCalls)
  1934. fprintf(QGLDebugFile(), "glLoadPaletteFromModelViewMatrixOES(void)\n");
  1935. #endif
  1936. glLoadPaletteFromModelViewMatrixOES();
  1937. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1938. if (!QGLBeginStarted)
  1939. QGLCheckError("glLoadPaletteFromModelViewMatrixOES");
  1940. #endif
  1941. }
  1942. // void glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  1943. static inline void qglMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  1944. {
  1945. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1946. if (QGLLogGLCalls)
  1947. fprintf(QGLDebugFile(), "glMatrixIndexPointerOES(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer);
  1948. #endif
  1949. glMatrixIndexPointerOES(size, type, stride, pointer);
  1950. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1951. if (!QGLBeginStarted)
  1952. QGLCheckError("glMatrixIndexPointerOES");
  1953. #endif
  1954. }
  1955. // void glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  1956. static inline void qglWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  1957. {
  1958. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1959. if (QGLLogGLCalls)
  1960. fprintf(QGLDebugFile(), "glWeightPointerOES(size=%ld, type=%s, stride=%ld, pointer=%p)\n", size, StringFromGLEnumerant( type ), stride, pointer);
  1961. #endif
  1962. glWeightPointerOES(size, type, stride, pointer);
  1963. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1964. if (!QGLBeginStarted)
  1965. QGLCheckError("glWeightPointerOES");
  1966. #endif
  1967. }
  1968. // void glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
  1969. static inline void qglPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer)
  1970. {
  1971. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1972. if (QGLLogGLCalls)
  1973. fprintf(QGLDebugFile(), "glPointSizePointerOES(type=%s, stride=%ld, pointer=%p)\n", StringFromGLEnumerant( type ), stride, pointer);
  1974. #endif
  1975. glPointSizePointerOES(type, stride, pointer);
  1976. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1977. if (!QGLBeginStarted)
  1978. QGLCheckError("glPointSizePointerOES");
  1979. #endif
  1980. }
  1981. // void glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
  1982. static inline void qglDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
  1983. {
  1984. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1985. if (QGLLogGLCalls)
  1986. fprintf(QGLDebugFile(), "glDrawTexsOES(x=%d, y=%d, z=%d, width=%d, height=%d)\n", x, y, z, width, height);
  1987. #endif
  1988. glDrawTexsOES(x, y, z, width, height);
  1989. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  1990. if (!QGLBeginStarted)
  1991. QGLCheckError("glDrawTexsOES");
  1992. #endif
  1993. }
  1994. // void glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
  1995. static inline void qglDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height)
  1996. {
  1997. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  1998. if (QGLLogGLCalls)
  1999. fprintf(QGLDebugFile(), "glDrawTexiOES(x=%ld, y=%ld, z=%ld, width=%ld, height=%ld)\n", x, y, z, width, height);
  2000. #endif
  2001. glDrawTexiOES(x, y, z, width, height);
  2002. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  2003. if (!QGLBeginStarted)
  2004. QGLCheckError("glDrawTexiOES");
  2005. #endif
  2006. }
  2007. // void glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
  2008. static inline void qglDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
  2009. {
  2010. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  2011. if (QGLLogGLCalls)
  2012. fprintf(QGLDebugFile(), "glDrawTexxOES(x=%ld, y=%ld, z=%ld, width=%ld, height=%ld)\n", x, y, z, width, height);
  2013. #endif
  2014. glDrawTexxOES(x, y, z, width, height);
  2015. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  2016. if (!QGLBeginStarted)
  2017. QGLCheckError("glDrawTexxOES");
  2018. #endif
  2019. }
  2020. // void glDrawTexsvOES (const GLshort *coords);
  2021. static inline void qglDrawTexsvOES(const GLshort *coords)
  2022. {
  2023. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  2024. if (QGLLogGLCalls)
  2025. fprintf(QGLDebugFile(), "glDrawTexsvOES(coords=%p)\n", coords);
  2026. #endif
  2027. glDrawTexsvOES(coords);
  2028. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  2029. if (!QGLBeginStarted)
  2030. QGLCheckError("glDrawTexsvOES");
  2031. #endif
  2032. }
  2033. // void glDrawTexivOES (const GLint *coords);
  2034. static inline void qglDrawTexivOES(const GLint *coords)
  2035. {
  2036. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  2037. if (QGLLogGLCalls)
  2038. fprintf(QGLDebugFile(), "glDrawTexivOES(coords=%p)\n", coords);
  2039. #endif
  2040. glDrawTexivOES(coords);
  2041. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  2042. if (!QGLBeginStarted)
  2043. QGLCheckError("glDrawTexivOES");
  2044. #endif
  2045. }
  2046. // void glDrawTexxvOES (const GLfixed *coords);
  2047. static inline void qglDrawTexxvOES(const GLfixed *coords)
  2048. {
  2049. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  2050. if (QGLLogGLCalls)
  2051. fprintf(QGLDebugFile(), "glDrawTexxvOES(coords=%p)\n", coords);
  2052. #endif
  2053. glDrawTexxvOES(coords);
  2054. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  2055. if (!QGLBeginStarted)
  2056. QGLCheckError("glDrawTexxvOES");
  2057. #endif
  2058. }
  2059. // void glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
  2060. static inline void qglDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
  2061. {
  2062. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  2063. if (QGLLogGLCalls)
  2064. fprintf(QGLDebugFile(), "glDrawTexfOES(x=%f, y=%f, z=%f, width=%f, height=%f)\n", x, y, z, width, height);
  2065. #endif
  2066. glDrawTexfOES(x, y, z, width, height);
  2067. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  2068. if (!QGLBeginStarted)
  2069. QGLCheckError("glDrawTexfOES");
  2070. #endif
  2071. }
  2072. // void glDrawTexfvOES (const GLfloat *coords);
  2073. static inline void qglDrawTexfvOES(const GLfloat *coords)
  2074. {
  2075. #if !defined(NDEBUG) && defined(QGL_LOG_GL_CALLS)
  2076. if (QGLLogGLCalls)
  2077. fprintf(QGLDebugFile(), "glDrawTexfvOES(coords=%p)\n", coords);
  2078. #endif
  2079. glDrawTexfvOES(coords);
  2080. #if !defined(NDEBUG) && defined(QGL_CHECK_GL_ERRORS)
  2081. if (!QGLBeginStarted)
  2082. QGLCheckError("glDrawTexfvOES");
  2083. #endif
  2084. }
  2085. // Prevent calls to the 'normal' GL functions
  2086. #define glAlphaFunc CALL_THE_QGL_VERSION_OF_glAlphaFunc
  2087. #define glClearColor CALL_THE_QGL_VERSION_OF_glClearColor
  2088. #define glClearDepthf CALL_THE_QGL_VERSION_OF_glClearDepthf
  2089. #define glClipPlanef CALL_THE_QGL_VERSION_OF_glClipPlanef
  2090. #define glDepthRangef CALL_THE_QGL_VERSION_OF_glDepthRangef
  2091. #define glFogf CALL_THE_QGL_VERSION_OF_glFogf
  2092. #define glFogfv CALL_THE_QGL_VERSION_OF_glFogfv
  2093. #define glFrustumf CALL_THE_QGL_VERSION_OF_glFrustumf
  2094. #define glGetClipPlanef CALL_THE_QGL_VERSION_OF_glGetClipPlanef
  2095. #define glGetFloatv CALL_THE_QGL_VERSION_OF_glGetFloatv
  2096. #define glGetLightfv CALL_THE_QGL_VERSION_OF_glGetLightfv
  2097. #define glGetMaterialfv CALL_THE_QGL_VERSION_OF_glGetMaterialfv
  2098. #define glGetTexEnvfv CALL_THE_QGL_VERSION_OF_glGetTexEnvfv
  2099. #define glGetTexParameterfv CALL_THE_QGL_VERSION_OF_glGetTexParameterfv
  2100. #define glLightModelf CALL_THE_QGL_VERSION_OF_glLightModelf
  2101. #define glLightModelfv CALL_THE_QGL_VERSION_OF_glLightModelfv
  2102. #define glLightf CALL_THE_QGL_VERSION_OF_glLightf
  2103. #define glLightfv CALL_THE_QGL_VERSION_OF_glLightfv
  2104. #define glLineWidth CALL_THE_QGL_VERSION_OF_glLineWidth
  2105. #define glLoadMatrixf CALL_THE_QGL_VERSION_OF_glLoadMatrixf
  2106. #define glMaterialf CALL_THE_QGL_VERSION_OF_glMaterialf
  2107. #define glMaterialfv CALL_THE_QGL_VERSION_OF_glMaterialfv
  2108. #define glMultMatrixf CALL_THE_QGL_VERSION_OF_glMultMatrixf
  2109. #define glMultiTexCoord4f CALL_THE_QGL_VERSION_OF_glMultiTexCoord4f
  2110. #define glNormal3f CALL_THE_QGL_VERSION_OF_glNormal3f
  2111. #define glOrthof CALL_THE_QGL_VERSION_OF_glOrthof
  2112. #define glPointParameterf CALL_THE_QGL_VERSION_OF_glPointParameterf
  2113. #define glPointParameterfv CALL_THE_QGL_VERSION_OF_glPointParameterfv
  2114. #define glPointSize CALL_THE_QGL_VERSION_OF_glPointSize
  2115. #define glPolygonOffset CALL_THE_QGL_VERSION_OF_glPolygonOffset
  2116. #define glRotatef CALL_THE_QGL_VERSION_OF_glRotatef
  2117. #define glScalef CALL_THE_QGL_VERSION_OF_glScalef
  2118. #define glTexEnvf CALL_THE_QGL_VERSION_OF_glTexEnvf
  2119. #define glTexEnvfv CALL_THE_QGL_VERSION_OF_glTexEnvfv
  2120. #define glTexParameterf CALL_THE_QGL_VERSION_OF_glTexParameterf
  2121. #define glTexParameterfv CALL_THE_QGL_VERSION_OF_glTexParameterfv
  2122. #define glTranslatef CALL_THE_QGL_VERSION_OF_glTranslatef
  2123. #define glActiveTexture CALL_THE_QGL_VERSION_OF_glActiveTexture
  2124. #define glAlphaFuncx CALL_THE_QGL_VERSION_OF_glAlphaFuncx
  2125. #define glBindBuffer CALL_THE_QGL_VERSION_OF_glBindBuffer
  2126. #define glBindTexture CALL_THE_QGL_VERSION_OF_glBindTexture
  2127. #define glBlendFunc CALL_THE_QGL_VERSION_OF_glBlendFunc
  2128. #define glBufferData CALL_THE_QGL_VERSION_OF_glBufferData
  2129. #define glBufferSubData CALL_THE_QGL_VERSION_OF_glBufferSubData
  2130. #define glClear CALL_THE_QGL_VERSION_OF_glClear
  2131. #define glClearColorx CALL_THE_QGL_VERSION_OF_glClearColorx
  2132. #define glClearDepthx CALL_THE_QGL_VERSION_OF_glClearDepthx
  2133. #define glClearStencil CALL_THE_QGL_VERSION_OF_glClearStencil
  2134. #define glClientActiveTexture CALL_THE_QGL_VERSION_OF_glClientActiveTexture
  2135. #define glClipPlanex CALL_THE_QGL_VERSION_OF_glClipPlanex
  2136. #define glColor4ub CALL_THE_QGL_VERSION_OF_glColor4ub
  2137. #define glColor4x CALL_THE_QGL_VERSION_OF_glColor4x
  2138. #define glColorMask CALL_THE_QGL_VERSION_OF_glColorMask
  2139. #define glColorPointer CALL_THE_QGL_VERSION_OF_glColorPointer
  2140. #define glCompressedTexImage2D CALL_THE_QGL_VERSION_OF_glCompressedTexImage2D
  2141. #define glCompressedTexSubImage2D CALL_THE_QGL_VERSION_OF_glCompressedTexSubImage2D
  2142. #define glCopyTexImage2D CALL_THE_QGL_VERSION_OF_glCopyTexImage2D
  2143. #define glCopyTexSubImage2D CALL_THE_QGL_VERSION_OF_glCopyTexSubImage2D
  2144. #define glCullFace CALL_THE_QGL_VERSION_OF_glCullFace
  2145. #define glDeleteBuffers CALL_THE_QGL_VERSION_OF_glDeleteBuffers
  2146. #define glDeleteTextures CALL_THE_QGL_VERSION_OF_glDeleteTextures
  2147. #define glDepthFunc CALL_THE_QGL_VERSION_OF_glDepthFunc
  2148. #define glDepthMask CALL_THE_QGL_VERSION_OF_glDepthMask
  2149. #define glDepthRangex CALL_THE_QGL_VERSION_OF_glDepthRangex
  2150. #define glDisable CALL_THE_QGL_VERSION_OF_glDisable
  2151. #define glDisableClientState CALL_THE_QGL_VERSION_OF_glDisableClientState
  2152. #define glDrawArrays CALL_THE_QGL_VERSION_OF_glDrawArrays
  2153. #define glDrawElements CALL_THE_QGL_VERSION_OF_glDrawElements
  2154. #define glEnable CALL_THE_QGL_VERSION_OF_glEnable
  2155. #define glEnableClientState CALL_THE_QGL_VERSION_OF_glEnableClientState
  2156. #define glFinish CALL_THE_QGL_VERSION_OF_glFinish
  2157. #define glFlush CALL_THE_QGL_VERSION_OF_glFlush
  2158. #define glFogx CALL_THE_QGL_VERSION_OF_glFogx
  2159. #define glFogxv CALL_THE_QGL_VERSION_OF_glFogxv
  2160. #define glFrontFace CALL_THE_QGL_VERSION_OF_glFrontFace
  2161. #define glFrustumx CALL_THE_QGL_VERSION_OF_glFrustumx
  2162. #define glGetBooleanv CALL_THE_QGL_VERSION_OF_glGetBooleanv
  2163. #define glGetBufferParameteriv CALL_THE_QGL_VERSION_OF_glGetBufferParameteriv
  2164. #define glGetClipPlanex CALL_THE_QGL_VERSION_OF_glGetClipPlanex
  2165. #define glGenBuffers CALL_THE_QGL_VERSION_OF_glGenBuffers
  2166. #define glGenTextures CALL_THE_QGL_VERSION_OF_glGenTextures
  2167. #define glGetError CALL_THE_QGL_VERSION_OF_glGetError
  2168. #define glGetFixedv CALL_THE_QGL_VERSION_OF_glGetFixedv
  2169. #define glGetIntegerv CALL_THE_QGL_VERSION_OF_glGetIntegerv
  2170. #define glGetLightxv CALL_THE_QGL_VERSION_OF_glGetLightxv
  2171. #define glGetMaterialxv CALL_THE_QGL_VERSION_OF_glGetMaterialxv
  2172. #define glGetPointerv CALL_THE_QGL_VERSION_OF_glGetPointerv
  2173. #define glGetString CALL_THE_QGL_VERSION_OF_glGetString
  2174. #define glGetTexEnviv CALL_THE_QGL_VERSION_OF_glGetTexEnviv
  2175. #define glGetTexEnvxv CALL_THE_QGL_VERSION_OF_glGetTexEnvxv
  2176. #define glGetTexParameteriv CALL_THE_QGL_VERSION_OF_glGetTexParameteriv
  2177. #define glGetTexParameterxv CALL_THE_QGL_VERSION_OF_glGetTexParameterxv
  2178. #define glHint CALL_THE_QGL_VERSION_OF_glHint
  2179. #define glIsBuffer CALL_THE_QGL_VERSION_OF_glIsBuffer
  2180. #define glIsEnabled CALL_THE_QGL_VERSION_OF_glIsEnabled
  2181. #define glIsTexture CALL_THE_QGL_VERSION_OF_glIsTexture
  2182. #define glLightModelx CALL_THE_QGL_VERSION_OF_glLightModelx
  2183. #define glLightModelxv CALL_THE_QGL_VERSION_OF_glLightModelxv
  2184. #define glLightx CALL_THE_QGL_VERSION_OF_glLightx
  2185. #define glLightxv CALL_THE_QGL_VERSION_OF_glLightxv
  2186. #define glLineWidthx CALL_THE_QGL_VERSION_OF_glLineWidthx
  2187. #define glLoadIdentity CALL_THE_QGL_VERSION_OF_glLoadIdentity
  2188. #define glLoadMatrixx CALL_THE_QGL_VERSION_OF_glLoadMatrixx
  2189. #define glLogicOp CALL_THE_QGL_VERSION_OF_glLogicOp
  2190. #define glMaterialx CALL_THE_QGL_VERSION_OF_glMaterialx
  2191. #define glMaterialxv CALL_THE_QGL_VERSION_OF_glMaterialxv
  2192. #define glMatrixMode CALL_THE_QGL_VERSION_OF_glMatrixMode
  2193. #define glMultMatrixx CALL_THE_QGL_VERSION_OF_glMultMatrixx
  2194. #define glMultiTexCoord4x CALL_THE_QGL_VERSION_OF_glMultiTexCoord4x
  2195. #define glNormal3x CALL_THE_QGL_VERSION_OF_glNormal3x
  2196. #define glNormalPointer CALL_THE_QGL_VERSION_OF_glNormalPointer
  2197. #define glOrthox CALL_THE_QGL_VERSION_OF_glOrthox
  2198. #define glPixelStorei CALL_THE_QGL_VERSION_OF_glPixelStorei
  2199. #define glPointParameterx CALL_THE_QGL_VERSION_OF_glPointParameterx
  2200. #define glPointParameterxv CALL_THE_QGL_VERSION_OF_glPointParameterxv
  2201. #define glPointSizex CALL_THE_QGL_VERSION_OF_glPointSizex
  2202. #define glPolygonOffsetx CALL_THE_QGL_VERSION_OF_glPolygonOffsetx
  2203. #define glPopMatrix CALL_THE_QGL_VERSION_OF_glPopMatrix
  2204. #define glPushMatrix CALL_THE_QGL_VERSION_OF_glPushMatrix
  2205. #define glReadPixels CALL_THE_QGL_VERSION_OF_glReadPixels
  2206. #define glRotatex CALL_THE_QGL_VERSION_OF_glRotatex
  2207. #define glSampleCoverage CALL_THE_QGL_VERSION_OF_glSampleCoverage
  2208. #define glSampleCoveragex CALL_THE_QGL_VERSION_OF_glSampleCoveragex
  2209. #define glScalex CALL_THE_QGL_VERSION_OF_glScalex
  2210. #define glScissor CALL_THE_QGL_VERSION_OF_glScissor
  2211. #define glShadeModel CALL_THE_QGL_VERSION_OF_glShadeModel
  2212. #define glStencilFunc CALL_THE_QGL_VERSION_OF_glStencilFunc
  2213. #define glStencilMask CALL_THE_QGL_VERSION_OF_glStencilMask
  2214. #define glStencilOp CALL_THE_QGL_VERSION_OF_glStencilOp
  2215. #define glTexCoordPointer CALL_THE_QGL_VERSION_OF_glTexCoordPointer
  2216. #define glTexEnvi CALL_THE_QGL_VERSION_OF_glTexEnvi
  2217. #define glTexEnvx CALL_THE_QGL_VERSION_OF_glTexEnvx
  2218. #define glTexEnviv CALL_THE_QGL_VERSION_OF_glTexEnviv
  2219. #define glTexEnvxv CALL_THE_QGL_VERSION_OF_glTexEnvxv
  2220. #define glTexImage2D CALL_THE_QGL_VERSION_OF_glTexImage2D
  2221. #define glTexParameteri CALL_THE_QGL_VERSION_OF_glTexParameteri
  2222. #define glTexParameterx CALL_THE_QGL_VERSION_OF_glTexParameterx
  2223. #define glTexParameteriv CALL_THE_QGL_VERSION_OF_glTexParameteriv
  2224. #define glTexParameterxv CALL_THE_QGL_VERSION_OF_glTexParameterxv
  2225. #define glTexSubImage2D CALL_THE_QGL_VERSION_OF_glTexSubImage2D
  2226. #define glTranslatex CALL_THE_QGL_VERSION_OF_glTranslatex
  2227. #define glVertexPointer CALL_THE_QGL_VERSION_OF_glVertexPointer
  2228. #define glViewport CALL_THE_QGL_VERSION_OF_glViewport
  2229. #define glCurrentPaletteMatrixOES CALL_THE_QGL_VERSION_OF_glCurrentPaletteMatrixOES
  2230. #define glLoadPaletteFromModelViewMatrixOES CALL_THE_QGL_VERSION_OF_glLoadPaletteFromModelViewMatrixOES
  2231. #define glMatrixIndexPointerOES CALL_THE_QGL_VERSION_OF_glMatrixIndexPointerOES
  2232. #define glWeightPointerOES CALL_THE_QGL_VERSION_OF_glWeightPointerOES
  2233. #define glPointSizePointerOES CALL_THE_QGL_VERSION_OF_glPointSizePointerOES
  2234. #define glDrawTexsOES CALL_THE_QGL_VERSION_OF_glDrawTexsOES
  2235. #define glDrawTexiOES CALL_THE_QGL_VERSION_OF_glDrawTexiOES
  2236. #define glDrawTexxOES CALL_THE_QGL_VERSION_OF_glDrawTexxOES
  2237. #define glDrawTexsvOES CALL_THE_QGL_VERSION_OF_glDrawTexsvOES
  2238. #define glDrawTexivOES CALL_THE_QGL_VERSION_OF_glDrawTexivOES
  2239. #define glDrawTexxvOES CALL_THE_QGL_VERSION_OF_glDrawTexxvOES
  2240. #define glDrawTexfOES CALL_THE_QGL_VERSION_OF_glDrawTexfOES
  2241. #define glDrawTexfvOES CALL_THE_QGL_VERSION_OF_glDrawTexfvOES
  2242. #endif // _IPHONE_QGL_H_