qglfunctions.h 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2016 The Qt Company Ltd.
  4. ** Contact: https://www.qt.io/licensing/
  5. **
  6. ** This file is part of the QtOpenGL module of the Qt Toolkit.
  7. **
  8. ** $QT_BEGIN_LICENSE:LGPL$
  9. ** Commercial License Usage
  10. ** Licensees holding valid commercial Qt licenses may use this file in
  11. ** accordance with the commercial license agreement provided with the
  12. ** Software or, alternatively, in accordance with the terms contained in
  13. ** a written agreement between you and The Qt Company. For licensing terms
  14. ** and conditions see https://www.qt.io/terms-conditions. For further
  15. ** information use the contact form at https://www.qt.io/contact-us.
  16. **
  17. ** GNU Lesser General Public License Usage
  18. ** Alternatively, this file may be used under the terms of the GNU Lesser
  19. ** General Public License version 3 as published by the Free Software
  20. ** Foundation and appearing in the file LICENSE.LGPL3 included in the
  21. ** packaging of this file. Please review the following information to
  22. ** ensure the GNU Lesser General Public License version 3 requirements
  23. ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
  24. **
  25. ** GNU General Public License Usage
  26. ** Alternatively, this file may be used under the terms of the GNU
  27. ** General Public License version 2.0 or (at your option) the GNU General
  28. ** Public license version 3 or any later version approved by the KDE Free
  29. ** Qt Foundation. The licenses are as published by the Free Software
  30. ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
  31. ** included in the packaging of this file. Please review the following
  32. ** information to ensure the GNU General Public License requirements will
  33. ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
  34. ** https://www.gnu.org/licenses/gpl-3.0.html.
  35. **
  36. ** $QT_END_LICENSE$
  37. **
  38. ****************************************************************************/
  39. #ifndef QGLFUNCTIONS_H
  40. #define QGLFUNCTIONS_H
  41. #include <QtOpenGL/qgl.h>
  42. #include <QtGui/qopenglcontext.h>
  43. #include <QtGui/qopenglfunctions.h>
  44. QT_BEGIN_NAMESPACE
  45. struct QGLFunctionsPrivate;
  46. class Q_OPENGL_EXPORT QGLFunctions
  47. {
  48. public:
  49. QGLFunctions();
  50. explicit QGLFunctions(const QGLContext *context);
  51. ~QGLFunctions() {}
  52. enum OpenGLFeature
  53. {
  54. Multitexture = 0x0001,
  55. Shaders = 0x0002,
  56. Buffers = 0x0004,
  57. Framebuffers = 0x0008,
  58. BlendColor = 0x0010,
  59. BlendEquation = 0x0020,
  60. BlendEquationSeparate = 0x0040,
  61. BlendFuncSeparate = 0x0080,
  62. BlendSubtract = 0x0100,
  63. CompressedTextures = 0x0200,
  64. Multisample = 0x0400,
  65. StencilSeparate = 0x0800,
  66. NPOTTextures = 0x1000
  67. };
  68. Q_DECLARE_FLAGS(OpenGLFeatures, OpenGLFeature)
  69. QGLFunctions::OpenGLFeatures openGLFeatures() const;
  70. bool hasOpenGLFeature(QGLFunctions::OpenGLFeature feature) const;
  71. void initializeGLFunctions(const QGLContext *context = Q_NULLPTR);
  72. void glActiveTexture(GLenum texture);
  73. void glAttachShader(GLuint program, GLuint shader);
  74. void glBindAttribLocation(GLuint program, GLuint index, const char* name);
  75. void glBindBuffer(GLenum target, GLuint buffer);
  76. void glBindFramebuffer(GLenum target, GLuint framebuffer);
  77. void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
  78. void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  79. void glBlendEquation(GLenum mode);
  80. void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
  81. void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
  82. void glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage);
  83. void glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data);
  84. GLenum glCheckFramebufferStatus(GLenum target);
  85. void glClearDepthf(GLclampf depth);
  86. void glCompileShader(GLuint shader);
  87. void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
  88. void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
  89. GLuint glCreateProgram();
  90. GLuint glCreateShader(GLenum type);
  91. void glDeleteBuffers(GLsizei n, const GLuint* buffers);
  92. void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
  93. void glDeleteProgram(GLuint program);
  94. void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
  95. void glDeleteShader(GLuint shader);
  96. void glDepthRangef(GLclampf zNear, GLclampf zFar);
  97. void glDetachShader(GLuint program, GLuint shader);
  98. void glDisableVertexAttribArray(GLuint index);
  99. void glEnableVertexAttribArray(GLuint index);
  100. void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
  101. void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
  102. void glGenBuffers(GLsizei n, GLuint* buffers);
  103. void glGenerateMipmap(GLenum target);
  104. void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
  105. void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
  106. void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
  107. void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
  108. void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
  109. int glGetAttribLocation(GLuint program, const char* name);
  110. void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
  111. void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
  112. void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
  113. void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
  114. void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
  115. void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
  116. void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
  117. void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
  118. void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
  119. void glGetUniformfv(GLuint program, GLint location, GLfloat* params);
  120. void glGetUniformiv(GLuint program, GLint location, GLint* params);
  121. int glGetUniformLocation(GLuint program, const char* name);
  122. void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
  123. void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
  124. void glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
  125. GLboolean glIsBuffer(GLuint buffer);
  126. GLboolean glIsFramebuffer(GLuint framebuffer);
  127. GLboolean glIsProgram(GLuint program);
  128. GLboolean glIsRenderbuffer(GLuint renderbuffer);
  129. GLboolean glIsShader(GLuint shader);
  130. void glLinkProgram(GLuint program);
  131. void glReleaseShaderCompiler();
  132. void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
  133. void glSampleCoverage(GLclampf value, GLboolean invert);
  134. void glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
  135. void glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length);
  136. void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
  137. void glStencilMaskSeparate(GLenum face, GLuint mask);
  138. void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
  139. void glUniform1f(GLint location, GLfloat x);
  140. void glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
  141. void glUniform1i(GLint location, GLint x);
  142. void glUniform1iv(GLint location, GLsizei count, const GLint* v);
  143. void glUniform2f(GLint location, GLfloat x, GLfloat y);
  144. void glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
  145. void glUniform2i(GLint location, GLint x, GLint y);
  146. void glUniform2iv(GLint location, GLsizei count, const GLint* v);
  147. void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
  148. void glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
  149. void glUniform3i(GLint location, GLint x, GLint y, GLint z);
  150. void glUniform3iv(GLint location, GLsizei count, const GLint* v);
  151. void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  152. void glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
  153. void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
  154. void glUniform4iv(GLint location, GLsizei count, const GLint* v);
  155. void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  156. void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  157. void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  158. void glUseProgram(GLuint program);
  159. void glValidateProgram(GLuint program);
  160. void glVertexAttrib1f(GLuint indx, GLfloat x);
  161. void glVertexAttrib1fv(GLuint indx, const GLfloat* values);
  162. void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
  163. void glVertexAttrib2fv(GLuint indx, const GLfloat* values);
  164. void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
  165. void glVertexAttrib3fv(GLuint indx, const GLfloat* values);
  166. void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  167. void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
  168. void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
  169. private:
  170. QGLFunctionsPrivate *d_ptr;
  171. static bool isInitialized(const QGLFunctionsPrivate *d) { return d != Q_NULLPTR; }
  172. };
  173. Q_DECLARE_OPERATORS_FOR_FLAGS(QGLFunctions::OpenGLFeatures)
  174. struct QGLFunctionsPrivate
  175. {
  176. QGLFunctionsPrivate(const QGLContext *context = Q_NULLPTR);
  177. QOpenGLFunctions *funcs;
  178. };
  179. inline void QGLFunctions::glActiveTexture(GLenum texture)
  180. {
  181. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  182. d_ptr->funcs->glActiveTexture(texture);
  183. }
  184. inline void QGLFunctions::glAttachShader(GLuint program, GLuint shader)
  185. {
  186. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  187. d_ptr->funcs->glAttachShader(program, shader);
  188. }
  189. inline void QGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name)
  190. {
  191. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  192. d_ptr->funcs->glBindAttribLocation(program, index, name);
  193. }
  194. inline void QGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
  195. {
  196. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  197. d_ptr->funcs->glBindBuffer(target, buffer);
  198. }
  199. inline void QGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)
  200. {
  201. if (framebuffer == 0)
  202. framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject();
  203. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  204. d_ptr->funcs->glBindFramebuffer(target, framebuffer);
  205. }
  206. inline void QGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
  207. {
  208. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  209. d_ptr->funcs->glBindRenderbuffer(target, renderbuffer);
  210. }
  211. inline void QGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  212. {
  213. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  214. d_ptr->funcs->glBlendColor(red, green, blue, alpha);
  215. }
  216. inline void QGLFunctions::glBlendEquation(GLenum mode)
  217. {
  218. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  219. d_ptr->funcs->glBlendEquation(mode);
  220. }
  221. inline void QGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
  222. {
  223. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  224. d_ptr->funcs->glBlendEquationSeparate(modeRGB, modeAlpha);
  225. }
  226. inline void QGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
  227. {
  228. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  229. d_ptr->funcs->glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
  230. }
  231. inline void QGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage)
  232. {
  233. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  234. d_ptr->funcs->glBufferData(target, size, data, usage);
  235. }
  236. inline void QGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data)
  237. {
  238. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  239. d_ptr->funcs->glBufferSubData(target, offset, size, data);
  240. }
  241. inline GLenum QGLFunctions::glCheckFramebufferStatus(GLenum target)
  242. {
  243. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  244. return d_ptr->funcs->glCheckFramebufferStatus(target);
  245. }
  246. inline void QGLFunctions::glClearDepthf(GLclampf depth)
  247. {
  248. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  249. return d_ptr->funcs->glClearDepthf(depth);
  250. }
  251. inline void QGLFunctions::glCompileShader(GLuint shader)
  252. {
  253. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  254. d_ptr->funcs->glCompileShader(shader);
  255. }
  256. inline void QGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
  257. {
  258. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  259. d_ptr->funcs->glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
  260. }
  261. inline void QGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
  262. {
  263. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  264. d_ptr->funcs->glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
  265. }
  266. inline GLuint QGLFunctions::glCreateProgram()
  267. {
  268. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  269. return d_ptr->funcs->glCreateProgram();
  270. }
  271. inline GLuint QGLFunctions::glCreateShader(GLenum type)
  272. {
  273. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  274. return d_ptr->funcs->glCreateShader(type);
  275. }
  276. inline void QGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
  277. {
  278. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  279. d_ptr->funcs->glDeleteBuffers(n, buffers);
  280. }
  281. inline void QGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
  282. {
  283. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  284. d_ptr->funcs->glDeleteFramebuffers(n, framebuffers);
  285. }
  286. inline void QGLFunctions::glDeleteProgram(GLuint program)
  287. {
  288. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  289. d_ptr->funcs->glDeleteProgram(program);
  290. }
  291. inline void QGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
  292. {
  293. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  294. d_ptr->funcs->glDeleteRenderbuffers(n, renderbuffers);
  295. }
  296. inline void QGLFunctions::glDeleteShader(GLuint shader)
  297. {
  298. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  299. d_ptr->funcs->glDeleteShader(shader);
  300. }
  301. inline void QGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
  302. {
  303. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  304. return d_ptr->funcs->glDepthRangef(zNear, zFar);
  305. }
  306. inline void QGLFunctions::glDetachShader(GLuint program, GLuint shader)
  307. {
  308. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  309. d_ptr->funcs->glDetachShader(program, shader);
  310. }
  311. inline void QGLFunctions::glDisableVertexAttribArray(GLuint index)
  312. {
  313. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  314. d_ptr->funcs->glDisableVertexAttribArray(index);
  315. }
  316. inline void QGLFunctions::glEnableVertexAttribArray(GLuint index)
  317. {
  318. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  319. d_ptr->funcs->glEnableVertexAttribArray(index);
  320. }
  321. inline void QGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
  322. {
  323. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  324. d_ptr->funcs->glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
  325. }
  326. inline void QGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
  327. {
  328. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  329. d_ptr->funcs->glFramebufferTexture2D(target, attachment, textarget, texture, level);
  330. }
  331. inline void QGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
  332. {
  333. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  334. d_ptr->funcs->glGenBuffers(n, buffers);
  335. }
  336. inline void QGLFunctions::glGenerateMipmap(GLenum target)
  337. {
  338. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  339. d_ptr->funcs->glGenerateMipmap(target);
  340. }
  341. inline void QGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
  342. {
  343. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  344. d_ptr->funcs->glGenFramebuffers(n, framebuffers);
  345. }
  346. inline void QGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
  347. {
  348. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  349. d_ptr->funcs->glGenRenderbuffers(n, renderbuffers);
  350. }
  351. inline void QGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
  352. {
  353. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  354. d_ptr->funcs->glGetActiveAttrib(program, index, bufsize, length, size, type, name);
  355. }
  356. inline void QGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
  357. {
  358. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  359. d_ptr->funcs->glGetActiveUniform(program, index, bufsize, length, size, type, name);
  360. }
  361. inline void QGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
  362. {
  363. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  364. d_ptr->funcs->glGetAttachedShaders(program, maxcount, count, shaders);
  365. }
  366. inline int QGLFunctions::glGetAttribLocation(GLuint program, const char* name)
  367. {
  368. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  369. return d_ptr->funcs->glGetAttribLocation(program, name);
  370. }
  371. inline void QGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
  372. {
  373. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  374. d_ptr->funcs->glGetBufferParameteriv(target, pname, params);
  375. }
  376. inline void QGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
  377. {
  378. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  379. d_ptr->funcs->glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
  380. }
  381. inline void QGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint* params)
  382. {
  383. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  384. d_ptr->funcs->glGetProgramiv(program, pname, params);
  385. }
  386. inline void QGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
  387. {
  388. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  389. d_ptr->funcs->glGetProgramInfoLog(program, bufsize, length, infolog);
  390. }
  391. inline void QGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
  392. {
  393. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  394. d_ptr->funcs->glGetRenderbufferParameteriv(target, pname, params);
  395. }
  396. inline void QGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
  397. {
  398. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  399. d_ptr->funcs->glGetShaderiv(shader, pname, params);
  400. }
  401. inline void QGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
  402. {
  403. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  404. d_ptr->funcs->glGetShaderInfoLog(shader, bufsize, length, infolog);
  405. }
  406. inline void QGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
  407. {
  408. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  409. d_ptr->funcs->glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
  410. }
  411. inline void QGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
  412. {
  413. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  414. d_ptr->funcs->glGetShaderSource(shader, bufsize, length, source);
  415. }
  416. inline void QGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat* params)
  417. {
  418. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  419. d_ptr->funcs->glGetUniformfv(program, location, params);
  420. }
  421. inline void QGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params)
  422. {
  423. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  424. d_ptr->funcs->glGetUniformiv(program, location, params);
  425. }
  426. inline int QGLFunctions::glGetUniformLocation(GLuint program, const char* name)
  427. {
  428. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  429. return d_ptr->funcs->glGetUniformLocation(program, name);
  430. }
  431. inline void QGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
  432. {
  433. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  434. d_ptr->funcs->glGetVertexAttribfv(index, pname, params);
  435. }
  436. inline void QGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
  437. {
  438. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  439. d_ptr->funcs->glGetVertexAttribiv(index, pname, params);
  440. }
  441. inline void QGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
  442. {
  443. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  444. d_ptr->funcs->glGetVertexAttribPointerv(index, pname, pointer);
  445. }
  446. inline GLboolean QGLFunctions::glIsBuffer(GLuint buffer)
  447. {
  448. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  449. return d_ptr->funcs->glIsBuffer(buffer);
  450. }
  451. inline GLboolean QGLFunctions::glIsFramebuffer(GLuint framebuffer)
  452. {
  453. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  454. return d_ptr->funcs->glIsFramebuffer(framebuffer);
  455. }
  456. inline GLboolean QGLFunctions::glIsProgram(GLuint program)
  457. {
  458. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  459. return d_ptr->funcs->glIsProgram(program);
  460. }
  461. inline GLboolean QGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
  462. {
  463. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  464. return d_ptr->funcs->glIsRenderbuffer(renderbuffer);
  465. }
  466. inline GLboolean QGLFunctions::glIsShader(GLuint shader)
  467. {
  468. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  469. return d_ptr->funcs->glIsShader(shader);
  470. }
  471. inline void QGLFunctions::glLinkProgram(GLuint program)
  472. {
  473. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  474. d_ptr->funcs->glLinkProgram(program);
  475. }
  476. inline void QGLFunctions::glReleaseShaderCompiler()
  477. {
  478. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  479. d_ptr->funcs->glReleaseShaderCompiler();
  480. }
  481. inline void QGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
  482. {
  483. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  484. d_ptr->funcs->glRenderbufferStorage(target, internalformat, width, height);
  485. }
  486. inline void QGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
  487. {
  488. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  489. d_ptr->funcs->glSampleCoverage(value, invert);
  490. }
  491. inline void QGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)
  492. {
  493. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  494. d_ptr->funcs->glShaderBinary(n, shaders, binaryformat, binary, length);
  495. }
  496. inline void QGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
  497. {
  498. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  499. d_ptr->funcs->glShaderSource(shader, count, string, length);
  500. }
  501. inline void QGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
  502. {
  503. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  504. d_ptr->funcs->glStencilFuncSeparate(face, func, ref, mask);
  505. }
  506. inline void QGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
  507. {
  508. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  509. d_ptr->funcs->glStencilMaskSeparate(face, mask);
  510. }
  511. inline void QGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
  512. {
  513. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  514. d_ptr->funcs->glStencilOpSeparate(face, fail, zfail, zpass);
  515. }
  516. inline void QGLFunctions::glUniform1f(GLint location, GLfloat x)
  517. {
  518. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  519. d_ptr->funcs->glUniform1f(location, x);
  520. }
  521. inline void QGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
  522. {
  523. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  524. d_ptr->funcs->glUniform1fv(location, count, v);
  525. }
  526. inline void QGLFunctions::glUniform1i(GLint location, GLint x)
  527. {
  528. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  529. d_ptr->funcs->glUniform1i(location, x);
  530. }
  531. inline void QGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint* v)
  532. {
  533. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  534. d_ptr->funcs->glUniform1iv(location, count, v);
  535. }
  536. inline void QGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
  537. {
  538. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  539. d_ptr->funcs->glUniform2f(location, x, y);
  540. }
  541. inline void QGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
  542. {
  543. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  544. d_ptr->funcs->glUniform2fv(location, count, v);
  545. }
  546. inline void QGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
  547. {
  548. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  549. d_ptr->funcs->glUniform2i(location, x, y);
  550. }
  551. inline void QGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint* v)
  552. {
  553. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  554. d_ptr->funcs->glUniform2iv(location, count, v);
  555. }
  556. inline void QGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
  557. {
  558. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  559. d_ptr->funcs->glUniform3f(location, x, y, z);
  560. }
  561. inline void QGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
  562. {
  563. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  564. d_ptr->funcs->glUniform3fv(location, count, v);
  565. }
  566. inline void QGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)
  567. {
  568. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  569. d_ptr->funcs->glUniform3i(location, x, y, z);
  570. }
  571. inline void QGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint* v)
  572. {
  573. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  574. d_ptr->funcs->glUniform3iv(location, count, v);
  575. }
  576. inline void QGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  577. {
  578. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  579. d_ptr->funcs->glUniform4f(location, x, y, z, w);
  580. }
  581. inline void QGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
  582. {
  583. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  584. d_ptr->funcs->glUniform4fv(location, count, v);
  585. }
  586. inline void QGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
  587. {
  588. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  589. d_ptr->funcs->glUniform4i(location, x, y, z, w);
  590. }
  591. inline void QGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint* v)
  592. {
  593. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  594. d_ptr->funcs->glUniform4iv(location, count, v);
  595. }
  596. inline void QGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
  597. {
  598. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  599. d_ptr->funcs->glUniformMatrix2fv(location, count, transpose, value);
  600. }
  601. inline void QGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
  602. {
  603. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  604. d_ptr->funcs->glUniformMatrix3fv(location, count, transpose, value);
  605. }
  606. inline void QGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
  607. {
  608. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  609. d_ptr->funcs->glUniformMatrix4fv(location, count, transpose, value);
  610. }
  611. inline void QGLFunctions::glUseProgram(GLuint program)
  612. {
  613. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  614. d_ptr->funcs->glUseProgram(program);
  615. }
  616. inline void QGLFunctions::glValidateProgram(GLuint program)
  617. {
  618. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  619. d_ptr->funcs->glValidateProgram(program);
  620. }
  621. inline void QGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
  622. {
  623. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  624. d_ptr->funcs->glVertexAttrib1f(indx, x);
  625. }
  626. inline void QGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* values)
  627. {
  628. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  629. d_ptr->funcs->glVertexAttrib1fv(indx, values);
  630. }
  631. inline void QGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
  632. {
  633. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  634. d_ptr->funcs->glVertexAttrib2f(indx, x, y);
  635. }
  636. inline void QGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* values)
  637. {
  638. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  639. d_ptr->funcs->glVertexAttrib2fv(indx, values);
  640. }
  641. inline void QGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
  642. {
  643. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  644. d_ptr->funcs->glVertexAttrib3f(indx, x, y, z);
  645. }
  646. inline void QGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* values)
  647. {
  648. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  649. d_ptr->funcs->glVertexAttrib3fv(indx, values);
  650. }
  651. inline void QGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  652. {
  653. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  654. d_ptr->funcs->glVertexAttrib4f(indx, x, y, z, w);
  655. }
  656. inline void QGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* values)
  657. {
  658. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  659. d_ptr->funcs->glVertexAttrib4fv(indx, values);
  660. }
  661. inline void QGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
  662. {
  663. Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
  664. d_ptr->funcs->glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
  665. }
  666. #ifndef GL_ACTIVE_ATTRIBUTE_MAX_LENGTH
  667. #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
  668. #endif
  669. #ifndef GL_ACTIVE_ATTRIBUTES
  670. #define GL_ACTIVE_ATTRIBUTES 0x8B89
  671. #endif
  672. #ifndef GL_ACTIVE_TEXTURE
  673. #define GL_ACTIVE_TEXTURE 0x84E0
  674. #endif
  675. #ifndef GL_ACTIVE_UNIFORM_MAX_LENGTH
  676. #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
  677. #endif
  678. #ifndef GL_ACTIVE_UNIFORMS
  679. #define GL_ACTIVE_UNIFORMS 0x8B86
  680. #endif
  681. #ifndef GL_ALIASED_LINE_WIDTH_RANGE
  682. #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
  683. #endif
  684. #ifndef GL_ALIASED_POINT_SIZE_RANGE
  685. #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
  686. #endif
  687. #ifndef GL_ALPHA
  688. #define GL_ALPHA 0x1906
  689. #endif
  690. #ifndef GL_ALPHA_BITS
  691. #define GL_ALPHA_BITS 0x0D55
  692. #endif
  693. #ifndef GL_ALWAYS
  694. #define GL_ALWAYS 0x0207
  695. #endif
  696. #ifndef GL_ARRAY_BUFFER
  697. #define GL_ARRAY_BUFFER 0x8892
  698. #endif
  699. #ifndef GL_ARRAY_BUFFER_BINDING
  700. #define GL_ARRAY_BUFFER_BINDING 0x8894
  701. #endif
  702. #ifndef GL_ATTACHED_SHADERS
  703. #define GL_ATTACHED_SHADERS 0x8B85
  704. #endif
  705. #ifndef GL_BACK
  706. #define GL_BACK 0x0405
  707. #endif
  708. #ifndef GL_BLEND
  709. #define GL_BLEND 0x0BE2
  710. #endif
  711. #ifndef GL_BLEND_COLOR
  712. #define GL_BLEND_COLOR 0x8005
  713. #endif
  714. #ifndef GL_BLEND_DST_ALPHA
  715. #define GL_BLEND_DST_ALPHA 0x80CA
  716. #endif
  717. #ifndef GL_BLEND_DST_RGB
  718. #define GL_BLEND_DST_RGB 0x80C8
  719. #endif
  720. #ifndef GL_BLEND_EQUATION
  721. #define GL_BLEND_EQUATION 0x8009
  722. #endif
  723. #ifndef GL_BLEND_EQUATION_ALPHA
  724. #define GL_BLEND_EQUATION_ALPHA 0x883D
  725. #endif
  726. #ifndef GL_BLEND_EQUATION_RGB
  727. #define GL_BLEND_EQUATION_RGB 0x8009
  728. #endif
  729. #ifndef GL_BLEND_SRC_ALPHA
  730. #define GL_BLEND_SRC_ALPHA 0x80CB
  731. #endif
  732. #ifndef GL_BLEND_SRC_RGB
  733. #define GL_BLEND_SRC_RGB 0x80C9
  734. #endif
  735. #ifndef GL_BLUE_BITS
  736. #define GL_BLUE_BITS 0x0D54
  737. #endif
  738. #ifndef GL_BOOL
  739. #define GL_BOOL 0x8B56
  740. #endif
  741. #ifndef GL_BOOL_VEC2
  742. #define GL_BOOL_VEC2 0x8B57
  743. #endif
  744. #ifndef GL_BOOL_VEC3
  745. #define GL_BOOL_VEC3 0x8B58
  746. #endif
  747. #ifndef GL_BOOL_VEC4
  748. #define GL_BOOL_VEC4 0x8B59
  749. #endif
  750. #ifndef GL_BUFFER_SIZE
  751. #define GL_BUFFER_SIZE 0x8764
  752. #endif
  753. #ifndef GL_BUFFER_USAGE
  754. #define GL_BUFFER_USAGE 0x8765
  755. #endif
  756. #ifndef GL_BYTE
  757. #define GL_BYTE 0x1400
  758. #endif
  759. #ifndef GL_CCW
  760. #define GL_CCW 0x0901
  761. #endif
  762. #ifndef GL_CLAMP_TO_EDGE
  763. #define GL_CLAMP_TO_EDGE 0x812F
  764. #endif
  765. #ifndef GL_COLOR_ATTACHMENT0
  766. #define GL_COLOR_ATTACHMENT0 0x8CE0
  767. #endif
  768. #ifndef GL_COLOR_BUFFER_BIT
  769. #define GL_COLOR_BUFFER_BIT 0x00004000
  770. #endif
  771. #ifndef GL_COLOR_CLEAR_VALUE
  772. #define GL_COLOR_CLEAR_VALUE 0x0C22
  773. #endif
  774. #ifndef GL_COLOR_WRITEMASK
  775. #define GL_COLOR_WRITEMASK 0x0C23
  776. #endif
  777. #ifndef GL_COMPILE_STATUS
  778. #define GL_COMPILE_STATUS 0x8B81
  779. #endif
  780. #ifndef GL_COMPRESSED_TEXTURE_FORMATS
  781. #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
  782. #endif
  783. #ifndef GL_CONSTANT_ALPHA
  784. #define GL_CONSTANT_ALPHA 0x8003
  785. #endif
  786. #ifndef GL_CONSTANT_COLOR
  787. #define GL_CONSTANT_COLOR 0x8001
  788. #endif
  789. #ifndef GL_CULL_FACE
  790. #define GL_CULL_FACE 0x0B44
  791. #endif
  792. #ifndef GL_CULL_FACE_MODE
  793. #define GL_CULL_FACE_MODE 0x0B45
  794. #endif
  795. #ifndef GL_CURRENT_PROGRAM
  796. #define GL_CURRENT_PROGRAM 0x8B8D
  797. #endif
  798. #ifndef GL_CURRENT_VERTEX_ATTRIB
  799. #define GL_CURRENT_VERTEX_ATTRIB 0x8626
  800. #endif
  801. #ifndef GL_CW
  802. #define GL_CW 0x0900
  803. #endif
  804. #ifndef GL_DECR
  805. #define GL_DECR 0x1E03
  806. #endif
  807. #ifndef GL_DECR_WRAP
  808. #define GL_DECR_WRAP 0x8508
  809. #endif
  810. #ifndef GL_DELETE_STATUS
  811. #define GL_DELETE_STATUS 0x8B80
  812. #endif
  813. #ifndef GL_DEPTH_ATTACHMENT
  814. #define GL_DEPTH_ATTACHMENT 0x8D00
  815. #endif
  816. #ifndef GL_DEPTH_BITS
  817. #define GL_DEPTH_BITS 0x0D56
  818. #endif
  819. #ifndef GL_DEPTH_BUFFER_BIT
  820. #define GL_DEPTH_BUFFER_BIT 0x00000100
  821. #endif
  822. #ifndef GL_DEPTH_CLEAR_VALUE
  823. #define GL_DEPTH_CLEAR_VALUE 0x0B73
  824. #endif
  825. #ifndef GL_DEPTH_COMPONENT
  826. #define GL_DEPTH_COMPONENT 0x1902
  827. #endif
  828. #ifndef GL_DEPTH_COMPONENT16
  829. #define GL_DEPTH_COMPONENT16 0x81A5
  830. #endif
  831. #ifndef GL_DEPTH_FUNC
  832. #define GL_DEPTH_FUNC 0x0B74
  833. #endif
  834. #ifndef GL_DEPTH_RANGE
  835. #define GL_DEPTH_RANGE 0x0B70
  836. #endif
  837. #ifndef GL_DEPTH_TEST
  838. #define GL_DEPTH_TEST 0x0B71
  839. #endif
  840. #ifndef GL_DEPTH_WRITEMASK
  841. #define GL_DEPTH_WRITEMASK 0x0B72
  842. #endif
  843. #ifndef GL_DITHER
  844. #define GL_DITHER 0x0BD0
  845. #endif
  846. #ifndef GL_DONT_CARE
  847. #define GL_DONT_CARE 0x1100
  848. #endif
  849. #ifndef GL_DST_ALPHA
  850. #define GL_DST_ALPHA 0x0304
  851. #endif
  852. #ifndef GL_DST_COLOR
  853. #define GL_DST_COLOR 0x0306
  854. #endif
  855. #ifndef GL_DYNAMIC_DRAW
  856. #define GL_DYNAMIC_DRAW 0x88E8
  857. #endif
  858. #ifndef GL_ELEMENT_ARRAY_BUFFER
  859. #define GL_ELEMENT_ARRAY_BUFFER 0x8893
  860. #endif
  861. #ifndef GL_ELEMENT_ARRAY_BUFFER_BINDING
  862. #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
  863. #endif
  864. #ifndef GL_EQUAL
  865. #define GL_EQUAL 0x0202
  866. #endif
  867. #ifndef GL_EXTENSIONS
  868. #define GL_EXTENSIONS 0x1F03
  869. #endif
  870. #ifndef GL_FALSE
  871. #define GL_FALSE 0
  872. #endif
  873. #ifndef GL_FASTEST
  874. #define GL_FASTEST 0x1101
  875. #endif
  876. #ifndef GL_FIXED
  877. #define GL_FIXED 0x140C
  878. #endif
  879. #ifndef GL_FLOAT
  880. #define GL_FLOAT 0x1406
  881. #endif
  882. #ifndef GL_FLOAT_MAT2
  883. #define GL_FLOAT_MAT2 0x8B5A
  884. #endif
  885. #ifndef GL_FLOAT_MAT3
  886. #define GL_FLOAT_MAT3 0x8B5B
  887. #endif
  888. #ifndef GL_FLOAT_MAT4
  889. #define GL_FLOAT_MAT4 0x8B5C
  890. #endif
  891. #ifndef GL_FLOAT_VEC2
  892. #define GL_FLOAT_VEC2 0x8B50
  893. #endif
  894. #ifndef GL_FLOAT_VEC3
  895. #define GL_FLOAT_VEC3 0x8B51
  896. #endif
  897. #ifndef GL_FLOAT_VEC4
  898. #define GL_FLOAT_VEC4 0x8B52
  899. #endif
  900. #ifndef GL_FRAGMENT_SHADER
  901. #define GL_FRAGMENT_SHADER 0x8B30
  902. #endif
  903. #ifndef GL_FRAMEBUFFER
  904. #define GL_FRAMEBUFFER 0x8D40
  905. #endif
  906. #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
  907. #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
  908. #endif
  909. #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
  910. #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
  911. #endif
  912. #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
  913. #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
  914. #endif
  915. #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
  916. #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
  917. #endif
  918. #ifndef GL_FRAMEBUFFER_BINDING
  919. #define GL_FRAMEBUFFER_BINDING 0x8CA6
  920. #endif
  921. #ifndef GL_FRAMEBUFFER_COMPLETE
  922. #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
  923. #endif
  924. #ifndef GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
  925. #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
  926. #endif
  927. #ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
  928. #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
  929. #endif
  930. #ifndef GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
  931. #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
  932. #endif
  933. #ifndef GL_FRAMEBUFFER_UNSUPPORTED
  934. #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
  935. #endif
  936. #ifndef GL_FRONT
  937. #define GL_FRONT 0x0404
  938. #endif
  939. #ifndef GL_FRONT_AND_BACK
  940. #define GL_FRONT_AND_BACK 0x0408
  941. #endif
  942. #ifndef GL_FRONT_FACE
  943. #define GL_FRONT_FACE 0x0B46
  944. #endif
  945. #ifndef GL_FUNC_ADD
  946. #define GL_FUNC_ADD 0x8006
  947. #endif
  948. #ifndef GL_FUNC_REVERSE_SUBTRACT
  949. #define GL_FUNC_REVERSE_SUBTRACT 0x800B
  950. #endif
  951. #ifndef GL_FUNC_SUBTRACT
  952. #define GL_FUNC_SUBTRACT 0x800A
  953. #endif
  954. #ifndef GL_GENERATE_MIPMAP_HINT
  955. #define GL_GENERATE_MIPMAP_HINT 0x8192
  956. #endif
  957. #ifndef GL_GEQUAL
  958. #define GL_GEQUAL 0x0206
  959. #endif
  960. #ifndef GL_GREATER
  961. #define GL_GREATER 0x0204
  962. #endif
  963. #ifndef GL_GREEN_BITS
  964. #define GL_GREEN_BITS 0x0D53
  965. #endif
  966. #ifndef GL_HIGH_FLOAT
  967. #define GL_HIGH_FLOAT 0x8DF2
  968. #endif
  969. #ifndef GL_HIGH_INT
  970. #define GL_HIGH_INT 0x8DF5
  971. #endif
  972. #ifndef GL_IMPLEMENTATION_COLOR_READ_FORMAT
  973. #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
  974. #endif
  975. #ifndef GL_IMPLEMENTATION_COLOR_READ_TYPE
  976. #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
  977. #endif
  978. #ifndef GL_INCR
  979. #define GL_INCR 0x1E02
  980. #endif
  981. #ifndef GL_INCR_WRAP
  982. #define GL_INCR_WRAP 0x8507
  983. #endif
  984. #ifndef GL_INFO_LOG_LENGTH
  985. #define GL_INFO_LOG_LENGTH 0x8B84
  986. #endif
  987. #ifndef GL_INT
  988. #define GL_INT 0x1404
  989. #endif
  990. #ifndef GL_INT_VEC2
  991. #define GL_INT_VEC2 0x8B53
  992. #endif
  993. #ifndef GL_INT_VEC3
  994. #define GL_INT_VEC3 0x8B54
  995. #endif
  996. #ifndef GL_INT_VEC4
  997. #define GL_INT_VEC4 0x8B55
  998. #endif
  999. #ifndef GL_INVALID_ENUM
  1000. #define GL_INVALID_ENUM 0x0500
  1001. #endif
  1002. #ifndef GL_INVALID_FRAMEBUFFER_OPERATION
  1003. #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
  1004. #endif
  1005. #ifndef GL_INVALID_OPERATION
  1006. #define GL_INVALID_OPERATION 0x0502
  1007. #endif
  1008. #ifndef GL_INVALID_VALUE
  1009. #define GL_INVALID_VALUE 0x0501
  1010. #endif
  1011. #ifndef GL_INVERT
  1012. #define GL_INVERT 0x150A
  1013. #endif
  1014. #ifndef GL_KEEP
  1015. #define GL_KEEP 0x1E00
  1016. #endif
  1017. #ifndef GL_LEQUAL
  1018. #define GL_LEQUAL 0x0203
  1019. #endif
  1020. #ifndef GL_LESS
  1021. #define GL_LESS 0x0201
  1022. #endif
  1023. #ifndef GL_LINEAR
  1024. #define GL_LINEAR 0x2601
  1025. #endif
  1026. #ifndef GL_LINEAR_MIPMAP_LINEAR
  1027. #define GL_LINEAR_MIPMAP_LINEAR 0x2703
  1028. #endif
  1029. #ifndef GL_LINEAR_MIPMAP_NEAREST
  1030. #define GL_LINEAR_MIPMAP_NEAREST 0x2701
  1031. #endif
  1032. #ifndef GL_LINE_LOOP
  1033. #define GL_LINE_LOOP 0x0002
  1034. #endif
  1035. #ifndef GL_LINES
  1036. #define GL_LINES 0x0001
  1037. #endif
  1038. #ifndef GL_LINE_STRIP
  1039. #define GL_LINE_STRIP 0x0003
  1040. #endif
  1041. #ifndef GL_LINE_WIDTH
  1042. #define GL_LINE_WIDTH 0x0B21
  1043. #endif
  1044. #ifndef GL_LINK_STATUS
  1045. #define GL_LINK_STATUS 0x8B82
  1046. #endif
  1047. #ifndef GL_LOW_FLOAT
  1048. #define GL_LOW_FLOAT 0x8DF0
  1049. #endif
  1050. #ifndef GL_LOW_INT
  1051. #define GL_LOW_INT 0x8DF3
  1052. #endif
  1053. #ifndef GL_LUMINANCE
  1054. #define GL_LUMINANCE 0x1909
  1055. #endif
  1056. #ifndef GL_LUMINANCE_ALPHA
  1057. #define GL_LUMINANCE_ALPHA 0x190A
  1058. #endif
  1059. #ifndef GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
  1060. #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
  1061. #endif
  1062. #ifndef GL_MAX_CUBE_MAP_TEXTURE_SIZE
  1063. #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
  1064. #endif
  1065. #ifndef GL_MAX_FRAGMENT_UNIFORM_VECTORS
  1066. #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
  1067. #endif
  1068. #ifndef GL_MAX_RENDERBUFFER_SIZE
  1069. #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
  1070. #endif
  1071. #ifndef GL_MAX_TEXTURE_IMAGE_UNITS
  1072. #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
  1073. #endif
  1074. #ifndef GL_MAX_TEXTURE_SIZE
  1075. #define GL_MAX_TEXTURE_SIZE 0x0D33
  1076. #endif
  1077. #ifndef GL_MAX_VARYING_VECTORS
  1078. #define GL_MAX_VARYING_VECTORS 0x8DFC
  1079. #endif
  1080. #ifndef GL_MAX_VERTEX_ATTRIBS
  1081. #define GL_MAX_VERTEX_ATTRIBS 0x8869
  1082. #endif
  1083. #ifndef GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
  1084. #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
  1085. #endif
  1086. #ifndef GL_MAX_VERTEX_UNIFORM_VECTORS
  1087. #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
  1088. #endif
  1089. #ifndef GL_MAX_VIEWPORT_DIMS
  1090. #define GL_MAX_VIEWPORT_DIMS 0x0D3A
  1091. #endif
  1092. #ifndef GL_MEDIUM_FLOAT
  1093. #define GL_MEDIUM_FLOAT 0x8DF1
  1094. #endif
  1095. #ifndef GL_MEDIUM_INT
  1096. #define GL_MEDIUM_INT 0x8DF4
  1097. #endif
  1098. #ifndef GL_MIRRORED_REPEAT
  1099. #define GL_MIRRORED_REPEAT 0x8370
  1100. #endif
  1101. #ifndef GL_NEAREST
  1102. #define GL_NEAREST 0x2600
  1103. #endif
  1104. #ifndef GL_NEAREST_MIPMAP_LINEAR
  1105. #define GL_NEAREST_MIPMAP_LINEAR 0x2702
  1106. #endif
  1107. #ifndef GL_NEAREST_MIPMAP_NEAREST
  1108. #define GL_NEAREST_MIPMAP_NEAREST 0x2700
  1109. #endif
  1110. #ifndef GL_NEVER
  1111. #define GL_NEVER 0x0200
  1112. #endif
  1113. #ifndef GL_NICEST
  1114. #define GL_NICEST 0x1102
  1115. #endif
  1116. #ifndef GL_NO_ERROR
  1117. #define GL_NO_ERROR 0
  1118. #endif
  1119. #ifndef GL_NONE
  1120. #define GL_NONE 0
  1121. #endif
  1122. #ifndef GL_NOTEQUAL
  1123. #define GL_NOTEQUAL 0x0205
  1124. #endif
  1125. #ifndef GL_NUM_COMPRESSED_TEXTURE_FORMATS
  1126. #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
  1127. #endif
  1128. #ifndef GL_NUM_SHADER_BINARY_FORMATS
  1129. #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
  1130. #endif
  1131. #ifndef GL_ONE
  1132. #define GL_ONE 1
  1133. #endif
  1134. #ifndef GL_ONE_MINUS_CONSTANT_ALPHA
  1135. #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
  1136. #endif
  1137. #ifndef GL_ONE_MINUS_CONSTANT_COLOR
  1138. #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
  1139. #endif
  1140. #ifndef GL_ONE_MINUS_DST_ALPHA
  1141. #define GL_ONE_MINUS_DST_ALPHA 0x0305
  1142. #endif
  1143. #ifndef GL_ONE_MINUS_DST_COLOR
  1144. #define GL_ONE_MINUS_DST_COLOR 0x0307
  1145. #endif
  1146. #ifndef GL_ONE_MINUS_SRC_ALPHA
  1147. #define GL_ONE_MINUS_SRC_ALPHA 0x0303
  1148. #endif
  1149. #ifndef GL_ONE_MINUS_SRC_COLOR
  1150. #define GL_ONE_MINUS_SRC_COLOR 0x0301
  1151. #endif
  1152. #ifndef GL_OUT_OF_MEMORY
  1153. #define GL_OUT_OF_MEMORY 0x0505
  1154. #endif
  1155. #ifndef GL_PACK_ALIGNMENT
  1156. #define GL_PACK_ALIGNMENT 0x0D05
  1157. #endif
  1158. #ifndef GL_POINTS
  1159. #define GL_POINTS 0x0000
  1160. #endif
  1161. #ifndef GL_POLYGON_OFFSET_FACTOR
  1162. #define GL_POLYGON_OFFSET_FACTOR 0x8038
  1163. #endif
  1164. #ifndef GL_POLYGON_OFFSET_FILL
  1165. #define GL_POLYGON_OFFSET_FILL 0x8037
  1166. #endif
  1167. #ifndef GL_POLYGON_OFFSET_UNITS
  1168. #define GL_POLYGON_OFFSET_UNITS 0x2A00
  1169. #endif
  1170. #ifndef GL_RED_BITS
  1171. #define GL_RED_BITS 0x0D52
  1172. #endif
  1173. #ifndef GL_RENDERBUFFER
  1174. #define GL_RENDERBUFFER 0x8D41
  1175. #endif
  1176. #ifndef GL_RENDERBUFFER_ALPHA_SIZE
  1177. #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
  1178. #endif
  1179. #ifndef GL_RENDERBUFFER_BINDING
  1180. #define GL_RENDERBUFFER_BINDING 0x8CA7
  1181. #endif
  1182. #ifndef GL_RENDERBUFFER_BLUE_SIZE
  1183. #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
  1184. #endif
  1185. #ifndef GL_RENDERBUFFER_DEPTH_SIZE
  1186. #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
  1187. #endif
  1188. #ifndef GL_RENDERBUFFER_GREEN_SIZE
  1189. #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
  1190. #endif
  1191. #ifndef GL_RENDERBUFFER_HEIGHT
  1192. #define GL_RENDERBUFFER_HEIGHT 0x8D43
  1193. #endif
  1194. #ifndef GL_RENDERBUFFER_INTERNAL_FORMAT
  1195. #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
  1196. #endif
  1197. #ifndef GL_RENDERBUFFER_RED_SIZE
  1198. #define GL_RENDERBUFFER_RED_SIZE 0x8D50
  1199. #endif
  1200. #ifndef GL_RENDERBUFFER_STENCIL_SIZE
  1201. #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
  1202. #endif
  1203. #ifndef GL_RENDERBUFFER_WIDTH
  1204. #define GL_RENDERBUFFER_WIDTH 0x8D42
  1205. #endif
  1206. #ifndef GL_RENDERER
  1207. #define GL_RENDERER 0x1F01
  1208. #endif
  1209. #ifndef GL_REPEAT
  1210. #define GL_REPEAT 0x2901
  1211. #endif
  1212. #ifndef GL_REPLACE
  1213. #define GL_REPLACE 0x1E01
  1214. #endif
  1215. #ifndef GL_RGB
  1216. #define GL_RGB 0x1907
  1217. #endif
  1218. #ifndef GL_RGB565
  1219. #define GL_RGB565 0x8D62
  1220. #endif
  1221. #ifndef GL_RGB5_A1
  1222. #define GL_RGB5_A1 0x8057
  1223. #endif
  1224. #ifndef GL_RGBA
  1225. #define GL_RGBA 0x1908
  1226. #endif
  1227. #ifndef GL_RGBA4
  1228. #define GL_RGBA4 0x8056
  1229. #endif
  1230. #ifndef GL_BGRA
  1231. #define GL_BGRA 0x80E1
  1232. #endif
  1233. #ifndef GL_SAMPLE_ALPHA_TO_COVERAGE
  1234. #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
  1235. #endif
  1236. #ifndef GL_SAMPLE_BUFFERS
  1237. #define GL_SAMPLE_BUFFERS 0x80A8
  1238. #endif
  1239. #ifndef GL_SAMPLE_COVERAGE
  1240. #define GL_SAMPLE_COVERAGE 0x80A0
  1241. #endif
  1242. #ifndef GL_SAMPLE_COVERAGE_INVERT
  1243. #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
  1244. #endif
  1245. #ifndef GL_SAMPLE_COVERAGE_VALUE
  1246. #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
  1247. #endif
  1248. #ifndef GL_SAMPLER_2D
  1249. #define GL_SAMPLER_2D 0x8B5E
  1250. #endif
  1251. #ifndef GL_SAMPLER_CUBE
  1252. #define GL_SAMPLER_CUBE 0x8B60
  1253. #endif
  1254. #ifndef GL_SAMPLES
  1255. #define GL_SAMPLES 0x80A9
  1256. #endif
  1257. #ifndef GL_SCISSOR_BOX
  1258. #define GL_SCISSOR_BOX 0x0C10
  1259. #endif
  1260. #ifndef GL_SCISSOR_TEST
  1261. #define GL_SCISSOR_TEST 0x0C11
  1262. #endif
  1263. #ifndef GL_SHADER_BINARY_FORMATS
  1264. #define GL_SHADER_BINARY_FORMATS 0x8DF8
  1265. #endif
  1266. #ifndef GL_SHADER_COMPILER
  1267. #define GL_SHADER_COMPILER 0x8DFA
  1268. #endif
  1269. #ifndef GL_SHADER_SOURCE_LENGTH
  1270. #define GL_SHADER_SOURCE_LENGTH 0x8B88
  1271. #endif
  1272. #ifndef GL_SHADER_TYPE
  1273. #define GL_SHADER_TYPE 0x8B4F
  1274. #endif
  1275. #ifndef GL_SHADING_LANGUAGE_VERSION
  1276. #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
  1277. #endif
  1278. #ifndef GL_SHORT
  1279. #define GL_SHORT 0x1402
  1280. #endif
  1281. #ifndef GL_SRC_ALPHA
  1282. #define GL_SRC_ALPHA 0x0302
  1283. #endif
  1284. #ifndef GL_SRC_ALPHA_SATURATE
  1285. #define GL_SRC_ALPHA_SATURATE 0x0308
  1286. #endif
  1287. #ifndef GL_SRC_COLOR
  1288. #define GL_SRC_COLOR 0x0300
  1289. #endif
  1290. #ifndef GL_STATIC_DRAW
  1291. #define GL_STATIC_DRAW 0x88E4
  1292. #endif
  1293. #ifndef GL_STENCIL_ATTACHMENT
  1294. #define GL_STENCIL_ATTACHMENT 0x8D20
  1295. #endif
  1296. #ifndef GL_STENCIL_BACK_FAIL
  1297. #define GL_STENCIL_BACK_FAIL 0x8801
  1298. #endif
  1299. #ifndef GL_STENCIL_BACK_FUNC
  1300. #define GL_STENCIL_BACK_FUNC 0x8800
  1301. #endif
  1302. #ifndef GL_STENCIL_BACK_PASS_DEPTH_FAIL
  1303. #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
  1304. #endif
  1305. #ifndef GL_STENCIL_BACK_PASS_DEPTH_PASS
  1306. #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
  1307. #endif
  1308. #ifndef GL_STENCIL_BACK_REF
  1309. #define GL_STENCIL_BACK_REF 0x8CA3
  1310. #endif
  1311. #ifndef GL_STENCIL_BACK_VALUE_MASK
  1312. #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
  1313. #endif
  1314. #ifndef GL_STENCIL_BACK_WRITEMASK
  1315. #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
  1316. #endif
  1317. #ifndef GL_STENCIL_BITS
  1318. #define GL_STENCIL_BITS 0x0D57
  1319. #endif
  1320. #ifndef GL_STENCIL_BUFFER_BIT
  1321. #define GL_STENCIL_BUFFER_BIT 0x00000400
  1322. #endif
  1323. #ifndef GL_STENCIL_CLEAR_VALUE
  1324. #define GL_STENCIL_CLEAR_VALUE 0x0B91
  1325. #endif
  1326. #ifndef GL_STENCIL_FAIL
  1327. #define GL_STENCIL_FAIL 0x0B94
  1328. #endif
  1329. #ifndef GL_STENCIL_FUNC
  1330. #define GL_STENCIL_FUNC 0x0B92
  1331. #endif
  1332. #ifndef GL_STENCIL_INDEX
  1333. #define GL_STENCIL_INDEX 0x1901
  1334. #endif
  1335. #ifndef GL_STENCIL_INDEX8
  1336. #define GL_STENCIL_INDEX8 0x8D48
  1337. #endif
  1338. #ifndef GL_STENCIL_PASS_DEPTH_FAIL
  1339. #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
  1340. #endif
  1341. #ifndef GL_STENCIL_PASS_DEPTH_PASS
  1342. #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
  1343. #endif
  1344. #ifndef GL_STENCIL_REF
  1345. #define GL_STENCIL_REF 0x0B97
  1346. #endif
  1347. #ifndef GL_STENCIL_TEST
  1348. #define GL_STENCIL_TEST 0x0B90
  1349. #endif
  1350. #ifndef GL_STENCIL_VALUE_MASK
  1351. #define GL_STENCIL_VALUE_MASK 0x0B93
  1352. #endif
  1353. #ifndef GL_STENCIL_WRITEMASK
  1354. #define GL_STENCIL_WRITEMASK 0x0B98
  1355. #endif
  1356. #ifndef GL_STREAM_DRAW
  1357. #define GL_STREAM_DRAW 0x88E0
  1358. #endif
  1359. #ifndef GL_SUBPIXEL_BITS
  1360. #define GL_SUBPIXEL_BITS 0x0D50
  1361. #endif
  1362. #ifndef GL_TEXTURE0
  1363. #define GL_TEXTURE0 0x84C0
  1364. #endif
  1365. #ifndef GL_TEXTURE
  1366. #define GL_TEXTURE 0x1702
  1367. #endif
  1368. #ifndef GL_TEXTURE10
  1369. #define GL_TEXTURE10 0x84CA
  1370. #endif
  1371. #ifndef GL_TEXTURE1
  1372. #define GL_TEXTURE1 0x84C1
  1373. #endif
  1374. #ifndef GL_TEXTURE11
  1375. #define GL_TEXTURE11 0x84CB
  1376. #endif
  1377. #ifndef GL_TEXTURE12
  1378. #define GL_TEXTURE12 0x84CC
  1379. #endif
  1380. #ifndef GL_TEXTURE13
  1381. #define GL_TEXTURE13 0x84CD
  1382. #endif
  1383. #ifndef GL_TEXTURE14
  1384. #define GL_TEXTURE14 0x84CE
  1385. #endif
  1386. #ifndef GL_TEXTURE15
  1387. #define GL_TEXTURE15 0x84CF
  1388. #endif
  1389. #ifndef GL_TEXTURE16
  1390. #define GL_TEXTURE16 0x84D0
  1391. #endif
  1392. #ifndef GL_TEXTURE17
  1393. #define GL_TEXTURE17 0x84D1
  1394. #endif
  1395. #ifndef GL_TEXTURE18
  1396. #define GL_TEXTURE18 0x84D2
  1397. #endif
  1398. #ifndef GL_TEXTURE19
  1399. #define GL_TEXTURE19 0x84D3
  1400. #endif
  1401. #ifndef GL_TEXTURE20
  1402. #define GL_TEXTURE20 0x84D4
  1403. #endif
  1404. #ifndef GL_TEXTURE2
  1405. #define GL_TEXTURE2 0x84C2
  1406. #endif
  1407. #ifndef GL_TEXTURE21
  1408. #define GL_TEXTURE21 0x84D5
  1409. #endif
  1410. #ifndef GL_TEXTURE22
  1411. #define GL_TEXTURE22 0x84D6
  1412. #endif
  1413. #ifndef GL_TEXTURE23
  1414. #define GL_TEXTURE23 0x84D7
  1415. #endif
  1416. #ifndef GL_TEXTURE24
  1417. #define GL_TEXTURE24 0x84D8
  1418. #endif
  1419. #ifndef GL_TEXTURE25
  1420. #define GL_TEXTURE25 0x84D9
  1421. #endif
  1422. #ifndef GL_TEXTURE26
  1423. #define GL_TEXTURE26 0x84DA
  1424. #endif
  1425. #ifndef GL_TEXTURE27
  1426. #define GL_TEXTURE27 0x84DB
  1427. #endif
  1428. #ifndef GL_TEXTURE28
  1429. #define GL_TEXTURE28 0x84DC
  1430. #endif
  1431. #ifndef GL_TEXTURE29
  1432. #define GL_TEXTURE29 0x84DD
  1433. #endif
  1434. #ifndef GL_TEXTURE_2D
  1435. #define GL_TEXTURE_2D 0x0DE1
  1436. #endif
  1437. #ifndef GL_TEXTURE30
  1438. #define GL_TEXTURE30 0x84DE
  1439. #endif
  1440. #ifndef GL_TEXTURE3
  1441. #define GL_TEXTURE3 0x84C3
  1442. #endif
  1443. #ifndef GL_TEXTURE31
  1444. #define GL_TEXTURE31 0x84DF
  1445. #endif
  1446. #ifndef GL_TEXTURE4
  1447. #define GL_TEXTURE4 0x84C4
  1448. #endif
  1449. #ifndef GL_TEXTURE5
  1450. #define GL_TEXTURE5 0x84C5
  1451. #endif
  1452. #ifndef GL_TEXTURE6
  1453. #define GL_TEXTURE6 0x84C6
  1454. #endif
  1455. #ifndef GL_TEXTURE7
  1456. #define GL_TEXTURE7 0x84C7
  1457. #endif
  1458. #ifndef GL_TEXTURE8
  1459. #define GL_TEXTURE8 0x84C8
  1460. #endif
  1461. #ifndef GL_TEXTURE9
  1462. #define GL_TEXTURE9 0x84C9
  1463. #endif
  1464. #ifndef GL_TEXTURE_BINDING_2D
  1465. #define GL_TEXTURE_BINDING_2D 0x8069
  1466. #endif
  1467. #ifndef GL_TEXTURE_BINDING_CUBE_MAP
  1468. #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
  1469. #endif
  1470. #ifndef GL_TEXTURE_CUBE_MAP
  1471. #define GL_TEXTURE_CUBE_MAP 0x8513
  1472. #endif
  1473. #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_X
  1474. #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
  1475. #endif
  1476. #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
  1477. #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
  1478. #endif
  1479. #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
  1480. #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
  1481. #endif
  1482. #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X
  1483. #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
  1484. #endif
  1485. #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Y
  1486. #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
  1487. #endif
  1488. #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Z
  1489. #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
  1490. #endif
  1491. #ifndef GL_TEXTURE_MAG_FILTER
  1492. #define GL_TEXTURE_MAG_FILTER 0x2800
  1493. #endif
  1494. #ifndef GL_TEXTURE_MIN_FILTER
  1495. #define GL_TEXTURE_MIN_FILTER 0x2801
  1496. #endif
  1497. #ifndef GL_TEXTURE_WRAP_S
  1498. #define GL_TEXTURE_WRAP_S 0x2802
  1499. #endif
  1500. #ifndef GL_TEXTURE_WRAP_T
  1501. #define GL_TEXTURE_WRAP_T 0x2803
  1502. #endif
  1503. #ifndef GL_TRIANGLE_FAN
  1504. #define GL_TRIANGLE_FAN 0x0006
  1505. #endif
  1506. #ifndef GL_TRIANGLES
  1507. #define GL_TRIANGLES 0x0004
  1508. #endif
  1509. #ifndef GL_TRIANGLE_STRIP
  1510. #define GL_TRIANGLE_STRIP 0x0005
  1511. #endif
  1512. #ifndef GL_TRUE
  1513. #define GL_TRUE 1
  1514. #endif
  1515. #ifndef GL_UNPACK_ALIGNMENT
  1516. #define GL_UNPACK_ALIGNMENT 0x0CF5
  1517. #endif
  1518. #ifndef GL_UNSIGNED_BYTE
  1519. #define GL_UNSIGNED_BYTE 0x1401
  1520. #endif
  1521. #ifndef GL_UNSIGNED_INT
  1522. #define GL_UNSIGNED_INT 0x1405
  1523. #endif
  1524. #ifndef GL_UNSIGNED_SHORT
  1525. #define GL_UNSIGNED_SHORT 0x1403
  1526. #endif
  1527. #ifndef GL_UNSIGNED_SHORT_4_4_4_4
  1528. #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
  1529. #endif
  1530. #ifndef GL_UNSIGNED_SHORT_5_5_5_1
  1531. #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
  1532. #endif
  1533. #ifndef GL_UNSIGNED_SHORT_5_6_5
  1534. #define GL_UNSIGNED_SHORT_5_6_5 0x8363
  1535. #endif
  1536. #ifndef GL_VALIDATE_STATUS
  1537. #define GL_VALIDATE_STATUS 0x8B83
  1538. #endif
  1539. #ifndef GL_VENDOR
  1540. #define GL_VENDOR 0x1F00
  1541. #endif
  1542. #ifndef GL_VERSION
  1543. #define GL_VERSION 0x1F02
  1544. #endif
  1545. #ifndef GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
  1546. #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
  1547. #endif
  1548. #ifndef GL_VERTEX_ATTRIB_ARRAY_ENABLED
  1549. #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
  1550. #endif
  1551. #ifndef GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
  1552. #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
  1553. #endif
  1554. #ifndef GL_VERTEX_ATTRIB_ARRAY_POINTER
  1555. #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
  1556. #endif
  1557. #ifndef GL_VERTEX_ATTRIB_ARRAY_SIZE
  1558. #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
  1559. #endif
  1560. #ifndef GL_VERTEX_ATTRIB_ARRAY_STRIDE
  1561. #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
  1562. #endif
  1563. #ifndef GL_VERTEX_ATTRIB_ARRAY_TYPE
  1564. #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
  1565. #endif
  1566. #ifndef GL_VERTEX_SHADER
  1567. #define GL_VERTEX_SHADER 0x8B31
  1568. #endif
  1569. #ifndef GL_VIEWPORT
  1570. #define GL_VIEWPORT 0x0BA2
  1571. #endif
  1572. #ifndef GL_ZERO
  1573. #define GL_ZERO 0
  1574. #endif
  1575. QT_END_NAMESPACE
  1576. #endif