diff options
Diffstat (limited to 'src/gui/egl/qegl_p.h')
-rw-r--r-- | src/gui/egl/qegl_p.h | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 83bdb5e..4fc1338 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -55,6 +55,7 @@ QT_BEGIN_INCLUDE_NAMESPACE +#ifndef QT_NO_EGL #if defined(QT_OPENGL_ES_2) # include <GLES2/gl2.h> #endif @@ -64,6 +65,23 @@ QT_BEGIN_INCLUDE_NAMESPACE #else # include <EGL/egl.h> #endif +#else + +//types from egltypes.h for compiling stub without EGL headers +typedef int EGLBoolean; +typedef int EGLint; +typedef int EGLenum; +typedef int NativeDisplayType; +typedef void* NativeWindowType; +typedef void* NativePixmapType; +typedef int EGLDisplay; +typedef int EGLConfig; +typedef int EGLSurface; +typedef int EGLContext; +typedef int EGLClientBuffer; +#define EGL_NONE 0x3038 /* Attrib list terminator */ + +#endif #if defined(Q_WS_X11) // If <EGL/egl.h> included <X11/Xlib.h>, then the global namespace @@ -136,7 +154,13 @@ QT_BEGIN_NAMESPACE // Declare/define the bits of EGL_KHR_image_base we need: #if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_base) +#ifdef Q_OS_SYMBIAN +//symbian version of eglext.h differs from the khronos reference +typedef int EGLImageKHR; +#else typedef void *EGLImageKHR; +#endif + #define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) #define EGL_IMAGE_PRESERVED_KHR 0x30D2 #define EGL_KHR_image_base @@ -169,7 +193,7 @@ namespace QEgl { Translucent = 0x01, Renderable = 0x02 // Config will be compatable with the paint engines (VG or GL) }; - Q_DECLARE_FLAGS(ConfigOptions, ConfigOption); + Q_DECLARE_FLAGS(ConfigOptions, ConfigOption) // Most of the time we use the same config for things like widgets & pixmaps, so rather than // go through the eglChooseConfig loop every time, we use defaultConfig, which will return @@ -182,7 +206,11 @@ namespace QEgl { Q_GUI_EXPORT void dumpAllConfigs(); +#ifdef QT_NO_EGL + Q_GUI_EXPORT QString errorString(EGLint code = 0); +#else Q_GUI_EXPORT QString errorString(EGLint code = eglGetError()); +#endif Q_GUI_EXPORT QString extensions(); Q_GUI_EXPORT bool hasExtension(const char* extensionName); @@ -200,9 +228,9 @@ namespace QEgl { #ifdef Q_WS_X11 Q_GUI_EXPORT VisualID getCompatibleVisualId(EGLConfig config); #endif -}; +} -Q_DECLARE_OPERATORS_FOR_FLAGS(QEgl::ConfigOptions); +Q_DECLARE_OPERATORS_FOR_FLAGS(QEgl::ConfigOptions) QT_END_NAMESPACE |