| 1 | /**************************************************************************** | 
|---|
| 2 | ** | 
|---|
| 3 | ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 
|---|
| 4 | ** All rights reserved. | 
|---|
| 5 | ** Contact: Nokia Corporation (qt-info@nokia.com) | 
|---|
| 6 | ** | 
|---|
| 7 | ** This file is part of the QtOpenGL module of the Qt Toolkit. | 
|---|
| 8 | ** | 
|---|
| 9 | ** $QT_BEGIN_LICENSE:LGPL$ | 
|---|
| 10 | ** Commercial Usage | 
|---|
| 11 | ** Licensees holding valid Qt Commercial licenses may use this file in | 
|---|
| 12 | ** accordance with the Qt Commercial License Agreement provided with the | 
|---|
| 13 | ** Software or, alternatively, in accordance with the terms contained in | 
|---|
| 14 | ** a written agreement between you and Nokia. | 
|---|
| 15 | ** | 
|---|
| 16 | ** GNU Lesser General Public License Usage | 
|---|
| 17 | ** Alternatively, this file may be used under the terms of the GNU Lesser | 
|---|
| 18 | ** General Public License version 2.1 as published by the Free Software | 
|---|
| 19 | ** Foundation and appearing in the file LICENSE.LGPL included in the | 
|---|
| 20 | ** packaging of this file.  Please review the following information to | 
|---|
| 21 | ** ensure the GNU Lesser General Public License version 2.1 requirements | 
|---|
| 22 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | 
|---|
| 23 | ** | 
|---|
| 24 | ** In addition, as a special exception, Nokia gives you certain additional | 
|---|
| 25 | ** rights.  These rights are described in the Nokia Qt LGPL Exception | 
|---|
| 26 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | 
|---|
| 27 | ** | 
|---|
| 28 | ** GNU General Public License Usage | 
|---|
| 29 | ** Alternatively, this file may be used under the terms of the GNU | 
|---|
| 30 | ** General Public License version 3.0 as published by the Free Software | 
|---|
| 31 | ** Foundation and appearing in the file LICENSE.GPL included in the | 
|---|
| 32 | ** packaging of this file.  Please review the following information to | 
|---|
| 33 | ** ensure the GNU General Public License version 3.0 requirements will be | 
|---|
| 34 | ** met: http://www.gnu.org/copyleft/gpl.html. | 
|---|
| 35 | ** | 
|---|
| 36 | ** If you have questions regarding the use of this file, please contact | 
|---|
| 37 | ** Nokia at qt-info@nokia.com. | 
|---|
| 38 | ** $QT_END_LICENSE$ | 
|---|
| 39 | ** | 
|---|
| 40 | ****************************************************************************/ | 
|---|
| 41 |  | 
|---|
| 42 | #ifndef QGL_EXTENSIONS_P_H | 
|---|
| 43 | #define QGL_EXTENSIONS_P_H | 
|---|
| 44 |  | 
|---|
| 45 | // | 
|---|
| 46 | //  W A R N I N G | 
|---|
| 47 | //  ------------- | 
|---|
| 48 | // | 
|---|
| 49 | // This file is not part of the Qt API.  It exists for the convenience | 
|---|
| 50 | // of the Qt OpenGL classes.  This header file may change from | 
|---|
| 51 | // version to version without notice, or even be removed. | 
|---|
| 52 | // | 
|---|
| 53 | // We mean it. | 
|---|
| 54 | // | 
|---|
| 55 |  | 
|---|
| 56 | // extension prototypes | 
|---|
| 57 | #ifndef Q_WS_MAC | 
|---|
| 58 | # ifndef APIENTRYP | 
|---|
| 59 | #   ifdef APIENTRY | 
|---|
| 60 | #     define APIENTRYP APIENTRY * | 
|---|
| 61 | #   else | 
|---|
| 62 | #     define APIENTRY | 
|---|
| 63 | #     define APIENTRYP * | 
|---|
| 64 | #   endif | 
|---|
| 65 | # endif | 
|---|
| 66 | #else | 
|---|
| 67 | # define APIENTRY | 
|---|
| 68 | # define APIENTRYP * | 
|---|
| 69 | #endif | 
|---|
| 70 |  | 
|---|
| 71 | #include <QtCore/qglobal.h> | 
|---|
| 72 |  | 
|---|
| 73 | #ifndef GL_ARB_vertex_buffer_object | 
|---|
| 74 | typedef ptrdiff_t GLsizeiptrARB; | 
|---|
| 75 | #endif | 
|---|
| 76 |  | 
|---|
| 77 | #ifndef GL_VERSION_2_0 | 
|---|
| 78 | typedef char GLchar; | 
|---|
| 79 | #endif | 
|---|
| 80 |  | 
|---|
| 81 | // ARB_pixel_buffer_object | 
|---|
| 82 | typedef void (APIENTRY *_glBindBuffer) (GLenum, GLuint); | 
|---|
| 83 | typedef void (APIENTRY *_glDeleteBuffers) (GLsizei, const GLuint *); | 
|---|
| 84 | typedef void (APIENTRY *_glGenBuffers) (GLsizei, GLuint *); | 
|---|
| 85 | typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptrARB, const GLvoid *, GLenum); | 
|---|
| 86 | typedef GLvoid* (APIENTRY *_glMapBufferARB) (GLenum, GLenum); | 
|---|
| 87 | typedef GLboolean (APIENTRY *_glUnmapBufferARB) (GLenum); | 
|---|
| 88 |  | 
|---|
| 89 | // ARB_fragment_program | 
|---|
| 90 | typedef void (APIENTRY *_glProgramStringARB) (GLenum, GLenum, GLsizei, const GLvoid *); | 
|---|
| 91 | typedef void (APIENTRY *_glBindProgramARB) (GLenum, GLuint); | 
|---|
| 92 | typedef void (APIENTRY *_glDeleteProgramsARB) (GLsizei, const GLuint *); | 
|---|
| 93 | typedef void (APIENTRY *_glGenProgramsARB) (GLsizei, GLuint *); | 
|---|
| 94 | typedef void (APIENTRY *_glProgramLocalParameter4fvARB) (GLenum, GLuint, const GLfloat *); | 
|---|
| 95 |  | 
|---|
| 96 | // GLSL | 
|---|
| 97 | typedef GLuint (APIENTRY *_glCreateShader) (GLenum); | 
|---|
| 98 | typedef void (APIENTRY *_glShaderSource) (GLuint, GLsizei, const char **, const GLint *); | 
|---|
| 99 | typedef void (APIENTRY *_glShaderBinary) (GLint, const GLuint*, GLenum, const void*, GLint); | 
|---|
| 100 | typedef void (APIENTRY *_glCompileShader) (GLuint); | 
|---|
| 101 | typedef void (APIENTRY *_glDeleteShader) (GLuint); | 
|---|
| 102 | typedef GLboolean (APIENTRY *_glIsShader) (GLuint); | 
|---|
| 103 |  | 
|---|
| 104 | typedef GLuint (APIENTRY *_glCreateProgram) (); | 
|---|
| 105 | typedef void (APIENTRY *_glAttachShader) (GLuint, GLuint); | 
|---|
| 106 | typedef void (APIENTRY *_glDetachShader) (GLuint, GLuint); | 
|---|
| 107 | typedef void (APIENTRY *_glLinkProgram) (GLuint); | 
|---|
| 108 | typedef void (APIENTRY *_glUseProgram) (GLuint); | 
|---|
| 109 | typedef void (APIENTRY *_glDeleteProgram) (GLuint); | 
|---|
| 110 | typedef GLboolean (APIENTRY *_glIsProgram) (GLuint); | 
|---|
| 111 |  | 
|---|
| 112 | typedef void (APIENTRY *_glGetShaderInfoLog) (GLuint, GLsizei, GLsizei *, char *); | 
|---|
| 113 | typedef void (APIENTRY *_glGetShaderiv) (GLuint, GLenum, GLint *); | 
|---|
| 114 | typedef void (APIENTRY *_glGetShaderSource) (GLuint, GLsizei, GLsizei *, char *); | 
|---|
| 115 | typedef void (APIENTRY *_glGetProgramiv) (GLuint, GLenum, GLint *); | 
|---|
| 116 | typedef void (APIENTRY *_glGetProgramInfoLog) (GLuint, GLsizei, GLsizei *, char *); | 
|---|
| 117 |  | 
|---|
| 118 | typedef GLuint (APIENTRY *_glGetUniformLocation) (GLuint, const char*); | 
|---|
| 119 | typedef void (APIENTRY *_glUniform4fv) (GLint, GLsizei, const GLfloat *); | 
|---|
| 120 | typedef void (APIENTRY *_glUniform3fv) (GLint, GLsizei, const GLfloat *); | 
|---|
| 121 | typedef void (APIENTRY *_glUniform2fv) (GLint, GLsizei, const GLfloat *); | 
|---|
| 122 | typedef void (APIENTRY *_glUniform1fv) (GLint, GLsizei, const GLfloat *); | 
|---|
| 123 | typedef void (APIENTRY *_glUniform1i) (GLint, GLint); | 
|---|
| 124 | typedef void (APIENTRY *_glUniform1iv) (GLint, GLsizei, const GLint *); | 
|---|
| 125 | typedef void (APIENTRY *_glUniformMatrix2fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 126 | typedef void (APIENTRY *_glUniformMatrix3fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 127 | typedef void (APIENTRY *_glUniformMatrix4fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 128 | typedef void (APIENTRY *_glUniformMatrix2x3fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 129 | typedef void (APIENTRY *_glUniformMatrix2x4fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 130 | typedef void (APIENTRY *_glUniformMatrix3x2fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 131 | typedef void (APIENTRY *_glUniformMatrix3x4fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 132 | typedef void (APIENTRY *_glUniformMatrix4x2fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 133 | typedef void (APIENTRY *_glUniformMatrix4x3fv) (GLint, GLsizei, GLboolean, const GLfloat *); | 
|---|
| 134 |  | 
|---|
| 135 | typedef void (APIENTRY *_glBindAttribLocation) (GLuint, GLuint, const char *); | 
|---|
| 136 | typedef GLint (APIENTRY *_glGetAttribLocation) (GLuint, const char *); | 
|---|
| 137 | typedef void (APIENTRY *_glVertexAttrib1fv) (GLuint, const GLfloat *); | 
|---|
| 138 | typedef void (APIENTRY *_glVertexAttrib2fv) (GLuint, const GLfloat *); | 
|---|
| 139 | typedef void (APIENTRY *_glVertexAttrib3fv) (GLuint, const GLfloat *); | 
|---|
| 140 | typedef void (APIENTRY *_glVertexAttrib4fv) (GLuint, const GLfloat *); | 
|---|
| 141 | typedef void (APIENTRY *_glVertexAttribPointer) (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); | 
|---|
| 142 | typedef void (APIENTRY *_glDisableVertexAttribArray) (GLuint); | 
|---|
| 143 | typedef void (APIENTRY *_glEnableVertexAttribArray) (GLuint); | 
|---|
| 144 |  | 
|---|
| 145 | typedef void (APIENTRY *_glGetProgramBinaryOES) (GLuint, GLsizei, GLsizei *, GLenum *, void *); | 
|---|
| 146 | typedef void (APIENTRY *_glProgramBinaryOES) (GLuint, GLenum, const void *, GLint); | 
|---|
| 147 |  | 
|---|
| 148 |  | 
|---|
| 149 | typedef void (APIENTRY *_glMultiTexCoord4f) (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); | 
|---|
| 150 | typedef void (APIENTRY *_glActiveStencilFaceEXT) (GLenum ); | 
|---|
| 151 |  | 
|---|
| 152 | // Needed for GL2 engine: | 
|---|
| 153 | typedef void (APIENTRY *_glStencilOpSeparate) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); | 
|---|
| 154 | typedef void (APIENTRY *_glActiveTexture) (GLenum); | 
|---|
| 155 | typedef void (APIENTRY *_glBlendColor) (GLclampf, GLclampf, GLclampf, GLclampf); | 
|---|
| 156 |  | 
|---|
| 157 |  | 
|---|
| 158 | // EXT_GL_framebuffer_object | 
|---|
| 159 | typedef GLboolean (APIENTRY *_glIsRenderbuffer) (GLuint renderbuffer); | 
|---|
| 160 | typedef void (APIENTRY *_glBindRenderbuffer) (GLenum target, GLuint renderbuffer); | 
|---|
| 161 | typedef void (APIENTRY *_glDeleteRenderbuffers) (GLsizei n, const GLuint *renderbuffers); | 
|---|
| 162 | typedef void (APIENTRY *_glGenRenderbuffers) (GLsizei n, GLuint *renderbuffers); | 
|---|
| 163 | typedef void (APIENTRY *_glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); | 
|---|
| 164 | typedef void (APIENTRY *_glGetRenderbufferParameteriv) (GLenum target, GLenum pname, GLint *params); | 
|---|
| 165 | typedef GLboolean (APIENTRY *_glIsFramebuffer) (GLuint framebuffer); | 
|---|
| 166 | typedef void (APIENTRY *_glBindFramebuffer) (GLenum target, GLuint framebuffer); | 
|---|
| 167 | typedef void (APIENTRY *_glDeleteFramebuffers) (GLsizei n, const GLuint *framebuffers); | 
|---|
| 168 | typedef void (APIENTRY *_glGenFramebuffers) (GLsizei n, GLuint *framebuffers); | 
|---|
| 169 | typedef GLenum (APIENTRY *_glCheckFramebufferStatus) (GLenum target); | 
|---|
| 170 | typedef void (APIENTRY *_glFramebufferTexture2D) (GLenum target, GLenum attachment, GLenum textarget, | 
|---|
| 171 | GLuint texture, GLint level); | 
|---|
| 172 | typedef void (APIENTRY *_glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, | 
|---|
| 173 | GLuint renderbuffer); | 
|---|
| 174 | typedef void (APIENTRY *_glGetFramebufferAttachmentParameteriv) (GLenum target, GLenum attachment, GLenum pname, | 
|---|
| 175 | GLint *params); | 
|---|
| 176 | typedef void (APIENTRY *_glGenerateMipmap) (GLenum target); | 
|---|
| 177 |  | 
|---|
| 178 | // EXT_GL_framebuffer_blit | 
|---|
| 179 | typedef void (APIENTRY *_glBlitFramebufferEXT) (int srcX0, int srcY0, int srcX1, int srcY1, | 
|---|
| 180 | int dstX0, int dstY0, int dstX1, int dstY1, | 
|---|
| 181 | GLbitfield mask, GLenum filter); | 
|---|
| 182 |  | 
|---|
| 183 | // EXT_GL_framebuffer_multisample | 
|---|
| 184 | typedef void (APIENTRY *_glRenderbufferStorageMultisampleEXT) (GLenum target, GLsizei samples, | 
|---|
| 185 | GLenum internalformat, GLsizei width, GLsizei height); | 
|---|
| 186 |  | 
|---|
| 187 | // ARB_texture_compression | 
|---|
| 188 | typedef void (APIENTRY *_glCompressedTexImage2DARB) (GLenum, GLint, GLenum, GLsizei, | 
|---|
| 189 | GLsizei, GLint, GLsizei, const GLvoid *); | 
|---|
| 190 |  | 
|---|
| 191 | QT_BEGIN_NAMESPACE | 
|---|
| 192 |  | 
|---|
| 193 | struct QGLExtensionFuncs | 
|---|
| 194 | { | 
|---|
| 195 | QGLExtensionFuncs() { | 
|---|
| 196 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 197 | qt_glProgramStringARB = 0; | 
|---|
| 198 | qt_glBindProgramARB = 0; | 
|---|
| 199 | qt_glDeleteProgramsARB = 0; | 
|---|
| 200 | qt_glGenProgramsARB = 0; | 
|---|
| 201 | qt_glProgramLocalParameter4fvARB = 0; | 
|---|
| 202 |  | 
|---|
| 203 | // GLSL | 
|---|
| 204 | qt_glCreateShader = 0; | 
|---|
| 205 | qt_glShaderSource = 0; | 
|---|
| 206 | qt_glShaderBinary = 0; | 
|---|
| 207 | qt_glCompileShader = 0; | 
|---|
| 208 | qt_glDeleteShader = 0; | 
|---|
| 209 | qt_glIsShader = 0; | 
|---|
| 210 |  | 
|---|
| 211 | qt_glCreateProgram = 0; | 
|---|
| 212 | qt_glAttachShader = 0; | 
|---|
| 213 | qt_glDetachShader = 0; | 
|---|
| 214 | qt_glLinkProgram = 0; | 
|---|
| 215 | qt_glUseProgram = 0; | 
|---|
| 216 | qt_glDeleteProgram = 0; | 
|---|
| 217 | qt_glIsProgram = 0; | 
|---|
| 218 |  | 
|---|
| 219 | qt_glGetShaderInfoLog = 0; | 
|---|
| 220 | qt_glGetShaderiv = 0; | 
|---|
| 221 | qt_glGetShaderSource = 0; | 
|---|
| 222 | qt_glGetProgramiv = 0; | 
|---|
| 223 | qt_glGetProgramInfoLog = 0; | 
|---|
| 224 |  | 
|---|
| 225 | qt_glGetUniformLocation = 0; | 
|---|
| 226 | qt_glUniform4fv = 0; | 
|---|
| 227 | qt_glUniform3fv = 0; | 
|---|
| 228 | qt_glUniform2fv = 0; | 
|---|
| 229 | qt_glUniform1fv = 0; | 
|---|
| 230 | qt_glUniform1i = 0; | 
|---|
| 231 | qt_glUniform1iv = 0; | 
|---|
| 232 | qt_glUniformMatrix2fv = 0; | 
|---|
| 233 | qt_glUniformMatrix3fv = 0; | 
|---|
| 234 | qt_glUniformMatrix4fv = 0; | 
|---|
| 235 | qt_glUniformMatrix2x3fv = 0; | 
|---|
| 236 | qt_glUniformMatrix2x4fv = 0; | 
|---|
| 237 | qt_glUniformMatrix3x2fv = 0; | 
|---|
| 238 | qt_glUniformMatrix3x4fv = 0; | 
|---|
| 239 | qt_glUniformMatrix4x2fv = 0; | 
|---|
| 240 | qt_glUniformMatrix4x3fv = 0; | 
|---|
| 241 |  | 
|---|
| 242 | qt_glBindAttribLocation = 0; | 
|---|
| 243 | qt_glGetAttribLocation = 0; | 
|---|
| 244 | qt_glVertexAttrib1fv = 0; | 
|---|
| 245 | qt_glVertexAttrib2fv = 0; | 
|---|
| 246 | qt_glVertexAttrib3fv = 0; | 
|---|
| 247 | qt_glVertexAttrib4fv = 0; | 
|---|
| 248 | qt_glVertexAttribPointer = 0; | 
|---|
| 249 | qt_glDisableVertexAttribArray = 0; | 
|---|
| 250 | qt_glEnableVertexAttribArray = 0; | 
|---|
| 251 |  | 
|---|
| 252 | // Extras for GL2 engine: | 
|---|
| 253 | qt_glActiveTexture = 0; | 
|---|
| 254 | qt_glStencilOpSeparate = 0; | 
|---|
| 255 | qt_glBlendColor = 0; | 
|---|
| 256 |  | 
|---|
| 257 | qt_glActiveStencilFaceEXT = 0; | 
|---|
| 258 | qt_glMultiTexCoord4f = 0; | 
|---|
| 259 | #else | 
|---|
| 260 | qt_glslResolved = false; | 
|---|
| 261 |  | 
|---|
| 262 | qt_glGetProgramBinaryOES = 0; | 
|---|
| 263 | qt_glProgramBinaryOES = 0; | 
|---|
| 264 | #endif | 
|---|
| 265 |  | 
|---|
| 266 | // FBOs | 
|---|
| 267 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 268 | qt_glIsRenderbuffer = 0; | 
|---|
| 269 | qt_glBindRenderbuffer = 0; | 
|---|
| 270 | qt_glDeleteRenderbuffers = 0; | 
|---|
| 271 | qt_glGenRenderbuffers = 0; | 
|---|
| 272 | qt_glRenderbufferStorage = 0; | 
|---|
| 273 | qt_glGetRenderbufferParameteriv = 0; | 
|---|
| 274 | qt_glIsFramebuffer = 0; | 
|---|
| 275 | qt_glBindFramebuffer = 0; | 
|---|
| 276 | qt_glDeleteFramebuffers = 0; | 
|---|
| 277 | qt_glGenFramebuffers = 0; | 
|---|
| 278 | qt_glCheckFramebufferStatus = 0; | 
|---|
| 279 | qt_glFramebufferTexture2D = 0; | 
|---|
| 280 | qt_glFramebufferRenderbuffer = 0; | 
|---|
| 281 | qt_glGetFramebufferAttachmentParameteriv = 0; | 
|---|
| 282 | qt_glGenerateMipmap = 0; | 
|---|
| 283 | #endif | 
|---|
| 284 | qt_glBlitFramebufferEXT = 0; | 
|---|
| 285 | qt_glRenderbufferStorageMultisampleEXT = 0; | 
|---|
| 286 |  | 
|---|
| 287 | // Buffer objects: | 
|---|
| 288 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 289 | qt_glBindBuffer = 0; | 
|---|
| 290 | qt_glDeleteBuffers = 0; | 
|---|
| 291 | qt_glGenBuffers = 0; | 
|---|
| 292 | qt_glBufferData = 0; | 
|---|
| 293 | #endif | 
|---|
| 294 | qt_glMapBufferARB = 0; | 
|---|
| 295 | qt_glUnmapBufferARB = 0; | 
|---|
| 296 |  | 
|---|
| 297 | #if !defined(QT_OPENGL_ES) | 
|---|
| 298 | // Texture compression | 
|---|
| 299 | qt_glCompressedTexImage2DARB = 0; | 
|---|
| 300 | #endif | 
|---|
| 301 | } | 
|---|
| 302 |  | 
|---|
| 303 |  | 
|---|
| 304 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 305 | _glProgramStringARB qt_glProgramStringARB; | 
|---|
| 306 | _glBindProgramARB qt_glBindProgramARB; | 
|---|
| 307 | _glDeleteProgramsARB qt_glDeleteProgramsARB; | 
|---|
| 308 | _glGenProgramsARB qt_glGenProgramsARB; | 
|---|
| 309 | _glProgramLocalParameter4fvARB qt_glProgramLocalParameter4fvARB; | 
|---|
| 310 |  | 
|---|
| 311 | // GLSL definitions | 
|---|
| 312 | _glCreateShader qt_glCreateShader; | 
|---|
| 313 | _glShaderSource qt_glShaderSource; | 
|---|
| 314 | _glShaderBinary qt_glShaderBinary; | 
|---|
| 315 | _glCompileShader qt_glCompileShader; | 
|---|
| 316 | _glDeleteShader qt_glDeleteShader; | 
|---|
| 317 | _glIsShader qt_glIsShader; | 
|---|
| 318 |  | 
|---|
| 319 | _glCreateProgram qt_glCreateProgram; | 
|---|
| 320 | _glAttachShader qt_glAttachShader; | 
|---|
| 321 | _glDetachShader qt_glDetachShader; | 
|---|
| 322 | _glLinkProgram qt_glLinkProgram; | 
|---|
| 323 | _glUseProgram qt_glUseProgram; | 
|---|
| 324 | _glDeleteProgram qt_glDeleteProgram; | 
|---|
| 325 | _glIsProgram qt_glIsProgram; | 
|---|
| 326 |  | 
|---|
| 327 | _glGetShaderInfoLog qt_glGetShaderInfoLog; | 
|---|
| 328 | _glGetShaderiv qt_glGetShaderiv; | 
|---|
| 329 | _glGetShaderSource qt_glGetShaderSource; | 
|---|
| 330 | _glGetProgramiv qt_glGetProgramiv; | 
|---|
| 331 | _glGetProgramInfoLog qt_glGetProgramInfoLog; | 
|---|
| 332 |  | 
|---|
| 333 | _glGetUniformLocation qt_glGetUniformLocation; | 
|---|
| 334 | _glUniform4fv qt_glUniform4fv; | 
|---|
| 335 | _glUniform3fv qt_glUniform3fv; | 
|---|
| 336 | _glUniform2fv qt_glUniform2fv; | 
|---|
| 337 | _glUniform1fv qt_glUniform1fv; | 
|---|
| 338 | _glUniform1i qt_glUniform1i; | 
|---|
| 339 | _glUniform1iv qt_glUniform1iv; | 
|---|
| 340 | _glUniformMatrix2fv qt_glUniformMatrix2fv; | 
|---|
| 341 | _glUniformMatrix3fv qt_glUniformMatrix3fv; | 
|---|
| 342 | _glUniformMatrix4fv qt_glUniformMatrix4fv; | 
|---|
| 343 | _glUniformMatrix2x3fv qt_glUniformMatrix2x3fv; | 
|---|
| 344 | _glUniformMatrix2x4fv qt_glUniformMatrix2x4fv; | 
|---|
| 345 | _glUniformMatrix3x2fv qt_glUniformMatrix3x2fv; | 
|---|
| 346 | _glUniformMatrix3x4fv qt_glUniformMatrix3x4fv; | 
|---|
| 347 | _glUniformMatrix4x2fv qt_glUniformMatrix4x2fv; | 
|---|
| 348 | _glUniformMatrix4x3fv qt_glUniformMatrix4x3fv; | 
|---|
| 349 |  | 
|---|
| 350 | _glBindAttribLocation qt_glBindAttribLocation; | 
|---|
| 351 | _glGetAttribLocation qt_glGetAttribLocation; | 
|---|
| 352 | _glVertexAttrib1fv qt_glVertexAttrib1fv; | 
|---|
| 353 | _glVertexAttrib2fv qt_glVertexAttrib2fv; | 
|---|
| 354 | _glVertexAttrib3fv qt_glVertexAttrib3fv; | 
|---|
| 355 | _glVertexAttrib4fv qt_glVertexAttrib4fv; | 
|---|
| 356 | _glVertexAttribPointer qt_glVertexAttribPointer; | 
|---|
| 357 | _glDisableVertexAttribArray qt_glDisableVertexAttribArray; | 
|---|
| 358 | _glEnableVertexAttribArray qt_glEnableVertexAttribArray; | 
|---|
| 359 |  | 
|---|
| 360 | #else | 
|---|
| 361 | bool qt_glslResolved; | 
|---|
| 362 |  | 
|---|
| 363 | _glGetProgramBinaryOES qt_glGetProgramBinaryOES; | 
|---|
| 364 | _glProgramBinaryOES qt_glProgramBinaryOES; | 
|---|
| 365 | #endif | 
|---|
| 366 |  | 
|---|
| 367 | _glActiveStencilFaceEXT qt_glActiveStencilFaceEXT; | 
|---|
| 368 | _glMultiTexCoord4f qt_glMultiTexCoord4f; | 
|---|
| 369 |  | 
|---|
| 370 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 371 | // Extras needed for GL2 engine: | 
|---|
| 372 | _glActiveTexture qt_glActiveTexture; | 
|---|
| 373 | _glStencilOpSeparate qt_glStencilOpSeparate; | 
|---|
| 374 | _glBlendColor qt_glBlendColor; | 
|---|
| 375 |  | 
|---|
| 376 | #endif | 
|---|
| 377 |  | 
|---|
| 378 | // FBOs | 
|---|
| 379 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 380 | _glIsRenderbuffer qt_glIsRenderbuffer; | 
|---|
| 381 | _glBindRenderbuffer qt_glBindRenderbuffer; | 
|---|
| 382 | _glDeleteRenderbuffers qt_glDeleteRenderbuffers; | 
|---|
| 383 | _glGenRenderbuffers qt_glGenRenderbuffers; | 
|---|
| 384 | _glRenderbufferStorage qt_glRenderbufferStorage; | 
|---|
| 385 | _glGetRenderbufferParameteriv qt_glGetRenderbufferParameteriv; | 
|---|
| 386 | _glIsFramebuffer qt_glIsFramebuffer; | 
|---|
| 387 | _glBindFramebuffer qt_glBindFramebuffer; | 
|---|
| 388 | _glDeleteFramebuffers qt_glDeleteFramebuffers; | 
|---|
| 389 | _glGenFramebuffers qt_glGenFramebuffers; | 
|---|
| 390 | _glCheckFramebufferStatus qt_glCheckFramebufferStatus; | 
|---|
| 391 | _glFramebufferTexture2D qt_glFramebufferTexture2D; | 
|---|
| 392 | _glFramebufferRenderbuffer qt_glFramebufferRenderbuffer; | 
|---|
| 393 | _glGetFramebufferAttachmentParameteriv qt_glGetFramebufferAttachmentParameteriv; | 
|---|
| 394 | _glGenerateMipmap qt_glGenerateMipmap; | 
|---|
| 395 | #endif | 
|---|
| 396 | _glBlitFramebufferEXT qt_glBlitFramebufferEXT; | 
|---|
| 397 | _glRenderbufferStorageMultisampleEXT qt_glRenderbufferStorageMultisampleEXT; | 
|---|
| 398 |  | 
|---|
| 399 | // Buffer objects | 
|---|
| 400 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 401 | _glBindBuffer qt_glBindBuffer; | 
|---|
| 402 | _glDeleteBuffers qt_glDeleteBuffers; | 
|---|
| 403 | _glGenBuffers qt_glGenBuffers; | 
|---|
| 404 | _glBufferData qt_glBufferData; | 
|---|
| 405 | #endif | 
|---|
| 406 | _glMapBufferARB qt_glMapBufferARB; | 
|---|
| 407 | _glUnmapBufferARB qt_glUnmapBufferARB; | 
|---|
| 408 |  | 
|---|
| 409 | #if !defined(QT_OPENGL_ES) | 
|---|
| 410 | // Texture compression | 
|---|
| 411 | _glCompressedTexImage2DARB qt_glCompressedTexImage2DARB; | 
|---|
| 412 | #endif | 
|---|
| 413 | }; | 
|---|
| 414 |  | 
|---|
| 415 |  | 
|---|
| 416 | // OpenGL constants | 
|---|
| 417 |  | 
|---|
| 418 | /* NV_texture_rectangle */ | 
|---|
| 419 | #ifndef GL_NV_texture_rectangle | 
|---|
| 420 | #define GL_TEXTURE_RECTANGLE_NV           0x84F5 | 
|---|
| 421 | #define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6 | 
|---|
| 422 | #define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7 | 
|---|
| 423 | #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8 | 
|---|
| 424 | #endif | 
|---|
| 425 |  | 
|---|
| 426 | #ifndef GL_BGRA | 
|---|
| 427 | #define GL_BGRA 0x80E1 | 
|---|
| 428 | #endif | 
|---|
| 429 |  | 
|---|
| 430 | #ifndef GL_RGB16 | 
|---|
| 431 | #define GL_RGB16 32852 | 
|---|
| 432 | #endif | 
|---|
| 433 |  | 
|---|
| 434 | #ifndef GL_UNSIGNED_SHORT_5_6_5 | 
|---|
| 435 | #define GL_UNSIGNED_SHORT_5_6_5 33635 | 
|---|
| 436 | #endif | 
|---|
| 437 |  | 
|---|
| 438 | #ifndef GL_UNSIGNED_INT_8_8_8_8_REV | 
|---|
| 439 | #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 | 
|---|
| 440 | #endif | 
|---|
| 441 |  | 
|---|
| 442 | #ifndef GL_MULTISAMPLE | 
|---|
| 443 | #define GL_MULTISAMPLE  0x809D | 
|---|
| 444 | #endif | 
|---|
| 445 |  | 
|---|
| 446 | #ifndef GL_CLAMP_TO_EDGE | 
|---|
| 447 | #define GL_CLAMP_TO_EDGE 0x812F | 
|---|
| 448 | #endif | 
|---|
| 449 |  | 
|---|
| 450 | #ifndef GL_IBM_texture_mirrored_repeat | 
|---|
| 451 | #define GL_MIRRORED_REPEAT_IBM            0x8370 | 
|---|
| 452 | #endif | 
|---|
| 453 |  | 
|---|
| 454 | #ifndef GL_SGIS_generate_mipmap | 
|---|
| 455 | #define GL_GENERATE_MIPMAP_SGIS           0x8191 | 
|---|
| 456 | #define GL_GENERATE_MIPMAP_HINT_SGIS      0x8192 | 
|---|
| 457 | #endif | 
|---|
| 458 |  | 
|---|
| 459 | // ARB_fragment_program extension protos | 
|---|
| 460 | #ifndef GL_FRAGMENT_PROGRAM_ARB | 
|---|
| 461 | #define GL_FRAGMENT_PROGRAM_ARB           0x8804 | 
|---|
| 462 | #define GL_PROGRAM_FORMAT_ASCII_ARB       0x8875 | 
|---|
| 463 | #endif | 
|---|
| 464 |  | 
|---|
| 465 | #ifndef GL_PIXEL_UNPACK_BUFFER_ARB | 
|---|
| 466 | #define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC | 
|---|
| 467 | #endif | 
|---|
| 468 |  | 
|---|
| 469 | #ifndef GL_WRITE_ONLY_ARB | 
|---|
| 470 | #define GL_WRITE_ONLY_ARB 0x88B9 | 
|---|
| 471 | #endif | 
|---|
| 472 |  | 
|---|
| 473 | #ifndef GL_STREAM_DRAW_ARB | 
|---|
| 474 | #define GL_STREAM_DRAW_ARB 0x88E0 | 
|---|
| 475 | #endif | 
|---|
| 476 |  | 
|---|
| 477 | // Stencil wrap and two-side defines | 
|---|
| 478 | #ifndef GL_STENCIL_TEST_TWO_SIDE_EXT | 
|---|
| 479 | #define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 | 
|---|
| 480 | #endif | 
|---|
| 481 | #ifndef GL_INCR_WRAP_EXT | 
|---|
| 482 | #define GL_INCR_WRAP_EXT 0x8507 | 
|---|
| 483 | #endif | 
|---|
| 484 | #ifndef GL_DECR_WRAP_EXT | 
|---|
| 485 | #define GL_DECR_WRAP_EXT 0x8508 | 
|---|
| 486 | #endif | 
|---|
| 487 |  | 
|---|
| 488 | #ifndef GL_TEXTURE0 | 
|---|
| 489 | #define GL_TEXTURE0 0x84C0 | 
|---|
| 490 | #endif | 
|---|
| 491 |  | 
|---|
| 492 | #ifndef GL_TEXTURE1 | 
|---|
| 493 | #define GL_TEXTURE1 0x84C1 | 
|---|
| 494 | #endif | 
|---|
| 495 |  | 
|---|
| 496 | #ifndef GL_EXT_framebuffer_object | 
|---|
| 497 | #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT                    0x0506 | 
|---|
| 498 | #define GL_MAX_RENDERBUFFER_SIZE_EXT                            0x84E8 | 
|---|
| 499 | #define GL_FRAMEBUFFER_BINDING_EXT                              0x8CA6 | 
|---|
| 500 | #define GL_RENDERBUFFER_BINDING_EXT                             0x8CA7 | 
|---|
| 501 | #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT               0x8CD0 | 
|---|
| 502 | #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT               0x8CD1 | 
|---|
| 503 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT             0x8CD2 | 
|---|
| 504 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT     0x8CD3 | 
|---|
| 505 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT        0x8CD4 | 
|---|
| 506 | #define GL_FRAMEBUFFER_COMPLETE_EXT                             0x8CD5 | 
|---|
| 507 | #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT                0x8CD6 | 
|---|
| 508 | #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT        0x8CD7 | 
|---|
| 509 | #define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT      0x8CD8 | 
|---|
| 510 | #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT                0x8CD9 | 
|---|
| 511 | #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT                   0x8CDA | 
|---|
| 512 | #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT               0x8CDB | 
|---|
| 513 | #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT               0x8CDC | 
|---|
| 514 | #define GL_FRAMEBUFFER_UNSUPPORTED_EXT                          0x8CDD | 
|---|
| 515 | #define GL_MAX_COLOR_ATTACHMENTS_EXT                            0x8CDF | 
|---|
| 516 | #define GL_COLOR_ATTACHMENT0_EXT                                0x8CE0 | 
|---|
| 517 | #define GL_COLOR_ATTACHMENT1_EXT                                0x8CE1 | 
|---|
| 518 | #define GL_COLOR_ATTACHMENT2_EXT                                0x8CE2 | 
|---|
| 519 | #define GL_COLOR_ATTACHMENT3_EXT                                0x8CE3 | 
|---|
| 520 | #define GL_COLOR_ATTACHMENT4_EXT                                0x8CE4 | 
|---|
| 521 | #define GL_COLOR_ATTACHMENT5_EXT                                0x8CE5 | 
|---|
| 522 | #define GL_COLOR_ATTACHMENT6_EXT                                0x8CE6 | 
|---|
| 523 | #define GL_COLOR_ATTACHMENT7_EXT                                0x8CE7 | 
|---|
| 524 | #define GL_COLOR_ATTACHMENT8_EXT                                0x8CE8 | 
|---|
| 525 | #define GL_COLOR_ATTACHMENT9_EXT                                0x8CE9 | 
|---|
| 526 | #define GL_COLOR_ATTACHMENT10_EXT                               0x8CEA | 
|---|
| 527 | #define GL_COLOR_ATTACHMENT11_EXT                               0x8CEB | 
|---|
| 528 | #define GL_COLOR_ATTACHMENT12_EXT                               0x8CEC | 
|---|
| 529 | #define GL_COLOR_ATTACHMENT13_EXT                               0x8CED | 
|---|
| 530 | #define GL_COLOR_ATTACHMENT14_EXT                               0x8CEE | 
|---|
| 531 | #define GL_COLOR_ATTACHMENT15_EXT                               0x8CEF | 
|---|
| 532 | #define GL_DEPTH_ATTACHMENT_EXT                                 0x8D00 | 
|---|
| 533 | #define GL_STENCIL_ATTACHMENT_EXT                               0x8D20 | 
|---|
| 534 | #define GL_FRAMEBUFFER_EXT                                      0x8D40 | 
|---|
| 535 | #define GL_RENDERBUFFER_EXT                                     0x8D41 | 
|---|
| 536 | #define GL_RENDERBUFFER_WIDTH_EXT                               0x8D42 | 
|---|
| 537 | #define GL_RENDERBUFFER_HEIGHT_EXT                              0x8D43 | 
|---|
| 538 | #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT                     0x8D44 | 
|---|
| 539 | #define GL_STENCIL_INDEX_EXT                                    0x8D45 | 
|---|
| 540 | #define GL_STENCIL_INDEX1_EXT                                   0x8D46 | 
|---|
| 541 | #define GL_STENCIL_INDEX4_EXT                                   0x8D47 | 
|---|
| 542 | #define GL_STENCIL_INDEX8_EXT                                   0x8D48 | 
|---|
| 543 | #define GL_STENCIL_INDEX16_EXT                                  0x8D49 | 
|---|
| 544 | #define GL_RENDERBUFFER_RED_SIZE_EXT                            0x8D50 | 
|---|
| 545 | #define GL_RENDERBUFFER_GREEN_SIZE_EXT                          0x8D51 | 
|---|
| 546 | #define GL_RENDERBUFFER_BLUE_SIZE_EXT                           0x8D52 | 
|---|
| 547 | #define GL_RENDERBUFFER_ALPHA_SIZE_EXT                          0x8D53 | 
|---|
| 548 | #define GL_RENDERBUFFER_DEPTH_SIZE_EXT                          0x8D54 | 
|---|
| 549 | #define GL_RENDERBUFFER_STENCIL_SIZE_EXT                        0x8D55 | 
|---|
| 550 | #endif | 
|---|
| 551 |  | 
|---|
| 552 | // GL_EXT_framebuffer_blit | 
|---|
| 553 | #ifndef GL_READ_FRAMEBUFFER_EXT | 
|---|
| 554 | #define GL_READ_FRAMEBUFFER_EXT                                 0x8CA8 | 
|---|
| 555 | #endif | 
|---|
| 556 |  | 
|---|
| 557 | // GL_EXT_framebuffer_multisample | 
|---|
| 558 | #ifndef GL_RENDERBUFFER_SAMPLES_EXT | 
|---|
| 559 | #define GL_RENDERBUFFER_SAMPLES_EXT                             0x8CAB | 
|---|
| 560 | #endif | 
|---|
| 561 |  | 
|---|
| 562 | #ifndef GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT | 
|---|
| 563 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x8D56 | 
|---|
| 564 | #endif | 
|---|
| 565 |  | 
|---|
| 566 | #ifndef GL_MAX_SAMPLES_EXT | 
|---|
| 567 | #define GL_MAX_SAMPLES_EXT                                      0x8D57 | 
|---|
| 568 | #endif | 
|---|
| 569 |  | 
|---|
| 570 | #ifndef GL_DRAW_FRAMEBUFFER_EXT | 
|---|
| 571 | #define GL_DRAW_FRAMEBUFFER_EXT                                 0x8CA9 | 
|---|
| 572 | #endif | 
|---|
| 573 |  | 
|---|
| 574 | #ifndef GL_EXT_packed_depth_stencil | 
|---|
| 575 | #define GL_DEPTH_STENCIL_EXT                                    0x84F9 | 
|---|
| 576 | #define GL_UNSIGNED_INT_24_8_EXT                                0x84FA | 
|---|
| 577 | #define GL_DEPTH24_STENCIL8_EXT                                 0x88F0 | 
|---|
| 578 | #define GL_TEXTURE_STENCIL_SIZE_EXT                             0x88F1 | 
|---|
| 579 | #endif | 
|---|
| 580 |  | 
|---|
| 581 | // ### hm. should be part of the GL 1.2 spec.. | 
|---|
| 582 | #ifndef GL_CLAMP_TO_EDGE | 
|---|
| 583 | #define GL_CLAMP_TO_EDGE                  0x812F | 
|---|
| 584 | #endif | 
|---|
| 585 |  | 
|---|
| 586 | #ifndef GL_VERSION_1_2 | 
|---|
| 587 | #define GL_PACK_SKIP_IMAGES               0x806B | 
|---|
| 588 | #define GL_PACK_IMAGE_HEIGHT              0x806C | 
|---|
| 589 | #define GL_UNPACK_SKIP_IMAGES             0x806D | 
|---|
| 590 | #define GL_UNPACK_IMAGE_HEIGHT            0x806E | 
|---|
| 591 | #endif | 
|---|
| 592 |  | 
|---|
| 593 | #ifndef GL_VERSION_1_4 | 
|---|
| 594 | #define GL_CONSTANT_COLOR 0x8001 | 
|---|
| 595 | #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 | 
|---|
| 596 | #define GL_CONSTANT_ALPHA 0x8003 | 
|---|
| 597 | #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 | 
|---|
| 598 | #define GL_INCR_WRAP 0x8507 | 
|---|
| 599 | #define GL_DECR_WRAP 0x8508 | 
|---|
| 600 | #endif | 
|---|
| 601 |  | 
|---|
| 602 | #ifndef GL_VERSION_2_0 | 
|---|
| 603 | #define GL_FRAGMENT_SHADER 0x8B30 | 
|---|
| 604 | #define GL_VERTEX_SHADER 0x8B31 | 
|---|
| 605 | #define GL_FLOAT_VEC2 0x8B50 | 
|---|
| 606 | #define GL_FLOAT_VEC3 0x8B51 | 
|---|
| 607 | #define GL_FLOAT_VEC4 0x8B52 | 
|---|
| 608 | #define GL_INT_VEC2 0x8B53 | 
|---|
| 609 | #define GL_INT_VEC3 0x8B54 | 
|---|
| 610 | #define GL_INT_VEC4 0x8B55 | 
|---|
| 611 | #define GL_BOOL 0x8B56 | 
|---|
| 612 | #define GL_BOOL_VEC2 0x8B57 | 
|---|
| 613 | #define GL_BOOL_VEC3 0x8B58 | 
|---|
| 614 | #define GL_BOOL_VEC4 0x8B59 | 
|---|
| 615 | #define GL_FLOAT_MAT2 0x8B5A | 
|---|
| 616 | #define GL_FLOAT_MAT3 0x8B5B | 
|---|
| 617 | #define GL_FLOAT_MAT4 0x8B5C | 
|---|
| 618 | #define GL_SAMPLER_1D 0x8B5D | 
|---|
| 619 | #define GL_SAMPLER_2D 0x8B5E | 
|---|
| 620 | #define GL_SAMPLER_3D 0x8B5F | 
|---|
| 621 | #define GL_SAMPLER_CUBE 0x8B60 | 
|---|
| 622 | #define GL_COMPILE_STATUS 0x8B81 | 
|---|
| 623 | #define GL_LINK_STATUS 0x8B82 | 
|---|
| 624 | #define GL_INFO_LOG_LENGTH 0x8B84 | 
|---|
| 625 | #define GL_ACTIVE_UNIFORMS 0x8B86 | 
|---|
| 626 | #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 | 
|---|
| 627 | #define GL_ACTIVE_ATTRIBUTES 0x8B89 | 
|---|
| 628 | #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A | 
|---|
| 629 | #endif | 
|---|
| 630 |  | 
|---|
| 631 |  | 
|---|
| 632 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 633 | #define glProgramStringARB QGLContextPrivate::extensionFuncs(ctx).qt_glProgramStringARB | 
|---|
| 634 | #define glBindProgramARB QGLContextPrivate::extensionFuncs(ctx).qt_glBindProgramARB | 
|---|
| 635 | #define glDeleteProgramsARB QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgramsARB | 
|---|
| 636 | #define glGenProgramsARB QGLContextPrivate::extensionFuncs(ctx).qt_glGenProgramsARB | 
|---|
| 637 | #define glProgramLocalParameter4fvARB QGLContextPrivate::extensionFuncs(ctx).qt_glProgramLocalParameter4fvARB | 
|---|
| 638 |  | 
|---|
| 639 | #define glActiveStencilFaceEXT QGLContextPrivate::extensionFuncs(ctx).qt_glActiveStencilFaceEXT | 
|---|
| 640 |  | 
|---|
| 641 | #define glMultiTexCoord4f QGLContextPrivate::extensionFuncs(ctx).qt_glMultiTexCoord4f | 
|---|
| 642 |  | 
|---|
| 643 | #define glActiveTexture QGLContextPrivate::extensionFuncs(ctx).qt_glActiveTexture | 
|---|
| 644 | #endif // !defined(QT_OPENGL_ES_2) | 
|---|
| 645 |  | 
|---|
| 646 |  | 
|---|
| 647 | // FBOs | 
|---|
| 648 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 649 | #define glIsRenderbuffer QGLContextPrivate::extensionFuncs(ctx).qt_glIsRenderbuffer | 
|---|
| 650 | #define glBindRenderbuffer QGLContextPrivate::extensionFuncs(ctx).qt_glBindRenderbuffer | 
|---|
| 651 | #define glDeleteRenderbuffers QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteRenderbuffers | 
|---|
| 652 | #define glGenRenderbuffers QGLContextPrivate::extensionFuncs(ctx).qt_glGenRenderbuffers | 
|---|
| 653 | #define glRenderbufferStorage QGLContextPrivate::extensionFuncs(ctx).qt_glRenderbufferStorage | 
|---|
| 654 | #define glGetRenderbufferParameteriv QGLContextPrivate::extensionFuncs(ctx).qt_glGetRenderbufferParameteriv | 
|---|
| 655 | #define glIsFramebuffer QGLContextPrivate::extensionFuncs(ctx).qt_glIsFramebuffer | 
|---|
| 656 | #define glBindFramebuffer QGLContextPrivate::extensionFuncs(ctx).qt_glBindFramebuffer | 
|---|
| 657 | #define glDeleteFramebuffers QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteFramebuffers | 
|---|
| 658 | #define glGenFramebuffers QGLContextPrivate::extensionFuncs(ctx).qt_glGenFramebuffers | 
|---|
| 659 | #define glCheckFramebufferStatus QGLContextPrivate::extensionFuncs(ctx).qt_glCheckFramebufferStatus | 
|---|
| 660 | #define glFramebufferTexture2D QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferTexture2D | 
|---|
| 661 | #define glFramebufferRenderbuffer QGLContextPrivate::extensionFuncs(ctx).qt_glFramebufferRenderbuffer | 
|---|
| 662 | #define glGetFramebufferAttachmentParameteriv QGLContextPrivate::extensionFuncs(ctx).qt_glGetFramebufferAttachmentParameteriv | 
|---|
| 663 | #define glGenerateMipmap QGLContextPrivate::extensionFuncs(ctx).qt_glGenerateMipmap | 
|---|
| 664 | #endif // QT_OPENGL_ES_2 | 
|---|
| 665 | #define glBlitFramebufferEXT QGLContextPrivate::extensionFuncs(ctx).qt_glBlitFramebufferEXT | 
|---|
| 666 | #define glRenderbufferStorageMultisampleEXT QGLContextPrivate::extensionFuncs(ctx).qt_glRenderbufferStorageMultisampleEXT | 
|---|
| 667 |  | 
|---|
| 668 |  | 
|---|
| 669 | // Buffer objects | 
|---|
| 670 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 671 | #define glBindBuffer QGLContextPrivate::extensionFuncs(ctx).qt_glBindBuffer | 
|---|
| 672 | #define glDeleteBuffers QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteBuffers | 
|---|
| 673 | #define glGenBuffers QGLContextPrivate::extensionFuncs(ctx).qt_glGenBuffers | 
|---|
| 674 | #define glBufferData QGLContextPrivate::extensionFuncs(ctx).qt_glBufferData | 
|---|
| 675 | #endif | 
|---|
| 676 | #define glMapBufferARB QGLContextPrivate::extensionFuncs(ctx).qt_glMapBufferARB | 
|---|
| 677 | #define glUnmapBufferARB QGLContextPrivate::extensionFuncs(ctx).qt_glUnmapBufferARB | 
|---|
| 678 |  | 
|---|
| 679 |  | 
|---|
| 680 | // GLSL | 
|---|
| 681 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 682 |  | 
|---|
| 683 | #define glCreateShader QGLContextPrivate::extensionFuncs(ctx).qt_glCreateShader | 
|---|
| 684 | #define glShaderSource QGLContextPrivate::extensionFuncs(ctx).qt_glShaderSource | 
|---|
| 685 | #define glShaderBinary QGLContextPrivate::extensionFuncs(ctx).qt_glShaderBinary | 
|---|
| 686 | #define glCompileShader QGLContextPrivate::extensionFuncs(ctx).qt_glCompileShader | 
|---|
| 687 | #define glDeleteShader QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteShader | 
|---|
| 688 | #define glIsShader QGLContextPrivate::extensionFuncs(ctx).qt_glIsShader | 
|---|
| 689 |  | 
|---|
| 690 | #define glCreateProgram QGLContextPrivate::extensionFuncs(ctx).qt_glCreateProgram | 
|---|
| 691 | #define glAttachShader QGLContextPrivate::extensionFuncs(ctx).qt_glAttachShader | 
|---|
| 692 | #define glDetachShader QGLContextPrivate::extensionFuncs(ctx).qt_glDetachShader | 
|---|
| 693 | #define glLinkProgram QGLContextPrivate::extensionFuncs(ctx).qt_glLinkProgram | 
|---|
| 694 | #define glUseProgram QGLContextPrivate::extensionFuncs(ctx).qt_glUseProgram | 
|---|
| 695 | #define glDeleteProgram QGLContextPrivate::extensionFuncs(ctx).qt_glDeleteProgram | 
|---|
| 696 | #define glIsProgram QGLContextPrivate::extensionFuncs(ctx).qt_glIsProgram | 
|---|
| 697 |  | 
|---|
| 698 | #define glGetShaderInfoLog QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderInfoLog | 
|---|
| 699 | #define glGetShaderiv QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderiv | 
|---|
| 700 | #define glGetShaderSource QGLContextPrivate::extensionFuncs(ctx).qt_glGetShaderSource | 
|---|
| 701 | #define glGetProgramiv QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramiv | 
|---|
| 702 | #define glGetProgramInfoLog QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramInfoLog | 
|---|
| 703 |  | 
|---|
| 704 | #define glGetUniformLocation QGLContextPrivate::extensionFuncs(ctx).qt_glGetUniformLocation | 
|---|
| 705 | #define glUniform4fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniform4fv | 
|---|
| 706 | #define glUniform3fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniform3fv | 
|---|
| 707 | #define glUniform2fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniform2fv | 
|---|
| 708 | #define glUniform1fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1fv | 
|---|
| 709 | #define glUniform1i QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1i | 
|---|
| 710 | #define glUniform1iv QGLContextPrivate::extensionFuncs(ctx).qt_glUniform1iv | 
|---|
| 711 | #define glUniformMatrix2fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2fv | 
|---|
| 712 | #define glUniformMatrix3fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3fv | 
|---|
| 713 | #define glUniformMatrix4fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4fv | 
|---|
| 714 | #define glUniformMatrix2x3fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2x3fv | 
|---|
| 715 | #define glUniformMatrix2x4fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix2x4fv | 
|---|
| 716 | #define glUniformMatrix3x2fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3x2fv | 
|---|
| 717 | #define glUniformMatrix3x4fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix3x4fv | 
|---|
| 718 | #define glUniformMatrix4x2fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4x2fv | 
|---|
| 719 | #define glUniformMatrix4x3fv QGLContextPrivate::extensionFuncs(ctx).qt_glUniformMatrix4x3fv | 
|---|
| 720 |  | 
|---|
| 721 | #define glBindAttribLocation QGLContextPrivate::extensionFuncs(ctx).qt_glBindAttribLocation | 
|---|
| 722 | #define glGetAttribLocation QGLContextPrivate::extensionFuncs(ctx).qt_glGetAttribLocation | 
|---|
| 723 | #define glVertexAttrib1fv QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib1fv | 
|---|
| 724 | #define glVertexAttrib2fv QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib2fv | 
|---|
| 725 | #define glVertexAttrib3fv QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib3fv | 
|---|
| 726 | #define glVertexAttrib4fv QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttrib4fv | 
|---|
| 727 | #define glVertexAttribPointer QGLContextPrivate::extensionFuncs(ctx).qt_glVertexAttribPointer | 
|---|
| 728 | #define glDisableVertexAttribArray QGLContextPrivate::extensionFuncs(ctx).qt_glDisableVertexAttribArray | 
|---|
| 729 | #define glEnableVertexAttribArray QGLContextPrivate::extensionFuncs(ctx).qt_glEnableVertexAttribArray | 
|---|
| 730 |  | 
|---|
| 731 | #else // QT_OPENGL_ES_2 | 
|---|
| 732 |  | 
|---|
| 733 | #define glGetProgramBinaryOES QGLContextPrivate::extensionFuncs(ctx).qt_glGetProgramBinaryOES | 
|---|
| 734 | #define glProgramBinaryOES QGLContextPrivate::extensionFuncs(ctx).qt_glProgramBinaryOES | 
|---|
| 735 |  | 
|---|
| 736 | #endif // QT_OPENGL_ES_2 | 
|---|
| 737 |  | 
|---|
| 738 |  | 
|---|
| 739 | #if !defined(QT_OPENGL_ES_2) | 
|---|
| 740 | #define glStencilOpSeparate QGLContextPrivate::extensionFuncs(ctx).qt_glStencilOpSeparate | 
|---|
| 741 | #define glBlendColor QGLContextPrivate::extensionFuncs(ctx).qt_glBlendColor | 
|---|
| 742 | #endif | 
|---|
| 743 |  | 
|---|
| 744 | #if defined(QT_OPENGL_ES_2) | 
|---|
| 745 | #define glClearDepth glClearDepthf | 
|---|
| 746 | #endif | 
|---|
| 747 |  | 
|---|
| 748 | #if !defined(QT_OPENGL_ES) | 
|---|
| 749 | #define glCompressedTexImage2D QGLContextPrivate::extensionFuncs(ctx).qt_glCompressedTexImage2DARB | 
|---|
| 750 | #endif | 
|---|
| 751 |  | 
|---|
| 752 | extern bool qt_resolve_framebufferobject_extensions(QGLContext *ctx); | 
|---|
| 753 | bool qt_resolve_buffer_extensions(QGLContext *ctx); | 
|---|
| 754 |  | 
|---|
| 755 | bool qt_resolve_version_1_3_functions(QGLContext *ctx); | 
|---|
| 756 | bool qt_resolve_version_2_0_functions(QGLContext *ctx); | 
|---|
| 757 | bool qt_resolve_stencil_face_extension(QGLContext *ctx); | 
|---|
| 758 | bool qt_resolve_frag_program_extensions(QGLContext *ctx); | 
|---|
| 759 |  | 
|---|
| 760 | bool qt_resolve_glsl_extensions(QGLContext *ctx); | 
|---|
| 761 |  | 
|---|
| 762 | QT_END_NAMESPACE | 
|---|
| 763 |  | 
|---|
| 764 | #endif // QGL_EXTENSIONS_P_H | 
|---|