1 /****************************************************************************
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 ** This file is part of the QtOpenGL module of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
10 ** This file contains pre-release code and may not be distributed.
11 ** You may use this file in accordance with the terms and conditions
12 ** contained in the either Technology Preview License Agreement or the
13 ** Beta Release License Agreement.
15 ** GNU Lesser General Public License Usage
16 ** Alternatively, this file may be used under the terms of the GNU Lesser
17 ** General Public License version 2.1 as published by the Free Software
18 ** Foundation and appearing in the file LICENSE.LGPL included in the
19 ** packaging of this file. Please review the following information to
20 ** ensure the GNU Lesser General Public License version 2.1 requirements
21 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23 ** In addition, as a special exception, Nokia gives you certain
24 ** additional rights. These rights are described in the Nokia Qt LGPL
25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
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.
36 ** If you are unsure which license is appropriate for your use, please
37 ** contact the sales department at http://www.qtsoftware.com/contact.
40 ****************************************************************************/
42 #ifndef QGL_EXTENSIONS_P_H
43 #define QGL_EXTENSIONS_P_H
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.
56 // extension prototypes
60 # define APIENTRYP APIENTRY *
71 #include <QtCore/qglobal.h>
73 #ifndef GL_ARB_vertex_buffer_object
74 typedef ptrdiff_t GLsizeiptrARB
;
77 #ifndef GL_VERSION_2_0
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
);
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
*);
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
);
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
);
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 *);
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
*);
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
);
145 typedef void (APIENTRY
*_glGetProgramBinaryOES
) (GLuint
, GLsizei
, GLsizei
*, GLenum
*, void *);
146 typedef void (APIENTRY
*_glProgramBinaryOES
) (GLuint
, GLenum
, const void *, GLint
);
149 typedef void (APIENTRY
*_glMultiTexCoord4f
) (GLenum
, GLfloat
, GLfloat
, GLfloat
, GLfloat
);
150 typedef void (APIENTRY
*_glActiveStencilFaceEXT
) (GLenum
);
152 // Needed for GL2 engine:
153 typedef void (APIENTRY
*_glStencilOpSeparate
) (GLenum face
, GLenum sfail
, GLenum dpfail
, GLenum dppass
);
154 typedef void (APIENTRY
*_glActiveTexture
) (GLenum
);
157 // EXT_GL_framebuffer_object
158 typedef GLboolean (APIENTRY
*_glIsRenderbuffer
) (GLuint renderbuffer
);
159 typedef void (APIENTRY
*_glBindRenderbuffer
) (GLenum target
, GLuint renderbuffer
);
160 typedef void (APIENTRY
*_glDeleteRenderbuffers
) (GLsizei n
, const GLuint
*renderbuffers
);
161 typedef void (APIENTRY
*_glGenRenderbuffers
) (GLsizei n
, GLuint
*renderbuffers
);
162 typedef void (APIENTRY
*_glRenderbufferStorage
) (GLenum target
, GLenum internalformat
, GLsizei width
, GLsizei height
);
163 typedef void (APIENTRY
*_glGetRenderbufferParameteriv
) (GLenum target
, GLenum pname
, GLint
*params
);
164 typedef GLboolean (APIENTRY
*_glIsFramebuffer
) (GLuint framebuffer
);
165 typedef void (APIENTRY
*_glBindFramebuffer
) (GLenum target
, GLuint framebuffer
);
166 typedef void (APIENTRY
*_glDeleteFramebuffers
) (GLsizei n
, const GLuint
*framebuffers
);
167 typedef void (APIENTRY
*_glGenFramebuffers
) (GLsizei n
, GLuint
*framebuffers
);
168 typedef GLenum (APIENTRY
*_glCheckFramebufferStatus
) (GLenum target
);
169 typedef void (APIENTRY
*_glFramebufferTexture2D
) (GLenum target
, GLenum attachment
, GLenum textarget
,
170 GLuint texture
, GLint level
);
171 typedef void (APIENTRY
*_glFramebufferRenderbuffer
) (GLenum target
, GLenum attachment
, GLenum renderbuffertarget
,
172 GLuint renderbuffer
);
173 typedef void (APIENTRY
*_glGetFramebufferAttachmentParameteriv
) (GLenum target
, GLenum attachment
, GLenum pname
,
175 typedef void (APIENTRY
*_glGenerateMipmap
) (GLenum target
);
177 // EXT_GL_framebuffer_blit
178 typedef void (APIENTRY
*_glBlitFramebufferEXT
) (int srcX0
, int srcY0
, int srcX1
, int srcY1
,
179 int dstX0
, int dstY0
, int dstX1
, int dstY1
,
180 GLbitfield mask
, GLenum filter
);
182 // EXT_GL_framebuffer_multisample
183 typedef void (APIENTRY
*_glRenderbufferStorageMultisampleEXT
) (GLenum target
, GLsizei samples
,
184 GLenum internalformat
, GLsizei width
, GLsizei height
);
188 struct QGLExtensionFuncs
190 QGLExtensionFuncs() {
191 #if !defined(QT_OPENGL_ES_2)
192 qt_glProgramStringARB
= 0;
193 qt_glBindProgramARB
= 0;
194 qt_glDeleteProgramsARB
= 0;
195 qt_glGenProgramsARB
= 0;
196 qt_glProgramLocalParameter4fvARB
= 0;
199 qt_glCreateShader
= 0;
200 qt_glShaderSource
= 0;
201 qt_glShaderBinary
= 0;
202 qt_glCompileShader
= 0;
203 qt_glDeleteShader
= 0;
206 qt_glCreateProgram
= 0;
207 qt_glAttachShader
= 0;
208 qt_glDetachShader
= 0;
209 qt_glLinkProgram
= 0;
211 qt_glDeleteProgram
= 0;
214 qt_glGetShaderInfoLog
= 0;
215 qt_glGetShaderiv
= 0;
216 qt_glGetShaderSource
= 0;
217 qt_glGetProgramiv
= 0;
218 qt_glGetProgramInfoLog
= 0;
220 qt_glGetUniformLocation
= 0;
227 qt_glUniformMatrix2fv
= 0;
228 qt_glUniformMatrix3fv
= 0;
229 qt_glUniformMatrix4fv
= 0;
230 qt_glUniformMatrix2x3fv
= 0;
231 qt_glUniformMatrix2x4fv
= 0;
232 qt_glUniformMatrix3x2fv
= 0;
233 qt_glUniformMatrix3x4fv
= 0;
234 qt_glUniformMatrix4x2fv
= 0;
235 qt_glUniformMatrix4x3fv
= 0;
237 qt_glBindAttribLocation
= 0;
238 qt_glGetAttribLocation
= 0;
239 qt_glVertexAttrib1fv
= 0;
240 qt_glVertexAttrib2fv
= 0;
241 qt_glVertexAttrib3fv
= 0;
242 qt_glVertexAttrib4fv
= 0;
243 qt_glVertexAttribPointer
= 0;
244 qt_glDisableVertexAttribArray
= 0;
245 qt_glEnableVertexAttribArray
= 0;
247 // Extras for GL2 engine:
248 qt_glActiveTexture
= 0;
249 qt_glStencilOpSeparate
= 0;
251 qt_glActiveStencilFaceEXT
= 0;
252 qt_glMultiTexCoord4f
= 0;
254 qt_glslResolved
= false;
256 qt_glGetProgramBinaryOES
= 0;
257 qt_glProgramBinaryOES
= 0;
261 #if !defined(QT_OPENGL_ES_2)
262 qt_glIsRenderbuffer
= 0;
263 qt_glBindRenderbuffer
= 0;
264 qt_glDeleteRenderbuffers
= 0;
265 qt_glGenRenderbuffers
= 0;
266 qt_glRenderbufferStorage
= 0;
267 qt_glGetRenderbufferParameteriv
= 0;
268 qt_glIsFramebuffer
= 0;
269 qt_glBindFramebuffer
= 0;
270 qt_glDeleteFramebuffers
= 0;
271 qt_glGenFramebuffers
= 0;
272 qt_glCheckFramebufferStatus
= 0;
273 qt_glFramebufferTexture2D
= 0;
274 qt_glFramebufferRenderbuffer
= 0;
275 qt_glGetFramebufferAttachmentParameteriv
= 0;
276 qt_glGenerateMipmap
= 0;
278 qt_glBlitFramebufferEXT
= 0;
279 qt_glRenderbufferStorageMultisampleEXT
= 0;
282 #if !defined(QT_OPENGL_ES_2)
284 qt_glDeleteBuffers
= 0;
288 qt_glMapBufferARB
= 0;
289 qt_glUnmapBufferARB
= 0;
293 #if !defined(QT_OPENGL_ES_2)
294 _glProgramStringARB qt_glProgramStringARB
;
295 _glBindProgramARB qt_glBindProgramARB
;
296 _glDeleteProgramsARB qt_glDeleteProgramsARB
;
297 _glGenProgramsARB qt_glGenProgramsARB
;
298 _glProgramLocalParameter4fvARB qt_glProgramLocalParameter4fvARB
;
301 _glCreateShader qt_glCreateShader
;
302 _glShaderSource qt_glShaderSource
;
303 _glShaderBinary qt_glShaderBinary
;
304 _glCompileShader qt_glCompileShader
;
305 _glDeleteShader qt_glDeleteShader
;
306 _glIsShader qt_glIsShader
;
308 _glCreateProgram qt_glCreateProgram
;
309 _glAttachShader qt_glAttachShader
;
310 _glDetachShader qt_glDetachShader
;
311 _glLinkProgram qt_glLinkProgram
;
312 _glUseProgram qt_glUseProgram
;
313 _glDeleteProgram qt_glDeleteProgram
;
314 _glIsProgram qt_glIsProgram
;
316 _glGetShaderInfoLog qt_glGetShaderInfoLog
;
317 _glGetShaderiv qt_glGetShaderiv
;
318 _glGetShaderSource qt_glGetShaderSource
;
319 _glGetProgramiv qt_glGetProgramiv
;
320 _glGetProgramInfoLog qt_glGetProgramInfoLog
;
322 _glGetUniformLocation qt_glGetUniformLocation
;
323 _glUniform4fv qt_glUniform4fv
;
324 _glUniform3fv qt_glUniform3fv
;
325 _glUniform2fv qt_glUniform2fv
;
326 _glUniform1fv qt_glUniform1fv
;
327 _glUniform1i qt_glUniform1i
;
328 _glUniform1iv qt_glUniform1iv
;
329 _glUniformMatrix2fv qt_glUniformMatrix2fv
;
330 _glUniformMatrix3fv qt_glUniformMatrix3fv
;
331 _glUniformMatrix4fv qt_glUniformMatrix4fv
;
332 _glUniformMatrix2x3fv qt_glUniformMatrix2x3fv
;
333 _glUniformMatrix2x4fv qt_glUniformMatrix2x4fv
;
334 _glUniformMatrix3x2fv qt_glUniformMatrix3x2fv
;
335 _glUniformMatrix3x4fv qt_glUniformMatrix3x4fv
;
336 _glUniformMatrix4x2fv qt_glUniformMatrix4x2fv
;
337 _glUniformMatrix4x3fv qt_glUniformMatrix4x3fv
;
339 _glBindAttribLocation qt_glBindAttribLocation
;
340 _glGetAttribLocation qt_glGetAttribLocation
;
341 _glVertexAttrib1fv qt_glVertexAttrib1fv
;
342 _glVertexAttrib2fv qt_glVertexAttrib2fv
;
343 _glVertexAttrib3fv qt_glVertexAttrib3fv
;
344 _glVertexAttrib4fv qt_glVertexAttrib4fv
;
345 _glVertexAttribPointer qt_glVertexAttribPointer
;
346 _glDisableVertexAttribArray qt_glDisableVertexAttribArray
;
347 _glEnableVertexAttribArray qt_glEnableVertexAttribArray
;
350 bool qt_glslResolved
;
352 _glGetProgramBinaryOES qt_glGetProgramBinaryOES
;
353 _glProgramBinaryOES qt_glProgramBinaryOES
;
356 _glActiveStencilFaceEXT qt_glActiveStencilFaceEXT
;
357 _glMultiTexCoord4f qt_glMultiTexCoord4f
;
359 #if !defined(QT_OPENGL_ES_2)
360 // Extras needed for GL2 engine:
361 _glActiveTexture qt_glActiveTexture
;
362 _glStencilOpSeparate qt_glStencilOpSeparate
;
366 #if !defined(QT_OPENGL_ES_2)
367 _glIsRenderbuffer qt_glIsRenderbuffer
;
368 _glBindRenderbuffer qt_glBindRenderbuffer
;
369 _glDeleteRenderbuffers qt_glDeleteRenderbuffers
;
370 _glGenRenderbuffers qt_glGenRenderbuffers
;
371 _glRenderbufferStorage qt_glRenderbufferStorage
;
372 _glGetRenderbufferParameteriv qt_glGetRenderbufferParameteriv
;
373 _glIsFramebuffer qt_glIsFramebuffer
;
374 _glBindFramebuffer qt_glBindFramebuffer
;
375 _glDeleteFramebuffers qt_glDeleteFramebuffers
;
376 _glGenFramebuffers qt_glGenFramebuffers
;
377 _glCheckFramebufferStatus qt_glCheckFramebufferStatus
;
378 _glFramebufferTexture2D qt_glFramebufferTexture2D
;
379 _glFramebufferRenderbuffer qt_glFramebufferRenderbuffer
;
380 _glGetFramebufferAttachmentParameteriv qt_glGetFramebufferAttachmentParameteriv
;
381 _glGenerateMipmap qt_glGenerateMipmap
;
383 _glBlitFramebufferEXT qt_glBlitFramebufferEXT
;
384 _glRenderbufferStorageMultisampleEXT qt_glRenderbufferStorageMultisampleEXT
;
387 #if !defined(QT_OPENGL_ES_2)
388 _glBindBuffer qt_glBindBuffer
;
389 _glDeleteBuffers qt_glDeleteBuffers
;
390 _glGenBuffers qt_glGenBuffers
;
391 _glBufferData qt_glBufferData
;
393 _glMapBufferARB qt_glMapBufferARB
;
394 _glUnmapBufferARB qt_glUnmapBufferARB
;
401 /* NV_texture_rectangle */
402 #ifndef GL_NV_texture_rectangle
403 #define GL_TEXTURE_RECTANGLE_NV 0x84F5
404 #define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
405 #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
406 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
410 #define GL_BGRA 0x80E1
413 #ifndef GL_MULTISAMPLE
414 #define GL_MULTISAMPLE 0x809D
417 #ifndef GL_CLAMP_TO_EDGE
418 #define GL_CLAMP_TO_EDGE 0x812F
421 #ifndef GL_IBM_texture_mirrored_repeat
422 #define GL_MIRRORED_REPEAT_IBM 0x8370
425 #ifndef GL_SGIS_generate_mipmap
426 #define GL_GENERATE_MIPMAP_SGIS 0x8191
427 #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
430 // ARB_fragment_program extension protos
431 #ifndef GL_FRAGMENT_PROGRAM_ARB
432 #define GL_FRAGMENT_PROGRAM_ARB 0x8804
433 #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
436 #ifndef GL_PIXEL_UNPACK_BUFFER_ARB
437 #define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
440 #ifndef GL_WRITE_ONLY_ARB
441 #define GL_WRITE_ONLY_ARB 0x88B9
444 #ifndef GL_STREAM_DRAW_ARB
445 #define GL_STREAM_DRAW_ARB 0x88E0
448 // Stencil wrap and two-side defines
449 #ifndef GL_STENCIL_TEST_TWO_SIDE_EXT
450 #define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
452 #ifndef GL_INCR_WRAP_EXT
453 #define GL_INCR_WRAP_EXT 0x8507
455 #ifndef GL_DECR_WRAP_EXT
456 #define GL_DECR_WRAP_EXT 0x8508
460 #define GL_TEXTURE0 0x84C0
464 #define GL_TEXTURE1 0x84C1
467 #ifndef GL_EXT_framebuffer_object
468 #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
469 #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
470 #define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
471 #define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
472 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
473 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
474 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
475 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
476 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
477 #define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
478 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
479 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
480 #define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
481 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
482 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
483 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
484 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
485 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
486 #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
487 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
488 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
489 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
490 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
491 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
492 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
493 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
494 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
495 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
496 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
497 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
498 #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
499 #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
500 #define GL_COLOR_ATTACHMENT13_EXT 0x8CED
501 #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
502 #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
503 #define GL_DEPTH_ATTACHMENT_EXT 0x8D00
504 #define GL_STENCIL_ATTACHMENT_EXT 0x8D20
505 #define GL_FRAMEBUFFER_EXT 0x8D40
506 #define GL_RENDERBUFFER_EXT 0x8D41
507 #define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
508 #define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
509 #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
510 #define GL_STENCIL_INDEX_EXT 0x8D45
511 #define GL_STENCIL_INDEX1_EXT 0x8D46
512 #define GL_STENCIL_INDEX4_EXT 0x8D47
513 #define GL_STENCIL_INDEX8_EXT 0x8D48
514 #define GL_STENCIL_INDEX16_EXT 0x8D49
515 #define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
516 #define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
517 #define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
518 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
519 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
520 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
523 // GL_EXT_framebuffer_blit
524 #ifndef GL_READ_FRAMEBUFFER_EXT
525 #define GL_READ_FRAMEBUFFER_EXT 0x8CA8
528 // GL_EXT_framebuffer_multisample
529 #ifndef GL_RENDERBUFFER_SAMPLES_EXT
530 #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
533 #ifndef GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT
534 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
537 #ifndef GL_MAX_SAMPLES_EXT
538 #define GL_MAX_SAMPLES_EXT 0x8D5
541 #ifndef GL_DRAW_FRAMEBUFFER_EXT
542 #define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
545 #ifndef GL_EXT_packed_depth_stencil
546 #define GL_DEPTH_STENCIL_EXT 0x84F9
547 #define GL_UNSIGNED_INT_24_8_EXT 0x84FA
548 #define GL_DEPTH24_STENCIL8_EXT 0x88F0
549 #define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
552 // ### hm. should be part of the GL 1.2 spec..
553 #ifndef GL_CLAMP_TO_EDGE
554 #define GL_CLAMP_TO_EDGE 0x812F
557 #ifndef GL_VERSION_1_2
558 #define GL_PACK_SKIP_IMAGES 0x806B
559 #define GL_PACK_IMAGE_HEIGHT 0x806C
560 #define GL_UNPACK_SKIP_IMAGES 0x806D
561 #define GL_UNPACK_IMAGE_HEIGHT 0x806E
564 #ifndef GL_VERSION_1_4
565 #define GL_INCR_WRAP 0x8507
566 #define GL_DECR_WRAP 0x8508
569 #ifndef GL_VERSION_2_0
570 #define GL_FRAGMENT_SHADER 0x8B30
571 #define GL_VERTEX_SHADER 0x8B31
572 #define GL_FLOAT_VEC2 0x8B50
573 #define GL_FLOAT_VEC3 0x8B51
574 #define GL_FLOAT_VEC4 0x8B52
575 #define GL_INT_VEC2 0x8B53
576 #define GL_INT_VEC3 0x8B54
577 #define GL_INT_VEC4 0x8B55
578 #define GL_BOOL 0x8B56
579 #define GL_BOOL_VEC2 0x8B57
580 #define GL_BOOL_VEC3 0x8B58
581 #define GL_BOOL_VEC4 0x8B59
582 #define GL_FLOAT_MAT2 0x8B5A
583 #define GL_FLOAT_MAT3 0x8B5B
584 #define GL_FLOAT_MAT4 0x8B5C
585 #define GL_SAMPLER_1D 0x8B5D
586 #define GL_SAMPLER_2D 0x8B5E
587 #define GL_SAMPLER_3D 0x8B5F
588 #define GL_SAMPLER_CUBE 0x8B60
589 #define GL_COMPILE_STATUS 0x8B81
590 #define GL_LINK_STATUS 0x8B82
591 #define GL_INFO_LOG_LENGTH 0x8B84
592 #define GL_ACTIVE_UNIFORMS 0x8B86
593 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
594 #define GL_ACTIVE_ATTRIBUTES 0x8B89
595 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
599 #if !defined(QT_OPENGL_ES_2)
600 #define glProgramStringARB QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glProgramStringARB
601 #define glBindProgramARB QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glBindProgramARB
602 #define glDeleteProgramsARB QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glDeleteProgramsARB
603 #define glGenProgramsARB QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGenProgramsARB
604 #define glProgramLocalParameter4fvARB QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glProgramLocalParameter4fvARB
606 #define glActiveStencilFaceEXT QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glActiveStencilFaceEXT
608 #define glMultiTexCoord4f QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glMultiTexCoord4f
610 #define glActiveTexture QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glActiveTexture
611 #endif // !defined(QT_OPENGL_ES_2)
615 #if !defined(QT_OPENGL_ES_2)
616 #define glIsRenderbuffer QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glIsRenderbuffer
617 #define glBindRenderbuffer QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glBindRenderbuffer
618 #define glDeleteRenderbuffers QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glDeleteRenderbuffers
619 #define glGenRenderbuffers QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGenRenderbuffers
620 #define glRenderbufferStorage QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glRenderbufferStorage
621 #define glGetRenderbufferParameteriv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetRenderbufferParameteriv
622 #define glIsFramebuffer QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glIsFramebuffer
623 #define glBindFramebuffer QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glBindFramebuffer
624 #define glDeleteFramebuffers QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glDeleteFramebuffers
625 #define glGenFramebuffers QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGenFramebuffers
626 #define glCheckFramebufferStatus QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glCheckFramebufferStatus
627 #define glFramebufferTexture2D QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glFramebufferTexture2D
628 #define glFramebufferRenderbuffer QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glFramebufferRenderbuffer
629 #define glGetFramebufferAttachmentParameteriv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetFramebufferAttachmentParameteriv
630 #define glGenerateMipmap QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGenerateMipmap
631 #endif // QT_OPENGL_ES_2
632 #define glBlitFramebufferEXT QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glBlitFramebufferEXT
633 #define glRenderbufferStorageMultisampleEXT QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glRenderbufferStorageMultisampleEXT
637 #if !defined(QT_OPENGL_ES_2)
638 #define glBindBuffer QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glBindBuffer
639 #define glDeleteBuffers QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glDeleteBuffers
640 #define glGenBuffers QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGenBuffers
641 #define glBufferData QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glBufferData
643 #define glMapBufferARB QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glMapBufferARB
644 #define glUnmapBufferARB QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUnmapBufferARB
648 #if !defined(QT_OPENGL_ES_2)
650 #define glCreateShader QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glCreateShader
651 #define glShaderSource QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glShaderSource
652 #define glShaderBinary QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glShaderBinary
653 #define glCompileShader QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glCompileShader
654 #define glDeleteShader QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glDeleteShader
655 #define glIsShader QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glIsShader
657 #define glCreateProgram QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glCreateProgram
658 #define glAttachShader QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glAttachShader
659 #define glDetachShader QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glDetachShader
660 #define glLinkProgram QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glLinkProgram
661 #define glUseProgram QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUseProgram
662 #define glDeleteProgram QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glDeleteProgram
663 #define glIsProgram QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glIsProgram
665 #define glGetShaderInfoLog QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetShaderInfoLog
666 #define glGetShaderiv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetShaderiv
667 #define glGetShaderSource QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetShaderSource
668 #define glGetProgramiv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetProgramiv
669 #define glGetProgramInfoLog QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetProgramInfoLog
671 #define glGetUniformLocation QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetUniformLocation
672 #define glUniform4fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniform4fv
673 #define glUniform3fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniform3fv
674 #define glUniform2fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniform2fv
675 #define glUniform1fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniform1fv
676 #define glUniform1i QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniform1i
677 #define glUniform1iv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniform1iv
678 #define glUniformMatrix2fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix2fv
679 #define glUniformMatrix3fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix3fv
680 #define glUniformMatrix4fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix4fv
681 #define glUniformMatrix2x3fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix2x3fv
682 #define glUniformMatrix2x4fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix2x4fv
683 #define glUniformMatrix3x2fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix3x2fv
684 #define glUniformMatrix3x4fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix3x4fv
685 #define glUniformMatrix4x2fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix4x2fv
686 #define glUniformMatrix4x3fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glUniformMatrix4x3fv
688 #define glBindAttribLocation QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glBindAttribLocation
689 #define glGetAttribLocation QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetAttribLocation
690 #define glVertexAttrib1fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glVertexAttrib1fv
691 #define glVertexAttrib2fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glVertexAttrib2fv
692 #define glVertexAttrib3fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glVertexAttrib3fv
693 #define glVertexAttrib4fv QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glVertexAttrib4fv
694 #define glVertexAttribPointer QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glVertexAttribPointer
695 #define glDisableVertexAttribArray QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glDisableVertexAttribArray
696 #define glEnableVertexAttribArray QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glEnableVertexAttribArray
698 #else // QT_OPENGL_ES_2
700 #define glGetProgramBinaryOES QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glGetProgramBinaryOES
701 #define glProgramBinaryOES QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glProgramBinaryOES
703 #endif // QT_OPENGL_ES_2
706 #if !defined(QT_OPENGL_ES_2)
707 #define glStencilOpSeparate QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glStencilOpSeparate
710 #if defined(QT_OPENGL_ES_2)
711 #define glClearDepth glClearDepthf
714 extern bool qt_resolve_framebufferobject_extensions(QGLContext
*ctx
);
715 bool qt_resolve_buffer_extensions(QGLContext
*ctx
);
717 bool qt_resolve_version_1_3_functions(QGLContext
*ctx
);
718 bool qt_resolve_version_2_0_functions(QGLContext
*ctx
);
719 bool qt_resolve_stencil_face_extension(QGLContext
*ctx
);
720 bool qt_resolve_frag_program_extensions(QGLContext
*ctx
);
722 bool qt_resolve_glsl_extensions(QGLContext
*ctx
);
726 #endif // QGL_EXTENSIONS_P_H