qopenglextrafunctions.h 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2016 The Qt Company Ltd.
  4. ** Contact: https://www.qt.io/licensing/
  5. **
  6. ** This file is part of the QtGui module of the Qt Toolkit.
  7. **
  8. ** $QT_BEGIN_LICENSE:LGPL$
  9. ** Commercial License Usage
  10. ** Licensees holding valid commercial Qt licenses may use this file in
  11. ** accordance with the commercial license agreement provided with the
  12. ** Software or, alternatively, in accordance with the terms contained in
  13. ** a written agreement between you and The Qt Company. For licensing terms
  14. ** and conditions see https://www.qt.io/terms-conditions. For further
  15. ** information use the contact form at https://www.qt.io/contact-us.
  16. **
  17. ** GNU Lesser General Public License Usage
  18. ** Alternatively, this file may be used under the terms of the GNU Lesser
  19. ** General Public License version 3 as published by the Free Software
  20. ** Foundation and appearing in the file LICENSE.LGPL3 included in the
  21. ** packaging of this file. Please review the following information to
  22. ** ensure the GNU Lesser General Public License version 3 requirements
  23. ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
  24. **
  25. ** GNU General Public License Usage
  26. ** Alternatively, this file may be used under the terms of the GNU
  27. ** General Public License version 2.0 or (at your option) the GNU General
  28. ** Public license version 3 or any later version approved by the KDE Free
  29. ** Qt Foundation. The licenses are as published by the Free Software
  30. ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
  31. ** included in the packaging of this file. Please review the following
  32. ** information to ensure the GNU General Public License requirements will
  33. ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
  34. ** https://www.gnu.org/licenses/gpl-3.0.html.
  35. **
  36. ** $QT_END_LICENSE$
  37. **
  38. ****************************************************************************/
  39. #ifndef QOPENGLEXTRAFUNCTIONS_H
  40. #define QOPENGLEXTRAFUNCTIONS_H
  41. #include <QtCore/qglobal.h>
  42. #ifndef QT_NO_OPENGL
  43. #include <QtGui/qopenglfunctions.h>
  44. // MemoryBarrier is a macro on some architectures on Windows
  45. #ifdef Q_OS_WIN
  46. #pragma push_macro("MemoryBarrier")
  47. #undef MemoryBarrier
  48. #endif
  49. QT_BEGIN_NAMESPACE
  50. class QOpenGLExtraFunctionsPrivate;
  51. #undef glReadBuffer
  52. #undef glDrawRangeElements
  53. #undef glTexImage3D
  54. #undef glTexSubImage3D
  55. #undef glCopyTexSubImage3D
  56. #undef glCompressedTexImage3D
  57. #undef glCompressedTexSubImage3D
  58. #undef glGenQueries
  59. #undef glDeleteQueries
  60. #undef glIsQuery
  61. #undef glBeginQuery
  62. #undef glEndQuery
  63. #undef glGetQueryiv
  64. #undef glGetQueryObjectuiv
  65. #undef glUnmapBuffer
  66. #undef glGetBufferPointerv
  67. #undef glDrawBuffers
  68. #undef glUniformMatrix2x3fv
  69. #undef glUniformMatrix3x2fv
  70. #undef glUniformMatrix2x4fv
  71. #undef glUniformMatrix4x2fv
  72. #undef glUniformMatrix3x4fv
  73. #undef glUniformMatrix4x3fv
  74. #undef glBlitFramebuffer
  75. #undef glRenderbufferStorageMultisample
  76. #undef glFramebufferTextureLayer
  77. #undef glMapBufferRange
  78. #undef glFlushMappedBufferRange
  79. #undef glBindVertexArray
  80. #undef glDeleteVertexArrays
  81. #undef glGenVertexArrays
  82. #undef glIsVertexArray
  83. #undef glGetIntegeri_v
  84. #undef glBeginTransformFeedback
  85. #undef glEndTransformFeedback
  86. #undef glBindBufferRange
  87. #undef glBindBufferBase
  88. #undef glTransformFeedbackVaryings
  89. #undef glGetTransformFeedbackVarying
  90. #undef glVertexAttribIPointer
  91. #undef glGetVertexAttribIiv
  92. #undef glGetVertexAttribIuiv
  93. #undef glVertexAttribI4i
  94. #undef glVertexAttribI4ui
  95. #undef glVertexAttribI4iv
  96. #undef glVertexAttribI4uiv
  97. #undef glGetUniformuiv
  98. #undef glGetFragDataLocation
  99. #undef glUniform1ui
  100. #undef glUniform2ui
  101. #undef glUniform3ui
  102. #undef glUniform4ui
  103. #undef glUniform1uiv
  104. #undef glUniform2uiv
  105. #undef glUniform3uiv
  106. #undef glUniform4uiv
  107. #undef glClearBufferiv
  108. #undef glClearBufferuiv
  109. #undef glClearBufferfv
  110. #undef glClearBufferfi
  111. #undef glGetStringi
  112. #undef glCopyBufferSubData
  113. #undef glGetUniformIndices
  114. #undef glGetActiveUniformsiv
  115. #undef glGetUniformBlockIndex
  116. #undef glGetActiveUniformBlockiv
  117. #undef glGetActiveUniformBlockName
  118. #undef glUniformBlockBinding
  119. #undef glDrawArraysInstanced
  120. #undef glDrawElementsInstanced
  121. #undef glFenceSync
  122. #undef glIsSync
  123. #undef glDeleteSync
  124. #undef glClientWaitSync
  125. #undef glWaitSync
  126. #undef glGetInteger64v
  127. #undef glGetSynciv
  128. #undef glGetInteger64i_v
  129. #undef glGetBufferParameteri64v
  130. #undef glGenSamplers
  131. #undef glDeleteSamplers
  132. #undef glIsSampler
  133. #undef glBindSampler
  134. #undef glSamplerParameteri
  135. #undef glSamplerParameteriv
  136. #undef glSamplerParameterf
  137. #undef glSamplerParameterfv
  138. #undef glGetSamplerParameteriv
  139. #undef glGetSamplerParameterfv
  140. #undef glVertexAttribDivisor
  141. #undef glBindTransformFeedback
  142. #undef glDeleteTransformFeedbacks
  143. #undef glGenTransformFeedbacks
  144. #undef glIsTransformFeedback
  145. #undef glPauseTransformFeedback
  146. #undef glResumeTransformFeedback
  147. #undef glGetProgramBinary
  148. #undef glProgramBinary
  149. #undef glProgramParameteri
  150. #undef glInvalidateFramebuffer
  151. #undef glInvalidateSubFramebuffer
  152. #undef glTexStorage2D
  153. #undef glTexStorage3D
  154. #undef glGetInternalformativ
  155. #undef glDispatchCompute
  156. #undef glDispatchComputeIndirect
  157. #undef glDrawArraysIndirect
  158. #undef glDrawElementsIndirect
  159. #undef glFramebufferParameteri
  160. #undef glGetFramebufferParameteriv
  161. #undef glGetProgramInterfaceiv
  162. #undef glGetProgramResourceIndex
  163. #undef glGetProgramResourceName
  164. #undef glGetProgramResourceiv
  165. #undef glGetProgramResourceLocation
  166. #undef glUseProgramStages
  167. #undef glActiveShaderProgram
  168. #undef glCreateShaderProgramv
  169. #undef glBindProgramPipeline
  170. #undef glDeleteProgramPipelines
  171. #undef glGenProgramPipelines
  172. #undef glIsProgramPipeline
  173. #undef glGetProgramPipelineiv
  174. #undef glProgramUniform1i
  175. #undef glProgramUniform2i
  176. #undef glProgramUniform3i
  177. #undef glProgramUniform4i
  178. #undef glProgramUniform1ui
  179. #undef glProgramUniform2ui
  180. #undef glProgramUniform3ui
  181. #undef glProgramUniform4ui
  182. #undef glProgramUniform1f
  183. #undef glProgramUniform2f
  184. #undef glProgramUniform3f
  185. #undef glProgramUniform4f
  186. #undef glProgramUniform1iv
  187. #undef glProgramUniform2iv
  188. #undef glProgramUniform3iv
  189. #undef glProgramUniform4iv
  190. #undef glProgramUniform1uiv
  191. #undef glProgramUniform2uiv
  192. #undef glProgramUniform3uiv
  193. #undef glProgramUniform4uiv
  194. #undef glProgramUniform1fv
  195. #undef glProgramUniform2fv
  196. #undef glProgramUniform3fv
  197. #undef glProgramUniform4fv
  198. #undef glProgramUniformMatrix2fv
  199. #undef glProgramUniformMatrix3fv
  200. #undef glProgramUniformMatrix4fv
  201. #undef glProgramUniformMatrix2x3fv
  202. #undef glProgramUniformMatrix3x2fv
  203. #undef glProgramUniformMatrix2x4fv
  204. #undef glProgramUniformMatrix4x2fv
  205. #undef glProgramUniformMatrix3x4fv
  206. #undef glProgramUniformMatrix4x3fv
  207. #undef glValidateProgramPipeline
  208. #undef glGetProgramPipelineInfoLog
  209. #undef glBindImageTexture
  210. #undef glGetBooleani_v
  211. #undef glMemoryBarrier
  212. #undef glMemoryBarrierByRegion
  213. #undef glTexStorage2DMultisample
  214. #undef glGetMultisamplefv
  215. #undef glSampleMaski
  216. #undef glGetTexLevelParameteriv
  217. #undef glGetTexLevelParameterfv
  218. #undef glBindVertexBuffer
  219. #undef glVertexAttribFormat
  220. #undef glVertexAttribIFormat
  221. #undef glVertexAttribBinding
  222. #undef glVertexBindingDivisor
  223. class Q_GUI_EXPORT QOpenGLExtraFunctions : public QOpenGLFunctions
  224. {
  225. Q_DECLARE_PRIVATE(QOpenGLExtraFunctions)
  226. public:
  227. QOpenGLExtraFunctions();
  228. QOpenGLExtraFunctions(QOpenGLContext *context);
  229. ~QOpenGLExtraFunctions() {}
  230. // GLES3
  231. void glReadBuffer(GLenum mode);
  232. void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
  233. void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
  234. void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
  235. void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  236. void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
  237. void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
  238. void glGenQueries(GLsizei n, GLuint *ids);
  239. void glDeleteQueries(GLsizei n, const GLuint *ids);
  240. GLboolean glIsQuery(GLuint id);
  241. void glBeginQuery(GLenum target, GLuint id);
  242. void glEndQuery(GLenum target);
  243. void glGetQueryiv(GLenum target, GLenum pname, GLint *params);
  244. void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
  245. GLboolean glUnmapBuffer(GLenum target);
  246. void glGetBufferPointerv(GLenum target, GLenum pname, void **params);
  247. void glDrawBuffers(GLsizei n, const GLenum *bufs);
  248. void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  249. void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  250. void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  251. void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  252. void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  253. void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  254. void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
  255. void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
  256. void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
  257. void *glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
  258. void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
  259. void glBindVertexArray(GLuint array);
  260. void glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
  261. void glGenVertexArrays(GLsizei n, GLuint *arrays);
  262. GLboolean glIsVertexArray(GLuint array);
  263. void glGetIntegeri_v(GLenum target, GLuint index, GLint *data);
  264. void glBeginTransformFeedback(GLenum primitiveMode);
  265. void glEndTransformFeedback(void);
  266. void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
  267. void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
  268. void glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
  269. void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
  270. void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
  271. void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
  272. void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params);
  273. void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
  274. void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
  275. void glVertexAttribI4iv(GLuint index, const GLint *v);
  276. void glVertexAttribI4uiv(GLuint index, const GLuint *v);
  277. void glGetUniformuiv(GLuint program, GLint location, GLuint *params);
  278. GLint glGetFragDataLocation(GLuint program, const GLchar *name);
  279. void glUniform1ui(GLint location, GLuint v0);
  280. void glUniform2ui(GLint location, GLuint v0, GLuint v1);
  281. void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
  282. void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
  283. void glUniform1uiv(GLint location, GLsizei count, const GLuint *value);
  284. void glUniform2uiv(GLint location, GLsizei count, const GLuint *value);
  285. void glUniform3uiv(GLint location, GLsizei count, const GLuint *value);
  286. void glUniform4uiv(GLint location, GLsizei count, const GLuint *value);
  287. void glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value);
  288. void glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value);
  289. void glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value);
  290. void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
  291. const GLubyte *glGetStringi(GLenum name, GLuint index);
  292. void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
  293. void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
  294. void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
  295. GLuint glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName);
  296. void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
  297. void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
  298. void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
  299. void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
  300. void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
  301. GLsync glFenceSync(GLenum condition, GLbitfield flags);
  302. GLboolean glIsSync(GLsync sync);
  303. void glDeleteSync(GLsync sync);
  304. GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
  305. void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
  306. void glGetInteger64v(GLenum pname, GLint64 *data);
  307. void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
  308. void glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data);
  309. void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params);
  310. void glGenSamplers(GLsizei count, GLuint *samplers);
  311. void glDeleteSamplers(GLsizei count, const GLuint *samplers);
  312. GLboolean glIsSampler(GLuint sampler);
  313. void glBindSampler(GLuint unit, GLuint sampler);
  314. void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
  315. void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param);
  316. void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
  317. void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param);
  318. void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params);
  319. void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params);
  320. void glVertexAttribDivisor(GLuint index, GLuint divisor);
  321. void glBindTransformFeedback(GLenum target, GLuint id);
  322. void glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids);
  323. void glGenTransformFeedbacks(GLsizei n, GLuint *ids);
  324. GLboolean glIsTransformFeedback(GLuint id);
  325. void glPauseTransformFeedback(void);
  326. void glResumeTransformFeedback(void);
  327. void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
  328. void glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
  329. void glProgramParameteri(GLuint program, GLenum pname, GLint value);
  330. void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);
  331. void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
  332. void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
  333. void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
  334. void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
  335. // GLES 3.1
  336. void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
  337. void glDispatchComputeIndirect(GLintptr indirect);
  338. void glDrawArraysIndirect(GLenum mode, const void *indirect);
  339. void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect);
  340. void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
  341. void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
  342. void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params);
  343. GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name);
  344. void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
  345. void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
  346. GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name);
  347. void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
  348. void glActiveShaderProgram(GLuint pipeline, GLuint program);
  349. GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings);
  350. void glBindProgramPipeline(GLuint pipeline);
  351. void glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines);
  352. void glGenProgramPipelines(GLsizei n, GLuint *pipelines);
  353. GLboolean glIsProgramPipeline(GLuint pipeline);
  354. void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);
  355. void glProgramUniform1i(GLuint program, GLint location, GLint v0);
  356. void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
  357. void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
  358. void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
  359. void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
  360. void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
  361. void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
  362. void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
  363. void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
  364. void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
  365. void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
  366. void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
  367. void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value);
  368. void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value);
  369. void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value);
  370. void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value);
  371. void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
  372. void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
  373. void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
  374. void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
  375. void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
  376. void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
  377. void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
  378. void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
  379. void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  380. void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  381. void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  382. void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  383. void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  384. void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  385. void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  386. void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  387. void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
  388. void glValidateProgramPipeline(GLuint pipeline);
  389. void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
  390. void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
  391. void glGetBooleani_v(GLenum target, GLuint index, GLboolean *data);
  392. void glMemoryBarrier(GLbitfield barriers);
  393. void glMemoryBarrierByRegion(GLbitfield barriers);
  394. void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
  395. void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val);
  396. void glSampleMaski(GLuint maskNumber, GLbitfield mask);
  397. void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
  398. void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params);
  399. void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
  400. void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
  401. void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
  402. void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
  403. void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
  404. private:
  405. static bool isInitialized(const QOpenGLExtraFunctionsPrivate *d) { return d != Q_NULLPTR; }
  406. };
  407. #define QT_OPENGL_DECLARE_FUNCTIONS(ret, name, args) \
  408. ret (QOPENGLF_APIENTRYP name)args;
  409. #define QT_OPENGL_COUNT_FUNCTIONS(ret, name, args) +1
  410. #define QT_OPENGL_DECLARE(FUNCTIONS) \
  411. public: \
  412. struct Functions { \
  413. FUNCTIONS(QT_OPENGL_DECLARE_FUNCTIONS) \
  414. }; \
  415. union { \
  416. QFunctionPointer functions[FUNCTIONS(QT_OPENGL_COUNT_FUNCTIONS)]; \
  417. Functions f; \
  418. }; \
  419. private: \
  420. void init(QOpenGLContext *context);
  421. class QOpenGLExtraFunctionsPrivate : public QOpenGLFunctionsPrivate
  422. {
  423. public:
  424. QOpenGLExtraFunctionsPrivate(QOpenGLContext *ctx);
  425. // GLES3
  426. #define QT_OPENGL_EXTRA_FUNCTIONS(F) \
  427. F(void, ReadBuffer, (GLenum mode)) \
  428. F(void, DrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)) \
  429. F(void, TexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels)) \
  430. F(void, TexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)) \
  431. F(void, CopyTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
  432. F(void, CompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)) \
  433. F(void, CompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)) \
  434. F(void, GenQueries, (GLsizei n, GLuint *ids)) \
  435. F(void, DeleteQueries, (GLsizei n, const GLuint *ids)) \
  436. F(GLboolean, IsQuery, (GLuint id)) \
  437. F(void, BeginQuery, (GLenum target, GLuint id)) \
  438. F(void, EndQuery, (GLenum target)) \
  439. F(void, GetQueryiv, (GLenum target, GLenum pname, GLint *params)) \
  440. F(void, GetQueryObjectuiv, (GLuint id, GLenum pname, GLuint *params)) \
  441. F(GLboolean, UnmapBuffer, (GLenum target)) \
  442. F(void, GetBufferPointerv, (GLenum target, GLenum pname, void **params)) \
  443. F(void, DrawBuffers, (GLsizei n, const GLenum *bufs)) \
  444. F(void, UniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  445. F(void, UniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  446. F(void, UniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  447. F(void, UniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  448. F(void, UniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  449. F(void, UniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  450. F(void, BlitFramebuffer, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) \
  451. F(void, RenderbufferStorageMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) \
  452. F(void, FramebufferTextureLayer, (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) \
  453. F(void *,MapBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)) \
  454. F(void, FlushMappedBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length)) \
  455. F(void, BindVertexArray, (GLuint array)) \
  456. F(void, DeleteVertexArrays, (GLsizei n, const GLuint *arrays)) \
  457. F(void, GenVertexArrays, (GLsizei n, GLuint *arrays)) \
  458. F(GLboolean, IsVertexArray, (GLuint array)) \
  459. F(void, GetIntegeri_v, (GLenum target, GLuint index, GLint *data)) \
  460. F(void, BeginTransformFeedback, (GLenum primitiveMode)) \
  461. F(void, EndTransformFeedback, (void)) \
  462. F(void, BindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) \
  463. F(void, BindBufferBase, (GLenum target, GLuint index, GLuint buffer)) \
  464. F(void, TransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode)) \
  465. F(void, GetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) \
  466. F(void, VertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)) \
  467. F(void, GetVertexAttribIiv, (GLuint index, GLenum pname, GLint *params)) \
  468. F(void, GetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint *params)) \
  469. F(void, VertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w)) \
  470. F(void, VertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) \
  471. F(void, VertexAttribI4iv, (GLuint index, const GLint *v)) \
  472. F(void, VertexAttribI4uiv, (GLuint index, const GLuint *v)) \
  473. F(void, GetUniformuiv, (GLuint program, GLint location, GLuint *params)) \
  474. F(GLint, GetFragDataLocation, (GLuint program, const GLchar *name)) \
  475. F(void, Uniform1ui, (GLint location, GLuint v0)) \
  476. F(void, Uniform2ui, (GLint location, GLuint v0, GLuint v1)) \
  477. F(void, Uniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2)) \
  478. F(void, Uniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) \
  479. F(void, Uniform1uiv, (GLint location, GLsizei count, const GLuint *value)) \
  480. F(void, Uniform2uiv, (GLint location, GLsizei count, const GLuint *value)) \
  481. F(void, Uniform3uiv, (GLint location, GLsizei count, const GLuint *value)) \
  482. F(void, Uniform4uiv, (GLint location, GLsizei count, const GLuint *value)) \
  483. F(void, ClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint *value)) \
  484. F(void, ClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint *value)) \
  485. F(void, ClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat *value)) \
  486. F(void, ClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)) \
  487. F(const GLubyte *, GetStringi, (GLenum name, GLuint index)) \
  488. F(void, CopyBufferSubData, (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) \
  489. F(void, GetUniformIndices, (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices)) \
  490. F(void, GetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)) \
  491. F(GLuint, GetUniformBlockIndex, (GLuint program, const GLchar *uniformBlockName)) \
  492. F(void, GetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)) \
  493. F(void, GetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)) \
  494. F(void, UniformBlockBinding, (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)) \
  495. F(void, DrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei instancecount)) \
  496. F(void, DrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount)) \
  497. F(GLsync, FenceSync, (GLenum condition, GLbitfield flags)) \
  498. F(GLboolean, IsSync, (GLsync sync)) \
  499. F(void, DeleteSync, (GLsync sync)) \
  500. F(GLenum, ClientWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) \
  501. F(void, WaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) \
  502. F(void, GetInteger64v, (GLenum pname, GLint64 *data)) \
  503. F(void, GetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)) \
  504. F(void, GetInteger64i_v, (GLenum target, GLuint index, GLint64 *data)) \
  505. F(void, GetBufferParameteri64v, (GLenum target, GLenum pname, GLint64 *params)) \
  506. F(void, GenSamplers, (GLsizei count, GLuint *samplers)) \
  507. F(void, DeleteSamplers, (GLsizei count, const GLuint *samplers)) \
  508. F(GLboolean, IsSampler, (GLuint sampler)) \
  509. F(void, BindSampler, (GLuint unit, GLuint sampler)) \
  510. F(void, SamplerParameteri, (GLuint sampler, GLenum pname, GLint param)) \
  511. F(void, SamplerParameteriv, (GLuint sampler, GLenum pname, const GLint *param)) \
  512. F(void, SamplerParameterf, (GLuint sampler, GLenum pname, GLfloat param)) \
  513. F(void, SamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat *param)) \
  514. F(void, GetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint *params)) \
  515. F(void, GetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat *params)) \
  516. F(void, VertexAttribDivisor, (GLuint index, GLuint divisor)) \
  517. F(void, BindTransformFeedback, (GLenum target, GLuint id)) \
  518. F(void, DeleteTransformFeedbacks, (GLsizei n, const GLuint *ids)) \
  519. F(void, GenTransformFeedbacks, (GLsizei n, GLuint *ids)) \
  520. F(GLboolean, IsTransformFeedback, (GLuint id)) \
  521. F(void, PauseTransformFeedback, (void)) \
  522. F(void, ResumeTransformFeedback, (void)) \
  523. F(void, GetProgramBinary, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)) \
  524. F(void, ProgramBinary, (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)) \
  525. F(void, ProgramParameteri, (GLuint program, GLenum pname, GLint value)) \
  526. F(void, InvalidateFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum *attachments)) \
  527. F(void, InvalidateSubFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)) \
  528. F(void, TexStorage2D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) \
  529. F(void, TexStorage3D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) \
  530. F(void, GetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)) \
  531. F(void, DispatchCompute, (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)) \
  532. F(void, DispatchComputeIndirect, (GLintptr indirect)) \
  533. F(void, DrawArraysIndirect, (GLenum mode, const void *indirect)) \
  534. F(void, DrawElementsIndirect, (GLenum mode, GLenum type, const void *indirect)) \
  535. F(void, FramebufferParameteri, (GLenum target, GLenum pname, GLint param)) \
  536. F(void, GetFramebufferParameteriv, (GLenum target, GLenum pname, GLint *params)) \
  537. F(void, GetProgramInterfaceiv, (GLuint program, GLenum programInterface, GLenum pname, GLint *params)) \
  538. F(GLuint, GetProgramResourceIndex, (GLuint program, GLenum programInterface, const GLchar *name)) \
  539. F(void, GetProgramResourceName, (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)) \
  540. F(void, GetProgramResourceiv, (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)) \
  541. F(GLint, GetProgramResourceLocation, (GLuint program, GLenum programInterface, const GLchar *name)) \
  542. F(void, UseProgramStages, (GLuint pipeline, GLbitfield stages, GLuint program)) \
  543. F(void, ActiveShaderProgram, (GLuint pipeline, GLuint program)) \
  544. F(GLuint, CreateShaderProgramv, (GLenum type, GLsizei count, const GLchar *const*strings)) \
  545. F(void, BindProgramPipeline, (GLuint pipeline)) \
  546. F(void, DeleteProgramPipelines, (GLsizei n, const GLuint *pipelines)) \
  547. F(void, GenProgramPipelines, (GLsizei n, GLuint *pipelines)) \
  548. F(GLboolean, IsProgramPipeline, (GLuint pipeline)) \
  549. F(void, GetProgramPipelineiv, (GLuint pipeline, GLenum pname, GLint *params)) \
  550. F(void, ProgramUniform1i, (GLuint program, GLint location, GLint v0)) \
  551. F(void, ProgramUniform2i, (GLuint program, GLint location, GLint v0, GLint v1)) \
  552. F(void, ProgramUniform3i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2)) \
  553. F(void, ProgramUniform4i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) \
  554. F(void, ProgramUniform1ui, (GLuint program, GLint location, GLuint v0)) \
  555. F(void, ProgramUniform2ui, (GLuint program, GLint location, GLuint v0, GLuint v1)) \
  556. F(void, ProgramUniform3ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)) \
  557. F(void, ProgramUniform4ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) \
  558. F(void, ProgramUniform1f, (GLuint program, GLint location, GLfloat v0)) \
  559. F(void, ProgramUniform2f, (GLuint program, GLint location, GLfloat v0, GLfloat v1)) \
  560. F(void, ProgramUniform3f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) \
  561. F(void, ProgramUniform4f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) \
  562. F(void, ProgramUniform1iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
  563. F(void, ProgramUniform2iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
  564. F(void, ProgramUniform3iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
  565. F(void, ProgramUniform4iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
  566. F(void, ProgramUniform1uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
  567. F(void, ProgramUniform2uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
  568. F(void, ProgramUniform3uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
  569. F(void, ProgramUniform4uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
  570. F(void, ProgramUniform1fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
  571. F(void, ProgramUniform2fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
  572. F(void, ProgramUniform3fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
  573. F(void, ProgramUniform4fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
  574. F(void, ProgramUniformMatrix2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  575. F(void, ProgramUniformMatrix3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  576. F(void, ProgramUniformMatrix4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  577. F(void, ProgramUniformMatrix2x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  578. F(void, ProgramUniformMatrix3x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  579. F(void, ProgramUniformMatrix2x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  580. F(void, ProgramUniformMatrix4x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  581. F(void, ProgramUniformMatrix3x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  582. F(void, ProgramUniformMatrix4x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
  583. F(void, ValidateProgramPipeline, (GLuint pipeline)) \
  584. F(void, GetProgramPipelineInfoLog, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) \
  585. F(void, BindImageTexture, (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)) \
  586. F(void, GetBooleani_v, (GLenum target, GLuint index, GLboolean *data)) \
  587. F(void, MemoryBarrier, (GLbitfield barriers)) \
  588. F(void, MemoryBarrierByRegion, (GLbitfield barriers)) \
  589. F(void, TexStorage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) \
  590. F(void, GetMultisamplefv, (GLenum pname, GLuint index, GLfloat *val)) \
  591. F(void, SampleMaski, (GLuint maskNumber, GLbitfield mask)) \
  592. F(void, GetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params)) \
  593. F(void, GetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params)) \
  594. F(void, BindVertexBuffer, (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)) \
  595. F(void, VertexAttribFormat, (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)) \
  596. F(void, VertexAttribIFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
  597. F(void, VertexAttribBinding, (GLuint attribindex, GLuint bindingindex)) \
  598. F(void, VertexBindingDivisor, (GLuint bindingindex, GLuint divisor)) \
  599. QT_OPENGL_DECLARE(QT_OPENGL_EXTRA_FUNCTIONS)
  600. };
  601. // GLES 3.0 and 3.1
  602. inline void QOpenGLExtraFunctions::glBeginQuery(GLenum target, GLuint id)
  603. {
  604. Q_D(QOpenGLExtraFunctions);
  605. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  606. d->f.BeginQuery(target, id);
  607. Q_OPENGL_FUNCTIONS_DEBUG
  608. }
  609. inline void QOpenGLExtraFunctions::glBeginTransformFeedback(GLenum primitiveMode)
  610. {
  611. Q_D(QOpenGLExtraFunctions);
  612. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  613. d->f.BeginTransformFeedback(primitiveMode);
  614. Q_OPENGL_FUNCTIONS_DEBUG
  615. }
  616. inline void QOpenGLExtraFunctions::glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
  617. {
  618. Q_D(QOpenGLExtraFunctions);
  619. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  620. d->f.BindBufferBase(target, index, buffer);
  621. Q_OPENGL_FUNCTIONS_DEBUG
  622. }
  623. inline void QOpenGLExtraFunctions::glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
  624. {
  625. Q_D(QOpenGLExtraFunctions);
  626. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  627. d->f.BindBufferRange(target, index, buffer, offset, size);
  628. Q_OPENGL_FUNCTIONS_DEBUG
  629. }
  630. inline void QOpenGLExtraFunctions::glBindSampler(GLuint unit, GLuint sampler)
  631. {
  632. Q_D(QOpenGLExtraFunctions);
  633. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  634. d->f.BindSampler(unit, sampler);
  635. Q_OPENGL_FUNCTIONS_DEBUG
  636. }
  637. inline void QOpenGLExtraFunctions::glBindTransformFeedback(GLenum target, GLuint id)
  638. {
  639. Q_D(QOpenGLExtraFunctions);
  640. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  641. d->f.BindTransformFeedback(target, id);
  642. Q_OPENGL_FUNCTIONS_DEBUG
  643. }
  644. inline void QOpenGLExtraFunctions::glBindVertexArray(GLuint array)
  645. {
  646. Q_D(QOpenGLExtraFunctions);
  647. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  648. d->f.BindVertexArray(array);
  649. Q_OPENGL_FUNCTIONS_DEBUG
  650. }
  651. inline void QOpenGLExtraFunctions::glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
  652. {
  653. Q_D(QOpenGLExtraFunctions);
  654. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  655. d->f.BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
  656. Q_OPENGL_FUNCTIONS_DEBUG
  657. }
  658. inline void QOpenGLExtraFunctions::glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
  659. {
  660. Q_D(QOpenGLExtraFunctions);
  661. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  662. d->f.ClearBufferfi(buffer, drawbuffer, depth, stencil);
  663. Q_OPENGL_FUNCTIONS_DEBUG
  664. }
  665. inline void QOpenGLExtraFunctions::glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat * value)
  666. {
  667. Q_D(QOpenGLExtraFunctions);
  668. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  669. d->f.ClearBufferfv(buffer, drawbuffer, value);
  670. Q_OPENGL_FUNCTIONS_DEBUG
  671. }
  672. inline void QOpenGLExtraFunctions::glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint * value)
  673. {
  674. Q_D(QOpenGLExtraFunctions);
  675. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  676. d->f.ClearBufferiv(buffer, drawbuffer, value);
  677. Q_OPENGL_FUNCTIONS_DEBUG
  678. }
  679. inline void QOpenGLExtraFunctions::glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint * value)
  680. {
  681. Q_D(QOpenGLExtraFunctions);
  682. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  683. d->f.ClearBufferuiv(buffer, drawbuffer, value);
  684. Q_OPENGL_FUNCTIONS_DEBUG
  685. }
  686. inline GLenum QOpenGLExtraFunctions::glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
  687. {
  688. Q_D(QOpenGLExtraFunctions);
  689. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  690. GLenum result = d->f.ClientWaitSync(sync, flags, timeout);
  691. Q_OPENGL_FUNCTIONS_DEBUG
  692. return result;
  693. }
  694. inline void QOpenGLExtraFunctions::glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data)
  695. {
  696. Q_D(QOpenGLExtraFunctions);
  697. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  698. d->f.CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
  699. Q_OPENGL_FUNCTIONS_DEBUG
  700. }
  701. inline void QOpenGLExtraFunctions::glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data)
  702. {
  703. Q_D(QOpenGLExtraFunctions);
  704. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  705. d->f.CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
  706. Q_OPENGL_FUNCTIONS_DEBUG
  707. }
  708. inline void QOpenGLExtraFunctions::glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
  709. {
  710. Q_D(QOpenGLExtraFunctions);
  711. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  712. d->f.CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
  713. Q_OPENGL_FUNCTIONS_DEBUG
  714. }
  715. inline void QOpenGLExtraFunctions::glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  716. {
  717. Q_D(QOpenGLExtraFunctions);
  718. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  719. d->f.CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
  720. Q_OPENGL_FUNCTIONS_DEBUG
  721. }
  722. inline void QOpenGLExtraFunctions::glDeleteQueries(GLsizei n, const GLuint * ids)
  723. {
  724. Q_D(QOpenGLExtraFunctions);
  725. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  726. d->f.DeleteQueries(n, ids);
  727. Q_OPENGL_FUNCTIONS_DEBUG
  728. }
  729. inline void QOpenGLExtraFunctions::glDeleteSamplers(GLsizei count, const GLuint * samplers)
  730. {
  731. Q_D(QOpenGLExtraFunctions);
  732. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  733. d->f.DeleteSamplers(count, samplers);
  734. Q_OPENGL_FUNCTIONS_DEBUG
  735. }
  736. inline void QOpenGLExtraFunctions::glDeleteSync(GLsync sync)
  737. {
  738. Q_D(QOpenGLExtraFunctions);
  739. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  740. d->f.DeleteSync(sync);
  741. Q_OPENGL_FUNCTIONS_DEBUG
  742. }
  743. inline void QOpenGLExtraFunctions::glDeleteTransformFeedbacks(GLsizei n, const GLuint * ids)
  744. {
  745. Q_D(QOpenGLExtraFunctions);
  746. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  747. d->f.DeleteTransformFeedbacks(n, ids);
  748. Q_OPENGL_FUNCTIONS_DEBUG
  749. }
  750. inline void QOpenGLExtraFunctions::glDeleteVertexArrays(GLsizei n, const GLuint * arrays)
  751. {
  752. Q_D(QOpenGLExtraFunctions);
  753. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  754. d->f.DeleteVertexArrays(n, arrays);
  755. Q_OPENGL_FUNCTIONS_DEBUG
  756. }
  757. inline void QOpenGLExtraFunctions::glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
  758. {
  759. Q_D(QOpenGLExtraFunctions);
  760. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  761. d->f.DrawArraysInstanced(mode, first, count, instancecount);
  762. Q_OPENGL_FUNCTIONS_DEBUG
  763. }
  764. inline void QOpenGLExtraFunctions::glDrawBuffers(GLsizei n, const GLenum * bufs)
  765. {
  766. Q_D(QOpenGLExtraFunctions);
  767. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  768. d->f.DrawBuffers(n, bufs);
  769. Q_OPENGL_FUNCTIONS_DEBUG
  770. }
  771. inline void QOpenGLExtraFunctions::glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount)
  772. {
  773. Q_D(QOpenGLExtraFunctions);
  774. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  775. d->f.DrawElementsInstanced(mode, count, type, indices, instancecount);
  776. Q_OPENGL_FUNCTIONS_DEBUG
  777. }
  778. inline void QOpenGLExtraFunctions::glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices)
  779. {
  780. Q_D(QOpenGLExtraFunctions);
  781. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  782. d->f.DrawRangeElements(mode, start, end, count, type, indices);
  783. Q_OPENGL_FUNCTIONS_DEBUG
  784. }
  785. inline void QOpenGLExtraFunctions::glEndQuery(GLenum target)
  786. {
  787. Q_D(QOpenGLExtraFunctions);
  788. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  789. d->f.EndQuery(target);
  790. Q_OPENGL_FUNCTIONS_DEBUG
  791. }
  792. inline void QOpenGLExtraFunctions::glEndTransformFeedback()
  793. {
  794. Q_D(QOpenGLExtraFunctions);
  795. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  796. d->f.EndTransformFeedback();
  797. Q_OPENGL_FUNCTIONS_DEBUG
  798. }
  799. inline GLsync QOpenGLExtraFunctions::glFenceSync(GLenum condition, GLbitfield flags)
  800. {
  801. Q_D(QOpenGLExtraFunctions);
  802. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  803. GLsync result = d->f.FenceSync(condition, flags);
  804. Q_OPENGL_FUNCTIONS_DEBUG
  805. return result;
  806. }
  807. inline void QOpenGLExtraFunctions::glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
  808. {
  809. Q_D(QOpenGLExtraFunctions);
  810. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  811. d->f.FlushMappedBufferRange(target, offset, length);
  812. Q_OPENGL_FUNCTIONS_DEBUG
  813. }
  814. inline void QOpenGLExtraFunctions::glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
  815. {
  816. Q_D(QOpenGLExtraFunctions);
  817. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  818. d->f.FramebufferTextureLayer(target, attachment, texture, level, layer);
  819. Q_OPENGL_FUNCTIONS_DEBUG
  820. }
  821. inline void QOpenGLExtraFunctions::glGenQueries(GLsizei n, GLuint* ids)
  822. {
  823. Q_D(QOpenGLExtraFunctions);
  824. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  825. d->f.GenQueries(n, ids);
  826. Q_OPENGL_FUNCTIONS_DEBUG
  827. }
  828. inline void QOpenGLExtraFunctions::glGenSamplers(GLsizei count, GLuint* samplers)
  829. {
  830. Q_D(QOpenGLExtraFunctions);
  831. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  832. d->f.GenSamplers(count, samplers);
  833. Q_OPENGL_FUNCTIONS_DEBUG
  834. }
  835. inline void QOpenGLExtraFunctions::glGenTransformFeedbacks(GLsizei n, GLuint* ids)
  836. {
  837. Q_D(QOpenGLExtraFunctions);
  838. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  839. d->f.GenTransformFeedbacks(n, ids);
  840. Q_OPENGL_FUNCTIONS_DEBUG
  841. }
  842. inline void QOpenGLExtraFunctions::glGenVertexArrays(GLsizei n, GLuint* arrays)
  843. {
  844. Q_D(QOpenGLExtraFunctions);
  845. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  846. d->f.GenVertexArrays(n, arrays);
  847. Q_OPENGL_FUNCTIONS_DEBUG
  848. }
  849. inline void QOpenGLExtraFunctions::glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
  850. {
  851. Q_D(QOpenGLExtraFunctions);
  852. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  853. d->f.GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
  854. Q_OPENGL_FUNCTIONS_DEBUG
  855. }
  856. inline void QOpenGLExtraFunctions::glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
  857. {
  858. Q_D(QOpenGLExtraFunctions);
  859. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  860. d->f.GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
  861. Q_OPENGL_FUNCTIONS_DEBUG
  862. }
  863. inline void QOpenGLExtraFunctions::glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint* params)
  864. {
  865. Q_D(QOpenGLExtraFunctions);
  866. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  867. d->f.GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
  868. Q_OPENGL_FUNCTIONS_DEBUG
  869. }
  870. inline void QOpenGLExtraFunctions::glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params)
  871. {
  872. Q_D(QOpenGLExtraFunctions);
  873. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  874. d->f.GetBufferParameteri64v(target, pname, params);
  875. Q_OPENGL_FUNCTIONS_DEBUG
  876. }
  877. inline void QOpenGLExtraFunctions::glGetBufferPointerv(GLenum target, GLenum pname, void ** params)
  878. {
  879. Q_D(QOpenGLExtraFunctions);
  880. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  881. d->f.GetBufferPointerv(target, pname, params);
  882. Q_OPENGL_FUNCTIONS_DEBUG
  883. }
  884. inline GLint QOpenGLExtraFunctions::glGetFragDataLocation(GLuint program, const GLchar * name)
  885. {
  886. Q_D(QOpenGLExtraFunctions);
  887. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  888. GLint result = d->f.GetFragDataLocation(program, name);
  889. Q_OPENGL_FUNCTIONS_DEBUG
  890. return result;
  891. }
  892. inline void QOpenGLExtraFunctions::glGetInteger64i_v(GLenum target, GLuint index, GLint64* data)
  893. {
  894. Q_D(QOpenGLExtraFunctions);
  895. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  896. d->f.GetInteger64i_v(target, index, data);
  897. Q_OPENGL_FUNCTIONS_DEBUG
  898. }
  899. inline void QOpenGLExtraFunctions::glGetInteger64v(GLenum pname, GLint64* data)
  900. {
  901. Q_D(QOpenGLExtraFunctions);
  902. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  903. d->f.GetInteger64v(pname, data);
  904. Q_OPENGL_FUNCTIONS_DEBUG
  905. }
  906. inline void QOpenGLExtraFunctions::glGetIntegeri_v(GLenum target, GLuint index, GLint* data)
  907. {
  908. Q_D(QOpenGLExtraFunctions);
  909. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  910. d->f.GetIntegeri_v(target, index, data);
  911. Q_OPENGL_FUNCTIONS_DEBUG
  912. }
  913. inline void QOpenGLExtraFunctions::glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
  914. {
  915. Q_D(QOpenGLExtraFunctions);
  916. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  917. d->f.GetInternalformativ(target, internalformat, pname, bufSize, params);
  918. Q_OPENGL_FUNCTIONS_DEBUG
  919. }
  920. inline void QOpenGLExtraFunctions::glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void * binary)
  921. {
  922. Q_D(QOpenGLExtraFunctions);
  923. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  924. d->f.GetProgramBinary(program, bufSize, length, binaryFormat, binary);
  925. Q_OPENGL_FUNCTIONS_DEBUG
  926. }
  927. inline void QOpenGLExtraFunctions::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params)
  928. {
  929. Q_D(QOpenGLExtraFunctions);
  930. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  931. d->f.GetQueryObjectuiv(id, pname, params);
  932. Q_OPENGL_FUNCTIONS_DEBUG
  933. }
  934. inline void QOpenGLExtraFunctions::glGetQueryiv(GLenum target, GLenum pname, GLint* params)
  935. {
  936. Q_D(QOpenGLExtraFunctions);
  937. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  938. d->f.GetQueryiv(target, pname, params);
  939. Q_OPENGL_FUNCTIONS_DEBUG
  940. }
  941. inline void QOpenGLExtraFunctions::glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
  942. {
  943. Q_D(QOpenGLExtraFunctions);
  944. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  945. d->f.GetSamplerParameterfv(sampler, pname, params);
  946. Q_OPENGL_FUNCTIONS_DEBUG
  947. }
  948. inline void QOpenGLExtraFunctions::glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
  949. {
  950. Q_D(QOpenGLExtraFunctions);
  951. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  952. d->f.GetSamplerParameteriv(sampler, pname, params);
  953. Q_OPENGL_FUNCTIONS_DEBUG
  954. }
  955. inline const GLubyte * QOpenGLExtraFunctions::glGetStringi(GLenum name, GLuint index)
  956. {
  957. Q_D(QOpenGLExtraFunctions);
  958. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  959. const GLubyte * result = d->f.GetStringi(name, index);
  960. Q_OPENGL_FUNCTIONS_DEBUG
  961. return result;
  962. }
  963. inline void QOpenGLExtraFunctions::glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
  964. {
  965. Q_D(QOpenGLExtraFunctions);
  966. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  967. d->f.GetSynciv(sync, pname, bufSize, length, values);
  968. Q_OPENGL_FUNCTIONS_DEBUG
  969. }
  970. inline void QOpenGLExtraFunctions::glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
  971. {
  972. Q_D(QOpenGLExtraFunctions);
  973. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  974. d->f.GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
  975. Q_OPENGL_FUNCTIONS_DEBUG
  976. }
  977. inline GLuint QOpenGLExtraFunctions::glGetUniformBlockIndex(GLuint program, const GLchar * uniformBlockName)
  978. {
  979. Q_D(QOpenGLExtraFunctions);
  980. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  981. GLuint result = d->f.GetUniformBlockIndex(program, uniformBlockName);
  982. Q_OPENGL_FUNCTIONS_DEBUG
  983. return result;
  984. }
  985. inline void QOpenGLExtraFunctions::glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint* uniformIndices)
  986. {
  987. Q_D(QOpenGLExtraFunctions);
  988. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  989. d->f.GetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
  990. Q_OPENGL_FUNCTIONS_DEBUG
  991. }
  992. inline void QOpenGLExtraFunctions::glGetUniformuiv(GLuint program, GLint location, GLuint* params)
  993. {
  994. Q_D(QOpenGLExtraFunctions);
  995. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  996. d->f.GetUniformuiv(program, location, params);
  997. Q_OPENGL_FUNCTIONS_DEBUG
  998. }
  999. inline void QOpenGLExtraFunctions::glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
  1000. {
  1001. Q_D(QOpenGLExtraFunctions);
  1002. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1003. d->f.GetVertexAttribIiv(index, pname, params);
  1004. Q_OPENGL_FUNCTIONS_DEBUG
  1005. }
  1006. inline void QOpenGLExtraFunctions::glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
  1007. {
  1008. Q_D(QOpenGLExtraFunctions);
  1009. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1010. d->f.GetVertexAttribIuiv(index, pname, params);
  1011. Q_OPENGL_FUNCTIONS_DEBUG
  1012. }
  1013. inline void QOpenGLExtraFunctions::glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments)
  1014. {
  1015. Q_D(QOpenGLExtraFunctions);
  1016. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1017. d->f.InvalidateFramebuffer(target, numAttachments, attachments);
  1018. Q_OPENGL_FUNCTIONS_DEBUG
  1019. }
  1020. inline void QOpenGLExtraFunctions::glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height)
  1021. {
  1022. Q_D(QOpenGLExtraFunctions);
  1023. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1024. d->f.InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
  1025. Q_OPENGL_FUNCTIONS_DEBUG
  1026. }
  1027. inline GLboolean QOpenGLExtraFunctions::glIsQuery(GLuint id)
  1028. {
  1029. Q_D(QOpenGLExtraFunctions);
  1030. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1031. GLboolean result = d->f.IsQuery(id);
  1032. Q_OPENGL_FUNCTIONS_DEBUG
  1033. return result;
  1034. }
  1035. inline GLboolean QOpenGLExtraFunctions::glIsSampler(GLuint sampler)
  1036. {
  1037. Q_D(QOpenGLExtraFunctions);
  1038. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1039. GLboolean result = d->f.IsSampler(sampler);
  1040. Q_OPENGL_FUNCTIONS_DEBUG
  1041. return result;
  1042. }
  1043. inline GLboolean QOpenGLExtraFunctions::glIsSync(GLsync sync)
  1044. {
  1045. Q_D(QOpenGLExtraFunctions);
  1046. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1047. GLboolean result = d->f.IsSync(sync);
  1048. Q_OPENGL_FUNCTIONS_DEBUG
  1049. return result;
  1050. }
  1051. inline GLboolean QOpenGLExtraFunctions::glIsTransformFeedback(GLuint id)
  1052. {
  1053. Q_D(QOpenGLExtraFunctions);
  1054. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1055. GLboolean result = d->f.IsTransformFeedback(id);
  1056. Q_OPENGL_FUNCTIONS_DEBUG
  1057. return result;
  1058. }
  1059. inline GLboolean QOpenGLExtraFunctions::glIsVertexArray(GLuint array)
  1060. {
  1061. Q_D(QOpenGLExtraFunctions);
  1062. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1063. GLboolean result = d->f.IsVertexArray(array);
  1064. Q_OPENGL_FUNCTIONS_DEBUG
  1065. return result;
  1066. }
  1067. inline void * QOpenGLExtraFunctions::glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
  1068. {
  1069. Q_D(QOpenGLExtraFunctions);
  1070. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1071. void *result = d->f.MapBufferRange(target, offset, length, access);
  1072. Q_OPENGL_FUNCTIONS_DEBUG
  1073. return result;
  1074. }
  1075. inline void QOpenGLExtraFunctions::glPauseTransformFeedback()
  1076. {
  1077. Q_D(QOpenGLExtraFunctions);
  1078. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1079. d->f.PauseTransformFeedback();
  1080. Q_OPENGL_FUNCTIONS_DEBUG
  1081. }
  1082. inline void QOpenGLExtraFunctions::glProgramBinary(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length)
  1083. {
  1084. Q_D(QOpenGLExtraFunctions);
  1085. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1086. d->f.ProgramBinary(program, binaryFormat, binary, length);
  1087. Q_OPENGL_FUNCTIONS_DEBUG
  1088. }
  1089. inline void QOpenGLExtraFunctions::glProgramParameteri(GLuint program, GLenum pname, GLint value)
  1090. {
  1091. Q_D(QOpenGLExtraFunctions);
  1092. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1093. d->f.ProgramParameteri(program, pname, value);
  1094. Q_OPENGL_FUNCTIONS_DEBUG
  1095. }
  1096. inline void QOpenGLExtraFunctions::glReadBuffer(GLenum src)
  1097. {
  1098. Q_D(QOpenGLExtraFunctions);
  1099. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1100. d->f.ReadBuffer(src);
  1101. Q_OPENGL_FUNCTIONS_DEBUG
  1102. }
  1103. inline void QOpenGLExtraFunctions::glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
  1104. {
  1105. Q_D(QOpenGLExtraFunctions);
  1106. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1107. d->f.RenderbufferStorageMultisample(target, samples, internalformat, width, height);
  1108. Q_OPENGL_FUNCTIONS_DEBUG
  1109. }
  1110. inline void QOpenGLExtraFunctions::glResumeTransformFeedback()
  1111. {
  1112. Q_D(QOpenGLExtraFunctions);
  1113. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1114. d->f.ResumeTransformFeedback();
  1115. Q_OPENGL_FUNCTIONS_DEBUG
  1116. }
  1117. inline void QOpenGLExtraFunctions::glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
  1118. {
  1119. Q_D(QOpenGLExtraFunctions);
  1120. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1121. d->f.SamplerParameterf(sampler, pname, param);
  1122. Q_OPENGL_FUNCTIONS_DEBUG
  1123. }
  1124. inline void QOpenGLExtraFunctions::glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat * param)
  1125. {
  1126. Q_D(QOpenGLExtraFunctions);
  1127. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1128. d->f.SamplerParameterfv(sampler, pname, param);
  1129. Q_OPENGL_FUNCTIONS_DEBUG
  1130. }
  1131. inline void QOpenGLExtraFunctions::glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
  1132. {
  1133. Q_D(QOpenGLExtraFunctions);
  1134. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1135. d->f.SamplerParameteri(sampler, pname, param);
  1136. Q_OPENGL_FUNCTIONS_DEBUG
  1137. }
  1138. inline void QOpenGLExtraFunctions::glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint * param)
  1139. {
  1140. Q_D(QOpenGLExtraFunctions);
  1141. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1142. d->f.SamplerParameteriv(sampler, pname, param);
  1143. Q_OPENGL_FUNCTIONS_DEBUG
  1144. }
  1145. inline void QOpenGLExtraFunctions::glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels)
  1146. {
  1147. Q_D(QOpenGLExtraFunctions);
  1148. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1149. d->f.TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
  1150. Q_OPENGL_FUNCTIONS_DEBUG
  1151. }
  1152. inline void QOpenGLExtraFunctions::glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
  1153. {
  1154. Q_D(QOpenGLExtraFunctions);
  1155. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1156. d->f.TexStorage2D(target, levels, internalformat, width, height);
  1157. Q_OPENGL_FUNCTIONS_DEBUG
  1158. }
  1159. inline void QOpenGLExtraFunctions::glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
  1160. {
  1161. Q_D(QOpenGLExtraFunctions);
  1162. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1163. d->f.TexStorage3D(target, levels, internalformat, width, height, depth);
  1164. Q_OPENGL_FUNCTIONS_DEBUG
  1165. }
  1166. inline void QOpenGLExtraFunctions::glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels)
  1167. {
  1168. Q_D(QOpenGLExtraFunctions);
  1169. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1170. d->f.TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
  1171. Q_OPENGL_FUNCTIONS_DEBUG
  1172. }
  1173. inline void QOpenGLExtraFunctions::glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode)
  1174. {
  1175. Q_D(QOpenGLExtraFunctions);
  1176. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1177. d->f.TransformFeedbackVaryings(program, count, varyings, bufferMode);
  1178. Q_OPENGL_FUNCTIONS_DEBUG
  1179. }
  1180. inline void QOpenGLExtraFunctions::glUniform1ui(GLint location, GLuint v0)
  1181. {
  1182. Q_D(QOpenGLExtraFunctions);
  1183. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1184. d->f.Uniform1ui(location, v0);
  1185. Q_OPENGL_FUNCTIONS_DEBUG
  1186. }
  1187. inline void QOpenGLExtraFunctions::glUniform1uiv(GLint location, GLsizei count, const GLuint * value)
  1188. {
  1189. Q_D(QOpenGLExtraFunctions);
  1190. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1191. d->f.Uniform1uiv(location, count, value);
  1192. Q_OPENGL_FUNCTIONS_DEBUG
  1193. }
  1194. inline void QOpenGLExtraFunctions::glUniform2ui(GLint location, GLuint v0, GLuint v1)
  1195. {
  1196. Q_D(QOpenGLExtraFunctions);
  1197. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1198. d->f.Uniform2ui(location, v0, v1);
  1199. Q_OPENGL_FUNCTIONS_DEBUG
  1200. }
  1201. inline void QOpenGLExtraFunctions::glUniform2uiv(GLint location, GLsizei count, const GLuint * value)
  1202. {
  1203. Q_D(QOpenGLExtraFunctions);
  1204. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1205. d->f.Uniform2uiv(location, count, value);
  1206. Q_OPENGL_FUNCTIONS_DEBUG
  1207. }
  1208. inline void QOpenGLExtraFunctions::glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
  1209. {
  1210. Q_D(QOpenGLExtraFunctions);
  1211. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1212. d->f.Uniform3ui(location, v0, v1, v2);
  1213. Q_OPENGL_FUNCTIONS_DEBUG
  1214. }
  1215. inline void QOpenGLExtraFunctions::glUniform3uiv(GLint location, GLsizei count, const GLuint * value)
  1216. {
  1217. Q_D(QOpenGLExtraFunctions);
  1218. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1219. d->f.Uniform3uiv(location, count, value);
  1220. Q_OPENGL_FUNCTIONS_DEBUG
  1221. }
  1222. inline void QOpenGLExtraFunctions::glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
  1223. {
  1224. Q_D(QOpenGLExtraFunctions);
  1225. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1226. d->f.Uniform4ui(location, v0, v1, v2, v3);
  1227. Q_OPENGL_FUNCTIONS_DEBUG
  1228. }
  1229. inline void QOpenGLExtraFunctions::glUniform4uiv(GLint location, GLsizei count, const GLuint * value)
  1230. {
  1231. Q_D(QOpenGLExtraFunctions);
  1232. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1233. d->f.Uniform4uiv(location, count, value);
  1234. Q_OPENGL_FUNCTIONS_DEBUG
  1235. }
  1236. inline void QOpenGLExtraFunctions::glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
  1237. {
  1238. Q_D(QOpenGLExtraFunctions);
  1239. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1240. d->f.UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
  1241. Q_OPENGL_FUNCTIONS_DEBUG
  1242. }
  1243. inline void QOpenGLExtraFunctions::glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1244. {
  1245. Q_D(QOpenGLExtraFunctions);
  1246. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1247. d->f.UniformMatrix2x3fv(location, count, transpose, value);
  1248. Q_OPENGL_FUNCTIONS_DEBUG
  1249. }
  1250. inline void QOpenGLExtraFunctions::glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1251. {
  1252. Q_D(QOpenGLExtraFunctions);
  1253. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1254. d->f.UniformMatrix2x4fv(location, count, transpose, value);
  1255. Q_OPENGL_FUNCTIONS_DEBUG
  1256. }
  1257. inline void QOpenGLExtraFunctions::glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1258. {
  1259. Q_D(QOpenGLExtraFunctions);
  1260. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1261. d->f.UniformMatrix3x2fv(location, count, transpose, value);
  1262. Q_OPENGL_FUNCTIONS_DEBUG
  1263. }
  1264. inline void QOpenGLExtraFunctions::glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1265. {
  1266. Q_D(QOpenGLExtraFunctions);
  1267. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1268. d->f.UniformMatrix3x4fv(location, count, transpose, value);
  1269. Q_OPENGL_FUNCTIONS_DEBUG
  1270. }
  1271. inline void QOpenGLExtraFunctions::glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1272. {
  1273. Q_D(QOpenGLExtraFunctions);
  1274. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1275. d->f.UniformMatrix4x2fv(location, count, transpose, value);
  1276. Q_OPENGL_FUNCTIONS_DEBUG
  1277. }
  1278. inline void QOpenGLExtraFunctions::glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1279. {
  1280. Q_D(QOpenGLExtraFunctions);
  1281. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1282. d->f.UniformMatrix4x3fv(location, count, transpose, value);
  1283. Q_OPENGL_FUNCTIONS_DEBUG
  1284. }
  1285. inline GLboolean QOpenGLExtraFunctions::glUnmapBuffer(GLenum target)
  1286. {
  1287. Q_D(QOpenGLExtraFunctions);
  1288. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1289. GLboolean result = d->f.UnmapBuffer(target);
  1290. Q_OPENGL_FUNCTIONS_DEBUG
  1291. return result;
  1292. }
  1293. inline void QOpenGLExtraFunctions::glVertexAttribDivisor(GLuint index, GLuint divisor)
  1294. {
  1295. Q_D(QOpenGLExtraFunctions);
  1296. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1297. d->f.VertexAttribDivisor(index, divisor);
  1298. Q_OPENGL_FUNCTIONS_DEBUG
  1299. }
  1300. inline void QOpenGLExtraFunctions::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
  1301. {
  1302. Q_D(QOpenGLExtraFunctions);
  1303. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1304. d->f.VertexAttribI4i(index, x, y, z, w);
  1305. Q_OPENGL_FUNCTIONS_DEBUG
  1306. }
  1307. inline void QOpenGLExtraFunctions::glVertexAttribI4iv(GLuint index, const GLint * v)
  1308. {
  1309. Q_D(QOpenGLExtraFunctions);
  1310. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1311. d->f.VertexAttribI4iv(index, v);
  1312. Q_OPENGL_FUNCTIONS_DEBUG
  1313. }
  1314. inline void QOpenGLExtraFunctions::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
  1315. {
  1316. Q_D(QOpenGLExtraFunctions);
  1317. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1318. d->f.VertexAttribI4ui(index, x, y, z, w);
  1319. Q_OPENGL_FUNCTIONS_DEBUG
  1320. }
  1321. inline void QOpenGLExtraFunctions::glVertexAttribI4uiv(GLuint index, const GLuint * v)
  1322. {
  1323. Q_D(QOpenGLExtraFunctions);
  1324. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1325. d->f.VertexAttribI4uiv(index, v);
  1326. Q_OPENGL_FUNCTIONS_DEBUG
  1327. }
  1328. inline void QOpenGLExtraFunctions::glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer)
  1329. {
  1330. Q_D(QOpenGLExtraFunctions);
  1331. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1332. d->f.VertexAttribIPointer(index, size, type, stride, pointer);
  1333. Q_OPENGL_FUNCTIONS_DEBUG
  1334. }
  1335. inline void QOpenGLExtraFunctions::glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
  1336. {
  1337. Q_D(QOpenGLExtraFunctions);
  1338. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1339. d->f.WaitSync(sync, flags, timeout);
  1340. Q_OPENGL_FUNCTIONS_DEBUG
  1341. }
  1342. inline void QOpenGLExtraFunctions::glActiveShaderProgram(GLuint pipeline, GLuint program)
  1343. {
  1344. Q_D(QOpenGLExtraFunctions);
  1345. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1346. d->f.ActiveShaderProgram(pipeline, program);
  1347. Q_OPENGL_FUNCTIONS_DEBUG
  1348. }
  1349. inline void QOpenGLExtraFunctions::glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)
  1350. {
  1351. Q_D(QOpenGLExtraFunctions);
  1352. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1353. d->f.BindImageTexture(unit, texture, level, layered, layer, access, format);
  1354. Q_OPENGL_FUNCTIONS_DEBUG
  1355. }
  1356. inline void QOpenGLExtraFunctions::glBindProgramPipeline(GLuint pipeline)
  1357. {
  1358. Q_D(QOpenGLExtraFunctions);
  1359. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1360. d->f.BindProgramPipeline(pipeline);
  1361. Q_OPENGL_FUNCTIONS_DEBUG
  1362. }
  1363. inline void QOpenGLExtraFunctions::glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
  1364. {
  1365. Q_D(QOpenGLExtraFunctions);
  1366. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1367. d->f.BindVertexBuffer(bindingindex, buffer, offset, stride);
  1368. Q_OPENGL_FUNCTIONS_DEBUG
  1369. }
  1370. inline GLuint QOpenGLExtraFunctions::glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const* strings)
  1371. {
  1372. Q_D(QOpenGLExtraFunctions);
  1373. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1374. GLuint result = d->f.CreateShaderProgramv(type, count, strings);
  1375. Q_OPENGL_FUNCTIONS_DEBUG
  1376. return result;
  1377. }
  1378. inline void QOpenGLExtraFunctions::glDeleteProgramPipelines(GLsizei n, const GLuint * pipelines)
  1379. {
  1380. Q_D(QOpenGLExtraFunctions);
  1381. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1382. d->f.DeleteProgramPipelines(n, pipelines);
  1383. Q_OPENGL_FUNCTIONS_DEBUG
  1384. }
  1385. inline void QOpenGLExtraFunctions::glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
  1386. {
  1387. Q_D(QOpenGLExtraFunctions);
  1388. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1389. d->f.DispatchCompute(num_groups_x, num_groups_y, num_groups_z);
  1390. Q_OPENGL_FUNCTIONS_DEBUG
  1391. }
  1392. inline void QOpenGLExtraFunctions::glDispatchComputeIndirect(GLintptr indirect)
  1393. {
  1394. Q_D(QOpenGLExtraFunctions);
  1395. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1396. d->f.DispatchComputeIndirect(indirect);
  1397. Q_OPENGL_FUNCTIONS_DEBUG
  1398. }
  1399. inline void QOpenGLExtraFunctions::glDrawArraysIndirect(GLenum mode, const void * indirect)
  1400. {
  1401. Q_D(QOpenGLExtraFunctions);
  1402. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1403. d->f.DrawArraysIndirect(mode, indirect);
  1404. Q_OPENGL_FUNCTIONS_DEBUG
  1405. }
  1406. inline void QOpenGLExtraFunctions::glDrawElementsIndirect(GLenum mode, GLenum type, const void * indirect)
  1407. {
  1408. Q_D(QOpenGLExtraFunctions);
  1409. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1410. d->f.DrawElementsIndirect(mode, type, indirect);
  1411. Q_OPENGL_FUNCTIONS_DEBUG
  1412. }
  1413. inline void QOpenGLExtraFunctions::glFramebufferParameteri(GLenum target, GLenum pname, GLint param)
  1414. {
  1415. Q_D(QOpenGLExtraFunctions);
  1416. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1417. d->f.FramebufferParameteri(target, pname, param);
  1418. Q_OPENGL_FUNCTIONS_DEBUG
  1419. }
  1420. inline void QOpenGLExtraFunctions::glGenProgramPipelines(GLsizei n, GLuint* pipelines)
  1421. {
  1422. Q_D(QOpenGLExtraFunctions);
  1423. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1424. d->f.GenProgramPipelines(n, pipelines);
  1425. Q_OPENGL_FUNCTIONS_DEBUG
  1426. }
  1427. inline void QOpenGLExtraFunctions::glGetBooleani_v(GLenum target, GLuint index, GLboolean* data)
  1428. {
  1429. Q_D(QOpenGLExtraFunctions);
  1430. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1431. d->f.GetBooleani_v(target, index, data);
  1432. Q_OPENGL_FUNCTIONS_DEBUG
  1433. }
  1434. inline void QOpenGLExtraFunctions::glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint* params)
  1435. {
  1436. Q_D(QOpenGLExtraFunctions);
  1437. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1438. d->f.GetFramebufferParameteriv(target, pname, params);
  1439. Q_OPENGL_FUNCTIONS_DEBUG
  1440. }
  1441. inline void QOpenGLExtraFunctions::glGetMultisamplefv(GLenum pname, GLuint index, GLfloat* val)
  1442. {
  1443. Q_D(QOpenGLExtraFunctions);
  1444. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1445. d->f.GetMultisamplefv(pname, index, val);
  1446. Q_OPENGL_FUNCTIONS_DEBUG
  1447. }
  1448. inline void QOpenGLExtraFunctions::glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint* params)
  1449. {
  1450. Q_D(QOpenGLExtraFunctions);
  1451. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1452. d->f.GetProgramInterfaceiv(program, programInterface, pname, params);
  1453. Q_OPENGL_FUNCTIONS_DEBUG
  1454. }
  1455. inline void QOpenGLExtraFunctions::glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog)
  1456. {
  1457. Q_D(QOpenGLExtraFunctions);
  1458. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1459. d->f.GetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
  1460. Q_OPENGL_FUNCTIONS_DEBUG
  1461. }
  1462. inline void QOpenGLExtraFunctions::glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint* params)
  1463. {
  1464. Q_D(QOpenGLExtraFunctions);
  1465. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1466. d->f.GetProgramPipelineiv(pipeline, pname, params);
  1467. Q_OPENGL_FUNCTIONS_DEBUG
  1468. }
  1469. inline GLuint QOpenGLExtraFunctions::glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar * name)
  1470. {
  1471. Q_D(QOpenGLExtraFunctions);
  1472. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1473. GLuint result = d->f.GetProgramResourceIndex(program, programInterface, name);
  1474. Q_OPENGL_FUNCTIONS_DEBUG
  1475. return result;
  1476. }
  1477. inline GLint QOpenGLExtraFunctions::glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar * name)
  1478. {
  1479. Q_D(QOpenGLExtraFunctions);
  1480. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1481. GLint result = d->f.GetProgramResourceLocation(program, programInterface, name);
  1482. Q_OPENGL_FUNCTIONS_DEBUG
  1483. return result;
  1484. }
  1485. inline void QOpenGLExtraFunctions::glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, GLchar* name)
  1486. {
  1487. Q_D(QOpenGLExtraFunctions);
  1488. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1489. d->f.GetProgramResourceName(program, programInterface, index, bufSize, length, name);
  1490. Q_OPENGL_FUNCTIONS_DEBUG
  1491. }
  1492. inline void QOpenGLExtraFunctions::glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei* length, GLint* params)
  1493. {
  1494. Q_D(QOpenGLExtraFunctions);
  1495. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1496. d->f.GetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params);
  1497. Q_OPENGL_FUNCTIONS_DEBUG
  1498. }
  1499. inline void QOpenGLExtraFunctions::glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params)
  1500. {
  1501. Q_D(QOpenGLExtraFunctions);
  1502. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1503. d->f.GetTexLevelParameterfv(target, level, pname, params);
  1504. Q_OPENGL_FUNCTIONS_DEBUG
  1505. }
  1506. inline void QOpenGLExtraFunctions::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params)
  1507. {
  1508. Q_D(QOpenGLExtraFunctions);
  1509. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1510. d->f.GetTexLevelParameteriv(target, level, pname, params);
  1511. Q_OPENGL_FUNCTIONS_DEBUG
  1512. }
  1513. inline GLboolean QOpenGLExtraFunctions::glIsProgramPipeline(GLuint pipeline)
  1514. {
  1515. Q_D(QOpenGLExtraFunctions);
  1516. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1517. GLboolean result = d->f.IsProgramPipeline(pipeline);
  1518. Q_OPENGL_FUNCTIONS_DEBUG
  1519. return result;
  1520. }
  1521. inline void QOpenGLExtraFunctions::glMemoryBarrier(GLbitfield barriers)
  1522. {
  1523. Q_D(QOpenGLExtraFunctions);
  1524. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1525. d->f.MemoryBarrier(barriers);
  1526. Q_OPENGL_FUNCTIONS_DEBUG
  1527. }
  1528. inline void QOpenGLExtraFunctions::glMemoryBarrierByRegion(GLbitfield barriers)
  1529. {
  1530. Q_D(QOpenGLExtraFunctions);
  1531. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1532. d->f.MemoryBarrierByRegion(barriers);
  1533. Q_OPENGL_FUNCTIONS_DEBUG
  1534. }
  1535. inline void QOpenGLExtraFunctions::glProgramUniform1f(GLuint program, GLint location, GLfloat v0)
  1536. {
  1537. Q_D(QOpenGLExtraFunctions);
  1538. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1539. d->f.ProgramUniform1f(program, location, v0);
  1540. Q_OPENGL_FUNCTIONS_DEBUG
  1541. }
  1542. inline void QOpenGLExtraFunctions::glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat * value)
  1543. {
  1544. Q_D(QOpenGLExtraFunctions);
  1545. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1546. d->f.ProgramUniform1fv(program, location, count, value);
  1547. Q_OPENGL_FUNCTIONS_DEBUG
  1548. }
  1549. inline void QOpenGLExtraFunctions::glProgramUniform1i(GLuint program, GLint location, GLint v0)
  1550. {
  1551. Q_D(QOpenGLExtraFunctions);
  1552. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1553. d->f.ProgramUniform1i(program, location, v0);
  1554. Q_OPENGL_FUNCTIONS_DEBUG
  1555. }
  1556. inline void QOpenGLExtraFunctions::glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint * value)
  1557. {
  1558. Q_D(QOpenGLExtraFunctions);
  1559. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1560. d->f.ProgramUniform1iv(program, location, count, value);
  1561. Q_OPENGL_FUNCTIONS_DEBUG
  1562. }
  1563. inline void QOpenGLExtraFunctions::glProgramUniform1ui(GLuint program, GLint location, GLuint v0)
  1564. {
  1565. Q_D(QOpenGLExtraFunctions);
  1566. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1567. d->f.ProgramUniform1ui(program, location, v0);
  1568. Q_OPENGL_FUNCTIONS_DEBUG
  1569. }
  1570. inline void QOpenGLExtraFunctions::glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint * value)
  1571. {
  1572. Q_D(QOpenGLExtraFunctions);
  1573. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1574. d->f.ProgramUniform1uiv(program, location, count, value);
  1575. Q_OPENGL_FUNCTIONS_DEBUG
  1576. }
  1577. inline void QOpenGLExtraFunctions::glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
  1578. {
  1579. Q_D(QOpenGLExtraFunctions);
  1580. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1581. d->f.ProgramUniform2f(program, location, v0, v1);
  1582. Q_OPENGL_FUNCTIONS_DEBUG
  1583. }
  1584. inline void QOpenGLExtraFunctions::glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat * value)
  1585. {
  1586. Q_D(QOpenGLExtraFunctions);
  1587. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1588. d->f.ProgramUniform2fv(program, location, count, value);
  1589. Q_OPENGL_FUNCTIONS_DEBUG
  1590. }
  1591. inline void QOpenGLExtraFunctions::glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
  1592. {
  1593. Q_D(QOpenGLExtraFunctions);
  1594. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1595. d->f.ProgramUniform2i(program, location, v0, v1);
  1596. Q_OPENGL_FUNCTIONS_DEBUG
  1597. }
  1598. inline void QOpenGLExtraFunctions::glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint * value)
  1599. {
  1600. Q_D(QOpenGLExtraFunctions);
  1601. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1602. d->f.ProgramUniform2iv(program, location, count, value);
  1603. Q_OPENGL_FUNCTIONS_DEBUG
  1604. }
  1605. inline void QOpenGLExtraFunctions::glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
  1606. {
  1607. Q_D(QOpenGLExtraFunctions);
  1608. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1609. d->f.ProgramUniform2ui(program, location, v0, v1);
  1610. Q_OPENGL_FUNCTIONS_DEBUG
  1611. }
  1612. inline void QOpenGLExtraFunctions::glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint * value)
  1613. {
  1614. Q_D(QOpenGLExtraFunctions);
  1615. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1616. d->f.ProgramUniform2uiv(program, location, count, value);
  1617. Q_OPENGL_FUNCTIONS_DEBUG
  1618. }
  1619. inline void QOpenGLExtraFunctions::glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
  1620. {
  1621. Q_D(QOpenGLExtraFunctions);
  1622. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1623. d->f.ProgramUniform3f(program, location, v0, v1, v2);
  1624. Q_OPENGL_FUNCTIONS_DEBUG
  1625. }
  1626. inline void QOpenGLExtraFunctions::glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat * value)
  1627. {
  1628. Q_D(QOpenGLExtraFunctions);
  1629. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1630. d->f.ProgramUniform3fv(program, location, count, value);
  1631. Q_OPENGL_FUNCTIONS_DEBUG
  1632. }
  1633. inline void QOpenGLExtraFunctions::glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
  1634. {
  1635. Q_D(QOpenGLExtraFunctions);
  1636. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1637. d->f.ProgramUniform3i(program, location, v0, v1, v2);
  1638. Q_OPENGL_FUNCTIONS_DEBUG
  1639. }
  1640. inline void QOpenGLExtraFunctions::glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint * value)
  1641. {
  1642. Q_D(QOpenGLExtraFunctions);
  1643. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1644. d->f.ProgramUniform3iv(program, location, count, value);
  1645. Q_OPENGL_FUNCTIONS_DEBUG
  1646. }
  1647. inline void QOpenGLExtraFunctions::glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
  1648. {
  1649. Q_D(QOpenGLExtraFunctions);
  1650. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1651. d->f.ProgramUniform3ui(program, location, v0, v1, v2);
  1652. Q_OPENGL_FUNCTIONS_DEBUG
  1653. }
  1654. inline void QOpenGLExtraFunctions::glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint * value)
  1655. {
  1656. Q_D(QOpenGLExtraFunctions);
  1657. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1658. d->f.ProgramUniform3uiv(program, location, count, value);
  1659. Q_OPENGL_FUNCTIONS_DEBUG
  1660. }
  1661. inline void QOpenGLExtraFunctions::glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
  1662. {
  1663. Q_D(QOpenGLExtraFunctions);
  1664. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1665. d->f.ProgramUniform4f(program, location, v0, v1, v2, v3);
  1666. Q_OPENGL_FUNCTIONS_DEBUG
  1667. }
  1668. inline void QOpenGLExtraFunctions::glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat * value)
  1669. {
  1670. Q_D(QOpenGLExtraFunctions);
  1671. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1672. d->f.ProgramUniform4fv(program, location, count, value);
  1673. Q_OPENGL_FUNCTIONS_DEBUG
  1674. }
  1675. inline void QOpenGLExtraFunctions::glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
  1676. {
  1677. Q_D(QOpenGLExtraFunctions);
  1678. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1679. d->f.ProgramUniform4i(program, location, v0, v1, v2, v3);
  1680. Q_OPENGL_FUNCTIONS_DEBUG
  1681. }
  1682. inline void QOpenGLExtraFunctions::glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint * value)
  1683. {
  1684. Q_D(QOpenGLExtraFunctions);
  1685. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1686. d->f.ProgramUniform4iv(program, location, count, value);
  1687. Q_OPENGL_FUNCTIONS_DEBUG
  1688. }
  1689. inline void QOpenGLExtraFunctions::glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
  1690. {
  1691. Q_D(QOpenGLExtraFunctions);
  1692. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1693. d->f.ProgramUniform4ui(program, location, v0, v1, v2, v3);
  1694. Q_OPENGL_FUNCTIONS_DEBUG
  1695. }
  1696. inline void QOpenGLExtraFunctions::glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint * value)
  1697. {
  1698. Q_D(QOpenGLExtraFunctions);
  1699. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1700. d->f.ProgramUniform4uiv(program, location, count, value);
  1701. Q_OPENGL_FUNCTIONS_DEBUG
  1702. }
  1703. inline void QOpenGLExtraFunctions::glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1704. {
  1705. Q_D(QOpenGLExtraFunctions);
  1706. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1707. d->f.ProgramUniformMatrix2fv(program, location, count, transpose, value);
  1708. Q_OPENGL_FUNCTIONS_DEBUG
  1709. }
  1710. inline void QOpenGLExtraFunctions::glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1711. {
  1712. Q_D(QOpenGLExtraFunctions);
  1713. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1714. d->f.ProgramUniformMatrix2x3fv(program, location, count, transpose, value);
  1715. Q_OPENGL_FUNCTIONS_DEBUG
  1716. }
  1717. inline void QOpenGLExtraFunctions::glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1718. {
  1719. Q_D(QOpenGLExtraFunctions);
  1720. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1721. d->f.ProgramUniformMatrix2x4fv(program, location, count, transpose, value);
  1722. Q_OPENGL_FUNCTIONS_DEBUG
  1723. }
  1724. inline void QOpenGLExtraFunctions::glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1725. {
  1726. Q_D(QOpenGLExtraFunctions);
  1727. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1728. d->f.ProgramUniformMatrix3fv(program, location, count, transpose, value);
  1729. Q_OPENGL_FUNCTIONS_DEBUG
  1730. }
  1731. inline void QOpenGLExtraFunctions::glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1732. {
  1733. Q_D(QOpenGLExtraFunctions);
  1734. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1735. d->f.ProgramUniformMatrix3x2fv(program, location, count, transpose, value);
  1736. Q_OPENGL_FUNCTIONS_DEBUG
  1737. }
  1738. inline void QOpenGLExtraFunctions::glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1739. {
  1740. Q_D(QOpenGLExtraFunctions);
  1741. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1742. d->f.ProgramUniformMatrix3x4fv(program, location, count, transpose, value);
  1743. Q_OPENGL_FUNCTIONS_DEBUG
  1744. }
  1745. inline void QOpenGLExtraFunctions::glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1746. {
  1747. Q_D(QOpenGLExtraFunctions);
  1748. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1749. d->f.ProgramUniformMatrix4fv(program, location, count, transpose, value);
  1750. Q_OPENGL_FUNCTIONS_DEBUG
  1751. }
  1752. inline void QOpenGLExtraFunctions::glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1753. {
  1754. Q_D(QOpenGLExtraFunctions);
  1755. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1756. d->f.ProgramUniformMatrix4x2fv(program, location, count, transpose, value);
  1757. Q_OPENGL_FUNCTIONS_DEBUG
  1758. }
  1759. inline void QOpenGLExtraFunctions::glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
  1760. {
  1761. Q_D(QOpenGLExtraFunctions);
  1762. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1763. d->f.ProgramUniformMatrix4x3fv(program, location, count, transpose, value);
  1764. Q_OPENGL_FUNCTIONS_DEBUG
  1765. }
  1766. inline void QOpenGLExtraFunctions::glSampleMaski(GLuint maskNumber, GLbitfield mask)
  1767. {
  1768. Q_D(QOpenGLExtraFunctions);
  1769. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1770. d->f.SampleMaski(maskNumber, mask);
  1771. Q_OPENGL_FUNCTIONS_DEBUG
  1772. }
  1773. inline void QOpenGLExtraFunctions::glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
  1774. {
  1775. Q_D(QOpenGLExtraFunctions);
  1776. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1777. d->f.TexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
  1778. Q_OPENGL_FUNCTIONS_DEBUG
  1779. }
  1780. inline void QOpenGLExtraFunctions::glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
  1781. {
  1782. Q_D(QOpenGLExtraFunctions);
  1783. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1784. d->f.UseProgramStages(pipeline, stages, program);
  1785. Q_OPENGL_FUNCTIONS_DEBUG
  1786. }
  1787. inline void QOpenGLExtraFunctions::glValidateProgramPipeline(GLuint pipeline)
  1788. {
  1789. Q_D(QOpenGLExtraFunctions);
  1790. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1791. d->f.ValidateProgramPipeline(pipeline);
  1792. Q_OPENGL_FUNCTIONS_DEBUG
  1793. }
  1794. inline void QOpenGLExtraFunctions::glVertexAttribBinding(GLuint attribindex, GLuint bindingindex)
  1795. {
  1796. Q_D(QOpenGLExtraFunctions);
  1797. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1798. d->f.VertexAttribBinding(attribindex, bindingindex);
  1799. Q_OPENGL_FUNCTIONS_DEBUG
  1800. }
  1801. inline void QOpenGLExtraFunctions::glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
  1802. {
  1803. Q_D(QOpenGLExtraFunctions);
  1804. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1805. d->f.VertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
  1806. Q_OPENGL_FUNCTIONS_DEBUG
  1807. }
  1808. inline void QOpenGLExtraFunctions::glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
  1809. {
  1810. Q_D(QOpenGLExtraFunctions);
  1811. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1812. d->f.VertexAttribIFormat(attribindex, size, type, relativeoffset);
  1813. Q_OPENGL_FUNCTIONS_DEBUG
  1814. }
  1815. inline void QOpenGLExtraFunctions::glVertexBindingDivisor(GLuint bindingindex, GLuint divisor)
  1816. {
  1817. Q_D(QOpenGLExtraFunctions);
  1818. Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
  1819. d->f.VertexBindingDivisor(bindingindex, divisor);
  1820. Q_OPENGL_FUNCTIONS_DEBUG
  1821. }
  1822. QT_END_NAMESPACE
  1823. #undef QT_OPENGL_DECLARE_FUNCTIONS
  1824. #undef QT_OPENGL_COUNT_FUNCTIONS
  1825. #undef QT_OPENGL_DECLARE
  1826. #ifdef Q_OS_WIN
  1827. #pragma pop_macro("MemoryBarrier")
  1828. #endif
  1829. #endif // QT_NO_OPENGL
  1830. #endif