qopenglversionfunctions.h 109 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
  4. ** Copyright (C) 2016 The Qt Company Ltd.
  5. ** Contact: https://www.qt.io/licensing/
  6. **
  7. ** This file is part of the QtGui module of the Qt Toolkit.
  8. **
  9. ** $QT_BEGIN_LICENSE:LGPL$
  10. ** Commercial License Usage
  11. ** Licensees holding valid commercial Qt licenses may use this file in
  12. ** accordance with the commercial license agreement provided with the
  13. ** Software or, alternatively, in accordance with the terms contained in
  14. ** a written agreement between you and The Qt Company. For licensing terms
  15. ** and conditions see https://www.qt.io/terms-conditions. For further
  16. ** information use the contact form at https://www.qt.io/contact-us.
  17. **
  18. ** GNU Lesser General Public License Usage
  19. ** Alternatively, this file may be used under the terms of the GNU Lesser
  20. ** General Public License version 3 as published by the Free Software
  21. ** Foundation and appearing in the file LICENSE.LGPL3 included in the
  22. ** packaging of this file. Please review the following information to
  23. ** ensure the GNU Lesser General Public License version 3 requirements
  24. ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
  25. **
  26. ** GNU General Public License Usage
  27. ** Alternatively, this file may be used under the terms of the GNU
  28. ** General Public License version 2.0 or (at your option) the GNU General
  29. ** Public license version 3 or any later version approved by the KDE Free
  30. ** Qt Foundation. The licenses are as published by the Free Software
  31. ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
  32. ** included in the packaging of this file. Please review the following
  33. ** information to ensure the GNU General Public License requirements will
  34. ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
  35. ** https://www.gnu.org/licenses/gpl-3.0.html.
  36. **
  37. ** $QT_END_LICENSE$
  38. **
  39. **
  40. ** This file was generated by glgen version 0.1
  41. ** Command line was: glgen
  42. **
  43. ** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
  44. **
  45. ** This is an auto-generated file.
  46. ** Do not edit! All changes made to it will be lost.
  47. **
  48. ****************************************************************************/
  49. #ifndef QOPENGLVERSIONFUNCTIONS_H
  50. #define QOPENGLVERSIONFUNCTIONS_H
  51. #include <QtCore/qglobal.h>
  52. #ifndef QT_NO_OPENGL
  53. #if QT_DEPRECATED_SINCE(5, 6)
  54. #include <QtCore/qhash.h>
  55. #endif
  56. #include <QtCore/qhashfunctions.h>
  57. #include <QtCore/qpair.h>
  58. #include <QtGui/qopengl.h>
  59. QT_BEGIN_NAMESPACE
  60. class QOpenGLContext;
  61. #if 0
  62. // silence syncqt warnings
  63. #pragma qt_class(QOpenGLVersionFunctions)
  64. #pragma qt_sync_stop_processing
  65. #endif
  66. #define QOPENGL_DEPRECATEDFUNCTION \
  67. qFatal("This function was erroneously included in previous versions of Qt and is here only for binary compatibility. " \
  68. "If you need to use this function, please use a legacy OpenGL version or a Compatibility profile.")
  69. struct QOpenGLVersionStatus
  70. {
  71. enum OpenGLStatus {
  72. CoreStatus,
  73. DeprecatedStatus,
  74. InvalidStatus
  75. };
  76. Q_DECL_CONSTEXPR QOpenGLVersionStatus()
  77. : version(0, 0),
  78. status(InvalidStatus)
  79. {}
  80. Q_DECL_CONSTEXPR QOpenGLVersionStatus(int majorVersion, int minorVersion, QOpenGLVersionStatus::OpenGLStatus functionStatus)
  81. : version(majorVersion, minorVersion),
  82. status(functionStatus)
  83. {}
  84. QPair<int, int> version;
  85. OpenGLStatus status;
  86. };
  87. inline uint qHash(const QOpenGLVersionStatus &v, uint seed = 0) Q_DECL_NOTHROW
  88. {
  89. return qHash(static_cast<int>(v.status * 1000)
  90. + v.version.first * 100 + v.version.second * 10, seed);
  91. }
  92. Q_DECL_CONSTEXPR inline bool operator==(const QOpenGLVersionStatus &lhs, const QOpenGLVersionStatus &rhs)
  93. {
  94. return lhs.status == rhs.status && lhs.version == rhs.version;
  95. }
  96. Q_DECL_CONSTEXPR inline bool operator!=(const QOpenGLVersionStatus &lhs, const QOpenGLVersionStatus &rhs)
  97. {
  98. return !operator==(lhs, rhs);
  99. }
  100. #define QT_OPENGL_DECLARE_FUNCTIONS(ret, name, args) \
  101. ret (QOPENGLF_APIENTRYP name)args;
  102. #define QT_OPENGL_COUNT_FUNCTIONS(ret, name, args) +1
  103. #define QT_OPENGL_DECLARE(FUNCTIONS) \
  104. public: \
  105. struct Functions { \
  106. FUNCTIONS(QT_OPENGL_DECLARE_FUNCTIONS) \
  107. }; \
  108. union { \
  109. QFunctionPointer functions[FUNCTIONS(QT_OPENGL_COUNT_FUNCTIONS)]; \
  110. Functions f; \
  111. }; \
  112. private: \
  113. void init()
  114. class QOpenGLVersionFunctionsBackend
  115. {
  116. public:
  117. #define QT_OPENGL_VERSIONS(F) \
  118. F(1_0_Core) \
  119. F(1_1_Core) \
  120. F(1_2_Core) \
  121. F(1_3_Core) \
  122. F(1_4_Core) \
  123. F(1_5_Core) \
  124. F(2_0_Core) \
  125. F(2_1_Core) \
  126. F(3_0_Core) \
  127. F(3_1_Core) \
  128. F(3_2_Core) \
  129. F(3_3_Core) \
  130. F(4_0_Core) \
  131. F(4_1_Core) \
  132. F(4_2_Core) \
  133. F(4_3_Core) \
  134. F(4_4_Core) \
  135. F(4_5_Core) \
  136. F(1_0_Deprecated) \
  137. F(1_1_Deprecated) \
  138. F(1_2_Deprecated) \
  139. F(1_3_Deprecated) \
  140. F(1_4_Deprecated) \
  141. F(2_0_Deprecated) \
  142. F(3_0_Deprecated) \
  143. F(3_3_Deprecated) \
  144. F(4_5_Deprecated) \
  145. #define VERSION_ENUM(X) OpenGL_##X,
  146. enum Version {
  147. QT_OPENGL_VERSIONS(VERSION_ENUM)
  148. OpenGLVersionBackendCount
  149. };
  150. #undef VERSION_ENUM
  151. QOpenGLVersionFunctionsBackend(QOpenGLContext *ctx)
  152. : context(ctx)
  153. {}
  154. QOpenGLContext *context;
  155. QAtomicInt refs;
  156. };
  157. class QOpenGLVersionFunctionsStorage
  158. {
  159. public:
  160. QOpenGLVersionFunctionsStorage();
  161. ~QOpenGLVersionFunctionsStorage();
  162. QOpenGLVersionFunctionsBackend *backend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v);
  163. QOpenGLVersionFunctionsBackend **backends;
  164. };
  165. class QAbstractOpenGLFunctions;
  166. class QAbstractOpenGLFunctionsPrivate
  167. {
  168. public:
  169. QAbstractOpenGLFunctionsPrivate()
  170. : owningContext(Q_NULLPTR),
  171. initialized(false)
  172. {}
  173. static QOpenGLVersionFunctionsBackend *functionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v);
  174. static void insertExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f);
  175. static void removeExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f);
  176. static QAbstractOpenGLFunctionsPrivate *get(QAbstractOpenGLFunctions *q);
  177. QOpenGLContext *owningContext;
  178. bool initialized;
  179. };
  180. class Q_GUI_EXPORT QAbstractOpenGLFunctions
  181. {
  182. public:
  183. virtual ~QAbstractOpenGLFunctions();
  184. virtual bool initializeOpenGLFunctions();
  185. Q_DECLARE_PRIVATE(QAbstractOpenGLFunctions)
  186. protected:
  187. QAbstractOpenGLFunctions();
  188. QAbstractOpenGLFunctionsPrivate *d_ptr;
  189. bool isInitialized() const;
  190. void setOwningContext(const QOpenGLContext *context);
  191. QOpenGLContext *owningContext() const;
  192. friend class QOpenGLContext;
  193. };
  194. inline QAbstractOpenGLFunctionsPrivate *QAbstractOpenGLFunctionsPrivate::get(QAbstractOpenGLFunctions *q)
  195. {
  196. return q->d_func();
  197. }
  198. #if !defined(QT_OPENGL_ES_2)
  199. class QOpenGLFunctions_1_0_CoreBackend : public QOpenGLVersionFunctionsBackend
  200. {
  201. public:
  202. QOpenGLFunctions_1_0_CoreBackend(QOpenGLContext *c)
  203. : QOpenGLVersionFunctionsBackend(c)
  204. {
  205. init();
  206. }
  207. Q_DECL_CONSTEXPR static Version versionStatus()
  208. { return OpenGL_1_0_Core; }
  209. // OpenGL 1.0 core functions
  210. #define QT_OPENGL_1_0_FUNCTIONS(F) \
  211. F(void, Viewport, (GLint x, GLint y, GLsizei width, GLsizei height)) \
  212. F(void, DepthRange, (GLdouble nearVal, GLdouble farVal)) \
  213. F(GLboolean, IsEnabled, (GLenum cap)) \
  214. F(void, GetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params)) \
  215. F(void, GetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params)) \
  216. F(void, GetTexParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  217. F(void, GetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
  218. F(void, GetTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)) \
  219. F(const GLubyte *, GetString, (GLenum name)) \
  220. F(void, GetIntegerv, (GLenum pname, GLint *data)) \
  221. F(void, GetFloatv, (GLenum pname, GLfloat *data)) \
  222. F(GLenum, GetError, ()) \
  223. F(void, GetDoublev, (GLenum pname, GLdouble *data)) \
  224. F(void, GetBooleanv, (GLenum pname, GLboolean *data)) \
  225. F(void, ReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) \
  226. F(void, ReadBuffer, (GLenum src)) \
  227. F(void, PixelStorei, (GLenum pname, GLint param)) \
  228. F(void, PixelStoref, (GLenum pname, GLfloat param)) \
  229. F(void, DepthFunc, (GLenum func)) \
  230. F(void, StencilOp, (GLenum fail, GLenum zfail, GLenum zpass)) \
  231. F(void, StencilFunc, (GLenum func, GLint ref, GLuint mask)) \
  232. F(void, LogicOp, (GLenum opcode)) \
  233. F(void, BlendFunc, (GLenum sfactor, GLenum dfactor)) \
  234. F(void, Flush, ()) \
  235. F(void, Finish, ()) \
  236. F(void, Enable, (GLenum cap)) \
  237. F(void, Disable, (GLenum cap)) \
  238. F(void, DepthMask, (GLboolean flag)) \
  239. F(void, ColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) \
  240. F(void, StencilMask, (GLuint mask)) \
  241. F(void, ClearDepth, (GLdouble depth)) \
  242. F(void, ClearStencil, (GLint s)) \
  243. F(void, ClearColor, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) \
  244. F(void, Clear, (GLbitfield mask)) \
  245. F(void, DrawBuffer, (GLenum buf)) \
  246. F(void, TexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) \
  247. F(void, TexImage1D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) \
  248. F(void, TexParameteriv, (GLenum target, GLenum pname, const GLint *params)) \
  249. F(void, TexParameteri, (GLenum target, GLenum pname, GLint param)) \
  250. F(void, TexParameterfv, (GLenum target, GLenum pname, const GLfloat *params)) \
  251. F(void, TexParameterf, (GLenum target, GLenum pname, GLfloat param)) \
  252. F(void, Scissor, (GLint x, GLint y, GLsizei width, GLsizei height)) \
  253. F(void, PolygonMode, (GLenum face, GLenum mode)) \
  254. F(void, PointSize, (GLfloat size)) \
  255. F(void, LineWidth, (GLfloat width)) \
  256. F(void, Hint, (GLenum target, GLenum mode)) \
  257. F(void, FrontFace, (GLenum mode)) \
  258. F(void, CullFace, (GLenum mode)) \
  259. QT_OPENGL_DECLARE(QT_OPENGL_1_0_FUNCTIONS);
  260. };
  261. class QOpenGLFunctions_1_1_CoreBackend : public QOpenGLVersionFunctionsBackend
  262. {
  263. public:
  264. QOpenGLFunctions_1_1_CoreBackend(QOpenGLContext *c)
  265. : QOpenGLVersionFunctionsBackend(c)
  266. {
  267. init();
  268. }
  269. Q_DECL_CONSTEXPR static Version versionStatus()
  270. { return OpenGL_1_1_Core; }
  271. // OpenGL 1.1 core functions
  272. #define QT_OPENGL_1_1_FUNCTIONS(F) \
  273. F(void, Indexubv, (const GLubyte *c)) \
  274. F(void, Indexub, (GLubyte c)) \
  275. F(GLboolean, IsTexture, (GLuint texture)) \
  276. F(void, GenTextures, (GLsizei n, GLuint *textures)) \
  277. F(void, DeleteTextures, (GLsizei n, const GLuint *textures)) \
  278. F(void, BindTexture, (GLenum target, GLuint texture)) \
  279. F(void, TexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) \
  280. F(void, TexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) \
  281. F(void, CopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
  282. F(void, CopyTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) \
  283. F(void, CopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) \
  284. F(void, CopyTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)) \
  285. F(void, PolygonOffset, (GLfloat factor, GLfloat units)) \
  286. F(void, GetPointerv, (GLenum pname, GLvoid* *params)) \
  287. F(void, DrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) \
  288. F(void, DrawArrays, (GLenum mode, GLint first, GLsizei count)) \
  289. QT_OPENGL_DECLARE(QT_OPENGL_1_1_FUNCTIONS);
  290. };
  291. class QOpenGLFunctions_1_2_CoreBackend : public QOpenGLVersionFunctionsBackend
  292. {
  293. public:
  294. QOpenGLFunctions_1_2_CoreBackend(QOpenGLContext *c)
  295. : QOpenGLVersionFunctionsBackend(c)
  296. {
  297. init();
  298. }
  299. Q_DECL_CONSTEXPR static Version versionStatus()
  300. { return OpenGL_1_2_Core; }
  301. // OpenGL 1.2 core functions
  302. #define QT_OPENGL_1_2_FUNCTIONS(F) \
  303. F(void, CopyTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
  304. F(void, TexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) \
  305. F(void, TexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) \
  306. F(void, DrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) \
  307. F(void, BlendEquation, (GLenum mode)) \
  308. F(void, BlendColor, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) \
  309. QT_OPENGL_DECLARE(QT_OPENGL_1_2_FUNCTIONS);
  310. };
  311. class QOpenGLFunctions_1_3_CoreBackend : public QOpenGLVersionFunctionsBackend
  312. {
  313. public:
  314. QOpenGLFunctions_1_3_CoreBackend(QOpenGLContext *c)
  315. : QOpenGLVersionFunctionsBackend(c)
  316. {
  317. init();
  318. }
  319. Q_DECL_CONSTEXPR static Version versionStatus()
  320. { return OpenGL_1_3_Core; }
  321. // OpenGL 1.3 core functions
  322. #define QT_OPENGL_1_3_FUNCTIONS(F) \
  323. F(void, GetCompressedTexImage, (GLenum target, GLint level, GLvoid *img)) \
  324. F(void, CompressedTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)) \
  325. F(void, CompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) \
  326. F(void, CompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) \
  327. F(void, CompressedTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)) \
  328. F(void, CompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) \
  329. F(void, CompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) \
  330. F(void, SampleCoverage, (GLfloat value, GLboolean invert)) \
  331. F(void, ActiveTexture, (GLenum texture)) \
  332. QT_OPENGL_DECLARE(QT_OPENGL_1_3_FUNCTIONS);
  333. };
  334. class QOpenGLFunctions_1_4_CoreBackend : public QOpenGLVersionFunctionsBackend
  335. {
  336. public:
  337. QOpenGLFunctions_1_4_CoreBackend(QOpenGLContext *c)
  338. : QOpenGLVersionFunctionsBackend(c)
  339. {
  340. init();
  341. }
  342. Q_DECL_CONSTEXPR static Version versionStatus()
  343. { return OpenGL_1_4_Core; }
  344. // OpenGL 1.4 core functions
  345. #define QT_OPENGL_1_4_FUNCTIONS(F) \
  346. F(void, PointParameteriv, (GLenum pname, const GLint *params)) \
  347. F(void, PointParameteri, (GLenum pname, GLint param)) \
  348. F(void, PointParameterfv, (GLenum pname, const GLfloat *params)) \
  349. F(void, PointParameterf, (GLenum pname, GLfloat param)) \
  350. F(void, MultiDrawElements, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount)) \
  351. F(void, MultiDrawArrays, (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount)) \
  352. F(void, BlendFuncSeparate, (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) \
  353. QT_OPENGL_DECLARE(QT_OPENGL_1_4_FUNCTIONS);
  354. };
  355. class QOpenGLFunctions_1_5_CoreBackend : public QOpenGLVersionFunctionsBackend
  356. {
  357. public:
  358. QOpenGLFunctions_1_5_CoreBackend(QOpenGLContext *c)
  359. : QOpenGLVersionFunctionsBackend(c)
  360. {
  361. init();
  362. }
  363. Q_DECL_CONSTEXPR static Version versionStatus()
  364. { return OpenGL_1_5_Core; }
  365. // OpenGL 1.5 core functions
  366. #define QT_OPENGL_1_5_FUNCTIONS(F) \
  367. F(void, GetBufferPointerv, (GLenum target, GLenum pname, GLvoid* *params)) \
  368. F(void, GetBufferParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  369. F(GLboolean, UnmapBuffer, (GLenum target)) \
  370. F(GLvoid*, MapBuffer, (GLenum target, GLenum access)) \
  371. F(void, GetBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)) \
  372. F(void, BufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)) \
  373. F(void, BufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)) \
  374. F(GLboolean, IsBuffer, (GLuint buffer)) \
  375. F(void, GenBuffers, (GLsizei n, GLuint *buffers)) \
  376. F(void, DeleteBuffers, (GLsizei n, const GLuint *buffers)) \
  377. F(void, BindBuffer, (GLenum target, GLuint buffer)) \
  378. F(void, GetQueryObjectuiv, (GLuint id, GLenum pname, GLuint *params)) \
  379. F(void, GetQueryObjectiv, (GLuint id, GLenum pname, GLint *params)) \
  380. F(void, GetQueryiv, (GLenum target, GLenum pname, GLint *params)) \
  381. F(void, EndQuery, (GLenum target)) \
  382. F(void, BeginQuery, (GLenum target, GLuint id)) \
  383. F(GLboolean, IsQuery, (GLuint id)) \
  384. F(void, DeleteQueries, (GLsizei n, const GLuint *ids)) \
  385. F(void, GenQueries, (GLsizei n, GLuint *ids)) \
  386. QT_OPENGL_DECLARE(QT_OPENGL_1_5_FUNCTIONS);
  387. };
  388. class QOpenGLFunctions_2_0_CoreBackend : public QOpenGLVersionFunctionsBackend
  389. {
  390. public:
  391. QOpenGLFunctions_2_0_CoreBackend(QOpenGLContext *c)
  392. : QOpenGLVersionFunctionsBackend(c)
  393. {
  394. init();
  395. }
  396. Q_DECL_CONSTEXPR static Version versionStatus()
  397. { return OpenGL_2_0_Core; }
  398. // OpenGL 2.0 core functions
  399. #define QT_OPENGL_2_0_FUNCTIONS(F) \
  400. F(void, VertexAttribPointer, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) \
  401. F(void, ValidateProgram, (GLuint program)) \
  402. F(void, UniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  403. F(void, UniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  404. F(void, UniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  405. F(void, Uniform4iv, (GLint location, GLsizei count, const GLint *value)) \
  406. F(void, Uniform3iv, (GLint location, GLsizei count, const GLint *value)) \
  407. F(void, Uniform2iv, (GLint location, GLsizei count, const GLint *value)) \
  408. F(void, Uniform1iv, (GLint location, GLsizei count, const GLint *value)) \
  409. F(void, Uniform4fv, (GLint location, GLsizei count, const GLfloat *value)) \
  410. F(void, Uniform3fv, (GLint location, GLsizei count, const GLfloat *value)) \
  411. F(void, Uniform2fv, (GLint location, GLsizei count, const GLfloat *value)) \
  412. F(void, Uniform1fv, (GLint location, GLsizei count, const GLfloat *value)) \
  413. F(void, Uniform4i, (GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) \
  414. F(void, Uniform3i, (GLint location, GLint v0, GLint v1, GLint v2)) \
  415. F(void, Uniform2i, (GLint location, GLint v0, GLint v1)) \
  416. F(void, Uniform1i, (GLint location, GLint v0)) \
  417. F(void, Uniform4f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) \
  418. F(void, Uniform3f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) \
  419. F(void, Uniform2f, (GLint location, GLfloat v0, GLfloat v1)) \
  420. F(void, Uniform1f, (GLint location, GLfloat v0)) \
  421. F(void, UseProgram, (GLuint program)) \
  422. F(void, ShaderSource, (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length)) \
  423. F(void, LinkProgram, (GLuint program)) \
  424. F(GLboolean, IsShader, (GLuint shader)) \
  425. F(GLboolean, IsProgram, (GLuint program)) \
  426. F(void, GetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid* *pointer)) \
  427. F(void, GetVertexAttribiv, (GLuint index, GLenum pname, GLint *params)) \
  428. F(void, GetVertexAttribfv, (GLuint index, GLenum pname, GLfloat *params)) \
  429. F(void, GetVertexAttribdv, (GLuint index, GLenum pname, GLdouble *params)) \
  430. F(void, GetUniformiv, (GLuint program, GLint location, GLint *params)) \
  431. F(void, GetUniformfv, (GLuint program, GLint location, GLfloat *params)) \
  432. F(GLint, GetUniformLocation, (GLuint program, const GLchar *name)) \
  433. F(void, GetShaderSource, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)) \
  434. F(void, GetShaderInfoLog, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) \
  435. F(void, GetShaderiv, (GLuint shader, GLenum pname, GLint *params)) \
  436. F(void, GetProgramInfoLog, (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) \
  437. F(void, GetProgramiv, (GLuint program, GLenum pname, GLint *params)) \
  438. F(GLint, GetAttribLocation, (GLuint program, const GLchar *name)) \
  439. F(void, GetAttachedShaders, (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)) \
  440. F(void, GetActiveUniform, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) \
  441. F(void, GetActiveAttrib, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) \
  442. F(void, EnableVertexAttribArray, (GLuint index)) \
  443. F(void, DisableVertexAttribArray, (GLuint index)) \
  444. F(void, DetachShader, (GLuint program, GLuint shader)) \
  445. F(void, DeleteShader, (GLuint shader)) \
  446. F(void, DeleteProgram, (GLuint program)) \
  447. F(GLuint, CreateShader, (GLenum type)) \
  448. F(GLuint, CreateProgram, ()) \
  449. F(void, CompileShader, (GLuint shader)) \
  450. F(void, BindAttribLocation, (GLuint program, GLuint index, const GLchar *name)) \
  451. F(void, AttachShader, (GLuint program, GLuint shader)) \
  452. F(void, StencilMaskSeparate, (GLenum face, GLuint mask)) \
  453. F(void, StencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask)) \
  454. F(void, StencilOpSeparate, (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)) \
  455. F(void, DrawBuffers, (GLsizei n, const GLenum *bufs)) \
  456. F(void, BlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha)) \
  457. F(void, VertexAttrib4usv, (GLuint index, const GLushort *v)) \
  458. F(void, VertexAttrib4uiv, (GLuint index, const GLuint *v)) \
  459. F(void, VertexAttrib4ubv, (GLuint index, const GLubyte *v)) \
  460. F(void, VertexAttrib4sv, (GLuint index, const GLshort *v)) \
  461. F(void, VertexAttrib4s, (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) \
  462. F(void, VertexAttrib4iv, (GLuint index, const GLint *v)) \
  463. F(void, VertexAttrib4fv, (GLuint index, const GLfloat *v)) \
  464. F(void, VertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
  465. F(void, VertexAttrib4dv, (GLuint index, const GLdouble *v)) \
  466. F(void, VertexAttrib4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
  467. F(void, VertexAttrib4bv, (GLuint index, const GLbyte *v)) \
  468. F(void, VertexAttrib4Nusv, (GLuint index, const GLushort *v)) \
  469. F(void, VertexAttrib4Nuiv, (GLuint index, const GLuint *v)) \
  470. F(void, VertexAttrib4Nubv, (GLuint index, const GLubyte *v)) \
  471. F(void, VertexAttrib4Nub, (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) \
  472. F(void, VertexAttrib4Nsv, (GLuint index, const GLshort *v)) \
  473. F(void, VertexAttrib4Niv, (GLuint index, const GLint *v)) \
  474. F(void, VertexAttrib4Nbv, (GLuint index, const GLbyte *v)) \
  475. F(void, VertexAttrib3sv, (GLuint index, const GLshort *v)) \
  476. F(void, VertexAttrib3s, (GLuint index, GLshort x, GLshort y, GLshort z)) \
  477. F(void, VertexAttrib3fv, (GLuint index, const GLfloat *v)) \
  478. F(void, VertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z)) \
  479. F(void, VertexAttrib3dv, (GLuint index, const GLdouble *v)) \
  480. F(void, VertexAttrib3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z)) \
  481. F(void, VertexAttrib2sv, (GLuint index, const GLshort *v)) \
  482. F(void, VertexAttrib2s, (GLuint index, GLshort x, GLshort y)) \
  483. F(void, VertexAttrib2fv, (GLuint index, const GLfloat *v)) \
  484. F(void, VertexAttrib2f, (GLuint index, GLfloat x, GLfloat y)) \
  485. F(void, VertexAttrib2dv, (GLuint index, const GLdouble *v)) \
  486. F(void, VertexAttrib2d, (GLuint index, GLdouble x, GLdouble y)) \
  487. F(void, VertexAttrib1sv, (GLuint index, const GLshort *v)) \
  488. F(void, VertexAttrib1s, (GLuint index, GLshort x)) \
  489. F(void, VertexAttrib1fv, (GLuint index, const GLfloat *v)) \
  490. F(void, VertexAttrib1f, (GLuint index, GLfloat x)) \
  491. F(void, VertexAttrib1dv, (GLuint index, const GLdouble *v)) \
  492. F(void, VertexAttrib1d, (GLuint index, GLdouble x)) \
  493. QT_OPENGL_DECLARE(QT_OPENGL_2_0_FUNCTIONS);
  494. };
  495. class QOpenGLFunctions_2_1_CoreBackend : public QOpenGLVersionFunctionsBackend
  496. {
  497. public:
  498. QOpenGLFunctions_2_1_CoreBackend(QOpenGLContext *c)
  499. : QOpenGLVersionFunctionsBackend(c)
  500. {
  501. init();
  502. }
  503. Q_DECL_CONSTEXPR static Version versionStatus()
  504. { return OpenGL_2_1_Core; }
  505. // OpenGL 2.1 core functions
  506. #define QT_OPENGL_2_1_FUNCTIONS(F) \
  507. F(void, UniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  508. F(void, UniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  509. F(void, UniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  510. F(void, UniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  511. F(void, UniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  512. F(void, UniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  513. QT_OPENGL_DECLARE(QT_OPENGL_2_1_FUNCTIONS);
  514. };
  515. class QOpenGLFunctions_3_0_CoreBackend : public QOpenGLVersionFunctionsBackend
  516. {
  517. public:
  518. QOpenGLFunctions_3_0_CoreBackend(QOpenGLContext *c)
  519. : QOpenGLVersionFunctionsBackend(c)
  520. {
  521. init();
  522. }
  523. Q_DECL_CONSTEXPR static Version versionStatus()
  524. { return OpenGL_3_0_Core; }
  525. // OpenGL 3.0 core functions
  526. #define QT_OPENGL_3_0_FUNCTIONS(F) \
  527. F(GLboolean, IsVertexArray, (GLuint array)) \
  528. F(void, GenVertexArrays, (GLsizei n, GLuint *arrays)) \
  529. F(void, DeleteVertexArrays, (GLsizei n, const GLuint *arrays)) \
  530. F(void, BindVertexArray, (GLuint array)) \
  531. F(void, FlushMappedBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length)) \
  532. F(GLvoid *, MapBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)) \
  533. F(void, FramebufferTextureLayer, (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) \
  534. F(void, RenderbufferStorageMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) \
  535. F(void, BlitFramebuffer, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) \
  536. F(void, GenerateMipmap, (GLenum target)) \
  537. F(void, GetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint *params)) \
  538. F(void, FramebufferRenderbuffer, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) \
  539. F(void, FramebufferTexture3D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) \
  540. F(void, FramebufferTexture2D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) \
  541. F(void, FramebufferTexture1D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) \
  542. F(GLenum, CheckFramebufferStatus, (GLenum target)) \
  543. F(void, GenFramebuffers, (GLsizei n, GLuint *framebuffers)) \
  544. F(void, DeleteFramebuffers, (GLsizei n, const GLuint *framebuffers)) \
  545. F(void, BindFramebuffer, (GLenum target, GLuint framebuffer)) \
  546. F(GLboolean, IsFramebuffer, (GLuint framebuffer)) \
  547. F(void, GetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  548. F(void, RenderbufferStorage, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) \
  549. F(void, GenRenderbuffers, (GLsizei n, GLuint *renderbuffers)) \
  550. F(void, DeleteRenderbuffers, (GLsizei n, const GLuint *renderbuffers)) \
  551. F(void, BindRenderbuffer, (GLenum target, GLuint renderbuffer)) \
  552. F(GLboolean, IsRenderbuffer, (GLuint renderbuffer)) \
  553. F(const GLubyte *, GetStringi, (GLenum name, GLuint index)) \
  554. F(void, ClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)) \
  555. F(void, ClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat *value)) \
  556. F(void, ClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint *value)) \
  557. F(void, ClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint *value)) \
  558. F(void, GetTexParameterIuiv, (GLenum target, GLenum pname, GLuint *params)) \
  559. F(void, GetTexParameterIiv, (GLenum target, GLenum pname, GLint *params)) \
  560. F(void, TexParameterIuiv, (GLenum target, GLenum pname, const GLuint *params)) \
  561. F(void, TexParameterIiv, (GLenum target, GLenum pname, const GLint *params)) \
  562. F(void, Uniform4uiv, (GLint location, GLsizei count, const GLuint *value)) \
  563. F(void, Uniform3uiv, (GLint location, GLsizei count, const GLuint *value)) \
  564. F(void, Uniform2uiv, (GLint location, GLsizei count, const GLuint *value)) \
  565. F(void, Uniform1uiv, (GLint location, GLsizei count, const GLuint *value)) \
  566. F(void, Uniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) \
  567. F(void, Uniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2)) \
  568. F(void, Uniform2ui, (GLint location, GLuint v0, GLuint v1)) \
  569. F(void, Uniform1ui, (GLint location, GLuint v0)) \
  570. F(GLint, GetFragDataLocation, (GLuint program, const GLchar *name)) \
  571. F(void, BindFragDataLocation, (GLuint program, GLuint color, const GLchar *name)) \
  572. F(void, GetUniformuiv, (GLuint program, GLint location, GLuint *params)) \
  573. F(void, GetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint *params)) \
  574. F(void, GetVertexAttribIiv, (GLuint index, GLenum pname, GLint *params)) \
  575. F(void, VertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
  576. F(void, EndConditionalRender, ()) \
  577. F(void, BeginConditionalRender, (GLuint id, GLenum mode)) \
  578. F(void, ClampColor, (GLenum target, GLenum clamp)) \
  579. F(void, GetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) \
  580. F(void, TransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode)) \
  581. F(void, BindBufferBase, (GLenum target, GLuint index, GLuint buffer)) \
  582. F(void, BindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) \
  583. F(void, EndTransformFeedback, ()) \
  584. F(void, BeginTransformFeedback, (GLenum primitiveMode)) \
  585. F(GLboolean, IsEnabledi, (GLenum target, GLuint index)) \
  586. F(void, Disablei, (GLenum target, GLuint index)) \
  587. F(void, Enablei, (GLenum target, GLuint index)) \
  588. F(void, GetIntegeri_v,(GLenum target, GLuint index, GLint *data)) \
  589. F(void, GetBooleani_v,(GLenum target, GLuint index, GLboolean *data)) \
  590. F(void, ColorMaski, (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) \
  591. F(void, VertexAttribI4usv, (GLuint index, const GLushort *v)) \
  592. F(void, VertexAttribI4ubv, (GLuint index, const GLubyte *v)) \
  593. F(void, VertexAttribI4sv, (GLuint index, const GLshort *v)) \
  594. F(void, VertexAttribI4bv, (GLuint index, const GLbyte *v)) \
  595. F(void, VertexAttribI4uiv, (GLuint index, const GLuint *v)) \
  596. F(void, VertexAttribI3uiv, (GLuint index, const GLuint *v)) \
  597. F(void, VertexAttribI2uiv, (GLuint index, const GLuint *v)) \
  598. F(void, VertexAttribI1uiv, (GLuint index, const GLuint *v)) \
  599. F(void, VertexAttribI4iv, (GLuint index, const GLint *v)) \
  600. F(void, VertexAttribI3iv, (GLuint index, const GLint *v)) \
  601. F(void, VertexAttribI2iv, (GLuint index, const GLint *v)) \
  602. F(void, VertexAttribI1iv, (GLuint index, const GLint *v)) \
  603. F(void, VertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) \
  604. F(void, VertexAttribI3ui, (GLuint index, GLuint x, GLuint y, GLuint z)) \
  605. F(void, VertexAttribI2ui, (GLuint index, GLuint x, GLuint y)) \
  606. F(void, VertexAttribI1ui, (GLuint index, GLuint x)) \
  607. F(void, VertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w)) \
  608. F(void, VertexAttribI3i, (GLuint index, GLint x, GLint y, GLint z)) \
  609. F(void, VertexAttribI2i, (GLuint index, GLint x, GLint y)) \
  610. F(void, VertexAttribI1i, (GLuint index, GLint x)) \
  611. QT_OPENGL_DECLARE(QT_OPENGL_3_0_FUNCTIONS);
  612. };
  613. class QOpenGLFunctions_3_1_CoreBackend : public QOpenGLVersionFunctionsBackend
  614. {
  615. public:
  616. QOpenGLFunctions_3_1_CoreBackend(QOpenGLContext *c)
  617. : QOpenGLVersionFunctionsBackend(c)
  618. {
  619. init();
  620. }
  621. Q_DECL_CONSTEXPR static Version versionStatus()
  622. { return OpenGL_3_1_Core; }
  623. // OpenGL 3.1 core functions
  624. #define QT_OPENGL_3_1_FUNCTIONS(F) \
  625. F(void, CopyBufferSubData, (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) \
  626. F(void, UniformBlockBinding, (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)) \
  627. F(void, GetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)) \
  628. F(void, GetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)) \
  629. F(GLuint, GetUniformBlockIndex, (GLuint program, const GLchar *uniformBlockName)) \
  630. F(void, GetActiveUniformName, (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName)) \
  631. F(void, GetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)) \
  632. F(void, GetUniformIndices, (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices)) \
  633. F(void, PrimitiveRestartIndex, (GLuint index)) \
  634. F(void, TexBuffer, (GLenum target, GLenum internalformat, GLuint buffer)) \
  635. F(void, DrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount)) \
  636. F(void, DrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei instancecount)) \
  637. QT_OPENGL_DECLARE(QT_OPENGL_3_1_FUNCTIONS);
  638. };
  639. class QOpenGLFunctions_3_2_CoreBackend : public QOpenGLVersionFunctionsBackend
  640. {
  641. public:
  642. QOpenGLFunctions_3_2_CoreBackend(QOpenGLContext *c)
  643. : QOpenGLVersionFunctionsBackend(c)
  644. {
  645. init();
  646. }
  647. Q_DECL_CONSTEXPR static Version versionStatus()
  648. { return OpenGL_3_2_Core; }
  649. // OpenGL 3.2 core functions
  650. #define QT_OPENGL_3_2_FUNCTIONS(F) \
  651. F(void, SampleMaski, (GLuint maskNumber, GLbitfield mask)) \
  652. F(void, GetMultisamplefv, (GLenum pname, GLuint index, GLfloat *val)) \
  653. F(void, TexImage3DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) \
  654. F(void, TexImage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) \
  655. F(void, GetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)) \
  656. F(void, GetInteger64v, (GLenum pname, GLint64 *data)) \
  657. F(void, WaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) \
  658. F(GLenum, ClientWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) \
  659. F(void, DeleteSync, (GLsync sync)) \
  660. F(GLboolean, IsSync, (GLsync sync)) \
  661. F(GLsync, FenceSync, (GLenum condition, GLbitfield flags)) \
  662. F(void, ProvokingVertex, (GLenum mode)) \
  663. F(void, MultiDrawElementsBaseVertex, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex)) \
  664. F(void, DrawElementsInstancedBaseVertex, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex)) \
  665. F(void, DrawRangeElementsBaseVertex, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) \
  666. F(void, DrawElementsBaseVertex, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) \
  667. F(void, FramebufferTexture, (GLenum target, GLenum attachment, GLuint texture, GLint level)) \
  668. F(void, GetBufferParameteri64v, (GLenum target, GLenum pname, GLint64 *params)) \
  669. F(void, GetInteger64i_v,(GLenum target, GLuint index, GLint64 *data))
  670. QT_OPENGL_DECLARE(QT_OPENGL_3_2_FUNCTIONS);
  671. };
  672. class QOpenGLFunctions_3_3_CoreBackend : public QOpenGLVersionFunctionsBackend
  673. {
  674. public:
  675. QOpenGLFunctions_3_3_CoreBackend(QOpenGLContext *c)
  676. : QOpenGLVersionFunctionsBackend(c)
  677. {
  678. init();
  679. }
  680. Q_DECL_CONSTEXPR static Version versionStatus()
  681. { return OpenGL_3_3_Core; }
  682. // OpenGL 3.3 core functions
  683. #define QT_OPENGL_3_3_FUNCTIONS(F) \
  684. F(void, VertexAttribP4uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) \
  685. F(void, VertexAttribP4ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) \
  686. F(void, VertexAttribP3uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) \
  687. F(void, VertexAttribP3ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) \
  688. F(void, VertexAttribP2uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) \
  689. F(void, VertexAttribP2ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) \
  690. F(void, VertexAttribP1uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) \
  691. F(void, VertexAttribP1ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) \
  692. F(void, SecondaryColorP3uiv, (GLenum type, const GLuint *color)) \
  693. F(void, SecondaryColorP3ui, (GLenum type, GLuint color)) \
  694. F(void, ColorP4uiv, (GLenum type, const GLuint *color)) \
  695. F(void, ColorP4ui, (GLenum type, GLuint color)) \
  696. F(void, ColorP3uiv, (GLenum type, const GLuint *color)) \
  697. F(void, ColorP3ui, (GLenum type, GLuint color)) \
  698. F(void, NormalP3uiv, (GLenum type, const GLuint *coords)) \
  699. F(void, NormalP3ui, (GLenum type, GLuint coords)) \
  700. F(void, MultiTexCoordP4uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
  701. F(void, MultiTexCoordP4ui, (GLenum texture, GLenum type, GLuint coords)) \
  702. F(void, MultiTexCoordP3uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
  703. F(void, MultiTexCoordP3ui, (GLenum texture, GLenum type, GLuint coords)) \
  704. F(void, MultiTexCoordP2uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
  705. F(void, MultiTexCoordP2ui, (GLenum texture, GLenum type, GLuint coords)) \
  706. F(void, MultiTexCoordP1uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
  707. F(void, MultiTexCoordP1ui, (GLenum texture, GLenum type, GLuint coords)) \
  708. F(void, TexCoordP4uiv, (GLenum type, const GLuint *coords)) \
  709. F(void, TexCoordP4ui, (GLenum type, GLuint coords)) \
  710. F(void, TexCoordP3uiv, (GLenum type, const GLuint *coords)) \
  711. F(void, TexCoordP3ui, (GLenum type, GLuint coords)) \
  712. F(void, TexCoordP2uiv, (GLenum type, const GLuint *coords)) \
  713. F(void, TexCoordP2ui, (GLenum type, GLuint coords)) \
  714. F(void, TexCoordP1uiv, (GLenum type, const GLuint *coords)) \
  715. F(void, TexCoordP1ui, (GLenum type, GLuint coords)) \
  716. F(void, VertexP4uiv, (GLenum type, const GLuint *value)) \
  717. F(void, VertexP4ui, (GLenum type, GLuint value)) \
  718. F(void, VertexP3uiv, (GLenum type, const GLuint *value)) \
  719. F(void, VertexP3ui, (GLenum type, GLuint value)) \
  720. F(void, VertexP2uiv, (GLenum type, const GLuint *value)) \
  721. F(void, VertexP2ui, (GLenum type, GLuint value)) \
  722. F(void, GetQueryObjectui64v, (GLuint id, GLenum pname, GLuint64 *params)) \
  723. F(void, GetQueryObjecti64v, (GLuint id, GLenum pname, GLint64 *params)) \
  724. F(void, QueryCounter, (GLuint id, GLenum target)) \
  725. F(void, GetSamplerParameterIuiv, (GLuint sampler, GLenum pname, GLuint *params)) \
  726. F(void, GetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat *params)) \
  727. F(void, GetSamplerParameterIiv, (GLuint sampler, GLenum pname, GLint *params)) \
  728. F(void, GetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint *params)) \
  729. F(void, SamplerParameterIuiv, (GLuint sampler, GLenum pname, const GLuint *param)) \
  730. F(void, SamplerParameterIiv, (GLuint sampler, GLenum pname, const GLint *param)) \
  731. F(void, SamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat *param)) \
  732. F(void, SamplerParameterf, (GLuint sampler, GLenum pname, GLfloat param)) \
  733. F(void, SamplerParameteriv, (GLuint sampler, GLenum pname, const GLint *param)) \
  734. F(void, SamplerParameteri, (GLuint sampler, GLenum pname, GLint param)) \
  735. F(void, BindSampler, (GLuint unit, GLuint sampler)) \
  736. F(GLboolean, IsSampler, (GLuint sampler)) \
  737. F(void, DeleteSamplers, (GLsizei count, const GLuint *samplers)) \
  738. F(void, GenSamplers, (GLsizei count, GLuint *samplers)) \
  739. F(GLint, GetFragDataIndex, (GLuint program, const GLchar *name)) \
  740. F(void, BindFragDataLocationIndexed, (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name)) \
  741. F(void, VertexAttribDivisor, (GLuint index, GLuint divisor)) \
  742. QT_OPENGL_DECLARE(QT_OPENGL_3_3_FUNCTIONS);
  743. };
  744. class QOpenGLFunctions_4_0_CoreBackend : public QOpenGLVersionFunctionsBackend
  745. {
  746. public:
  747. QOpenGLFunctions_4_0_CoreBackend(QOpenGLContext *c)
  748. : QOpenGLVersionFunctionsBackend(c)
  749. {
  750. init();
  751. }
  752. Q_DECL_CONSTEXPR static Version versionStatus()
  753. { return OpenGL_4_0_Core; }
  754. // OpenGL 4.0 core functions
  755. #define QT_OPENGL_4_0_FUNCTIONS(F) \
  756. F(void, GetQueryIndexediv, (GLenum target, GLuint index, GLenum pname, GLint *params)) \
  757. F(void, EndQueryIndexed, (GLenum target, GLuint index)) \
  758. F(void, BeginQueryIndexed, (GLenum target, GLuint index, GLuint id)) \
  759. F(void, DrawTransformFeedbackStream, (GLenum mode, GLuint id, GLuint stream)) \
  760. F(void, DrawTransformFeedback, (GLenum mode, GLuint id)) \
  761. F(void, ResumeTransformFeedback, ()) \
  762. F(void, PauseTransformFeedback, ()) \
  763. F(GLboolean, IsTransformFeedback, (GLuint id)) \
  764. F(void, GenTransformFeedbacks, (GLsizei n, GLuint *ids)) \
  765. F(void, DeleteTransformFeedbacks, (GLsizei n, const GLuint *ids)) \
  766. F(void, BindTransformFeedback, (GLenum target, GLuint id)) \
  767. F(void, PatchParameterfv, (GLenum pname, const GLfloat *values)) \
  768. F(void, PatchParameteri, (GLenum pname, GLint value)) \
  769. F(void, GetProgramStageiv, (GLuint program, GLenum shadertype, GLenum pname, GLint *values)) \
  770. F(void, GetUniformSubroutineuiv, (GLenum shadertype, GLint location, GLuint *params)) \
  771. F(void, UniformSubroutinesuiv, (GLenum shadertype, GLsizei count, const GLuint *indices)) \
  772. F(void, GetActiveSubroutineName, (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)) \
  773. F(void, GetActiveSubroutineUniformName, (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)) \
  774. F(void, GetActiveSubroutineUniformiv, (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values)) \
  775. F(GLuint, GetSubroutineIndex, (GLuint program, GLenum shadertype, const GLchar *name)) \
  776. F(GLint, GetSubroutineUniformLocation, (GLuint program, GLenum shadertype, const GLchar *name)) \
  777. F(void, GetUniformdv, (GLuint program, GLint location, GLdouble *params)) \
  778. F(void, UniformMatrix4x3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  779. F(void, UniformMatrix4x2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  780. F(void, UniformMatrix3x4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  781. F(void, UniformMatrix3x2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  782. F(void, UniformMatrix2x4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  783. F(void, UniformMatrix2x3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  784. F(void, UniformMatrix4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  785. F(void, UniformMatrix3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  786. F(void, UniformMatrix2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  787. F(void, Uniform4dv, (GLint location, GLsizei count, const GLdouble *value)) \
  788. F(void, Uniform3dv, (GLint location, GLsizei count, const GLdouble *value)) \
  789. F(void, Uniform2dv, (GLint location, GLsizei count, const GLdouble *value)) \
  790. F(void, Uniform1dv, (GLint location, GLsizei count, const GLdouble *value)) \
  791. F(void, Uniform4d, (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
  792. F(void, Uniform3d, (GLint location, GLdouble x, GLdouble y, GLdouble z)) \
  793. F(void, Uniform2d, (GLint location, GLdouble x, GLdouble y)) \
  794. F(void, Uniform1d, (GLint location, GLdouble x)) \
  795. F(void, DrawElementsIndirect, (GLenum mode, GLenum type, const GLvoid *indirect)) \
  796. F(void, DrawArraysIndirect, (GLenum mode, const GLvoid *indirect)) \
  797. F(void, BlendFuncSeparatei, (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) \
  798. F(void, BlendFunci, (GLuint buf, GLenum src, GLenum dst)) \
  799. F(void, BlendEquationSeparatei, (GLuint buf, GLenum modeRGB, GLenum modeAlpha)) \
  800. F(void, BlendEquationi, (GLuint buf, GLenum mode)) \
  801. F(void, MinSampleShading, (GLfloat value)) \
  802. QT_OPENGL_DECLARE(QT_OPENGL_4_0_FUNCTIONS);
  803. };
  804. class QOpenGLFunctions_4_1_CoreBackend : public QOpenGLVersionFunctionsBackend
  805. {
  806. public:
  807. QOpenGLFunctions_4_1_CoreBackend(QOpenGLContext *c)
  808. : QOpenGLVersionFunctionsBackend(c)
  809. {
  810. init();
  811. }
  812. Q_DECL_CONSTEXPR static Version versionStatus()
  813. { return OpenGL_4_1_Core; }
  814. // OpenGL 4.1 core functions
  815. #define QT_OPENGL_4_1_FUNCTIONS(F) \
  816. F(void, GetDoublei_v, (GLenum target, GLuint index, GLdouble *data)) \
  817. F(void, GetFloati_v,(GLenum target, GLuint index, GLfloat *data)) \
  818. F(void, DepthRangeIndexed, (GLuint index, GLdouble n, GLdouble f)) \
  819. F(void, DepthRangeArrayv, (GLuint first, GLsizei count, const GLdouble *v)) \
  820. F(void, ScissorIndexedv, (GLuint index, const GLint *v)) \
  821. F(void, ScissorIndexed, (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height)) \
  822. F(void, ScissorArrayv, (GLuint first, GLsizei count, const GLint *v)) \
  823. F(void, ViewportIndexedfv, (GLuint index, const GLfloat *v)) \
  824. F(void, ViewportIndexedf, (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)) \
  825. F(void, ViewportArrayv, (GLuint first, GLsizei count, const GLfloat *v)) \
  826. F(void, GetVertexAttribLdv, (GLuint index, GLenum pname, GLdouble *params)) \
  827. F(void, VertexAttribLPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
  828. F(void, VertexAttribL4dv, (GLuint index, const GLdouble *v)) \
  829. F(void, VertexAttribL3dv, (GLuint index, const GLdouble *v)) \
  830. F(void, VertexAttribL2dv, (GLuint index, const GLdouble *v)) \
  831. F(void, VertexAttribL1dv, (GLuint index, const GLdouble *v)) \
  832. F(void, VertexAttribL4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
  833. F(void, VertexAttribL3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z)) \
  834. F(void, VertexAttribL2d, (GLuint index, GLdouble x, GLdouble y)) \
  835. F(void, VertexAttribL1d, (GLuint index, GLdouble x)) \
  836. F(void, GetProgramPipelineInfoLog, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) \
  837. F(void, ValidateProgramPipeline, (GLuint pipeline)) \
  838. F(void, ProgramUniformMatrix4x3dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  839. F(void, ProgramUniformMatrix3x4dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  840. F(void, ProgramUniformMatrix4x2dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  841. F(void, ProgramUniformMatrix2x4dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  842. F(void, ProgramUniformMatrix3x2dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  843. F(void, ProgramUniformMatrix2x3dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  844. F(void, ProgramUniformMatrix4x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  845. F(void, ProgramUniformMatrix3x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  846. F(void, ProgramUniformMatrix4x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  847. F(void, ProgramUniformMatrix2x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  848. F(void, ProgramUniformMatrix3x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  849. F(void, ProgramUniformMatrix2x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  850. F(void, ProgramUniformMatrix4dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  851. F(void, ProgramUniformMatrix3dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  852. F(void, ProgramUniformMatrix2dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
  853. F(void, ProgramUniformMatrix4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  854. F(void, ProgramUniformMatrix3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  855. F(void, ProgramUniformMatrix2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  856. F(void, ProgramUniform4uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
  857. F(void, ProgramUniform4ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) \
  858. F(void, ProgramUniform4dv, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) \
  859. F(void, ProgramUniform4d, (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3)) \
  860. F(void, ProgramUniform4fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
  861. F(void, ProgramUniform4f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) \
  862. F(void, ProgramUniform4iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
  863. F(void, ProgramUniform4i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) \
  864. F(void, ProgramUniform3uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
  865. F(void, ProgramUniform3ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)) \
  866. F(void, ProgramUniform3dv, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) \
  867. F(void, ProgramUniform3d, (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2)) \
  868. F(void, ProgramUniform3fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
  869. F(void, ProgramUniform3f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) \
  870. F(void, ProgramUniform3iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
  871. F(void, ProgramUniform3i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2)) \
  872. F(void, ProgramUniform2uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
  873. F(void, ProgramUniform2ui, (GLuint program, GLint location, GLuint v0, GLuint v1)) \
  874. F(void, ProgramUniform2dv, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) \
  875. F(void, ProgramUniform2d, (GLuint program, GLint location, GLdouble v0, GLdouble v1)) \
  876. F(void, ProgramUniform2fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
  877. F(void, ProgramUniform2f, (GLuint program, GLint location, GLfloat v0, GLfloat v1)) \
  878. F(void, ProgramUniform2iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
  879. F(void, ProgramUniform2i, (GLuint program, GLint location, GLint v0, GLint v1)) \
  880. F(void, ProgramUniform1uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
  881. F(void, ProgramUniform1ui, (GLuint program, GLint location, GLuint v0)) \
  882. F(void, ProgramUniform1dv, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) \
  883. F(void, ProgramUniform1d, (GLuint program, GLint location, GLdouble v0)) \
  884. F(void, ProgramUniform1fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
  885. F(void, ProgramUniform1f, (GLuint program, GLint location, GLfloat v0)) \
  886. F(void, ProgramUniform1iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
  887. F(void, ProgramUniform1i, (GLuint program, GLint location, GLint v0)) \
  888. F(void, GetProgramPipelineiv, (GLuint pipeline, GLenum pname, GLint *params)) \
  889. F(GLboolean, IsProgramPipeline, (GLuint pipeline)) \
  890. F(void, GenProgramPipelines, (GLsizei n, GLuint *pipelines)) \
  891. F(void, DeleteProgramPipelines, (GLsizei n, const GLuint *pipelines)) \
  892. F(void, BindProgramPipeline, (GLuint pipeline)) \
  893. F(GLuint, CreateShaderProgramv, (GLenum type, GLsizei count, const GLchar* const *strings)) \
  894. F(void, ActiveShaderProgram, (GLuint pipeline, GLuint program)) \
  895. F(void, UseProgramStages, (GLuint pipeline, GLbitfield stages, GLuint program)) \
  896. F(void, ProgramParameteri, (GLuint program, GLenum pname, GLint value)) \
  897. F(void, ProgramBinary, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length)) \
  898. F(void, GetProgramBinary, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)) \
  899. F(void, ClearDepthf, (GLfloat dd)) \
  900. F(void, DepthRangef, (GLfloat n, GLfloat f)) \
  901. F(void, GetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)) \
  902. F(void, ShaderBinary, (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)) \
  903. F(void, ReleaseShaderCompiler, ()) \
  904. QT_OPENGL_DECLARE(QT_OPENGL_4_1_FUNCTIONS);
  905. };
  906. class QOpenGLFunctions_4_2_CoreBackend : public QOpenGLVersionFunctionsBackend
  907. {
  908. public:
  909. QOpenGLFunctions_4_2_CoreBackend(QOpenGLContext *c)
  910. : QOpenGLVersionFunctionsBackend(c)
  911. {
  912. init();
  913. }
  914. Q_DECL_CONSTEXPR static Version versionStatus()
  915. { return OpenGL_4_2_Core; }
  916. // OpenGL 4.2 core functions
  917. #define QT_OPENGL_4_2_FUNCTIONS(F) \
  918. F(void, TexStorage3D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) \
  919. F(void, TexStorage2D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) \
  920. F(void, TexStorage1D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)) \
  921. F(void, MemoryBarrier, (GLbitfield barriers)) \
  922. F(void, BindImageTexture, (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)) \
  923. F(void, GetActiveAtomicCounterBufferiv, (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params)) \
  924. F(void, GetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)) \
  925. F(void, DrawTransformFeedbackStreamInstanced, (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount)) \
  926. F(void, DrawTransformFeedbackInstanced, (GLenum mode, GLuint id, GLsizei instancecount)) \
  927. F(void, DrawElementsInstancedBaseVertexBaseInstance, (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance)) \
  928. F(void, DrawElementsInstancedBaseInstance, (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance)) \
  929. F(void, DrawArraysInstancedBaseInstance, (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance)) \
  930. QT_OPENGL_DECLARE(QT_OPENGL_4_2_FUNCTIONS);
  931. };
  932. class QOpenGLFunctions_4_3_CoreBackend : public QOpenGLVersionFunctionsBackend
  933. {
  934. public:
  935. QOpenGLFunctions_4_3_CoreBackend(QOpenGLContext *c)
  936. : QOpenGLVersionFunctionsBackend(c)
  937. {
  938. init();
  939. }
  940. Q_DECL_CONSTEXPR static Version versionStatus()
  941. { return OpenGL_4_3_Core; }
  942. // OpenGL 4.3 core functions
  943. #define QT_OPENGL_4_3_FUNCTIONS(F) \
  944. F(void, TexStorage3DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) \
  945. F(void, TexStorage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) \
  946. F(void, TexBufferRange, (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)) \
  947. F(void, ShaderStorageBlockBinding, (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding)) \
  948. F(GLint, GetProgramResourceLocationIndex, (GLuint program, GLenum programInterface, const GLchar *name)) \
  949. F(GLint, GetProgramResourceLocation, (GLuint program, GLenum programInterface, const GLchar *name)) \
  950. F(void, GetProgramResourceiv, (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)) \
  951. F(void, GetProgramResourceName, (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)) \
  952. F(GLuint, GetProgramResourceIndex, (GLuint program, GLenum programInterface, const GLchar *name)) \
  953. F(void, GetProgramInterfaceiv, (GLuint program, GLenum programInterface, GLenum pname, GLint *params)) \
  954. F(void, MultiDrawElementsIndirect, (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride)) \
  955. F(void, MultiDrawArraysIndirect, (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride)) \
  956. F(void, InvalidateSubFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)) \
  957. F(void, InvalidateFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum *attachments)) \
  958. F(void, InvalidateBufferData, (GLuint buffer)) \
  959. F(void, InvalidateBufferSubData, (GLuint buffer, GLintptr offset, GLsizeiptr length)) \
  960. F(void, InvalidateTexImage, (GLuint texture, GLint level)) \
  961. F(void, InvalidateTexSubImage, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth)) \
  962. F(void, GetInternalformati64v, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params)) \
  963. F(void, GetFramebufferParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  964. F(void, FramebufferParameteri, (GLenum target, GLenum pname, GLint param)) \
  965. F(void, VertexBindingDivisor, (GLuint bindingindex, GLuint divisor)) \
  966. F(void, VertexAttribBinding, (GLuint attribindex, GLuint bindingindex)) \
  967. F(void, VertexAttribLFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
  968. F(void, VertexAttribIFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
  969. F(void, VertexAttribFormat, (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)) \
  970. F(void, BindVertexBuffer, (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)) \
  971. F(void, TextureView, (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)) \
  972. F(void, CopyImageSubData, (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)) \
  973. F(void, DispatchComputeIndirect, (GLintptr indirect)) \
  974. F(void, DispatchCompute, (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)) \
  975. F(void, ClearBufferSubData, (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data)) \
  976. F(void, ClearBufferData, (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data)) \
  977. F(void, GetObjectPtrLabel, (const GLvoid *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)) \
  978. F(void, ObjectPtrLabel, (const GLvoid *ptr, GLsizei length, const GLchar *label)) \
  979. F(void, GetObjectLabel, (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)) \
  980. F(void, ObjectLabel, (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) \
  981. F(void, PopDebugGroup, ()) \
  982. F(void, PushDebugGroup, (GLenum source, GLuint id, GLsizei length, const GLchar *message)) \
  983. F(GLuint, GetDebugMessageLog, (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)) \
  984. F(void, DebugMessageCallback, (GLDEBUGPROC callback, const GLvoid *userParam)) \
  985. F(void, DebugMessageInsert, (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)) \
  986. F(void, DebugMessageControl, (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)) \
  987. QT_OPENGL_DECLARE(QT_OPENGL_4_3_FUNCTIONS);
  988. };
  989. class QOpenGLFunctions_4_4_CoreBackend : public QOpenGLVersionFunctionsBackend
  990. {
  991. public:
  992. QOpenGLFunctions_4_4_CoreBackend(QOpenGLContext *c)
  993. : QOpenGLVersionFunctionsBackend(c)
  994. {
  995. init();
  996. }
  997. Q_DECL_CONSTEXPR static Version versionStatus()
  998. { return OpenGL_4_4_Core; }
  999. // OpenGL 4.4 core functions
  1000. #define QT_OPENGL_4_4_FUNCTIONS(F) \
  1001. F(void, BindVertexBuffers, (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)) \
  1002. F(void, BindImageTextures, (GLuint first, GLsizei count, const GLuint *textures)) \
  1003. F(void, BindSamplers, (GLuint first, GLsizei count, const GLuint *samplers)) \
  1004. F(void, BindTextures, (GLuint first, GLsizei count, const GLuint *textures)) \
  1005. F(void, BindBuffersRange, (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes)) \
  1006. F(void, BindBuffersBase, (GLenum target, GLuint first, GLsizei count, const GLuint *buffers)) \
  1007. F(void, ClearTexSubImage, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)) \
  1008. F(void, ClearTexImage, (GLuint texture, GLint level, GLenum format, GLenum type, const void *data)) \
  1009. F(void, BufferStorage, (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags)) \
  1010. QT_OPENGL_DECLARE(QT_OPENGL_4_4_FUNCTIONS);
  1011. };
  1012. class QOpenGLFunctions_4_5_CoreBackend : public QOpenGLVersionFunctionsBackend
  1013. {
  1014. public:
  1015. QOpenGLFunctions_4_5_CoreBackend(QOpenGLContext *c)
  1016. : QOpenGLVersionFunctionsBackend(c)
  1017. {
  1018. init();
  1019. }
  1020. Q_DECL_CONSTEXPR static Version versionStatus()
  1021. { return OpenGL_4_5_Core; }
  1022. // OpenGL 4.5 core functions
  1023. #define QT_OPENGL_4_5_FUNCTIONS(F) \
  1024. F(void, TextureBarrier, ()) \
  1025. F(void, ReadnPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data)) \
  1026. F(void, GetnUniformuiv, (GLuint program, GLint location, GLsizei bufSize, GLuint *params)) \
  1027. F(void, GetnUniformiv, (GLuint program, GLint location, GLsizei bufSize, GLint *params)) \
  1028. F(void, GetnUniformfv, (GLuint program, GLint location, GLsizei bufSize, GLfloat *params)) \
  1029. F(void, GetnUniformdv, (GLuint program, GLint location, GLsizei bufSize, GLdouble *params)) \
  1030. F(void, GetnTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)) \
  1031. F(void, GetnCompressedTexImage, (GLenum target, GLint lod, GLsizei bufSize, void *pixels)) \
  1032. F(GLenum, GetGraphicsResetStatus, ()) \
  1033. F(void, GetCompressedTextureSubImage, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels)) \
  1034. F(void, GetTextureSubImage, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels)) \
  1035. F(void, MemoryBarrierByRegion, (GLbitfield barriers)) \
  1036. F(void, CreateQueries, (GLenum target, GLsizei n, GLuint *ids)) \
  1037. F(void, CreateProgramPipelines, (GLsizei n, GLuint *pipelines)) \
  1038. F(void, CreateSamplers, (GLsizei n, GLuint *samplers)) \
  1039. F(void, GetVertexArrayIndexed64iv, (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param)) \
  1040. F(void, GetVertexArrayIndexediv, (GLuint vaobj, GLuint index, GLenum pname, GLint *param)) \
  1041. F(void, GetVertexArrayiv, (GLuint vaobj, GLenum pname, GLint *param)) \
  1042. F(void, VertexArrayBindingDivisor, (GLuint vaobj, GLuint bindingindex, GLuint divisor)) \
  1043. F(void, VertexArrayAttribLFormat, (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
  1044. F(void, VertexArrayAttribIFormat, (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
  1045. F(void, VertexArrayAttribFormat, (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)) \
  1046. F(void, VertexArrayAttribBinding, (GLuint vaobj, GLuint attribindex, GLuint bindingindex)) \
  1047. F(void, VertexArrayVertexBuffers, (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)) \
  1048. F(void, VertexArrayVertexBuffer, (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)) \
  1049. F(void, VertexArrayElementBuffer, (GLuint vaobj, GLuint buffer)) \
  1050. F(void, EnableVertexArrayAttrib, (GLuint vaobj, GLuint index)) \
  1051. F(void, DisableVertexArrayAttrib, (GLuint vaobj, GLuint index)) \
  1052. F(void, CreateVertexArrays, (GLsizei n, GLuint *arrays)) \
  1053. F(void, GetTextureParameteriv, (GLuint texture, GLenum pname, GLint *params)) \
  1054. F(void, GetTextureParameterIuiv, (GLuint texture, GLenum pname, GLuint *params)) \
  1055. F(void, GetTextureParameterIiv, (GLuint texture, GLenum pname, GLint *params)) \
  1056. F(void, GetTextureParameterfv, (GLuint texture, GLenum pname, GLfloat *params)) \
  1057. F(void, GetTextureLevelParameteriv, (GLuint texture, GLint level, GLenum pname, GLint *params)) \
  1058. F(void, GetTextureLevelParameterfv, (GLuint texture, GLint level, GLenum pname, GLfloat *params)) \
  1059. F(void, GetCompressedTextureImage, (GLuint texture, GLint level, GLsizei bufSize, void *pixels)) \
  1060. F(void, GetTextureImage, (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)) \
  1061. F(void, BindTextureUnit, (GLuint unit, GLuint texture)) \
  1062. F(void, GenerateTextureMipmap, (GLuint texture)) \
  1063. F(void, TextureParameteriv, (GLuint texture, GLenum pname, const GLint *param)) \
  1064. F(void, TextureParameterIuiv, (GLuint texture, GLenum pname, const GLuint *params)) \
  1065. F(void, TextureParameterIiv, (GLuint texture, GLenum pname, const GLint *params)) \
  1066. F(void, TextureParameteri, (GLuint texture, GLenum pname, GLint param)) \
  1067. F(void, TextureParameterfv, (GLuint texture, GLenum pname, const GLfloat *param)) \
  1068. F(void, TextureParameterf, (GLuint texture, GLenum pname, GLfloat param)) \
  1069. F(void, CopyTextureSubImage3D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
  1070. F(void, CopyTextureSubImage2D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
  1071. F(void, CopyTextureSubImage1D, (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) \
  1072. F(void, CompressedTextureSubImage3D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)) \
  1073. F(void, CompressedTextureSubImage2D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)) \
  1074. F(void, CompressedTextureSubImage1D, (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data)) \
  1075. F(void, TextureSubImage3D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)) \
  1076. F(void, TextureSubImage2D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)) \
  1077. F(void, TextureSubImage1D, (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)) \
  1078. F(void, TextureStorage3DMultisample, (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) \
  1079. F(void, TextureStorage2DMultisample, (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) \
  1080. F(void, TextureStorage3D, (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) \
  1081. F(void, TextureStorage2D, (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) \
  1082. F(void, TextureStorage1D, (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width)) \
  1083. F(void, TextureBufferRange, (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size)) \
  1084. F(void, TextureBuffer, (GLuint texture, GLenum internalformat, GLuint buffer)) \
  1085. F(void, CreateTextures, (GLenum target, GLsizei n, GLuint *textures)) \
  1086. F(void, GetNamedRenderbufferParameteriv, (GLuint renderbuffer, GLenum pname, GLint *params)) \
  1087. F(void, NamedRenderbufferStorageMultisample, (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) \
  1088. F(void, NamedRenderbufferStorage, (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height)) \
  1089. F(void, CreateRenderbuffers, (GLsizei n, GLuint *renderbuffers)) \
  1090. F(void, GetNamedFramebufferAttachmentParameteriv, (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params)) \
  1091. F(void, GetNamedFramebufferParameteriv, (GLuint framebuffer, GLenum pname, GLint *param)) \
  1092. F(GLenum, CheckNamedFramebufferStatus, (GLuint framebuffer, GLenum target)) \
  1093. F(void, BlitNamedFramebuffer, (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) \
  1094. F(void, ClearNamedFramebufferfi, (GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil)) \
  1095. F(void, ClearNamedFramebufferfv, (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value)) \
  1096. F(void, ClearNamedFramebufferuiv, (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value)) \
  1097. F(void, ClearNamedFramebufferiv, (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value)) \
  1098. F(void, InvalidateNamedFramebufferSubData, (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)) \
  1099. F(void, InvalidateNamedFramebufferData, (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments)) \
  1100. F(void, NamedFramebufferReadBuffer, (GLuint framebuffer, GLenum src)) \
  1101. F(void, NamedFramebufferDrawBuffers, (GLuint framebuffer, GLsizei n, const GLenum *bufs)) \
  1102. F(void, NamedFramebufferDrawBuffer, (GLuint framebuffer, GLenum buf)) \
  1103. F(void, NamedFramebufferTextureLayer, (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer)) \
  1104. F(void, NamedFramebufferTexture, (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level)) \
  1105. F(void, NamedFramebufferParameteri, (GLuint framebuffer, GLenum pname, GLint param)) \
  1106. F(void, NamedFramebufferRenderbuffer, (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) \
  1107. F(void, CreateFramebuffers, (GLsizei n, GLuint *framebuffers)) \
  1108. F(void, GetNamedBufferSubData, (GLuint buffer, GLintptr offset, GLsizei size, void *data)) \
  1109. F(void, GetNamedBufferPointerv, (GLuint buffer, GLenum pname, GLvoid* *params)) \
  1110. F(void, GetNamedBufferParameteri64v, (GLuint buffer, GLenum pname, GLint64 *params)) \
  1111. F(void, GetNamedBufferParameteriv, (GLuint buffer, GLenum pname, GLint *params)) \
  1112. F(void, FlushMappedNamedBufferRange, (GLuint buffer, GLintptr offset, GLsizei length)) \
  1113. F(GLboolean, UnmapNamedBuffer, (GLuint buffer)) \
  1114. F(GLvoid *, MapNamedBufferRange, (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access)) \
  1115. F(GLvoid *, MapNamedBuffer, (GLuint buffer, GLenum access)) \
  1116. F(void, ClearNamedBufferSubData, (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data)) \
  1117. F(void, ClearNamedBufferData, (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data)) \
  1118. F(void, CopyNamedBufferSubData, (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size)) \
  1119. F(void, NamedBufferSubData, (GLuint buffer, GLintptr offset, GLsizei size, const void *data)) \
  1120. F(void, NamedBufferData, (GLuint buffer, GLsizei size, const void *data, GLenum usage)) \
  1121. F(void, NamedBufferStorage, (GLuint buffer, GLsizei size, const void *data, GLbitfield flags)) \
  1122. F(void, CreateBuffers, (GLsizei n, GLuint *buffers)) \
  1123. F(void, GetTransformFeedbacki64_v,(GLuint xfb, GLenum pname, GLuint index, GLint64 *param)) \
  1124. F(void, GetTransformFeedbacki_v,(GLuint xfb, GLenum pname, GLuint index, GLint *param)) \
  1125. F(void, GetTransformFeedbackiv, (GLuint xfb, GLenum pname, GLint *param)) \
  1126. F(void, TransformFeedbackBufferRange, (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size)) \
  1127. F(void, TransformFeedbackBufferBase, (GLuint xfb, GLuint index, GLuint buffer)) \
  1128. F(void, CreateTransformFeedbacks, (GLsizei n, GLuint *ids)) \
  1129. F(void, ClipControl, (GLenum origin, GLenum depth)) \
  1130. QT_OPENGL_DECLARE(QT_OPENGL_4_5_FUNCTIONS);
  1131. };
  1132. class QOpenGLFunctions_1_0_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1133. {
  1134. public:
  1135. QOpenGLFunctions_1_0_DeprecatedBackend(QOpenGLContext *c)
  1136. : QOpenGLVersionFunctionsBackend(c)
  1137. {
  1138. init();
  1139. }
  1140. Q_DECL_CONSTEXPR static Version versionStatus()
  1141. { return OpenGL_1_0_Deprecated; }
  1142. // OpenGL 1.0 deprecated functions
  1143. #define QT_OPENGL_1_0_DEPRECATED_FUNCTIONS(F) \
  1144. F(void, Translatef, (GLfloat x, GLfloat y, GLfloat z)) \
  1145. F(void, Translated, (GLdouble x, GLdouble y, GLdouble z)) \
  1146. F(void, Scalef, (GLfloat x, GLfloat y, GLfloat z)) \
  1147. F(void, Scaled, (GLdouble x, GLdouble y, GLdouble z)) \
  1148. F(void, Rotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) \
  1149. F(void, Rotated, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)) \
  1150. F(void, PushMatrix, ()) \
  1151. F(void, PopMatrix, ()) \
  1152. F(void, Ortho, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) \
  1153. F(void, MultMatrixd, (const GLdouble *m)) \
  1154. F(void, MultMatrixf, (const GLfloat *m)) \
  1155. F(void, MatrixMode, (GLenum mode)) \
  1156. F(void, LoadMatrixd, (const GLdouble *m)) \
  1157. F(void, LoadMatrixf, (const GLfloat *m)) \
  1158. F(void, LoadIdentity, ()) \
  1159. F(void, Frustum, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) \
  1160. F(GLboolean, IsList, (GLuint list)) \
  1161. F(void, GetTexGeniv, (GLenum coord, GLenum pname, GLint *params)) \
  1162. F(void, GetTexGenfv, (GLenum coord, GLenum pname, GLfloat *params)) \
  1163. F(void, GetTexGendv, (GLenum coord, GLenum pname, GLdouble *params)) \
  1164. F(void, GetTexEnviv, (GLenum target, GLenum pname, GLint *params)) \
  1165. F(void, GetTexEnvfv, (GLenum target, GLenum pname, GLfloat *params)) \
  1166. F(void, GetPolygonStipple, (GLubyte *mask)) \
  1167. F(void, GetPixelMapusv, (GLenum map, GLushort *values)) \
  1168. F(void, GetPixelMapuiv, (GLenum map, GLuint *values)) \
  1169. F(void, GetPixelMapfv, (GLenum map, GLfloat *values)) \
  1170. F(void, GetMaterialiv, (GLenum face, GLenum pname, GLint *params)) \
  1171. F(void, GetMaterialfv, (GLenum face, GLenum pname, GLfloat *params)) \
  1172. F(void, GetMapiv, (GLenum target, GLenum query, GLint *v)) \
  1173. F(void, GetMapfv, (GLenum target, GLenum query, GLfloat *v)) \
  1174. F(void, GetMapdv, (GLenum target, GLenum query, GLdouble *v)) \
  1175. F(void, GetLightiv, (GLenum light, GLenum pname, GLint *params)) \
  1176. F(void, GetLightfv, (GLenum light, GLenum pname, GLfloat *params)) \
  1177. F(void, GetClipPlane, (GLenum plane, GLdouble *equation)) \
  1178. F(void, DrawPixels, (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) \
  1179. F(void, CopyPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)) \
  1180. F(void, PixelMapusv, (GLenum map, GLsizei mapsize, const GLushort *values)) \
  1181. F(void, PixelMapuiv, (GLenum map, GLsizei mapsize, const GLuint *values)) \
  1182. F(void, PixelMapfv, (GLenum map, GLsizei mapsize, const GLfloat *values)) \
  1183. F(void, PixelTransferi, (GLenum pname, GLint param)) \
  1184. F(void, PixelTransferf, (GLenum pname, GLfloat param)) \
  1185. F(void, PixelZoom, (GLfloat xfactor, GLfloat yfactor)) \
  1186. F(void, AlphaFunc, (GLenum func, GLfloat ref)) \
  1187. F(void, EvalPoint2, (GLint i, GLint j)) \
  1188. F(void, EvalMesh2, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)) \
  1189. F(void, EvalPoint1, (GLint i)) \
  1190. F(void, EvalMesh1, (GLenum mode, GLint i1, GLint i2)) \
  1191. F(void, EvalCoord2fv, (const GLfloat *u)) \
  1192. F(void, EvalCoord2f, (GLfloat u, GLfloat v)) \
  1193. F(void, EvalCoord2dv, (const GLdouble *u)) \
  1194. F(void, EvalCoord2d, (GLdouble u, GLdouble v)) \
  1195. F(void, EvalCoord1fv, (const GLfloat *u)) \
  1196. F(void, EvalCoord1f, (GLfloat u)) \
  1197. F(void, EvalCoord1dv, (const GLdouble *u)) \
  1198. F(void, EvalCoord1d, (GLdouble u)) \
  1199. F(void, MapGrid2f, (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)) \
  1200. F(void, MapGrid2d, (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)) \
  1201. F(void, MapGrid1f, (GLint un, GLfloat u1, GLfloat u2)) \
  1202. F(void, MapGrid1d, (GLint un, GLdouble u1, GLdouble u2)) \
  1203. F(void, Map2f, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)) \
  1204. F(void, Map2d, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)) \
  1205. F(void, Map1f, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)) \
  1206. F(void, Map1d, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)) \
  1207. F(void, PushAttrib, (GLbitfield mask)) \
  1208. F(void, PopAttrib, ()) \
  1209. F(void, Accum, (GLenum op, GLfloat value)) \
  1210. F(void, IndexMask, (GLuint mask)) \
  1211. F(void, ClearIndex, (GLfloat c)) \
  1212. F(void, ClearAccum, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) \
  1213. F(void, PushName, (GLuint name)) \
  1214. F(void, PopName, ()) \
  1215. F(void, PassThrough, (GLfloat token)) \
  1216. F(void, LoadName, (GLuint name)) \
  1217. F(void, InitNames, ()) \
  1218. F(GLint, RenderMode, (GLenum mode)) \
  1219. F(void, SelectBuffer, (GLsizei size, GLuint *buffer)) \
  1220. F(void, FeedbackBuffer, (GLsizei size, GLenum type, GLfloat *buffer)) \
  1221. F(void, TexGeniv, (GLenum coord, GLenum pname, const GLint *params)) \
  1222. F(void, TexGeni, (GLenum coord, GLenum pname, GLint param)) \
  1223. F(void, TexGenfv, (GLenum coord, GLenum pname, const GLfloat *params)) \
  1224. F(void, TexGenf, (GLenum coord, GLenum pname, GLfloat param)) \
  1225. F(void, TexGendv, (GLenum coord, GLenum pname, const GLdouble *params)) \
  1226. F(void, TexGend, (GLenum coord, GLenum pname, GLdouble param)) \
  1227. F(void, TexEnviv, (GLenum target, GLenum pname, const GLint *params)) \
  1228. F(void, TexEnvi, (GLenum target, GLenum pname, GLint param)) \
  1229. F(void, TexEnvfv, (GLenum target, GLenum pname, const GLfloat *params)) \
  1230. F(void, TexEnvf, (GLenum target, GLenum pname, GLfloat param)) \
  1231. F(void, ShadeModel, (GLenum mode)) \
  1232. F(void, PolygonStipple, (const GLubyte *mask)) \
  1233. F(void, Materialiv, (GLenum face, GLenum pname, const GLint *params)) \
  1234. F(void, Materiali, (GLenum face, GLenum pname, GLint param)) \
  1235. F(void, Materialfv, (GLenum face, GLenum pname, const GLfloat *params)) \
  1236. F(void, Materialf, (GLenum face, GLenum pname, GLfloat param)) \
  1237. F(void, LineStipple, (GLint factor, GLushort pattern)) \
  1238. F(void, LightModeliv, (GLenum pname, const GLint *params)) \
  1239. F(void, LightModeli, (GLenum pname, GLint param)) \
  1240. F(void, LightModelfv, (GLenum pname, const GLfloat *params)) \
  1241. F(void, LightModelf, (GLenum pname, GLfloat param)) \
  1242. F(void, Lightiv, (GLenum light, GLenum pname, const GLint *params)) \
  1243. F(void, Lighti, (GLenum light, GLenum pname, GLint param)) \
  1244. F(void, Lightfv, (GLenum light, GLenum pname, const GLfloat *params)) \
  1245. F(void, Lightf, (GLenum light, GLenum pname, GLfloat param)) \
  1246. F(void, Fogiv, (GLenum pname, const GLint *params)) \
  1247. F(void, Fogi, (GLenum pname, GLint param)) \
  1248. F(void, Fogfv, (GLenum pname, const GLfloat *params)) \
  1249. F(void, Fogf, (GLenum pname, GLfloat param)) \
  1250. F(void, ColorMaterial, (GLenum face, GLenum mode)) \
  1251. F(void, ClipPlane, (GLenum plane, const GLdouble *equation)) \
  1252. F(void, Vertex4sv, (const GLshort *v)) \
  1253. F(void, Vertex4s, (GLshort x, GLshort y, GLshort z, GLshort w)) \
  1254. F(void, Vertex4iv, (const GLint *v)) \
  1255. F(void, Vertex4i, (GLint x, GLint y, GLint z, GLint w)) \
  1256. F(void, Vertex4fv, (const GLfloat *v)) \
  1257. F(void, Vertex4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
  1258. F(void, Vertex4dv, (const GLdouble *v)) \
  1259. F(void, Vertex4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
  1260. F(void, Vertex3sv, (const GLshort *v)) \
  1261. F(void, Vertex3s, (GLshort x, GLshort y, GLshort z)) \
  1262. F(void, Vertex3iv, (const GLint *v)) \
  1263. F(void, Vertex3i, (GLint x, GLint y, GLint z)) \
  1264. F(void, Vertex3fv, (const GLfloat *v)) \
  1265. F(void, Vertex3f, (GLfloat x, GLfloat y, GLfloat z)) \
  1266. F(void, Vertex3dv, (const GLdouble *v)) \
  1267. F(void, Vertex3d, (GLdouble x, GLdouble y, GLdouble z)) \
  1268. F(void, Vertex2sv, (const GLshort *v)) \
  1269. F(void, Vertex2s, (GLshort x, GLshort y)) \
  1270. F(void, Vertex2iv, (const GLint *v)) \
  1271. F(void, Vertex2i, (GLint x, GLint y)) \
  1272. F(void, Vertex2fv, (const GLfloat *v)) \
  1273. F(void, Vertex2f, (GLfloat x, GLfloat y)) \
  1274. F(void, Vertex2dv, (const GLdouble *v)) \
  1275. F(void, Vertex2d, (GLdouble x, GLdouble y)) \
  1276. F(void, TexCoord4sv, (const GLshort *v)) \
  1277. F(void, TexCoord4s, (GLshort s, GLshort t, GLshort r, GLshort q)) \
  1278. F(void, TexCoord4iv, (const GLint *v)) \
  1279. F(void, TexCoord4i, (GLint s, GLint t, GLint r, GLint q)) \
  1280. F(void, TexCoord4fv, (const GLfloat *v)) \
  1281. F(void, TexCoord4f, (GLfloat s, GLfloat t, GLfloat r, GLfloat q)) \
  1282. F(void, TexCoord4dv, (const GLdouble *v)) \
  1283. F(void, TexCoord4d, (GLdouble s, GLdouble t, GLdouble r, GLdouble q)) \
  1284. F(void, TexCoord3sv, (const GLshort *v)) \
  1285. F(void, TexCoord3s, (GLshort s, GLshort t, GLshort r)) \
  1286. F(void, TexCoord3iv, (const GLint *v)) \
  1287. F(void, TexCoord3i, (GLint s, GLint t, GLint r)) \
  1288. F(void, TexCoord3fv, (const GLfloat *v)) \
  1289. F(void, TexCoord3f, (GLfloat s, GLfloat t, GLfloat r)) \
  1290. F(void, TexCoord3dv, (const GLdouble *v)) \
  1291. F(void, TexCoord3d, (GLdouble s, GLdouble t, GLdouble r)) \
  1292. F(void, TexCoord2sv, (const GLshort *v)) \
  1293. F(void, TexCoord2s, (GLshort s, GLshort t)) \
  1294. F(void, TexCoord2iv, (const GLint *v)) \
  1295. F(void, TexCoord2i, (GLint s, GLint t)) \
  1296. F(void, TexCoord2fv, (const GLfloat *v)) \
  1297. F(void, TexCoord2f, (GLfloat s, GLfloat t)) \
  1298. F(void, TexCoord2dv, (const GLdouble *v)) \
  1299. F(void, TexCoord2d, (GLdouble s, GLdouble t)) \
  1300. F(void, TexCoord1sv, (const GLshort *v)) \
  1301. F(void, TexCoord1s, (GLshort s)) \
  1302. F(void, TexCoord1iv, (const GLint *v)) \
  1303. F(void, TexCoord1i, (GLint s)) \
  1304. F(void, TexCoord1fv, (const GLfloat *v)) \
  1305. F(void, TexCoord1f, (GLfloat s)) \
  1306. F(void, TexCoord1dv, (const GLdouble *v)) \
  1307. F(void, TexCoord1d, (GLdouble s)) \
  1308. F(void, Rectsv, (const GLshort *v1, const GLshort *v2)) \
  1309. F(void, Rects, (GLshort x1, GLshort y1, GLshort x2, GLshort y2)) \
  1310. F(void, Rectiv, (const GLint *v1, const GLint *v2)) \
  1311. F(void, Recti, (GLint x1, GLint y1, GLint x2, GLint y2)) \
  1312. F(void, Rectfv, (const GLfloat *v1, const GLfloat *v2)) \
  1313. F(void, Rectf, (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)) \
  1314. F(void, Rectdv, (const GLdouble *v1, const GLdouble *v2)) \
  1315. F(void, Rectd, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)) \
  1316. F(void, RasterPos4sv, (const GLshort *v)) \
  1317. F(void, RasterPos4s, (GLshort x, GLshort y, GLshort z, GLshort w)) \
  1318. F(void, RasterPos4iv, (const GLint *v)) \
  1319. F(void, RasterPos4i, (GLint x, GLint y, GLint z, GLint w)) \
  1320. F(void, RasterPos4fv, (const GLfloat *v)) \
  1321. F(void, RasterPos4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
  1322. F(void, RasterPos4dv, (const GLdouble *v)) \
  1323. F(void, RasterPos4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
  1324. F(void, RasterPos3sv, (const GLshort *v)) \
  1325. F(void, RasterPos3s, (GLshort x, GLshort y, GLshort z)) \
  1326. F(void, RasterPos3iv, (const GLint *v)) \
  1327. F(void, RasterPos3i, (GLint x, GLint y, GLint z)) \
  1328. F(void, RasterPos3fv, (const GLfloat *v)) \
  1329. F(void, RasterPos3f, (GLfloat x, GLfloat y, GLfloat z)) \
  1330. F(void, RasterPos3dv, (const GLdouble *v)) \
  1331. F(void, RasterPos3d, (GLdouble x, GLdouble y, GLdouble z)) \
  1332. F(void, RasterPos2sv, (const GLshort *v)) \
  1333. F(void, RasterPos2s, (GLshort x, GLshort y)) \
  1334. F(void, RasterPos2iv, (const GLint *v)) \
  1335. F(void, RasterPos2i, (GLint x, GLint y)) \
  1336. F(void, RasterPos2fv, (const GLfloat *v)) \
  1337. F(void, RasterPos2f, (GLfloat x, GLfloat y)) \
  1338. F(void, RasterPos2dv, (const GLdouble *v)) \
  1339. F(void, RasterPos2d, (GLdouble x, GLdouble y)) \
  1340. F(void, Normal3sv, (const GLshort *v)) \
  1341. F(void, Normal3s, (GLshort nx, GLshort ny, GLshort nz)) \
  1342. F(void, Normal3iv, (const GLint *v)) \
  1343. F(void, Normal3i, (GLint nx, GLint ny, GLint nz)) \
  1344. F(void, Normal3fv, (const GLfloat *v)) \
  1345. F(void, Normal3f, (GLfloat nx, GLfloat ny, GLfloat nz)) \
  1346. F(void, Normal3dv, (const GLdouble *v)) \
  1347. F(void, Normal3d, (GLdouble nx, GLdouble ny, GLdouble nz)) \
  1348. F(void, Normal3bv, (const GLbyte *v)) \
  1349. F(void, Normal3b, (GLbyte nx, GLbyte ny, GLbyte nz)) \
  1350. F(void, Indexsv, (const GLshort *c)) \
  1351. F(void, Indexs, (GLshort c)) \
  1352. F(void, Indexiv, (const GLint *c)) \
  1353. F(void, Indexi, (GLint c)) \
  1354. F(void, Indexfv, (const GLfloat *c)) \
  1355. F(void, Indexf, (GLfloat c)) \
  1356. F(void, Indexdv, (const GLdouble *c)) \
  1357. F(void, Indexd, (GLdouble c)) \
  1358. F(void, End, ()) \
  1359. F(void, EdgeFlagv, (const GLboolean *flag)) \
  1360. F(void, EdgeFlag, (GLboolean flag)) \
  1361. F(void, Color4usv, (const GLushort *v)) \
  1362. F(void, Color4us, (GLushort red, GLushort green, GLushort blue, GLushort alpha)) \
  1363. F(void, Color4uiv, (const GLuint *v)) \
  1364. F(void, Color4ui, (GLuint red, GLuint green, GLuint blue, GLuint alpha)) \
  1365. F(void, Color4ubv, (const GLubyte *v)) \
  1366. F(void, Color4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) \
  1367. F(void, Color4sv, (const GLshort *v)) \
  1368. F(void, Color4s, (GLshort red, GLshort green, GLshort blue, GLshort alpha)) \
  1369. F(void, Color4iv, (const GLint *v)) \
  1370. F(void, Color4i, (GLint red, GLint green, GLint blue, GLint alpha)) \
  1371. F(void, Color4fv, (const GLfloat *v)) \
  1372. F(void, Color4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) \
  1373. F(void, Color4dv, (const GLdouble *v)) \
  1374. F(void, Color4d, (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)) \
  1375. F(void, Color4bv, (const GLbyte *v)) \
  1376. F(void, Color4b, (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)) \
  1377. F(void, Color3usv, (const GLushort *v)) \
  1378. F(void, Color3us, (GLushort red, GLushort green, GLushort blue)) \
  1379. F(void, Color3uiv, (const GLuint *v)) \
  1380. F(void, Color3ui, (GLuint red, GLuint green, GLuint blue)) \
  1381. F(void, Color3ubv, (const GLubyte *v)) \
  1382. F(void, Color3ub, (GLubyte red, GLubyte green, GLubyte blue)) \
  1383. F(void, Color3sv, (const GLshort *v)) \
  1384. F(void, Color3s, (GLshort red, GLshort green, GLshort blue)) \
  1385. F(void, Color3iv, (const GLint *v)) \
  1386. F(void, Color3i, (GLint red, GLint green, GLint blue)) \
  1387. F(void, Color3fv, (const GLfloat *v)) \
  1388. F(void, Color3f, (GLfloat red, GLfloat green, GLfloat blue)) \
  1389. F(void, Color3dv, (const GLdouble *v)) \
  1390. F(void, Color3d, (GLdouble red, GLdouble green, GLdouble blue)) \
  1391. F(void, Color3bv, (const GLbyte *v)) \
  1392. F(void, Color3b, (GLbyte red, GLbyte green, GLbyte blue)) \
  1393. F(void, Bitmap, (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)) \
  1394. F(void, Begin, (GLenum mode)) \
  1395. F(void, ListBase, (GLuint base)) \
  1396. F(GLuint, GenLists, (GLsizei range)) \
  1397. F(void, DeleteLists, (GLuint list, GLsizei range)) \
  1398. F(void, CallLists, (GLsizei n, GLenum type, const GLvoid *lists)) \
  1399. F(void, CallList, (GLuint list)) \
  1400. F(void, EndList, ()) \
  1401. F(void, NewList, (GLuint list, GLenum mode)) \
  1402. QT_OPENGL_DECLARE(QT_OPENGL_1_0_DEPRECATED_FUNCTIONS);
  1403. };
  1404. class QOpenGLFunctions_1_1_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1405. {
  1406. public:
  1407. QOpenGLFunctions_1_1_DeprecatedBackend(QOpenGLContext *c)
  1408. : QOpenGLVersionFunctionsBackend(c)
  1409. {
  1410. init();
  1411. }
  1412. Q_DECL_CONSTEXPR static Version versionStatus()
  1413. { return OpenGL_1_1_Deprecated; }
  1414. // OpenGL 1.1 deprecated functions
  1415. #define QT_OPENGL_1_1_DEPRECATED_FUNCTIONS(F) \
  1416. F(void, PushClientAttrib, (GLbitfield mask)) \
  1417. F(void, PopClientAttrib, ()) \
  1418. F(void, PrioritizeTextures, (GLsizei n, const GLuint *textures, const GLfloat *priorities)) \
  1419. F(GLboolean, AreTexturesResident, (GLsizei n, const GLuint *textures, GLboolean *residences)) \
  1420. F(void, VertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
  1421. F(void, TexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
  1422. F(void, NormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer)) \
  1423. F(void, InterleavedArrays, (GLenum format, GLsizei stride, const GLvoid *pointer)) \
  1424. F(void, IndexPointer, (GLenum type, GLsizei stride, const GLvoid *pointer)) \
  1425. F(void, EnableClientState, (GLenum array)) \
  1426. F(void, EdgeFlagPointer, (GLsizei stride, const GLvoid *pointer)) \
  1427. F(void, DisableClientState, (GLenum array)) \
  1428. F(void, ColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
  1429. F(void, ArrayElement, (GLint i)) \
  1430. F(void, Indexubv, (const GLubyte *c)) \
  1431. F(void, Indexub, (GLubyte c)) \
  1432. F(void, GetPointerv, (GLenum pname, GLvoid* *params)) \
  1433. QT_OPENGL_DECLARE(QT_OPENGL_1_1_DEPRECATED_FUNCTIONS);
  1434. };
  1435. class QOpenGLFunctions_1_2_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1436. {
  1437. public:
  1438. QOpenGLFunctions_1_2_DeprecatedBackend(QOpenGLContext *c)
  1439. : QOpenGLVersionFunctionsBackend(c)
  1440. {
  1441. init();
  1442. }
  1443. Q_DECL_CONSTEXPR static Version versionStatus()
  1444. { return OpenGL_1_2_Deprecated; }
  1445. // OpenGL 1.2 deprecated functions
  1446. #define QT_OPENGL_1_2_DEPRECATED_FUNCTIONS(F) \
  1447. F(void, ColorTableParameterfv, (GLenum target, GLenum pname, const GLfloat *params)) \
  1448. F(void, ColorTableParameteriv, (GLenum target, GLenum pname, const GLint *params)) \
  1449. F(void, CopyColorTable, (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) \
  1450. F(void, GetColorTable, (GLenum target, GLenum format, GLenum type, GLvoid *table)) \
  1451. F(void, GetColorTableParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
  1452. F(void, GetColorTableParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  1453. F(void, ColorSubTable, (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)) \
  1454. F(void, CopyColorSubTable, (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)) \
  1455. F(void, ConvolutionFilter1D, (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)) \
  1456. F(void, ConvolutionFilter2D, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)) \
  1457. F(void, ConvolutionParameterf, (GLenum target, GLenum pname, GLfloat params)) \
  1458. F(void, ConvolutionParameterfv, (GLenum target, GLenum pname, const GLfloat *params)) \
  1459. F(void, ConvolutionParameteri, (GLenum target, GLenum pname, GLint params)) \
  1460. F(void, ConvolutionParameteriv, (GLenum target, GLenum pname, const GLint *params)) \
  1461. F(void, CopyConvolutionFilter1D, (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) \
  1462. F(void, CopyConvolutionFilter2D, (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)) \
  1463. F(void, GetConvolutionFilter, (GLenum target, GLenum format, GLenum type, GLvoid *image)) \
  1464. F(void, GetConvolutionParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
  1465. F(void, GetConvolutionParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  1466. F(void, GetSeparableFilter, (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)) \
  1467. F(void, SeparableFilter2D, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)) \
  1468. F(void, GetHistogram, (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) \
  1469. F(void, GetHistogramParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
  1470. F(void, GetHistogramParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  1471. F(void, GetMinmax, (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) \
  1472. F(void, GetMinmaxParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
  1473. F(void, GetMinmaxParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  1474. F(void, Histogram, (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)) \
  1475. F(void, Minmax, (GLenum target, GLenum internalformat, GLboolean sink)) \
  1476. F(void, ResetHistogram, (GLenum target)) \
  1477. F(void, ResetMinmax, (GLenum target)) \
  1478. F(void, ColorTable, (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)) \
  1479. QT_OPENGL_DECLARE(QT_OPENGL_1_2_DEPRECATED_FUNCTIONS);
  1480. };
  1481. class QOpenGLFunctions_1_3_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1482. {
  1483. public:
  1484. QOpenGLFunctions_1_3_DeprecatedBackend(QOpenGLContext *c)
  1485. : QOpenGLVersionFunctionsBackend(c)
  1486. {
  1487. init();
  1488. }
  1489. Q_DECL_CONSTEXPR static Version versionStatus()
  1490. { return OpenGL_1_3_Deprecated; }
  1491. // OpenGL 1.3 deprecated functions
  1492. #define QT_OPENGL_1_3_DEPRECATED_FUNCTIONS(F) \
  1493. F(void, MultTransposeMatrixd, (const GLdouble *m)) \
  1494. F(void, MultTransposeMatrixf, (const GLfloat *m)) \
  1495. F(void, LoadTransposeMatrixd, (const GLdouble *m)) \
  1496. F(void, LoadTransposeMatrixf, (const GLfloat *m)) \
  1497. F(void, MultiTexCoord4sv, (GLenum target, const GLshort *v)) \
  1498. F(void, MultiTexCoord4s, (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)) \
  1499. F(void, MultiTexCoord4iv, (GLenum target, const GLint *v)) \
  1500. F(void, MultiTexCoord4i, (GLenum target, GLint s, GLint t, GLint r, GLint q)) \
  1501. F(void, MultiTexCoord4fv, (GLenum target, const GLfloat *v)) \
  1502. F(void, MultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)) \
  1503. F(void, MultiTexCoord4dv, (GLenum target, const GLdouble *v)) \
  1504. F(void, MultiTexCoord4d, (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)) \
  1505. F(void, MultiTexCoord3sv, (GLenum target, const GLshort *v)) \
  1506. F(void, MultiTexCoord3s, (GLenum target, GLshort s, GLshort t, GLshort r)) \
  1507. F(void, MultiTexCoord3iv, (GLenum target, const GLint *v)) \
  1508. F(void, MultiTexCoord3i, (GLenum target, GLint s, GLint t, GLint r)) \
  1509. F(void, MultiTexCoord3fv, (GLenum target, const GLfloat *v)) \
  1510. F(void, MultiTexCoord3f, (GLenum target, GLfloat s, GLfloat t, GLfloat r)) \
  1511. F(void, MultiTexCoord3dv, (GLenum target, const GLdouble *v)) \
  1512. F(void, MultiTexCoord3d, (GLenum target, GLdouble s, GLdouble t, GLdouble r)) \
  1513. F(void, MultiTexCoord2sv, (GLenum target, const GLshort *v)) \
  1514. F(void, MultiTexCoord2s, (GLenum target, GLshort s, GLshort t)) \
  1515. F(void, MultiTexCoord2iv, (GLenum target, const GLint *v)) \
  1516. F(void, MultiTexCoord2i, (GLenum target, GLint s, GLint t)) \
  1517. F(void, MultiTexCoord2fv, (GLenum target, const GLfloat *v)) \
  1518. F(void, MultiTexCoord2f, (GLenum target, GLfloat s, GLfloat t)) \
  1519. F(void, MultiTexCoord2dv, (GLenum target, const GLdouble *v)) \
  1520. F(void, MultiTexCoord2d, (GLenum target, GLdouble s, GLdouble t)) \
  1521. F(void, MultiTexCoord1sv, (GLenum target, const GLshort *v)) \
  1522. F(void, MultiTexCoord1s, (GLenum target, GLshort s)) \
  1523. F(void, MultiTexCoord1iv, (GLenum target, const GLint *v)) \
  1524. F(void, MultiTexCoord1i, (GLenum target, GLint s)) \
  1525. F(void, MultiTexCoord1fv, (GLenum target, const GLfloat *v)) \
  1526. F(void, MultiTexCoord1f, (GLenum target, GLfloat s)) \
  1527. F(void, MultiTexCoord1dv, (GLenum target, const GLdouble *v)) \
  1528. F(void, MultiTexCoord1d, (GLenum target, GLdouble s)) \
  1529. F(void, ClientActiveTexture, (GLenum texture)) \
  1530. QT_OPENGL_DECLARE(QT_OPENGL_1_3_DEPRECATED_FUNCTIONS);
  1531. };
  1532. class QOpenGLFunctions_1_4_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1533. {
  1534. public:
  1535. QOpenGLFunctions_1_4_DeprecatedBackend(QOpenGLContext *c)
  1536. : QOpenGLVersionFunctionsBackend(c)
  1537. {
  1538. init();
  1539. }
  1540. Q_DECL_CONSTEXPR static Version versionStatus()
  1541. { return OpenGL_1_4_Deprecated; }
  1542. // OpenGL 1.4 deprecated functions
  1543. #define QT_OPENGL_1_4_DEPRECATED_FUNCTIONS(F) \
  1544. F(void, WindowPos3sv, (const GLshort *v)) \
  1545. F(void, WindowPos3s, (GLshort x, GLshort y, GLshort z)) \
  1546. F(void, WindowPos3iv, (const GLint *v)) \
  1547. F(void, WindowPos3i, (GLint x, GLint y, GLint z)) \
  1548. F(void, WindowPos3fv, (const GLfloat *v)) \
  1549. F(void, WindowPos3f, (GLfloat x, GLfloat y, GLfloat z)) \
  1550. F(void, WindowPos3dv, (const GLdouble *v)) \
  1551. F(void, WindowPos3d, (GLdouble x, GLdouble y, GLdouble z)) \
  1552. F(void, WindowPos2sv, (const GLshort *v)) \
  1553. F(void, WindowPos2s, (GLshort x, GLshort y)) \
  1554. F(void, WindowPos2iv, (const GLint *v)) \
  1555. F(void, WindowPos2i, (GLint x, GLint y)) \
  1556. F(void, WindowPos2fv, (const GLfloat *v)) \
  1557. F(void, WindowPos2f, (GLfloat x, GLfloat y)) \
  1558. F(void, WindowPos2dv, (const GLdouble *v)) \
  1559. F(void, WindowPos2d, (GLdouble x, GLdouble y)) \
  1560. F(void, SecondaryColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
  1561. F(void, SecondaryColor3usv, (const GLushort *v)) \
  1562. F(void, SecondaryColor3us, (GLushort red, GLushort green, GLushort blue)) \
  1563. F(void, SecondaryColor3uiv, (const GLuint *v)) \
  1564. F(void, SecondaryColor3ui, (GLuint red, GLuint green, GLuint blue)) \
  1565. F(void, SecondaryColor3ubv, (const GLubyte *v)) \
  1566. F(void, SecondaryColor3ub, (GLubyte red, GLubyte green, GLubyte blue)) \
  1567. F(void, SecondaryColor3sv, (const GLshort *v)) \
  1568. F(void, SecondaryColor3s, (GLshort red, GLshort green, GLshort blue)) \
  1569. F(void, SecondaryColor3iv, (const GLint *v)) \
  1570. F(void, SecondaryColor3i, (GLint red, GLint green, GLint blue)) \
  1571. F(void, SecondaryColor3fv, (const GLfloat *v)) \
  1572. F(void, SecondaryColor3f, (GLfloat red, GLfloat green, GLfloat blue)) \
  1573. F(void, SecondaryColor3dv, (const GLdouble *v)) \
  1574. F(void, SecondaryColor3d, (GLdouble red, GLdouble green, GLdouble blue)) \
  1575. F(void, SecondaryColor3bv, (const GLbyte *v)) \
  1576. F(void, SecondaryColor3b, (GLbyte red, GLbyte green, GLbyte blue)) \
  1577. F(void, FogCoordPointer, (GLenum type, GLsizei stride, const GLvoid *pointer)) \
  1578. F(void, FogCoorddv, (const GLdouble *coord)) \
  1579. F(void, FogCoordd, (GLdouble coord)) \
  1580. F(void, FogCoordfv, (const GLfloat *coord)) \
  1581. F(void, FogCoordf, (GLfloat coord)) \
  1582. QT_OPENGL_DECLARE(QT_OPENGL_1_4_DEPRECATED_FUNCTIONS);
  1583. };
  1584. class QOpenGLFunctions_2_0_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1585. {
  1586. public:
  1587. QOpenGLFunctions_2_0_DeprecatedBackend(QOpenGLContext *c)
  1588. : QOpenGLVersionFunctionsBackend(c)
  1589. {
  1590. init();
  1591. }
  1592. Q_DECL_CONSTEXPR static Version versionStatus()
  1593. { return OpenGL_2_0_Deprecated; }
  1594. // OpenGL 2.0 deprecated functions
  1595. #define QT_OPENGL_2_0_DEPRECATED_FUNCTIONS(F) \
  1596. F(void, VertexAttrib4usv, (GLuint index, const GLushort *v)) \
  1597. F(void, VertexAttrib4uiv, (GLuint index, const GLuint *v)) \
  1598. F(void, VertexAttrib4ubv, (GLuint index, const GLubyte *v)) \
  1599. F(void, VertexAttrib4sv, (GLuint index, const GLshort *v)) \
  1600. F(void, VertexAttrib4s, (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) \
  1601. F(void, VertexAttrib4iv, (GLuint index, const GLint *v)) \
  1602. F(void, VertexAttrib4fv, (GLuint index, const GLfloat *v)) \
  1603. F(void, VertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
  1604. F(void, VertexAttrib4dv, (GLuint index, const GLdouble *v)) \
  1605. F(void, VertexAttrib4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
  1606. F(void, VertexAttrib4bv, (GLuint index, const GLbyte *v)) \
  1607. F(void, VertexAttrib4Nusv, (GLuint index, const GLushort *v)) \
  1608. F(void, VertexAttrib4Nuiv, (GLuint index, const GLuint *v)) \
  1609. F(void, VertexAttrib4Nubv, (GLuint index, const GLubyte *v)) \
  1610. F(void, VertexAttrib4Nub, (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) \
  1611. F(void, VertexAttrib4Nsv, (GLuint index, const GLshort *v)) \
  1612. F(void, VertexAttrib4Niv, (GLuint index, const GLint *v)) \
  1613. F(void, VertexAttrib4Nbv, (GLuint index, const GLbyte *v)) \
  1614. F(void, VertexAttrib3sv, (GLuint index, const GLshort *v)) \
  1615. F(void, VertexAttrib3s, (GLuint index, GLshort x, GLshort y, GLshort z)) \
  1616. F(void, VertexAttrib3fv, (GLuint index, const GLfloat *v)) \
  1617. F(void, VertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z)) \
  1618. F(void, VertexAttrib3dv, (GLuint index, const GLdouble *v)) \
  1619. F(void, VertexAttrib3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z)) \
  1620. F(void, VertexAttrib2sv, (GLuint index, const GLshort *v)) \
  1621. F(void, VertexAttrib2s, (GLuint index, GLshort x, GLshort y)) \
  1622. F(void, VertexAttrib2fv, (GLuint index, const GLfloat *v)) \
  1623. F(void, VertexAttrib2f, (GLuint index, GLfloat x, GLfloat y)) \
  1624. F(void, VertexAttrib2dv, (GLuint index, const GLdouble *v)) \
  1625. F(void, VertexAttrib2d, (GLuint index, GLdouble x, GLdouble y)) \
  1626. F(void, VertexAttrib1sv, (GLuint index, const GLshort *v)) \
  1627. F(void, VertexAttrib1s, (GLuint index, GLshort x)) \
  1628. F(void, VertexAttrib1fv, (GLuint index, const GLfloat *v)) \
  1629. F(void, VertexAttrib1f, (GLuint index, GLfloat x)) \
  1630. F(void, VertexAttrib1dv, (GLuint index, const GLdouble *v)) \
  1631. F(void, VertexAttrib1d, (GLuint index, GLdouble x)) \
  1632. QT_OPENGL_DECLARE(QT_OPENGL_2_0_DEPRECATED_FUNCTIONS);
  1633. };
  1634. class QOpenGLFunctions_3_0_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1635. {
  1636. public:
  1637. QOpenGLFunctions_3_0_DeprecatedBackend(QOpenGLContext *c)
  1638. : QOpenGLVersionFunctionsBackend(c)
  1639. {
  1640. init();
  1641. }
  1642. Q_DECL_CONSTEXPR static Version versionStatus()
  1643. { return OpenGL_3_0_Deprecated; }
  1644. // OpenGL 3.0 deprecated functions
  1645. #define QT_OPENGL_3_0_DEPRECATED_FUNCTIONS(F) \
  1646. F(void, VertexAttribI4usv, (GLuint index, const GLushort *v)) \
  1647. F(void, VertexAttribI4ubv, (GLuint index, const GLubyte *v)) \
  1648. F(void, VertexAttribI4sv, (GLuint index, const GLshort *v)) \
  1649. F(void, VertexAttribI4bv, (GLuint index, const GLbyte *v)) \
  1650. F(void, VertexAttribI4uiv, (GLuint index, const GLuint *v)) \
  1651. F(void, VertexAttribI3uiv, (GLuint index, const GLuint *v)) \
  1652. F(void, VertexAttribI2uiv, (GLuint index, const GLuint *v)) \
  1653. F(void, VertexAttribI1uiv, (GLuint index, const GLuint *v)) \
  1654. F(void, VertexAttribI4iv, (GLuint index, const GLint *v)) \
  1655. F(void, VertexAttribI3iv, (GLuint index, const GLint *v)) \
  1656. F(void, VertexAttribI2iv, (GLuint index, const GLint *v)) \
  1657. F(void, VertexAttribI1iv, (GLuint index, const GLint *v)) \
  1658. F(void, VertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) \
  1659. F(void, VertexAttribI3ui, (GLuint index, GLuint x, GLuint y, GLuint z)) \
  1660. F(void, VertexAttribI2ui, (GLuint index, GLuint x, GLuint y)) \
  1661. F(void, VertexAttribI1ui, (GLuint index, GLuint x)) \
  1662. F(void, VertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w)) \
  1663. F(void, VertexAttribI3i, (GLuint index, GLint x, GLint y, GLint z)) \
  1664. F(void, VertexAttribI2i, (GLuint index, GLint x, GLint y)) \
  1665. F(void, VertexAttribI1i, (GLuint index, GLint x)) \
  1666. QT_OPENGL_DECLARE(QT_OPENGL_3_0_DEPRECATED_FUNCTIONS);
  1667. };
  1668. class QOpenGLFunctions_3_3_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1669. {
  1670. public:
  1671. QOpenGLFunctions_3_3_DeprecatedBackend(QOpenGLContext *c)
  1672. : QOpenGLVersionFunctionsBackend(c)
  1673. {
  1674. init();
  1675. }
  1676. Q_DECL_CONSTEXPR static Version versionStatus()
  1677. { return OpenGL_3_3_Deprecated; }
  1678. // OpenGL 3.3 deprecated functions
  1679. #define QT_OPENGL_3_3_DEPRECATED_FUNCTIONS(F) \
  1680. F(void, SecondaryColorP3uiv, (GLenum type, const GLuint *color)) \
  1681. F(void, SecondaryColorP3ui, (GLenum type, GLuint color)) \
  1682. F(void, ColorP4uiv, (GLenum type, const GLuint *color)) \
  1683. F(void, ColorP4ui, (GLenum type, GLuint color)) \
  1684. F(void, ColorP3uiv, (GLenum type, const GLuint *color)) \
  1685. F(void, ColorP3ui, (GLenum type, GLuint color)) \
  1686. F(void, NormalP3uiv, (GLenum type, const GLuint *coords)) \
  1687. F(void, NormalP3ui, (GLenum type, GLuint coords)) \
  1688. F(void, MultiTexCoordP4uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
  1689. F(void, MultiTexCoordP4ui, (GLenum texture, GLenum type, GLuint coords)) \
  1690. F(void, MultiTexCoordP3uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
  1691. F(void, MultiTexCoordP3ui, (GLenum texture, GLenum type, GLuint coords)) \
  1692. F(void, MultiTexCoordP2uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
  1693. F(void, MultiTexCoordP2ui, (GLenum texture, GLenum type, GLuint coords)) \
  1694. F(void, MultiTexCoordP1uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
  1695. F(void, MultiTexCoordP1ui, (GLenum texture, GLenum type, GLuint coords)) \
  1696. F(void, TexCoordP4uiv, (GLenum type, const GLuint *coords)) \
  1697. F(void, TexCoordP4ui, (GLenum type, GLuint coords)) \
  1698. F(void, TexCoordP3uiv, (GLenum type, const GLuint *coords)) \
  1699. F(void, TexCoordP3ui, (GLenum type, GLuint coords)) \
  1700. F(void, TexCoordP2uiv, (GLenum type, const GLuint *coords)) \
  1701. F(void, TexCoordP2ui, (GLenum type, GLuint coords)) \
  1702. F(void, TexCoordP1uiv, (GLenum type, const GLuint *coords)) \
  1703. F(void, TexCoordP1ui, (GLenum type, GLuint coords)) \
  1704. F(void, VertexP4uiv, (GLenum type, const GLuint *value)) \
  1705. F(void, VertexP4ui, (GLenum type, GLuint value)) \
  1706. F(void, VertexP3uiv, (GLenum type, const GLuint *value)) \
  1707. F(void, VertexP3ui, (GLenum type, GLuint value)) \
  1708. F(void, VertexP2uiv, (GLenum type, const GLuint *value)) \
  1709. F(void, VertexP2ui, (GLenum type, GLuint value)) \
  1710. QT_OPENGL_DECLARE(QT_OPENGL_3_3_DEPRECATED_FUNCTIONS);
  1711. };
  1712. class QOpenGLFunctions_4_5_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
  1713. {
  1714. public:
  1715. QOpenGLFunctions_4_5_DeprecatedBackend(QOpenGLContext *c)
  1716. : QOpenGLVersionFunctionsBackend(c)
  1717. {
  1718. init();
  1719. }
  1720. Q_DECL_CONSTEXPR static Version versionStatus()
  1721. { return OpenGL_4_5_Deprecated; }
  1722. // OpenGL 4.5 deprecated functions
  1723. #define QT_OPENGL_4_5_DEPRECATED_FUNCTIONS(F) \
  1724. F(void, GetnMinmax, (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values)) \
  1725. F(void, GetnHistogram, (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values)) \
  1726. F(void, GetnSeparableFilter, (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span)) \
  1727. F(void, GetnConvolutionFilter, (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image)) \
  1728. F(void, GetnColorTable, (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table)) \
  1729. F(void, GetnPolygonStipple, (GLsizei bufSize, GLubyte *pattern)) \
  1730. F(void, GetnPixelMapusv, (GLenum map, GLsizei bufSize, GLushort *values)) \
  1731. F(void, GetnPixelMapuiv, (GLenum map, GLsizei bufSize, GLuint *values)) \
  1732. F(void, GetnPixelMapfv, (GLenum map, GLsizei bufSize, GLfloat *values)) \
  1733. F(void, GetnMapiv, (GLenum target, GLenum query, GLsizei bufSize, GLint *v)) \
  1734. F(void, GetnMapfv, (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v)) \
  1735. F(void, GetnMapdv, (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v)) \
  1736. QT_OPENGL_DECLARE(QT_OPENGL_4_5_DEPRECATED_FUNCTIONS);
  1737. };
  1738. #else
  1739. // No need for backend classes with function pointers with ES2.
  1740. // All function addresses are independent of context and display.
  1741. #endif // !QT_OPENGL_ES_2
  1742. #undef QT_OPENGL_DECLARE_FUNCTIONS
  1743. #undef QT_OPENGL_COUNT_FUNCTIONS
  1744. #undef QT_OPENGL_DECLARE
  1745. QT_END_NAMESPACE
  1746. #endif // QT_NO_OPENGL
  1747. #endif