summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaglcontext.mm
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-06-21 13:39:26 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-06-21 14:02:22 +0200
commit176f30b13739b352cbe453cba7796d9a9c808bcd (patch)
tree8fa60b6ae4ef06455652863a0406bc5e86a22303 /src/plugins/platforms/cocoa/qcocoaglcontext.mm
parent272daebaa07b21e372ad4274fafb51ce0be92396 (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.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
index f9cda1bb37..ba8bd423a2 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
-QCocoaGLContext::QCocoaGLContext(const QGuiGLFormat &format, QPlatformGLContext *share)
+QCocoaGLContext::QCocoaGLContext(const QSurfaceFormat &format, QPlatformGLContext *share)
: m_format(format)
{
NSOpenGLPixelFormat *pixelFormat = createNSOpenGLPixelFormat();
@@ -16,22 +16,22 @@ QCocoaGLContext::QCocoaGLContext(const QGuiGLFormat &format, QPlatformGLContext
}
// Match up with createNSOpenGLPixelFormat!
-QGuiGLFormat QCocoaGLContext::format() const
+QSurfaceFormat QCocoaGLContext::format() const
{
return m_format;
}
-void QCocoaGLContext::swapBuffers(const QPlatformGLSurface &surface)
+void QCocoaGLContext::swapBuffers(QPlatformSurface *surface)
{
- QWindow *window = static_cast<const QCocoaGLSurface &>(surface).window;
+ QWindow *window = static_cast<QCocoaWindow *>(surface)->window();
setActiveWindow(window);
[m_context flushBuffer];
}
-bool QCocoaGLContext::makeCurrent(const QPlatformGLSurface &surface)
+bool QCocoaGLContext::makeCurrent(QPlatformSurface *surface)
{
- QWindow *window = static_cast<const QCocoaGLSurface &>(surface).window;
+ QWindow *window = static_cast<QCocoaWindow *>(surface)->window();
setActiveWindow(window);
[m_context makeCurrentContext];