qopenglfunctions_es2.h 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
  4. ** Contact: https://www.qt.io/licensing/
  5. **
  6. ** This file is part of the QtGui 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 QOPENGLVERSIONFUNCTIONS_ES2_H
  40. #define QOPENGLVERSIONFUNCTIONS_ES2_H
  41. #include <QtCore/qglobal.h>
  42. #if defined(QT_OPENGL_ES_2) || defined(Q_QDOC)
  43. #include <QtGui/QOpenGLVersionFunctions>
  44. #include <QtGui/qopenglcontext.h>
  45. QT_BEGIN_NAMESPACE
  46. class QOpenGLFunctions_ES2Private;
  47. class Q_GUI_EXPORT QOpenGLFunctions_ES2 : public QAbstractOpenGLFunctions
  48. {
  49. public:
  50. QOpenGLFunctions_ES2();
  51. ~QOpenGLFunctions_ES2();
  52. bool initializeOpenGLFunctions() Q_DECL_OVERRIDE;
  53. // OpenGL ES2 core functions
  54. void glActiveTexture(GLenum texture);
  55. void glAttachShader(GLuint program, GLuint shader);
  56. void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name);
  57. void glBindBuffer(GLenum target, GLuint buffer);
  58. void glBindFramebuffer(GLenum target, GLuint framebuffer);
  59. void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
  60. void glBindTexture(GLenum target, GLuint texture);
  61. void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  62. void glBlendEquation(GLenum mode);
  63. void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
  64. void glBlendFunc(GLenum sfactor, GLenum dfactor);
  65. void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
  66. void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
  67. void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
  68. GLenum glCheckFramebufferStatus(GLenum target);
  69. void glClear(GLbitfield mask);
  70. void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  71. void glClearDepthf(GLclampf depth);
  72. void glClearStencil(GLint s);
  73. void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  74. void glCompileShader(GLuint shader);
  75. void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
  76. void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
  77. void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  78. void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  79. GLuint glCreateProgram(void);
  80. GLuint glCreateShader(GLenum type);
  81. void glCullFace(GLenum mode);
  82. void glDeleteBuffers(GLsizei n, const GLuint* buffers);
  83. void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
  84. void glDeleteProgram(GLuint program);
  85. void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
  86. void glDeleteShader(GLuint shader);
  87. void glDeleteTextures(GLsizei n, const GLuint* textures);
  88. void glDepthFunc(GLenum func);
  89. void glDepthMask(GLboolean flag);
  90. void glDepthRangef(GLclampf zNear, GLclampf zFar);
  91. void glDetachShader(GLuint program, GLuint shader);
  92. void glDisable(GLenum cap);
  93. void glDisableVertexAttribArray(GLuint index);
  94. void glDrawArrays(GLenum mode, GLint first, GLsizei count);
  95. void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
  96. void glEnable(GLenum cap);
  97. void glEnableVertexAttribArray(GLuint index);
  98. void glFinish(void);
  99. void glFlush(void);
  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 glFrontFace(GLenum mode);
  103. void glGenBuffers(GLsizei n, GLuint* buffers);
  104. void glGenerateMipmap(GLenum target);
  105. void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
  106. void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
  107. void glGenTextures(GLsizei n, GLuint* textures);
  108. void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
  109. void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
  110. void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
  111. int glGetAttribLocation(GLuint program, const GLchar* name);
  112. void glGetBooleanv(GLenum pname, GLboolean* params);
  113. void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
  114. GLenum glGetError(void);
  115. void glGetFloatv(GLenum pname, GLfloat* params);
  116. void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
  117. void glGetIntegerv(GLenum pname, GLint* params);
  118. void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
  119. void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
  120. void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
  121. void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
  122. void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
  123. void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
  124. void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
  125. const GLubyte* glGetString(GLenum name);
  126. void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
  127. void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
  128. void glGetUniformfv(GLuint program, GLint location, GLfloat* params);
  129. void glGetUniformiv(GLuint program, GLint location, GLint* params);
  130. int glGetUniformLocation(GLuint program, const GLchar* name);
  131. void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
  132. void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
  133. void glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
  134. void glHint(GLenum target, GLenum mode);
  135. GLboolean glIsBuffer(GLuint buffer);
  136. GLboolean glIsEnabled(GLenum cap);
  137. GLboolean glIsFramebuffer(GLuint framebuffer);
  138. GLboolean glIsProgram(GLuint program);
  139. GLboolean glIsRenderbuffer(GLuint renderbuffer);
  140. GLboolean glIsShader(GLuint shader);
  141. GLboolean glIsTexture(GLuint texture);
  142. void glLineWidth(GLfloat width);
  143. void glLinkProgram(GLuint program);
  144. void glPixelStorei(GLenum pname, GLint param);
  145. void glPolygonOffset(GLfloat factor, GLfloat units);
  146. void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
  147. void glReleaseShaderCompiler(void);
  148. void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
  149. void glSampleCoverage(GLclampf value, GLboolean invert);
  150. void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
  151. void glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
  152. void glShaderSource(GLuint shader, GLsizei count, const GLchar* *string, const GLint* length);
  153. void glStencilFunc(GLenum func, GLint ref, GLuint mask);
  154. void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
  155. void glStencilMask(GLuint mask);
  156. void glStencilMaskSeparate(GLenum face, GLuint mask);
  157. void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
  158. void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
  159. void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
  160. void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
  161. void glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
  162. void glTexParameteri(GLenum target, GLenum pname, GLint param);
  163. void glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
  164. void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
  165. void glUniform1f(GLint location, GLfloat x);
  166. void glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
  167. void glUniform1i(GLint location, GLint x);
  168. void glUniform1iv(GLint location, GLsizei count, const GLint* v);
  169. void glUniform2f(GLint location, GLfloat x, GLfloat y);
  170. void glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
  171. void glUniform2i(GLint location, GLint x, GLint y);
  172. void glUniform2iv(GLint location, GLsizei count, const GLint* v);
  173. void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
  174. void glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
  175. void glUniform3i(GLint location, GLint x, GLint y, GLint z);
  176. void glUniform3iv(GLint location, GLsizei count, const GLint* v);
  177. void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  178. void glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
  179. void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
  180. void glUniform4iv(GLint location, GLsizei count, const GLint* v);
  181. void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  182. void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  183. void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
  184. void glUseProgram(GLuint program);
  185. void glValidateProgram(GLuint program);
  186. void glVertexAttrib1f(GLuint indx, GLfloat x);
  187. void glVertexAttrib1fv(GLuint indx, const GLfloat* values);
  188. void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
  189. void glVertexAttrib2fv(GLuint indx, const GLfloat* values);
  190. void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
  191. void glVertexAttrib3fv(GLuint indx, const GLfloat* values);
  192. void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  193. void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
  194. void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
  195. void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
  196. private:
  197. friend class QOpenGLContext;
  198. static bool isContextCompatible(QOpenGLContext *context);
  199. static QOpenGLVersionProfile versionProfile();
  200. // For future expansion - not used
  201. QOpenGLFunctions_ES2Private* d_es2;
  202. };
  203. // OpenGL ES2 core functions
  204. inline void QOpenGLFunctions_ES2::glActiveTexture(GLenum texture)
  205. {
  206. ::glActiveTexture(texture);
  207. }
  208. inline void QOpenGLFunctions_ES2::glAttachShader(GLuint program, GLuint shader)
  209. {
  210. ::glAttachShader(program, shader);
  211. }
  212. inline void QOpenGLFunctions_ES2::glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
  213. {
  214. ::glBindAttribLocation(program, index, name);
  215. }
  216. inline void QOpenGLFunctions_ES2::glBindBuffer(GLenum target, GLuint buffer)
  217. {
  218. ::glBindBuffer(target, buffer);
  219. }
  220. inline void QOpenGLFunctions_ES2::glBindFramebuffer(GLenum target, GLuint framebuffer)
  221. {
  222. ::glBindFramebuffer(target, framebuffer);
  223. }
  224. inline void QOpenGLFunctions_ES2::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
  225. {
  226. ::glBindRenderbuffer(target, renderbuffer);
  227. }
  228. inline void QOpenGLFunctions_ES2::glBindTexture(GLenum target, GLuint texture)
  229. {
  230. ::glBindTexture(target, texture);
  231. }
  232. inline void QOpenGLFunctions_ES2::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  233. {
  234. ::glBlendColor(red, green, blue, alpha);
  235. }
  236. inline void QOpenGLFunctions_ES2::glBlendEquation(GLenum mode)
  237. {
  238. ::glBlendEquation(mode);
  239. }
  240. inline void QOpenGLFunctions_ES2::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
  241. {
  242. ::glBlendEquationSeparate(modeRGB, modeAlpha);
  243. }
  244. inline void QOpenGLFunctions_ES2::glBlendFunc(GLenum sfactor, GLenum dfactor)
  245. {
  246. ::glBlendFunc(sfactor, dfactor);
  247. }
  248. inline void QOpenGLFunctions_ES2::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
  249. {
  250. ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
  251. }
  252. inline void QOpenGLFunctions_ES2::glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
  253. {
  254. ::glBufferData(target, size, data, usage);
  255. }
  256. inline void QOpenGLFunctions_ES2::glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
  257. {
  258. ::glBufferSubData(target, offset, size, data);
  259. }
  260. inline GLenum QOpenGLFunctions_ES2::glCheckFramebufferStatus(GLenum target)
  261. {
  262. return ::glCheckFramebufferStatus(target);
  263. }
  264. inline void QOpenGLFunctions_ES2::glClear(GLbitfield mask)
  265. {
  266. ::glClear(mask);
  267. }
  268. inline void QOpenGLFunctions_ES2::glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  269. {
  270. ::glClearColor(red, green, blue, alpha);
  271. }
  272. inline void QOpenGLFunctions_ES2::glClearDepthf(GLclampf depth)
  273. {
  274. ::glClearDepthf(depth);
  275. }
  276. inline void QOpenGLFunctions_ES2::glClearStencil(GLint s)
  277. {
  278. ::glClearStencil(s);
  279. }
  280. inline void QOpenGLFunctions_ES2::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
  281. {
  282. ::glColorMask(red, green, blue, alpha);
  283. }
  284. inline void QOpenGLFunctions_ES2::glCompileShader(GLuint shader)
  285. {
  286. ::glCompileShader(shader);
  287. }
  288. inline void QOpenGLFunctions_ES2::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
  289. {
  290. ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
  291. }
  292. inline void QOpenGLFunctions_ES2::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
  293. {
  294. ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
  295. }
  296. inline void QOpenGLFunctions_ES2::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
  297. {
  298. ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
  299. }
  300. inline void QOpenGLFunctions_ES2::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  301. {
  302. ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
  303. }
  304. inline GLuint QOpenGLFunctions_ES2::glCreateProgram(void)
  305. {
  306. return ::glCreateProgram();
  307. }
  308. inline GLuint QOpenGLFunctions_ES2::glCreateShader(GLenum type)
  309. {
  310. return ::glCreateShader(type);
  311. }
  312. inline void QOpenGLFunctions_ES2::glCullFace(GLenum mode)
  313. {
  314. ::glCullFace(mode);
  315. }
  316. inline void QOpenGLFunctions_ES2::glDeleteBuffers(GLsizei n, const GLuint* buffers)
  317. {
  318. ::glDeleteBuffers(n, buffers);
  319. }
  320. inline void QOpenGLFunctions_ES2::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
  321. {
  322. ::glDeleteFramebuffers(n, framebuffers);
  323. }
  324. inline void QOpenGLFunctions_ES2::glDeleteProgram(GLuint program)
  325. {
  326. ::glDeleteProgram(program);
  327. }
  328. inline void QOpenGLFunctions_ES2::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
  329. {
  330. ::glDeleteRenderbuffers(n, renderbuffers);
  331. }
  332. inline void QOpenGLFunctions_ES2::glDeleteShader(GLuint shader)
  333. {
  334. ::glDeleteShader(shader);
  335. }
  336. inline void QOpenGLFunctions_ES2::glDeleteTextures(GLsizei n, const GLuint* textures)
  337. {
  338. ::glDeleteTextures(n, textures);
  339. }
  340. inline void QOpenGLFunctions_ES2::glDepthFunc(GLenum func)
  341. {
  342. ::glDepthFunc(func);
  343. }
  344. inline void QOpenGLFunctions_ES2::glDepthMask(GLboolean flag)
  345. {
  346. ::glDepthMask(flag);
  347. }
  348. inline void QOpenGLFunctions_ES2::glDepthRangef(GLclampf zNear, GLclampf zFar)
  349. {
  350. ::glDepthRangef(zNear, zFar);
  351. }
  352. inline void QOpenGLFunctions_ES2::glDetachShader(GLuint program, GLuint shader)
  353. {
  354. ::glDetachShader(program, shader);
  355. }
  356. inline void QOpenGLFunctions_ES2::glDisable(GLenum cap)
  357. {
  358. ::glDisable(cap);
  359. }
  360. inline void QOpenGLFunctions_ES2::glDisableVertexAttribArray(GLuint index)
  361. {
  362. ::glDisableVertexAttribArray(index);
  363. }
  364. inline void QOpenGLFunctions_ES2::glDrawArrays(GLenum mode, GLint first, GLsizei count)
  365. {
  366. ::glDrawArrays(mode, first, count);
  367. }
  368. inline void QOpenGLFunctions_ES2::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
  369. {
  370. ::glDrawElements(mode, count, type, indices);
  371. }
  372. inline void QOpenGLFunctions_ES2::glEnable(GLenum cap)
  373. {
  374. ::glEnable(cap);
  375. }
  376. inline void QOpenGLFunctions_ES2::glEnableVertexAttribArray(GLuint index)
  377. {
  378. ::glEnableVertexAttribArray(index);
  379. }
  380. inline void QOpenGLFunctions_ES2::glFinish(void)
  381. {
  382. ::glFinish();
  383. }
  384. inline void QOpenGLFunctions_ES2::glFlush(void)
  385. {
  386. ::glFlush();
  387. }
  388. inline void QOpenGLFunctions_ES2::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
  389. {
  390. ::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
  391. }
  392. inline void QOpenGLFunctions_ES2::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
  393. {
  394. ::glFramebufferTexture2D(target, attachment, textarget, texture, level);
  395. }
  396. inline void QOpenGLFunctions_ES2::glFrontFace(GLenum mode)
  397. {
  398. ::glFrontFace(mode);
  399. }
  400. inline void QOpenGLFunctions_ES2::glGenBuffers(GLsizei n, GLuint* buffers)
  401. {
  402. ::glGenBuffers(n, buffers);
  403. }
  404. inline void QOpenGLFunctions_ES2::glGenerateMipmap(GLenum target)
  405. {
  406. ::glGenerateMipmap(target);
  407. }
  408. inline void QOpenGLFunctions_ES2::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
  409. {
  410. ::glGenFramebuffers(n, framebuffers);
  411. }
  412. inline void QOpenGLFunctions_ES2::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
  413. {
  414. ::glGenRenderbuffers(n, renderbuffers);
  415. }
  416. inline void QOpenGLFunctions_ES2::glGenTextures(GLsizei n, GLuint* textures)
  417. {
  418. ::glGenTextures(n, textures);
  419. }
  420. inline void QOpenGLFunctions_ES2::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
  421. {
  422. ::glGetActiveAttrib(program, index, bufsize, length, size, type, name);
  423. }
  424. inline void QOpenGLFunctions_ES2::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
  425. {
  426. ::glGetActiveUniform(program, index, bufsize, length, size, type, name);
  427. }
  428. inline void QOpenGLFunctions_ES2::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
  429. {
  430. ::glGetAttachedShaders(program, maxcount, count, shaders);
  431. }
  432. inline int QOpenGLFunctions_ES2::glGetAttribLocation(GLuint program, const GLchar* name)
  433. {
  434. return ::glGetAttribLocation(program, name);
  435. }
  436. inline void QOpenGLFunctions_ES2::glGetBooleanv(GLenum pname, GLboolean* params)
  437. {
  438. ::glGetBooleanv(pname, params);
  439. }
  440. inline void QOpenGLFunctions_ES2::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
  441. {
  442. ::glGetBufferParameteriv(target, pname, params);
  443. }
  444. inline GLenum QOpenGLFunctions_ES2::glGetError(void)
  445. {
  446. return ::glGetError();
  447. }
  448. inline void QOpenGLFunctions_ES2::glGetFloatv(GLenum pname, GLfloat* params)
  449. {
  450. ::glGetFloatv(pname, params);
  451. }
  452. inline void QOpenGLFunctions_ES2::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
  453. {
  454. ::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
  455. }
  456. inline void QOpenGLFunctions_ES2::glGetIntegerv(GLenum pname, GLint* params)
  457. {
  458. ::glGetIntegerv(pname, params);
  459. }
  460. inline void QOpenGLFunctions_ES2::glGetProgramiv(GLuint program, GLenum pname, GLint* params)
  461. {
  462. ::glGetProgramiv(program, pname, params);
  463. }
  464. inline void QOpenGLFunctions_ES2::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
  465. {
  466. ::glGetProgramInfoLog(program, bufsize, length, infolog);
  467. }
  468. inline void QOpenGLFunctions_ES2::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
  469. {
  470. ::glGetRenderbufferParameteriv(target, pname, params);
  471. }
  472. inline void QOpenGLFunctions_ES2::glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
  473. {
  474. ::glGetShaderiv(shader, pname, params);
  475. }
  476. inline void QOpenGLFunctions_ES2::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
  477. {
  478. ::glGetShaderInfoLog(shader, bufsize, length, infolog);
  479. }
  480. inline void QOpenGLFunctions_ES2::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
  481. {
  482. ::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
  483. }
  484. inline void QOpenGLFunctions_ES2::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
  485. {
  486. ::glGetShaderSource(shader, bufsize, length, source);
  487. }
  488. inline const GLubyte* QOpenGLFunctions_ES2::glGetString(GLenum name)
  489. {
  490. return ::glGetString(name);
  491. }
  492. inline void QOpenGLFunctions_ES2::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
  493. {
  494. ::glGetTexParameterfv(target, pname, params);
  495. }
  496. inline void QOpenGLFunctions_ES2::glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
  497. {
  498. ::glGetTexParameteriv(target, pname, params);
  499. }
  500. inline void QOpenGLFunctions_ES2::glGetUniformfv(GLuint program, GLint location, GLfloat* params)
  501. {
  502. ::glGetUniformfv(program, location, params);
  503. }
  504. inline void QOpenGLFunctions_ES2::glGetUniformiv(GLuint program, GLint location, GLint* params)
  505. {
  506. ::glGetUniformiv(program, location, params);
  507. }
  508. inline int QOpenGLFunctions_ES2::glGetUniformLocation(GLuint program, const GLchar* name)
  509. {
  510. return ::glGetUniformLocation(program, name);
  511. }
  512. inline void QOpenGLFunctions_ES2::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
  513. {
  514. ::glGetVertexAttribfv(index, pname, params);
  515. }
  516. inline void QOpenGLFunctions_ES2::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
  517. {
  518. ::glGetVertexAttribiv(index, pname, params);
  519. }
  520. inline void QOpenGLFunctions_ES2::glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
  521. {
  522. ::glGetVertexAttribPointerv(index, pname, pointer);
  523. }
  524. inline void QOpenGLFunctions_ES2::glHint(GLenum target, GLenum mode)
  525. {
  526. ::glHint(target, mode);
  527. }
  528. inline GLboolean QOpenGLFunctions_ES2::glIsBuffer(GLuint buffer)
  529. {
  530. return ::glIsBuffer(buffer);
  531. }
  532. inline GLboolean QOpenGLFunctions_ES2::glIsEnabled(GLenum cap)
  533. {
  534. return ::glIsEnabled(cap);
  535. }
  536. inline GLboolean QOpenGLFunctions_ES2::glIsFramebuffer(GLuint framebuffer)
  537. {
  538. return ::glIsFramebuffer(framebuffer);
  539. }
  540. inline GLboolean QOpenGLFunctions_ES2::glIsProgram(GLuint program)
  541. {
  542. return ::glIsProgram(program);
  543. }
  544. inline GLboolean QOpenGLFunctions_ES2::glIsRenderbuffer(GLuint renderbuffer)
  545. {
  546. return ::glIsRenderbuffer(renderbuffer);
  547. }
  548. inline GLboolean QOpenGLFunctions_ES2::glIsShader(GLuint shader)
  549. {
  550. return ::glIsShader(shader);
  551. }
  552. inline GLboolean QOpenGLFunctions_ES2::glIsTexture(GLuint texture)
  553. {
  554. return ::glIsTexture(texture);
  555. }
  556. inline void QOpenGLFunctions_ES2::glLineWidth(GLfloat width)
  557. {
  558. ::glLineWidth(width);
  559. }
  560. inline void QOpenGLFunctions_ES2::glLinkProgram(GLuint program)
  561. {
  562. ::glLinkProgram(program);
  563. }
  564. inline void QOpenGLFunctions_ES2::glPixelStorei(GLenum pname, GLint param)
  565. {
  566. ::glPixelStorei(pname, param);
  567. }
  568. inline void QOpenGLFunctions_ES2::glPolygonOffset(GLfloat factor, GLfloat units)
  569. {
  570. ::glPolygonOffset(factor, units);
  571. }
  572. inline void QOpenGLFunctions_ES2::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
  573. {
  574. ::glReadPixels(x, y, width, height, format, type, pixels);
  575. }
  576. inline void QOpenGLFunctions_ES2::glReleaseShaderCompiler(void)
  577. {
  578. ::glReleaseShaderCompiler();
  579. }
  580. inline void QOpenGLFunctions_ES2::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
  581. {
  582. ::glRenderbufferStorage(target, internalformat, width, height);
  583. }
  584. inline void QOpenGLFunctions_ES2::glSampleCoverage(GLclampf value, GLboolean invert)
  585. {
  586. ::glSampleCoverage(value, invert);
  587. }
  588. inline void QOpenGLFunctions_ES2::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
  589. {
  590. ::glScissor(x, y, width, height);
  591. }
  592. inline void QOpenGLFunctions_ES2::glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
  593. {
  594. ::glShaderBinary(n, shaders, binaryformat, binary, length);
  595. }
  596. inline void QOpenGLFunctions_ES2::glShaderSource(GLuint shader, GLsizei count, const GLchar* *string, const GLint* length)
  597. {
  598. ::glShaderSource(shader, count, string, length);
  599. }
  600. inline void QOpenGLFunctions_ES2::glStencilFunc(GLenum func, GLint ref, GLuint mask)
  601. {
  602. ::glStencilFunc(func, ref, mask);
  603. }
  604. inline void QOpenGLFunctions_ES2::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
  605. {
  606. ::glStencilFuncSeparate(face, func, ref, mask);
  607. }
  608. inline void QOpenGLFunctions_ES2::glStencilMask(GLuint mask)
  609. {
  610. ::glStencilMask(mask);
  611. }
  612. inline void QOpenGLFunctions_ES2::glStencilMaskSeparate(GLenum face, GLuint mask)
  613. {
  614. ::glStencilMaskSeparate(face, mask);
  615. }
  616. inline void QOpenGLFunctions_ES2::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
  617. {
  618. ::glStencilOp(fail, zfail, zpass);
  619. }
  620. inline void QOpenGLFunctions_ES2::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
  621. {
  622. ::glStencilOpSeparate(face, fail, zfail, zpass);
  623. }
  624. inline void QOpenGLFunctions_ES2::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
  625. {
  626. ::glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
  627. }
  628. inline void QOpenGLFunctions_ES2::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
  629. {
  630. ::glTexParameterf(target, pname, param);
  631. }
  632. inline void QOpenGLFunctions_ES2::glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
  633. {
  634. ::glTexParameterfv(target, pname, params);
  635. }
  636. inline void QOpenGLFunctions_ES2::glTexParameteri(GLenum target, GLenum pname, GLint param)
  637. {
  638. ::glTexParameteri(target, pname, param);
  639. }
  640. inline void QOpenGLFunctions_ES2::glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
  641. {
  642. ::glTexParameteriv(target, pname, params);
  643. }
  644. inline void QOpenGLFunctions_ES2::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
  645. {
  646. ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
  647. }
  648. inline void QOpenGLFunctions_ES2::glUniform1f(GLint location, GLfloat x)
  649. {
  650. ::glUniform1f(location, x);
  651. }
  652. inline void QOpenGLFunctions_ES2::glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
  653. {
  654. ::glUniform1fv(location, count, v);
  655. }
  656. inline void QOpenGLFunctions_ES2::glUniform1i(GLint location, GLint x)
  657. {
  658. ::glUniform1i(location, x);
  659. }
  660. inline void QOpenGLFunctions_ES2::glUniform1iv(GLint location, GLsizei count, const GLint* v)
  661. {
  662. ::glUniform1iv(location, count, v);
  663. }
  664. inline void QOpenGLFunctions_ES2::glUniform2f(GLint location, GLfloat x, GLfloat y)
  665. {
  666. ::glUniform2f(location, x, y);
  667. }
  668. inline void QOpenGLFunctions_ES2::glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
  669. {
  670. ::glUniform2fv(location, count, v);
  671. }
  672. inline void QOpenGLFunctions_ES2::glUniform2i(GLint location, GLint x, GLint y)
  673. {
  674. ::glUniform2i(location, x, y);
  675. }
  676. inline void QOpenGLFunctions_ES2::glUniform2iv(GLint location, GLsizei count, const GLint* v)
  677. {
  678. ::glUniform2iv(location, count, v);
  679. }
  680. inline void QOpenGLFunctions_ES2::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
  681. {
  682. ::glUniform3f(location, x, y, z);
  683. }
  684. inline void QOpenGLFunctions_ES2::glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
  685. {
  686. ::glUniform3fv(location, count, v);
  687. }
  688. inline void QOpenGLFunctions_ES2::glUniform3i(GLint location, GLint x, GLint y, GLint z)
  689. {
  690. ::glUniform3i(location, x, y, z);
  691. }
  692. inline void QOpenGLFunctions_ES2::glUniform3iv(GLint location, GLsizei count, const GLint* v)
  693. {
  694. ::glUniform3iv(location, count, v);
  695. }
  696. inline void QOpenGLFunctions_ES2::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  697. {
  698. ::glUniform4f(location, x, y, z, w);
  699. }
  700. inline void QOpenGLFunctions_ES2::glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
  701. {
  702. ::glUniform4fv(location, count, v);
  703. }
  704. inline void QOpenGLFunctions_ES2::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
  705. {
  706. ::glUniform4i(location, x, y, z, w);
  707. }
  708. inline void QOpenGLFunctions_ES2::glUniform4iv(GLint location, GLsizei count, const GLint* v)
  709. {
  710. ::glUniform4iv(location, count, v);
  711. }
  712. inline void QOpenGLFunctions_ES2::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
  713. {
  714. ::glUniformMatrix2fv(location, count, transpose, value);
  715. }
  716. inline void QOpenGLFunctions_ES2::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
  717. {
  718. ::glUniformMatrix3fv(location, count, transpose, value);
  719. }
  720. inline void QOpenGLFunctions_ES2::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
  721. {
  722. ::glUniformMatrix4fv(location, count, transpose, value);
  723. }
  724. inline void QOpenGLFunctions_ES2::glUseProgram(GLuint program)
  725. {
  726. ::glUseProgram(program);
  727. }
  728. inline void QOpenGLFunctions_ES2::glValidateProgram(GLuint program)
  729. {
  730. ::glValidateProgram(program);
  731. }
  732. inline void QOpenGLFunctions_ES2::glVertexAttrib1f(GLuint indx, GLfloat x)
  733. {
  734. ::glVertexAttrib1f(indx, x);
  735. }
  736. inline void QOpenGLFunctions_ES2::glVertexAttrib1fv(GLuint indx, const GLfloat* values)
  737. {
  738. ::glVertexAttrib1fv(indx, values);
  739. }
  740. inline void QOpenGLFunctions_ES2::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
  741. {
  742. ::glVertexAttrib2f(indx, x, y);
  743. }
  744. inline void QOpenGLFunctions_ES2::glVertexAttrib2fv(GLuint indx, const GLfloat* values)
  745. {
  746. ::glVertexAttrib2fv(indx, values);
  747. }
  748. inline void QOpenGLFunctions_ES2::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
  749. {
  750. ::glVertexAttrib3f(indx, x, y, z);
  751. }
  752. inline void QOpenGLFunctions_ES2::glVertexAttrib3fv(GLuint indx, const GLfloat* values)
  753. {
  754. ::glVertexAttrib3fv(indx, values);
  755. }
  756. inline void QOpenGLFunctions_ES2::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  757. {
  758. ::glVertexAttrib4f(indx, x, y, z, w);
  759. }
  760. inline void QOpenGLFunctions_ES2::glVertexAttrib4fv(GLuint indx, const GLfloat* values)
  761. {
  762. ::glVertexAttrib4fv(indx, values);
  763. }
  764. inline void QOpenGLFunctions_ES2::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
  765. {
  766. ::glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
  767. }
  768. inline void QOpenGLFunctions_ES2::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
  769. {
  770. ::glViewport(x, y, width, height);
  771. }
  772. QT_END_NAMESPACE
  773. #endif // QT_OPENGL_ES_2
  774. #endif