src/opengl/qgl_p.h
changeset 37 758a864f9613
parent 33 3e2da88830cd
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   165                        , wsurf(0)
   165                        , wsurf(0)
   166 #endif
   166 #endif
   167 #if defined(Q_WS_X11) && !defined(QT_NO_EGL)
   167 #if defined(Q_WS_X11) && !defined(QT_NO_EGL)
   168                        , eglSurfaceWindowId(0)
   168                        , eglSurfaceWindowId(0)
   169 #endif
   169 #endif
       
   170 #if defined(Q_OS_SYMBIAN)
       
   171                        , eglSurfaceWindowId(0)
       
   172 #endif
   170     {
   173     {
   171         isGLWidget = 1;
   174         isGLWidget = 1;
   172     }
   175     }
   173 
   176 
   174     ~QGLWidgetPrivate() {}
   177     ~QGLWidgetPrivate() {}
   205 #elif defined(Q_WS_MAC)
   208 #elif defined(Q_WS_MAC)
   206     QGLContext *olcx;
   209     QGLContext *olcx;
   207     void updatePaintDevice();
   210     void updatePaintDevice();
   208 #elif defined(Q_WS_QWS)
   211 #elif defined(Q_WS_QWS)
   209     QWSGLWindowSurface *wsurf;
   212     QWSGLWindowSurface *wsurf;
       
   213 #endif
       
   214 #ifdef Q_OS_SYMBIAN
       
   215     void recreateEglSurface();
       
   216     WId eglSurfaceWindowId;
   210 #endif
   217 #endif
   211 };
   218 };
   212 
   219 
   213 class QGLContextResource;
   220 class QGLContextResource;
   214 class QGLSharedResourceGuard;
   221 class QGLSharedResourceGuard;
   275         NPOTTextures            = 0x00002000,
   282         NPOTTextures            = 0x00002000,
   276         BGRATextureFormat       = 0x00004000,
   283         BGRATextureFormat       = 0x00004000,
   277         DDSTextureCompression   = 0x00008000,
   284         DDSTextureCompression   = 0x00008000,
   278         ETC1TextureCompression  = 0x00010000,
   285         ETC1TextureCompression  = 0x00010000,
   279         PVRTCTextureCompression = 0x00020000,
   286         PVRTCTextureCompression = 0x00020000,
   280         FragmentShader          = 0x00040000
   287         FragmentShader          = 0x00040000,
       
   288         ES2Compatibility        = 0x00080000
   281     };
   289     };
   282     Q_DECLARE_FLAGS(Extensions, Extension)
   290     Q_DECLARE_FLAGS(Extensions, Extension)
   283 
   291 
   284     static Extensions glExtensions();
   292     static Extensions glExtensions();
   285     static Extensions currentContextExtensions();
   293     static Extensions currentContextExtensions();
   391     // workarounds for driver/hw bugs on different platforms
   399     // workarounds for driver/hw bugs on different platforms
   392     uint workaround_needsFullClearOnEveryFrame : 1;
   400     uint workaround_needsFullClearOnEveryFrame : 1;
   393     uint workaround_brokenFBOReadBack : 1;
   401     uint workaround_brokenFBOReadBack : 1;
   394     uint workaroundsCached : 1;
   402     uint workaroundsCached : 1;
   395 
   403 
       
   404     uint workaround_brokenTextureFromPixmap : 1;
       
   405     uint workaround_brokenTextureFromPixmap_init : 1;
       
   406 
   396     QPaintDevice *paintDevice;
   407     QPaintDevice *paintDevice;
   397     QColor transpColor;
   408     QColor transpColor;
   398     QGLContext *q_ptr;
   409     QGLContext *q_ptr;
   399     QGLFormat::OpenGLVersionFlags version_flags;
   410     QGLFormat::OpenGLVersionFlags version_flags;
   400     QGLExtensions::Extensions extension_flags;
   411     QGLExtensions::Extensions extension_flags;
   412 
   423 
   413 #ifdef Q_WS_WIN
   424 #ifdef Q_WS_WIN
   414     static inline QGLExtensionFuncs& extensionFuncs(const QGLContext *ctx) { return ctx->d_ptr->group->extensionFuncs(); }
   425     static inline QGLExtensionFuncs& extensionFuncs(const QGLContext *ctx) { return ctx->d_ptr->group->extensionFuncs(); }
   415 #endif
   426 #endif
   416 
   427 
   417 #if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS)
   428 #if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
   418     static QGLExtensionFuncs qt_extensionFuncs;
   429     static QGLExtensionFuncs qt_extensionFuncs;
   419     static Q_OPENGL_EXPORT QGLExtensionFuncs& extensionFuncs(const QGLContext *);
   430     static Q_OPENGL_EXPORT QGLExtensionFuncs& extensionFuncs(const QGLContext *);
   420 #endif
   431 #endif
   421 
   432 
   422     static void setCurrentContext(QGLContext *context);
   433     static void setCurrentContext(QGLContext *context);