diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2013-04-04 09:37:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-05 00:14:37 +0200 |
commit | f46787b48a4452cc19ed4201cfc8cac7b7cddcfe (patch) | |
tree | 2fed0f0b5d49df584862a51738c6feab9bb1b10f /util | |
parent | 8d92244d802599871b573c8ce9adcda95c68e578 (diff) | |
download | qtbase-f46787b48a4452cc19ed4201cfc8cac7b7cddcfe.tar.gz qtbase-f46787b48a4452cc19ed4201cfc8cac7b7cddcfe.tar.bz2 qtbase-f46787b48a4452cc19ed4201cfc8cac7b7cddcfe.zip |
Bring glgen into line with OpenGL functions and extensions code
This ensures that glgen outputs exactly what is included in
src/gui/opengl/qopenglversionfunctions.*
src/gui/opengl/qopenglfunctions_*
src/openglextensions/*
Change-Id: I7d41d9fc2bf6e5fedf11f58872c079339dac3649
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/glgen/qopenglextensions.h.footer | 60 | ||||
-rw-r--r-- | util/glgen/qopenglextensions.h.header | 116 | ||||
-rw-r--r-- | util/glgen/qopenglversionfunctions.h.header | 7 | ||||
-rw-r--r-- | util/glgen/qopenglversionfunctions__VERSION__.h.footer | 2 | ||||
-rw-r--r-- | util/glgen/qopenglversionfunctions__VERSION__.h.header | 4 |
5 files changed, 40 insertions, 149 deletions
diff --git a/util/glgen/qopenglextensions.h.footer b/util/glgen/qopenglextensions.h.footer index b8a8e6f267..465b241c33 100644 --- a/util/glgen/qopenglextensions.h.footer +++ b/util/glgen/qopenglextensions.h.footer @@ -8,7 +8,7 @@ public: void (QOPENGLF_APIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image); }; -class Q_GUI_EXPORT QOpenGLExtension_OES_EGL_image : public QAbstractOpenGLExtension +class QOpenGLExtension_OES_EGL_image : public QAbstractOpenGLExtension { public: QOpenGLExtension_OES_EGL_image(); @@ -41,7 +41,7 @@ public: void (QOPENGLF_APIENTRYP ProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); }; -class Q_GUI_EXPORT QOpenGLExtension_OES_get_program_binary : public QAbstractOpenGLExtension +class QOpenGLExtension_OES_get_program_binary : public QAbstractOpenGLExtension { public: QOpenGLExtension_OES_get_program_binary(); @@ -75,7 +75,7 @@ public: void (QOPENGLF_APIENTRYP GetBufferPointervOES)(GLenum target, GLenum pname, GLvoid** params); }; -class Q_GUI_EXPORT QOpenGLExtension_OES_mapbuffer : public QAbstractOpenGLExtension +class QOpenGLExtension_OES_mapbuffer : public QAbstractOpenGLExtension { public: QOpenGLExtension_OES_mapbuffer(); @@ -119,7 +119,7 @@ public: void (QOPENGLF_APIENTRYP FramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); }; -class Q_GUI_EXPORT QOpenGLExtension_OES_texture_3D : public QAbstractOpenGLExtension +class QOpenGLExtension_OES_texture_3D : public QAbstractOpenGLExtension { public: QOpenGLExtension_OES_texture_3D(); @@ -182,7 +182,7 @@ public: GLboolean (QOPENGLF_APIENTRYP IsVertexArrayOES)(GLuint array); }; -class Q_GUI_EXPORT QOpenGLExtension_OES_vertex_array_object : public QAbstractOpenGLExtension +class QOpenGLExtension_OES_vertex_array_object : public QAbstractOpenGLExtension { public: QOpenGLExtension_OES_vertex_array_object(); @@ -238,7 +238,7 @@ public: void (QOPENGLF_APIENTRYP GetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); }; -class Q_GUI_EXPORT QOpenGLExtension_AMD_performance_monitor : public QAbstractOpenGLExtension +class QOpenGLExtension_AMD_performance_monitor : public QAbstractOpenGLExtension { public: QOpenGLExtension_AMD_performance_monitor(); @@ -333,7 +333,7 @@ public: void (QOPENGLF_APIENTRYP BlitFramebufferANGLE)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); }; -class Q_GUI_EXPORT QOpenGLExtension_ANGLE_framebuffer_blit : public QAbstractOpenGLExtension +class QOpenGLExtension_ANGLE_framebuffer_blit : public QAbstractOpenGLExtension { public: QOpenGLExtension_ANGLE_framebuffer_blit(); @@ -358,7 +358,7 @@ public: void (QOPENGLF_APIENTRYP RenderbufferStorageMultisampleANGLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); }; -class Q_GUI_EXPORT QOpenGLExtension_ANGLE_framebuffer_multisample : public QAbstractOpenGLExtension +class QOpenGLExtension_ANGLE_framebuffer_multisample : public QAbstractOpenGLExtension { public: QOpenGLExtension_ANGLE_framebuffer_multisample(); @@ -385,7 +385,7 @@ public: void (QOPENGLF_APIENTRYP VertexAttribDivisorANGLE)(GLuint index, GLuint divisor); }; -class Q_GUI_EXPORT QOpenGLExtension_ANGLE_instanced_arrays : public QAbstractOpenGLExtension +class QOpenGLExtension_ANGLE_instanced_arrays : public QAbstractOpenGLExtension { public: QOpenGLExtension_ANGLE_instanced_arrays(); @@ -424,7 +424,7 @@ public: void (QOPENGLF_APIENTRYP GetTranslatedShaderSourceANGLE)(GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); }; -class Q_GUI_EXPORT QOpenGLExtension_ANGLE_translated_shader_source : public QAbstractOpenGLExtension +class QOpenGLExtension_ANGLE_translated_shader_source : public QAbstractOpenGLExtension { public: QOpenGLExtension_ANGLE_translated_shader_source(); @@ -450,7 +450,7 @@ public: void (QOPENGLF_APIENTRYP ResolveMultisampleFramebufferAPPLE)(void); }; -class Q_GUI_EXPORT QOpenGLExtension_APPLE_framebuffer_multisample : public QAbstractOpenGLExtension +class QOpenGLExtension_APPLE_framebuffer_multisample : public QAbstractOpenGLExtension { public: QOpenGLExtension_APPLE_framebuffer_multisample(); @@ -483,7 +483,7 @@ public: void (QOPENGLF_APIENTRYP GetObjectLabelEXT)(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_debug_label : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_debug_label : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_debug_label(); @@ -517,7 +517,7 @@ public: void (QOPENGLF_APIENTRYP PopGroupMarkerEXT)(void); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_debug_marker : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_debug_marker : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_debug_marker(); @@ -556,7 +556,7 @@ public: void (QOPENGLF_APIENTRYP DiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_discard_framebuffer : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_discard_framebuffer : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_discard_framebuffer(); @@ -582,7 +582,7 @@ public: void (QOPENGLF_APIENTRYP FramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_multisampled_render_to_texture : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_multisampled_render_to_texture : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_multisampled_render_to_texture(); @@ -615,7 +615,7 @@ public: void (QOPENGLF_APIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_multi_draw_arrays : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_multi_draw_arrays : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_multi_draw_arrays(); @@ -653,7 +653,7 @@ public: void (QOPENGLF_APIENTRYP GetQueryObjectuivEXT)(GLuint id, GLenum pname, GLuint *params); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_occlusion_query_boolean : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_occlusion_query_boolean : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_occlusion_query_boolean(); @@ -723,7 +723,7 @@ public: void (QOPENGLF_APIENTRYP GetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint *params); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_robustness : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_robustness : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_robustness(); @@ -798,7 +798,7 @@ public: void (QOPENGLF_APIENTRYP GetProgramPipelineInfoLogEXT)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_separate_shader_objects : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_separate_shader_objects : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_separate_shader_objects(); @@ -1031,7 +1031,7 @@ public: void (QOPENGLF_APIENTRYP TextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); }; -class Q_GUI_EXPORT QOpenGLExtension_EXT_texture_storage : public QAbstractOpenGLExtension +class QOpenGLExtension_EXT_texture_storage : public QAbstractOpenGLExtension { public: QOpenGLExtension_EXT_texture_storage(); @@ -1092,7 +1092,7 @@ public: void (QOPENGLF_APIENTRYP FramebufferTexture2DMultisampleIMG)(GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); }; -class Q_GUI_EXPORT QOpenGLExtension_IMG_multisampled_render_to_texture : public QAbstractOpenGLExtension +class QOpenGLExtension_IMG_multisampled_render_to_texture : public QAbstractOpenGLExtension { public: QOpenGLExtension_IMG_multisampled_render_to_texture(); @@ -1125,7 +1125,7 @@ public: void (QOPENGLF_APIENTRYP CoverageOperationNV)(GLenum operation); }; -class Q_GUI_EXPORT QOpenGLExtension_NV_coverage_sample : public QAbstractOpenGLExtension +class QOpenGLExtension_NV_coverage_sample : public QAbstractOpenGLExtension { public: QOpenGLExtension_NV_coverage_sample(); @@ -1157,7 +1157,7 @@ public: void (QOPENGLF_APIENTRYP DrawBuffersNV)(GLsizei n, const GLenum *bufs); }; -class Q_GUI_EXPORT QOpenGLExtension_NV_draw_buffers : public QAbstractOpenGLExtension +class QOpenGLExtension_NV_draw_buffers : public QAbstractOpenGLExtension { public: QOpenGLExtension_NV_draw_buffers(); @@ -1188,7 +1188,7 @@ public: void (QOPENGLF_APIENTRYP SetFenceNV)(GLuint fence, GLenum condition); }; -class Q_GUI_EXPORT QOpenGLExtension_NV_fence : public QAbstractOpenGLExtension +class QOpenGLExtension_NV_fence : public QAbstractOpenGLExtension { public: QOpenGLExtension_NV_fence(); @@ -1255,7 +1255,7 @@ public: void (QOPENGLF_APIENTRYP ReadBufferNV)(GLenum mode); }; -class Q_GUI_EXPORT QOpenGLExtension_NV_read_buffer : public QAbstractOpenGLExtension +class QOpenGLExtension_NV_read_buffer : public QAbstractOpenGLExtension { public: QOpenGLExtension_NV_read_buffer(); @@ -1280,7 +1280,7 @@ public: void (QOPENGLF_APIENTRYP AlphaFuncQCOM)(GLenum func, GLclampf ref); }; -class Q_GUI_EXPORT QOpenGLExtension_QCOM_alpha_test : public QAbstractOpenGLExtension +class QOpenGLExtension_QCOM_alpha_test : public QAbstractOpenGLExtension { public: QOpenGLExtension_QCOM_alpha_test(); @@ -1308,7 +1308,7 @@ public: void (QOPENGLF_APIENTRYP DisableDriverControlQCOM)(GLuint driverControl); }; -class Q_GUI_EXPORT QOpenGLExtension_QCOM_driver_control : public QAbstractOpenGLExtension +class QOpenGLExtension_QCOM_driver_control : public QAbstractOpenGLExtension { public: QOpenGLExtension_QCOM_driver_control(); @@ -1361,7 +1361,7 @@ public: void (QOPENGLF_APIENTRYP ExtGetBufferPointervQCOM)(GLenum target, GLvoid **params); }; -class Q_GUI_EXPORT QOpenGLExtension_QCOM_extended_get : public QAbstractOpenGLExtension +class QOpenGLExtension_QCOM_extended_get : public QAbstractOpenGLExtension { public: QOpenGLExtension_QCOM_extended_get(); @@ -1438,7 +1438,7 @@ public: void (QOPENGLF_APIENTRYP ExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length); }; -class Q_GUI_EXPORT QOpenGLExtension_QCOM_extended_get2 : public QAbstractOpenGLExtension +class QOpenGLExtension_QCOM_extended_get2 : public QAbstractOpenGLExtension { public: QOpenGLExtension_QCOM_extended_get2(); @@ -1485,7 +1485,7 @@ public: void (QOPENGLF_APIENTRYP EndTilingQCOM)(GLbitfield preserveMask); }; -class Q_GUI_EXPORT QOpenGLExtension_QCOM_tiled_rendering : public QAbstractOpenGLExtension +class QOpenGLExtension_QCOM_tiled_rendering : public QAbstractOpenGLExtension { public: QOpenGLExtension_QCOM_tiled_rendering(); diff --git a/util/glgen/qopenglextensions.h.header b/util/glgen/qopenglextensions.h.header index 89e248fc33..b83b081166 100644 --- a/util/glgen/qopenglextensions.h.header +++ b/util/glgen/qopenglextensions.h.header @@ -51,9 +51,10 @@ #ifndef QOPENGLEXTENSIONS_H #define QOPENGLEXTENSIONS_H +#include <QtCore/qglobal.h> + #ifndef QT_NO_OPENGL -#include <QtCore/QtGlobal> #include <QtGui/qopengl.h> class QOpenGLContext; @@ -66,119 +67,6 @@ QT_BEGIN_NAMESPACE #pragma qt_sync_stop_processing #endif -#if !defined(QT_OPENGL_ES_2) -// This block is copied from glext.h and defines the types needed by -// a few extension classes. This may need updating in glgen when a new -// OpenGL release is made and this file is regenerated. - -#include <stddef.h> -#ifndef GL_VERSION_2_0 -/* GL type for program/shader text */ -typedef char GLchar; -#endif - -#ifndef GL_VERSION_1_5 -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptr; -typedef ptrdiff_t GLsizeiptr; -#endif - -#ifndef GL_ARB_vertex_buffer_object -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptrARB; -typedef ptrdiff_t GLsizeiptrARB; -#endif - -#ifndef GL_ARB_shader_objects -/* GL types for program/shader text and shader object handles */ -typedef char GLcharARB; -typedef unsigned int GLhandleARB; -#endif - -/* GL type for "half" precision (s10e5) float data in host memory */ -#ifndef GL_ARB_half_float_pixel -typedef unsigned short GLhalfARB; -#endif - -#ifndef GL_NV_half_float -typedef unsigned short GLhalfNV; -#endif - -#ifndef GLEXT_64_TYPES_DEFINED -/* This code block is duplicated in glxext.h, so must be protected */ -#define GLEXT_64_TYPES_DEFINED -/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ -/* (as used in the GL_EXT_timer_query extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include <inttypes.h> -#elif defined(__sun__) || defined(__digital__) -#include <inttypes.h> -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; -typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include <inttypes.h> -#elif defined(__SCO__) || defined(__USLC__) -#include <stdint.h> -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include <stdint.h> -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -/* Fallback if nothing above works */ -#include <inttypes.h> -#endif -#endif - -#ifndef GL_EXT_timer_query -typedef int64_t GLint64EXT; -typedef uint64_t GLuint64EXT; -#endif - -#ifndef GL_ARB_sync -typedef int64_t GLint64; -typedef uint64_t GLuint64; -typedef struct __GLsync *GLsync; -#endif - -#ifndef GL_ARB_cl_event -/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */ -struct _cl_context; -struct _cl_event; -#endif - -#ifndef GL_ARB_debug_output -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#endif - -#ifndef GL_AMD_debug_output -typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#endif - -#ifndef GL_KHR_debug -typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#endif - -#ifndef GL_NV_vdpau_interop -typedef GLintptr GLvdpauSurfaceNV; -#endif - -// End of block copied from glext.h -#endif - -struct QOpenGLFunctionsPrivate; class QAbstractOpenGLExtensionPrivate { diff --git a/util/glgen/qopenglversionfunctions.h.header b/util/glgen/qopenglversionfunctions.h.header index 3bd28fc52d..69cdaf3728 100644 --- a/util/glgen/qopenglversionfunctions.h.header +++ b/util/glgen/qopenglversionfunctions.h.header @@ -51,17 +51,18 @@ #ifndef QOPENGLVERSIONFUNCTIONS_H #define QOPENGLVERSIONFUNCTIONS_H +#include <QtCore/qglobal.h> + #ifndef QT_NO_OPENGL -#include <QtCore/QtGlobal> #include <QtCore/qhash.h> #include <QtCore/qpair.h> #include <QtGui/qopengl.h> -class QOpenGLContext; - QT_BEGIN_NAMESPACE +class QOpenGLContext; + #if 0 // silence syncqt warnings #pragma qt_class(QOpenGLVersionFunctions) diff --git a/util/glgen/qopenglversionfunctions__VERSION__.h.footer b/util/glgen/qopenglversionfunctions__VERSION__.h.footer index 02db4d3a13..b81155c102 100644 --- a/util/glgen/qopenglversionfunctions__VERSION__.h.footer +++ b/util/glgen/qopenglversionfunctions__VERSION__.h.footer @@ -1,6 +1,6 @@ QT_END_NAMESPACE -#endif // QT_NO_OPENGL +#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif diff --git a/util/glgen/qopenglversionfunctions__VERSION__.h.header b/util/glgen/qopenglversionfunctions__VERSION__.h.header index b3d097c2f9..4b30dc1b65 100644 --- a/util/glgen/qopenglversionfunctions__VERSION__.h.header +++ b/util/glgen/qopenglversionfunctions__VERSION__.h.header @@ -51,7 +51,9 @@ #ifndef QOPENGLVERSIONFUNCTIONS__VERSION___H #define QOPENGLVERSIONFUNCTIONS__VERSION___H -#ifndef QT_NO_OPENGL +#include <QtCore/qglobal.h> + +#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2) #include <QtGui/QOpenGLVersionFunctions> #include <QtGui/qopenglcontext.h> |