iphone_qgl.h 88 KB

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