1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB) |
4 | ** Contact: https://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the QtOpenGL module of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:LGPL$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at https://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU Lesser General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
19 | ** General Public License version 3 as published by the Free Software |
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
21 | ** packaging of this file. Please review the following information to |
22 | ** ensure the GNU Lesser General Public License version 3 requirements |
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
24 | ** |
25 | ** GNU General Public License Usage |
26 | ** Alternatively, this file may be used under the terms of the GNU |
27 | ** General Public License version 2.0 or (at your option) the GNU General |
28 | ** Public license version 3 or any later version approved by the KDE Free |
29 | ** Qt Foundation. The licenses are as published by the Free Software |
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
31 | ** included in the packaging of this file. Please review the following |
32 | ** information to ensure the GNU General Public License requirements will |
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
35 | ** |
36 | ** $QT_END_LICENSE$ |
37 | ** |
38 | ****************************************************************************/ |
39 | |
40 | #ifndef QOPENGLVERSIONFUNCTIONS_ES2_H |
41 | #define QOPENGLVERSIONFUNCTIONS_ES2_H |
42 | |
43 | #include <QtOpenGL/qtopenglglobal.h> |
44 | |
45 | #if QT_CONFIG(opengles2) || defined(Q_QDOC) |
46 | |
47 | #include <QtOpenGL/QOpenGLVersionProfile> |
48 | #include <QtOpenGL/QOpenGLVersionFunctions> |
49 | #include <QtGui/qopenglcontext.h> |
50 | |
51 | QT_BEGIN_NAMESPACE |
52 | |
53 | class QOpenGLFunctions_ES2Private; |
54 | |
55 | class Q_OPENGL_EXPORT QOpenGLFunctions_ES2 : public QAbstractOpenGLFunctions |
56 | { |
57 | public: |
58 | QOpenGLFunctions_ES2(); |
59 | ~QOpenGLFunctions_ES2(); |
60 | |
61 | bool initializeOpenGLFunctions() override; |
62 | |
63 | // OpenGL ES2 core functions |
64 | void glActiveTexture(GLenum texture); |
65 | void glAttachShader(GLuint program, GLuint shader); |
66 | void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name); |
67 | void glBindBuffer(GLenum target, GLuint buffer); |
68 | void glBindFramebuffer(GLenum target, GLuint framebuffer); |
69 | void glBindRenderbuffer(GLenum target, GLuint renderbuffer); |
70 | void glBindTexture(GLenum target, GLuint texture); |
71 | void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); |
72 | void glBlendEquation(GLenum mode); |
73 | void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); |
74 | void glBlendFunc(GLenum sfactor, GLenum dfactor); |
75 | void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); |
76 | void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); |
77 | void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); |
78 | GLenum glCheckFramebufferStatus(GLenum target); |
79 | void glClear(GLbitfield mask); |
80 | void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); |
81 | void glClearDepthf(GLclampf depth); |
82 | void glClearStencil(GLint s); |
83 | void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); |
84 | void glCompileShader(GLuint shader); |
85 | void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); |
86 | void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); |
87 | void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); |
88 | void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); |
89 | GLuint glCreateProgram(void); |
90 | GLuint glCreateShader(GLenum type); |
91 | void glCullFace(GLenum mode); |
92 | void glDeleteBuffers(GLsizei n, const GLuint* buffers); |
93 | void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers); |
94 | void glDeleteProgram(GLuint program); |
95 | void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers); |
96 | void glDeleteShader(GLuint shader); |
97 | void glDeleteTextures(GLsizei n, const GLuint* textures); |
98 | void glDepthFunc(GLenum func); |
99 | void glDepthMask(GLboolean flag); |
100 | void glDepthRangef(GLclampf zNear, GLclampf zFar); |
101 | void glDetachShader(GLuint program, GLuint shader); |
102 | void glDisable(GLenum cap); |
103 | void glDisableVertexAttribArray(GLuint index); |
104 | void glDrawArrays(GLenum mode, GLint first, GLsizei count); |
105 | void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); |
106 | void glEnable(GLenum cap); |
107 | void glEnableVertexAttribArray(GLuint index); |
108 | void glFinish(void); |
109 | void glFlush(void); |
110 | void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); |
111 | void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); |
112 | void glFrontFace(GLenum mode); |
113 | void glGenBuffers(GLsizei n, GLuint* buffers); |
114 | void glGenerateMipmap(GLenum target); |
115 | void glGenFramebuffers(GLsizei n, GLuint* framebuffers); |
116 | void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers); |
117 | void glGenTextures(GLsizei n, GLuint* textures); |
118 | void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); |
119 | void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); |
120 | void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); |
121 | int glGetAttribLocation(GLuint program, const GLchar* name); |
122 | void glGetBooleanv(GLenum pname, GLboolean* params); |
123 | void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params); |
124 | GLenum glGetError(void); |
125 | void glGetFloatv(GLenum pname, GLfloat* params); |
126 | void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params); |
127 | void glGetIntegerv(GLenum pname, GLint* params); |
128 | void glGetProgramiv(GLuint program, GLenum pname, GLint* params); |
129 | void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); |
130 | void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params); |
131 | void glGetShaderiv(GLuint shader, GLenum pname, GLint* params); |
132 | void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); |
133 | void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); |
134 | void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); |
135 | const GLubyte* glGetString(GLenum name); |
136 | void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params); |
137 | void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params); |
138 | void glGetUniformfv(GLuint program, GLint location, GLfloat* params); |
139 | void glGetUniformiv(GLuint program, GLint location, GLint* params); |
140 | int glGetUniformLocation(GLuint program, const GLchar* name); |
141 | void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params); |
142 | void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params); |
143 | void glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer); |
144 | void glHint(GLenum target, GLenum mode); |
145 | GLboolean glIsBuffer(GLuint buffer); |
146 | GLboolean glIsEnabled(GLenum cap); |
147 | GLboolean glIsFramebuffer(GLuint framebuffer); |
148 | GLboolean glIsProgram(GLuint program); |
149 | GLboolean glIsRenderbuffer(GLuint renderbuffer); |
150 | GLboolean glIsShader(GLuint shader); |
151 | GLboolean glIsTexture(GLuint texture); |
152 | void glLineWidth(GLfloat width); |
153 | void glLinkProgram(GLuint program); |
154 | void glPixelStorei(GLenum pname, GLint param); |
155 | void glPolygonOffset(GLfloat factor, GLfloat units); |
156 | void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); |
157 | void glReleaseShaderCompiler(void); |
158 | void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); |
159 | void glSampleCoverage(GLclampf value, GLboolean invert); |
160 | void glScissor(GLint x, GLint y, GLsizei width, GLsizei height); |
161 | void glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); |
162 | void glShaderSource(GLuint shader, GLsizei count, const GLchar* *string, const GLint* length); |
163 | void glStencilFunc(GLenum func, GLint ref, GLuint mask); |
164 | void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); |
165 | void glStencilMask(GLuint mask); |
166 | void glStencilMaskSeparate(GLenum face, GLuint mask); |
167 | void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass); |
168 | void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); |
169 | void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); |
170 | void glTexParameterf(GLenum target, GLenum pname, GLfloat param); |
171 | void glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params); |
172 | void glTexParameteri(GLenum target, GLenum pname, GLint param); |
173 | void glTexParameteriv(GLenum target, GLenum pname, const GLint* params); |
174 | void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); |
175 | void glUniform1f(GLint location, GLfloat x); |
176 | void glUniform1fv(GLint location, GLsizei count, const GLfloat* v); |
177 | void glUniform1i(GLint location, GLint x); |
178 | void glUniform1iv(GLint location, GLsizei count, const GLint* v); |
179 | void glUniform2f(GLint location, GLfloat x, GLfloat y); |
180 | void glUniform2fv(GLint location, GLsizei count, const GLfloat* v); |
181 | void glUniform2i(GLint location, GLint x, GLint y); |
182 | void glUniform2iv(GLint location, GLsizei count, const GLint* v); |
183 | void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z); |
184 | void glUniform3fv(GLint location, GLsizei count, const GLfloat* v); |
185 | void glUniform3i(GLint location, GLint x, GLint y, GLint z); |
186 | void glUniform3iv(GLint location, GLsizei count, const GLint* v); |
187 | void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); |
188 | void glUniform4fv(GLint location, GLsizei count, const GLfloat* v); |
189 | void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w); |
190 | void glUniform4iv(GLint location, GLsizei count, const GLint* v); |
191 | void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); |
192 | void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); |
193 | void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); |
194 | void glUseProgram(GLuint program); |
195 | void glValidateProgram(GLuint program); |
196 | void glVertexAttrib1f(GLuint indx, GLfloat x); |
197 | void glVertexAttrib1fv(GLuint indx, const GLfloat* values); |
198 | void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); |
199 | void glVertexAttrib2fv(GLuint indx, const GLfloat* values); |
200 | void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); |
201 | void glVertexAttrib3fv(GLuint indx, const GLfloat* values); |
202 | void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); |
203 | void glVertexAttrib4fv(GLuint indx, const GLfloat* values); |
204 | void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); |
205 | void glViewport(GLint x, GLint y, GLsizei width, GLsizei height); |
206 | |
207 | private: |
208 | friend class QOpenGLContext; |
209 | |
210 | static bool isContextCompatible(QOpenGLContext *context); |
211 | static QOpenGLVersionProfile versionProfile(); |
212 | |
213 | // For future expansion - not used |
214 | QOpenGLFunctions_ES2Private* d_es2; |
215 | }; |
216 | |
217 | // OpenGL ES2 core functions |
218 | inline void QOpenGLFunctions_ES2::glActiveTexture(GLenum texture) |
219 | { |
220 | ::glActiveTexture(texture); |
221 | } |
222 | |
223 | inline void QOpenGLFunctions_ES2::glAttachShader(GLuint program, GLuint shader) |
224 | { |
225 | ::glAttachShader(program, shader); |
226 | } |
227 | |
228 | inline void QOpenGLFunctions_ES2::glBindAttribLocation(GLuint program, GLuint index, const GLchar* name) |
229 | { |
230 | ::glBindAttribLocation(program, index, name); |
231 | } |
232 | |
233 | inline void QOpenGLFunctions_ES2::glBindBuffer(GLenum target, GLuint buffer) |
234 | { |
235 | ::glBindBuffer(target, buffer); |
236 | } |
237 | |
238 | inline void QOpenGLFunctions_ES2::glBindFramebuffer(GLenum target, GLuint framebuffer) |
239 | { |
240 | ::glBindFramebuffer(target, framebuffer); |
241 | } |
242 | |
243 | inline void QOpenGLFunctions_ES2::glBindRenderbuffer(GLenum target, GLuint renderbuffer) |
244 | { |
245 | ::glBindRenderbuffer(target, renderbuffer); |
246 | } |
247 | |
248 | inline void QOpenGLFunctions_ES2::glBindTexture(GLenum target, GLuint texture) |
249 | { |
250 | ::glBindTexture(target, texture); |
251 | } |
252 | |
253 | inline void QOpenGLFunctions_ES2::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) |
254 | { |
255 | ::glBlendColor(red, green, blue, alpha); |
256 | } |
257 | |
258 | inline void QOpenGLFunctions_ES2::glBlendEquation(GLenum mode) |
259 | { |
260 | ::glBlendEquation(mode); |
261 | } |
262 | |
263 | inline void QOpenGLFunctions_ES2::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) |
264 | { |
265 | ::glBlendEquationSeparate(modeRGB, modeAlpha); |
266 | } |
267 | |
268 | inline void QOpenGLFunctions_ES2::glBlendFunc(GLenum sfactor, GLenum dfactor) |
269 | { |
270 | ::glBlendFunc(sfactor, dfactor); |
271 | } |
272 | |
273 | inline void QOpenGLFunctions_ES2::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) |
274 | { |
275 | ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); |
276 | } |
277 | |
278 | inline void QOpenGLFunctions_ES2::glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) |
279 | { |
280 | ::glBufferData(target, size, data, usage); |
281 | } |
282 | |
283 | inline void QOpenGLFunctions_ES2::glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) |
284 | { |
285 | ::glBufferSubData(target, offset, size, data); |
286 | } |
287 | |
288 | inline GLenum QOpenGLFunctions_ES2::glCheckFramebufferStatus(GLenum target) |
289 | { |
290 | return ::glCheckFramebufferStatus(target); |
291 | } |
292 | |
293 | inline void QOpenGLFunctions_ES2::glClear(GLbitfield mask) |
294 | { |
295 | ::glClear(mask); |
296 | } |
297 | |
298 | inline void QOpenGLFunctions_ES2::glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) |
299 | { |
300 | ::glClearColor(red, green, blue, alpha); |
301 | } |
302 | |
303 | inline void QOpenGLFunctions_ES2::glClearDepthf(GLclampf depth) |
304 | { |
305 | ::glClearDepthf(depth); |
306 | } |
307 | |
308 | inline void QOpenGLFunctions_ES2::glClearStencil(GLint s) |
309 | { |
310 | ::glClearStencil(s); |
311 | } |
312 | |
313 | inline void QOpenGLFunctions_ES2::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) |
314 | { |
315 | ::glColorMask(red, green, blue, alpha); |
316 | } |
317 | |
318 | inline void QOpenGLFunctions_ES2::glCompileShader(GLuint shader) |
319 | { |
320 | ::glCompileShader(shader); |
321 | } |
322 | |
323 | inline void QOpenGLFunctions_ES2::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) |
324 | { |
325 | ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); |
326 | } |
327 | |
328 | inline void QOpenGLFunctions_ES2::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) |
329 | { |
330 | ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); |
331 | } |
332 | |
333 | inline void QOpenGLFunctions_ES2::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) |
334 | { |
335 | ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); |
336 | } |
337 | |
338 | inline void QOpenGLFunctions_ES2::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) |
339 | { |
340 | ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); |
341 | } |
342 | |
343 | inline GLuint QOpenGLFunctions_ES2::glCreateProgram(void) |
344 | { |
345 | return ::glCreateProgram(); |
346 | } |
347 | |
348 | inline GLuint QOpenGLFunctions_ES2::glCreateShader(GLenum type) |
349 | { |
350 | return ::glCreateShader(type); |
351 | } |
352 | |
353 | inline void QOpenGLFunctions_ES2::glCullFace(GLenum mode) |
354 | { |
355 | ::glCullFace(mode); |
356 | } |
357 | |
358 | inline void QOpenGLFunctions_ES2::glDeleteBuffers(GLsizei n, const GLuint* buffers) |
359 | { |
360 | ::glDeleteBuffers(n, buffers); |
361 | } |
362 | |
363 | inline void QOpenGLFunctions_ES2::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) |
364 | { |
365 | ::glDeleteFramebuffers(n, framebuffers); |
366 | } |
367 | |
368 | inline void QOpenGLFunctions_ES2::glDeleteProgram(GLuint program) |
369 | { |
370 | ::glDeleteProgram(program); |
371 | } |
372 | |
373 | inline void QOpenGLFunctions_ES2::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) |
374 | { |
375 | ::glDeleteRenderbuffers(n, renderbuffers); |
376 | } |
377 | |
378 | inline void QOpenGLFunctions_ES2::glDeleteShader(GLuint shader) |
379 | { |
380 | ::glDeleteShader(shader); |
381 | } |
382 | |
383 | inline void QOpenGLFunctions_ES2::glDeleteTextures(GLsizei n, const GLuint* textures) |
384 | { |
385 | ::glDeleteTextures(n, textures); |
386 | } |
387 | |
388 | inline void QOpenGLFunctions_ES2::glDepthFunc(GLenum func) |
389 | { |
390 | ::glDepthFunc(func); |
391 | } |
392 | |
393 | inline void QOpenGLFunctions_ES2::glDepthMask(GLboolean flag) |
394 | { |
395 | ::glDepthMask(flag); |
396 | } |
397 | |
398 | inline void QOpenGLFunctions_ES2::glDepthRangef(GLclampf zNear, GLclampf zFar) |
399 | { |
400 | ::glDepthRangef(zNear, zFar); |
401 | } |
402 | |
403 | inline void QOpenGLFunctions_ES2::glDetachShader(GLuint program, GLuint shader) |
404 | { |
405 | ::glDetachShader(program, shader); |
406 | } |
407 | |
408 | inline void QOpenGLFunctions_ES2::glDisable(GLenum cap) |
409 | { |
410 | ::glDisable(cap); |
411 | } |
412 | |
413 | inline void QOpenGLFunctions_ES2::glDisableVertexAttribArray(GLuint index) |
414 | { |
415 | ::glDisableVertexAttribArray(index); |
416 | } |
417 | |
418 | inline void QOpenGLFunctions_ES2::glDrawArrays(GLenum mode, GLint first, GLsizei count) |
419 | { |
420 | ::glDrawArrays(mode, first, count); |
421 | } |
422 | |
423 | inline void QOpenGLFunctions_ES2::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) |
424 | { |
425 | ::glDrawElements(mode, count, type, indices); |
426 | } |
427 | |
428 | inline void QOpenGLFunctions_ES2::glEnable(GLenum cap) |
429 | { |
430 | ::glEnable(cap); |
431 | } |
432 | |
433 | inline void QOpenGLFunctions_ES2::glEnableVertexAttribArray(GLuint index) |
434 | { |
435 | ::glEnableVertexAttribArray(index); |
436 | } |
437 | |
438 | inline void QOpenGLFunctions_ES2::glFinish(void) |
439 | { |
440 | ::glFinish(); |
441 | } |
442 | |
443 | inline void QOpenGLFunctions_ES2::glFlush(void) |
444 | { |
445 | ::glFlush(); |
446 | } |
447 | |
448 | inline void QOpenGLFunctions_ES2::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) |
449 | { |
450 | ::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); |
451 | } |
452 | |
453 | inline void QOpenGLFunctions_ES2::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) |
454 | { |
455 | ::glFramebufferTexture2D(target, attachment, textarget, texture, level); |
456 | } |
457 | |
458 | inline void QOpenGLFunctions_ES2::glFrontFace(GLenum mode) |
459 | { |
460 | ::glFrontFace(mode); |
461 | } |
462 | |
463 | inline void QOpenGLFunctions_ES2::glGenBuffers(GLsizei n, GLuint* buffers) |
464 | { |
465 | ::glGenBuffers(n, buffers); |
466 | } |
467 | |
468 | inline void QOpenGLFunctions_ES2::glGenerateMipmap(GLenum target) |
469 | { |
470 | ::glGenerateMipmap(target); |
471 | } |
472 | |
473 | inline void QOpenGLFunctions_ES2::glGenFramebuffers(GLsizei n, GLuint* framebuffers) |
474 | { |
475 | ::glGenFramebuffers(n, framebuffers); |
476 | } |
477 | |
478 | inline void QOpenGLFunctions_ES2::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) |
479 | { |
480 | ::glGenRenderbuffers(n, renderbuffers); |
481 | } |
482 | |
483 | inline void QOpenGLFunctions_ES2::glGenTextures(GLsizei n, GLuint* textures) |
484 | { |
485 | ::glGenTextures(n, textures); |
486 | } |
487 | |
488 | inline void QOpenGLFunctions_ES2::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) |
489 | { |
490 | ::glGetActiveAttrib(program, index, bufsize, length, size, type, name); |
491 | } |
492 | |
493 | inline void QOpenGLFunctions_ES2::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) |
494 | { |
495 | ::glGetActiveUniform(program, index, bufsize, length, size, type, name); |
496 | } |
497 | |
498 | inline void QOpenGLFunctions_ES2::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) |
499 | { |
500 | ::glGetAttachedShaders(program, maxcount, count, shaders); |
501 | } |
502 | |
503 | inline int QOpenGLFunctions_ES2::glGetAttribLocation(GLuint program, const GLchar* name) |
504 | { |
505 | return ::glGetAttribLocation(program, name); |
506 | } |
507 | |
508 | inline void QOpenGLFunctions_ES2::glGetBooleanv(GLenum pname, GLboolean* params) |
509 | { |
510 | ::glGetBooleanv(pname, params); |
511 | } |
512 | |
513 | inline void QOpenGLFunctions_ES2::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) |
514 | { |
515 | ::glGetBufferParameteriv(target, pname, params); |
516 | } |
517 | |
518 | inline GLenum QOpenGLFunctions_ES2::glGetError(void) |
519 | { |
520 | return ::glGetError(); |
521 | } |
522 | |
523 | inline void QOpenGLFunctions_ES2::glGetFloatv(GLenum pname, GLfloat* params) |
524 | { |
525 | ::glGetFloatv(pname, params); |
526 | } |
527 | |
528 | inline void QOpenGLFunctions_ES2::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) |
529 | { |
530 | ::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); |
531 | } |
532 | |
533 | inline void QOpenGLFunctions_ES2::glGetIntegerv(GLenum pname, GLint* params) |
534 | { |
535 | ::glGetIntegerv(pname, params); |
536 | } |
537 | |
538 | inline void QOpenGLFunctions_ES2::glGetProgramiv(GLuint program, GLenum pname, GLint* params) |
539 | { |
540 | ::glGetProgramiv(program, pname, params); |
541 | } |
542 | |
543 | inline void QOpenGLFunctions_ES2::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) |
544 | { |
545 | ::glGetProgramInfoLog(program, bufsize, length, infolog); |
546 | } |
547 | |
548 | inline void QOpenGLFunctions_ES2::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) |
549 | { |
550 | ::glGetRenderbufferParameteriv(target, pname, params); |
551 | } |
552 | |
553 | inline void QOpenGLFunctions_ES2::glGetShaderiv(GLuint shader, GLenum pname, GLint* params) |
554 | { |
555 | ::glGetShaderiv(shader, pname, params); |
556 | } |
557 | |
558 | inline void QOpenGLFunctions_ES2::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) |
559 | { |
560 | ::glGetShaderInfoLog(shader, bufsize, length, infolog); |
561 | } |
562 | |
563 | inline void QOpenGLFunctions_ES2::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) |
564 | { |
565 | ::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); |
566 | } |
567 | |
568 | inline void QOpenGLFunctions_ES2::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) |
569 | { |
570 | ::glGetShaderSource(shader, bufsize, length, source); |
571 | } |
572 | |
573 | inline const GLubyte* QOpenGLFunctions_ES2::glGetString(GLenum name) |
574 | { |
575 | return ::glGetString(name); |
576 | } |
577 | |
578 | inline void QOpenGLFunctions_ES2::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) |
579 | { |
580 | ::glGetTexParameterfv(target, pname, params); |
581 | } |
582 | |
583 | inline void QOpenGLFunctions_ES2::glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) |
584 | { |
585 | ::glGetTexParameteriv(target, pname, params); |
586 | } |
587 | |
588 | inline void QOpenGLFunctions_ES2::glGetUniformfv(GLuint program, GLint location, GLfloat* params) |
589 | { |
590 | ::glGetUniformfv(program, location, params); |
591 | } |
592 | |
593 | inline void QOpenGLFunctions_ES2::glGetUniformiv(GLuint program, GLint location, GLint* params) |
594 | { |
595 | ::glGetUniformiv(program, location, params); |
596 | } |
597 | |
598 | inline int QOpenGLFunctions_ES2::glGetUniformLocation(GLuint program, const GLchar* name) |
599 | { |
600 | return ::glGetUniformLocation(program, name); |
601 | } |
602 | |
603 | inline void QOpenGLFunctions_ES2::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) |
604 | { |
605 | ::glGetVertexAttribfv(index, pname, params); |
606 | } |
607 | |
608 | inline void QOpenGLFunctions_ES2::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) |
609 | { |
610 | ::glGetVertexAttribiv(index, pname, params); |
611 | } |
612 | |
613 | inline void QOpenGLFunctions_ES2::glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer) |
614 | { |
615 | ::glGetVertexAttribPointerv(index, pname, pointer); |
616 | } |
617 | |
618 | inline void QOpenGLFunctions_ES2::glHint(GLenum target, GLenum mode) |
619 | { |
620 | ::glHint(target, mode); |
621 | } |
622 | |
623 | inline GLboolean QOpenGLFunctions_ES2::glIsBuffer(GLuint buffer) |
624 | { |
625 | return ::glIsBuffer(buffer); |
626 | } |
627 | |
628 | inline GLboolean QOpenGLFunctions_ES2::glIsEnabled(GLenum cap) |
629 | { |
630 | return ::glIsEnabled(cap); |
631 | } |
632 | |
633 | inline GLboolean QOpenGLFunctions_ES2::glIsFramebuffer(GLuint framebuffer) |
634 | { |
635 | return ::glIsFramebuffer(framebuffer); |
636 | } |
637 | |
638 | inline GLboolean QOpenGLFunctions_ES2::glIsProgram(GLuint program) |
639 | { |
640 | return ::glIsProgram(program); |
641 | } |
642 | |
643 | inline GLboolean QOpenGLFunctions_ES2::glIsRenderbuffer(GLuint renderbuffer) |
644 | { |
645 | return ::glIsRenderbuffer(renderbuffer); |
646 | } |
647 | |
648 | inline GLboolean QOpenGLFunctions_ES2::glIsShader(GLuint shader) |
649 | { |
650 | return ::glIsShader(shader); |
651 | } |
652 | |
653 | inline GLboolean QOpenGLFunctions_ES2::glIsTexture(GLuint texture) |
654 | { |
655 | return ::glIsTexture(texture); |
656 | } |
657 | |
658 | inline void QOpenGLFunctions_ES2::glLineWidth(GLfloat width) |
659 | { |
660 | ::glLineWidth(width); |
661 | } |
662 | |
663 | inline void QOpenGLFunctions_ES2::glLinkProgram(GLuint program) |
664 | { |
665 | ::glLinkProgram(program); |
666 | } |
667 | |
668 | inline void QOpenGLFunctions_ES2::glPixelStorei(GLenum pname, GLint param) |
669 | { |
670 | ::glPixelStorei(pname, param); |
671 | } |
672 | |
673 | inline void QOpenGLFunctions_ES2::glPolygonOffset(GLfloat factor, GLfloat units) |
674 | { |
675 | ::glPolygonOffset(factor, units); |
676 | } |
677 | |
678 | inline void QOpenGLFunctions_ES2::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) |
679 | { |
680 | ::glReadPixels(x, y, width, height, format, type, pixels); |
681 | } |
682 | |
683 | inline void QOpenGLFunctions_ES2::glReleaseShaderCompiler(void) |
684 | { |
685 | ::glReleaseShaderCompiler(); |
686 | } |
687 | |
688 | inline void QOpenGLFunctions_ES2::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) |
689 | { |
690 | ::glRenderbufferStorage(target, internalformat, width, height); |
691 | } |
692 | |
693 | inline void QOpenGLFunctions_ES2::glSampleCoverage(GLclampf value, GLboolean invert) |
694 | { |
695 | ::glSampleCoverage(value, invert); |
696 | } |
697 | |
698 | inline void QOpenGLFunctions_ES2::glScissor(GLint x, GLint y, GLsizei width, GLsizei height) |
699 | { |
700 | ::glScissor(x, y, width, height); |
701 | } |
702 | |
703 | inline void QOpenGLFunctions_ES2::glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) |
704 | { |
705 | ::glShaderBinary(n, shaders, binaryformat, binary, length); |
706 | } |
707 | |
708 | inline void QOpenGLFunctions_ES2::glShaderSource(GLuint shader, GLsizei count, const GLchar* *string, const GLint* length) |
709 | { |
710 | ::glShaderSource(shader, count, string, length); |
711 | } |
712 | |
713 | inline void QOpenGLFunctions_ES2::glStencilFunc(GLenum func, GLint ref, GLuint mask) |
714 | { |
715 | ::glStencilFunc(func, ref, mask); |
716 | } |
717 | |
718 | inline void QOpenGLFunctions_ES2::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) |
719 | { |
720 | ::glStencilFuncSeparate(face, func, ref, mask); |
721 | } |
722 | |
723 | inline void QOpenGLFunctions_ES2::glStencilMask(GLuint mask) |
724 | { |
725 | ::glStencilMask(mask); |
726 | } |
727 | |
728 | inline void QOpenGLFunctions_ES2::glStencilMaskSeparate(GLenum face, GLuint mask) |
729 | { |
730 | ::glStencilMaskSeparate(face, mask); |
731 | } |
732 | |
733 | inline void QOpenGLFunctions_ES2::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) |
734 | { |
735 | ::glStencilOp(fail, zfail, zpass); |
736 | } |
737 | |
738 | inline void QOpenGLFunctions_ES2::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) |
739 | { |
740 | ::glStencilOpSeparate(face, fail, zfail, zpass); |
741 | } |
742 | |
743 | inline void QOpenGLFunctions_ES2::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) |
744 | { |
745 | ::glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); |
746 | } |
747 | |
748 | inline void QOpenGLFunctions_ES2::glTexParameterf(GLenum target, GLenum pname, GLfloat param) |
749 | { |
750 | ::glTexParameterf(target, pname, param); |
751 | } |
752 | |
753 | inline void QOpenGLFunctions_ES2::glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) |
754 | { |
755 | ::glTexParameterfv(target, pname, params); |
756 | } |
757 | |
758 | inline void QOpenGLFunctions_ES2::glTexParameteri(GLenum target, GLenum pname, GLint param) |
759 | { |
760 | ::glTexParameteri(target, pname, param); |
761 | } |
762 | |
763 | inline void QOpenGLFunctions_ES2::glTexParameteriv(GLenum target, GLenum pname, const GLint* params) |
764 | { |
765 | ::glTexParameteriv(target, pname, params); |
766 | } |
767 | |
768 | inline void QOpenGLFunctions_ES2::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) |
769 | { |
770 | ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); |
771 | } |
772 | |
773 | inline void QOpenGLFunctions_ES2::glUniform1f(GLint location, GLfloat x) |
774 | { |
775 | ::glUniform1f(location, x); |
776 | } |
777 | |
778 | inline void QOpenGLFunctions_ES2::glUniform1fv(GLint location, GLsizei count, const GLfloat* v) |
779 | { |
780 | ::glUniform1fv(location, count, v); |
781 | } |
782 | |
783 | inline void QOpenGLFunctions_ES2::glUniform1i(GLint location, GLint x) |
784 | { |
785 | ::glUniform1i(location, x); |
786 | } |
787 | |
788 | inline void QOpenGLFunctions_ES2::glUniform1iv(GLint location, GLsizei count, const GLint* v) |
789 | { |
790 | ::glUniform1iv(location, count, v); |
791 | } |
792 | |
793 | inline void QOpenGLFunctions_ES2::glUniform2f(GLint location, GLfloat x, GLfloat y) |
794 | { |
795 | ::glUniform2f(location, x, y); |
796 | } |
797 | |
798 | inline void QOpenGLFunctions_ES2::glUniform2fv(GLint location, GLsizei count, const GLfloat* v) |
799 | { |
800 | ::glUniform2fv(location, count, v); |
801 | } |
802 | |
803 | inline void QOpenGLFunctions_ES2::glUniform2i(GLint location, GLint x, GLint y) |
804 | { |
805 | ::glUniform2i(location, x, y); |
806 | } |
807 | |
808 | inline void QOpenGLFunctions_ES2::glUniform2iv(GLint location, GLsizei count, const GLint* v) |
809 | { |
810 | ::glUniform2iv(location, count, v); |
811 | } |
812 | |
813 | inline void QOpenGLFunctions_ES2::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) |
814 | { |
815 | ::glUniform3f(location, x, y, z); |
816 | } |
817 | |
818 | inline void QOpenGLFunctions_ES2::glUniform3fv(GLint location, GLsizei count, const GLfloat* v) |
819 | { |
820 | ::glUniform3fv(location, count, v); |
821 | } |
822 | |
823 | inline void QOpenGLFunctions_ES2::glUniform3i(GLint location, GLint x, GLint y, GLint z) |
824 | { |
825 | ::glUniform3i(location, x, y, z); |
826 | } |
827 | |
828 | inline void QOpenGLFunctions_ES2::glUniform3iv(GLint location, GLsizei count, const GLint* v) |
829 | { |
830 | ::glUniform3iv(location, count, v); |
831 | } |
832 | |
833 | inline void QOpenGLFunctions_ES2::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
834 | { |
835 | ::glUniform4f(location, x, y, z, w); |
836 | } |
837 | |
838 | inline void QOpenGLFunctions_ES2::glUniform4fv(GLint location, GLsizei count, const GLfloat* v) |
839 | { |
840 | ::glUniform4fv(location, count, v); |
841 | } |
842 | |
843 | inline void QOpenGLFunctions_ES2::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) |
844 | { |
845 | ::glUniform4i(location, x, y, z, w); |
846 | } |
847 | |
848 | inline void QOpenGLFunctions_ES2::glUniform4iv(GLint location, GLsizei count, const GLint* v) |
849 | { |
850 | ::glUniform4iv(location, count, v); |
851 | } |
852 | |
853 | inline void QOpenGLFunctions_ES2::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) |
854 | { |
855 | ::glUniformMatrix2fv(location, count, transpose, value); |
856 | } |
857 | |
858 | inline void QOpenGLFunctions_ES2::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) |
859 | { |
860 | ::glUniformMatrix3fv(location, count, transpose, value); |
861 | } |
862 | |
863 | inline void QOpenGLFunctions_ES2::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) |
864 | { |
865 | ::glUniformMatrix4fv(location, count, transpose, value); |
866 | } |
867 | |
868 | inline void QOpenGLFunctions_ES2::glUseProgram(GLuint program) |
869 | { |
870 | ::glUseProgram(program); |
871 | } |
872 | |
873 | inline void QOpenGLFunctions_ES2::glValidateProgram(GLuint program) |
874 | { |
875 | ::glValidateProgram(program); |
876 | } |
877 | |
878 | inline void QOpenGLFunctions_ES2::glVertexAttrib1f(GLuint indx, GLfloat x) |
879 | { |
880 | ::glVertexAttrib1f(indx, x); |
881 | } |
882 | |
883 | inline void QOpenGLFunctions_ES2::glVertexAttrib1fv(GLuint indx, const GLfloat* values) |
884 | { |
885 | ::glVertexAttrib1fv(indx, values); |
886 | } |
887 | |
888 | inline void QOpenGLFunctions_ES2::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) |
889 | { |
890 | ::glVertexAttrib2f(indx, x, y); |
891 | } |
892 | |
893 | inline void QOpenGLFunctions_ES2::glVertexAttrib2fv(GLuint indx, const GLfloat* values) |
894 | { |
895 | ::glVertexAttrib2fv(indx, values); |
896 | } |
897 | |
898 | inline void QOpenGLFunctions_ES2::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) |
899 | { |
900 | ::glVertexAttrib3f(indx, x, y, z); |
901 | } |
902 | |
903 | inline void QOpenGLFunctions_ES2::glVertexAttrib3fv(GLuint indx, const GLfloat* values) |
904 | { |
905 | ::glVertexAttrib3fv(indx, values); |
906 | } |
907 | |
908 | inline void QOpenGLFunctions_ES2::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
909 | { |
910 | ::glVertexAttrib4f(indx, x, y, z, w); |
911 | } |
912 | |
913 | inline void QOpenGLFunctions_ES2::glVertexAttrib4fv(GLuint indx, const GLfloat* values) |
914 | { |
915 | ::glVertexAttrib4fv(indx, values); |
916 | } |
917 | |
918 | inline void QOpenGLFunctions_ES2::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) |
919 | { |
920 | ::glVertexAttribPointer(indx, size, type, normalized, stride, ptr); |
921 | } |
922 | |
923 | inline void QOpenGLFunctions_ES2::glViewport(GLint x, GLint y, GLsizei width, GLsizei height) |
924 | { |
925 | ::glViewport(x, y, width, height); |
926 | } |
927 | |
928 | QT_END_NAMESPACE |
929 | |
930 | #endif // QT_CONFIG(opengles2) |
931 | |
932 | #endif |
933 | |