File indexing completed on 2025-01-18 10:08:00
0001
0002
0003
0004 #ifndef QOPENGL_H
0005 #define QOPENGL_H
0006
0007 #include <QtGui/qtguiglobal.h>
0008
0009 #ifndef QT_NO_OPENGL
0010
0011
0012
0013
0014 #if defined(Q_OS_WIN)
0015 # ifndef APIENTRY
0016 # define APIENTRY __stdcall
0017 # define Q_UNDEF_APIENTRY
0018 # endif
0019 # ifndef WINGDIAPI
0020 # define WINGDIAPI __declspec(dllimport)
0021 # define Q_UNDEF_WINGDIAPI
0022 # endif
0023 # define QT_APIENTRY __stdcall
0024 #endif
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #if QT_CONFIG(opengles2)
0041 # if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
0042 # if QT_CONFIG(opengles3)
0043 # include <OpenGLES/ES3/gl.h>
0044 # include <OpenGLES/ES3/glext.h>
0045 # else
0046 # include <OpenGLES/ES2/gl.h>
0047 # include <OpenGLES/ES2/glext.h>
0048 # endif
0049
0050
0051
0052
0053
0054
0055
0056 typedef void* GLeglImageOES;
0057
0058 # elif !defined(Q_OS_DARWIN)
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073 # ifndef GL_GLEXT_PROTOTYPES
0074 # define GL_GLEXT_PROTOTYPES
0075 # define QGL_TEMP_GLEXT_PROTO
0076 # endif
0077
0078 # if QT_CONFIG(opengles32)
0079 # include <GLES3/gl32.h>
0080 # elif QT_CONFIG(opengles31)
0081 # include <GLES3/gl31.h>
0082 # elif QT_CONFIG(opengles3)
0083 # include <GLES3/gl3.h>
0084 # else
0085 # include <GLES2/gl2.h>
0086 # endif
0087
0088 # ifdef QGL_TEMP_GLEXT_PROTO
0089 # undef GL_GLEXT_PROTOTYPES
0090 # undef QGL_TEMP_GLEXT_PROTO
0091 # endif
0092
0093
0094
0095
0096
0097
0098
0099 typedef char GLchar;
0100
0101 # include <QtGui/qopengles2ext.h>
0102 # endif
0103 #else
0104 # if defined(Q_OS_MACOS)
0105 # include <OpenGL/gl.h>
0106 # define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
0107 # include <OpenGL/gl3.h>
0108 # include <OpenGL/glext.h>
0109 # else
0110 # define GL_GLEXT_LEGACY
0111
0112
0113 # ifndef GL_GLEXT_PROTOTYPES
0114 # define GL_GLEXT_PROTOTYPES
0115 # include <GL/gl.h>
0116 # undef GL_GLEXT_PROTOTYPES
0117 # else
0118 # include <GL/gl.h>
0119 # endif
0120 # include <QtGui/qopenglext.h>
0121 # endif
0122 #endif
0123
0124
0125 #if !QT_CONFIG(opengles2)
0126 #define QT_OPENGL_3
0127 #define QT_OPENGL_3_2
0128 #define QT_OPENGL_4
0129 # if !defined(Q_OS_MAC)
0130 # define QT_OPENGL_4_3
0131 # endif
0132 #endif
0133
0134
0135
0136
0137 #if !QT_CONFIG(opengles2)
0138
0139
0140
0141 #ifndef QT_APIENTRY
0142 #define QT_APIENTRY
0143 #endif
0144 #ifndef QT_APIENTRYP
0145 #define QT_APIENTRYP QT_APIENTRY *
0146 #endif
0147 #ifndef GLAPI
0148 #define GLAPI extern
0149 #endif
0150
0151
0152
0153
0154
0155 #include <stddef.h>
0156 #ifndef GL_VERSION_2_0
0157
0158 typedef char GLchar;
0159 #endif
0160
0161 #ifndef GL_VERSION_1_5
0162
0163 typedef ptrdiff_t GLintptr;
0164 typedef ptrdiff_t GLsizeiptr;
0165 #endif
0166
0167 #ifndef GL_ARB_vertex_buffer_object
0168
0169 typedef ptrdiff_t GLintptrARB;
0170 typedef ptrdiff_t GLsizeiptrARB;
0171 #endif
0172
0173 #ifndef GL_ARB_shader_objects
0174
0175 typedef char GLcharARB;
0176 # ifdef Q_OS_DARWIN
0177 typedef void *GLhandleARB;
0178 # else
0179 typedef unsigned int GLhandleARB;
0180 # endif
0181 #endif
0182
0183
0184 #ifndef GL_ARB_half_float_pixel
0185 typedef unsigned short GLhalfARB;
0186 #endif
0187
0188 #ifndef GL_NV_half_float
0189 typedef unsigned short GLhalfNV;
0190 #endif
0191
0192 #ifndef GLEXT_64_TYPES_DEFINED
0193
0194 #define GLEXT_64_TYPES_DEFINED
0195
0196
0197 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
0198 #include <inttypes.h>
0199 #elif defined(__sun__) || defined(__digital__)
0200 #include <inttypes.h>
0201 #if defined(__STDC__)
0202 #if defined(__arch64__) || defined(_LP64)
0203 typedef long int int64_t;
0204 typedef unsigned long int uint64_t;
0205 #else
0206 typedef long long int int64_t;
0207 typedef unsigned long long int uint64_t;
0208 #endif
0209 #endif
0210 #elif defined(__UNIXOS2__) || defined(__SOL64__)
0211 typedef long int int32_t;
0212 typedef long long int int64_t;
0213 typedef unsigned long long int uint64_t;
0214 #elif defined(_WIN32) && (defined(__GNUC__) || defined(_MSC_VER))
0215 #include <stdint.h>
0216 #elif defined(_WIN32)
0217 typedef __int32 int32_t;
0218 typedef __int64 int64_t;
0219 typedef unsigned __int64 uint64_t;
0220 #else
0221
0222 #include <inttypes.h>
0223 #endif
0224 #endif
0225
0226 #ifndef GL_EXT_timer_query
0227 typedef int64_t GLint64EXT;
0228 typedef uint64_t GLuint64EXT;
0229 #endif
0230
0231 #ifndef GL_ARB_sync
0232 typedef int64_t GLint64;
0233 typedef uint64_t GLuint64;
0234 typedef struct __GLsync *GLsync;
0235 #endif
0236
0237 #ifndef GL_ARB_cl_event
0238
0239 struct _cl_context;
0240 struct _cl_event;
0241 #endif
0242
0243 #ifndef GL_ARB_debug_output
0244 typedef void (QT_APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam);
0245 #endif
0246
0247 #ifndef GL_AMD_debug_output
0248 typedef void (QT_APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
0249 #endif
0250
0251 #ifndef GL_KHR_debug
0252 typedef void (QT_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam);
0253 #endif
0254
0255 #ifndef GL_NV_vdpau_interop
0256 typedef GLintptr GLvdpauSurfaceNV;
0257 #endif
0258
0259
0260 #endif
0261
0262 QT_BEGIN_NAMESPACE
0263
0264
0265 typedef ptrdiff_t qopengl_GLintptr;
0266 typedef ptrdiff_t qopengl_GLsizeiptr;
0267
0268
0269 #if defined(QT_APIENTRY) && !defined(QOPENGLF_APIENTRY)
0270 # define QOPENGLF_APIENTRY QT_APIENTRY
0271 #endif
0272
0273 # ifndef QOPENGLF_APIENTRYP
0274 # ifdef QOPENGLF_APIENTRY
0275 # define QOPENGLF_APIENTRYP QOPENGLF_APIENTRY *
0276 # else
0277 # define QOPENGLF_APIENTRY
0278 # define QOPENGLF_APIENTRYP *
0279 # endif
0280 # endif
0281
0282 QT_END_NAMESPACE
0283
0284 #ifdef Q_UNDEF_WINGDIAPI
0285 # undef WINGDIAPI
0286 # undef Q_UNDEF_WINGDIAPI
0287 #endif
0288 #ifdef Q_UNDEF_APIENTRY
0289 # undef APIENTRY
0290 # undef Q_UNDEF_APIENTRY
0291 #endif
0292
0293 #endif
0294
0295 #endif