diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-06-21 13:39:26 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-06-21 14:02:22 +0200 |
commit | 176f30b13739b352cbe453cba7796d9a9c808bcd (patch) | |
tree | 8fa60b6ae4ef06455652863a0406bc5e86a22303 /src/plugins/platforms/cocoa/qcocoaglcontext.h | |
parent | 272daebaa07b21e372ad4274fafb51ce0be92396 (diff) |
OpenGL API refactor.
Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of
QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of
having QPlatformGLSurface accessor in QWindow.
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.h b/src/plugins/platforms/cocoa/qcocoaglcontext.h index 01d931b662..9af931bf6c 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.h +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.h @@ -10,28 +10,16 @@ QT_BEGIN_NAMESPACE -class QCocoaGLSurface : public QPlatformGLSurface -{ -public: - QCocoaGLSurface(const QGuiGLFormat &format, QWindow *window) - : QPlatformGLSurface(format) - , window(window) - { - } - - QWindow *window; -}; - class QCocoaGLContext : public QPlatformGLContext { public: - QCocoaGLContext(const QGuiGLFormat &format, QPlatformGLContext *share); + QCocoaGLContext(const QSurfaceFormat &format, QPlatformGLContext *share); - QGuiGLFormat format() const; + QSurfaceFormat format() const; - void swapBuffers(const QPlatformGLSurface &surface); + void swapBuffers(QPlatformSurface *surface); - bool makeCurrent(const QPlatformGLSurface &surface); + bool makeCurrent(QPlatformSurface *surface); void doneCurrent(); void (*getProcAddress(const QByteArray &procName)) (); @@ -45,7 +33,7 @@ private: void setActiveWindow(QWindow *window); NSOpenGLContext *m_context; - QGuiGLFormat m_format; + QSurfaceFormat m_format; QWeakPointer<QWindow> m_currentWindow; }; |