summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
authorMorten Sorvig <morten.sorvig@nokia.com>2011-08-30 10:41:54 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-08-30 12:12:45 +0200
commitd610fbc13e589b36ce8f1e1af7166d215f0ccc90 (patch)
treea80f8345f7c155a5d875ab008c5966c77df0cabe /src/plugins/platforms/cocoa/qcocoawindow.mm
parent42f2da5e6b543e698fc4f036c45ebb15078409c8 (diff)
Cocoa: Make the hellowindow opengl example work.
You're not supposed to use NSOpenGLView and NSOpenGLContext at the same time - it's one or the other. Qmlscene worked because it was hitting the raster path that doesn't have a NSOpenGLView. Remove the NSOpenGLView path and m_windowSurfaceView. Change-Id: I10358851a94cd1780a312af09bbb7cf5db8f984f Reviewed-on: http://codereview.qt.nokia.com/3862 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index b7d7bd83bc..78785a8527 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -90,16 +90,6 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
m_contentView = [[QNSView alloc] initWithQWindow:tlw];
- if (tlw->surfaceType() == QWindow::OpenGLSurface) {
- NSRect glFrame = globalGeometry(window()->geometry());
- m_windowSurfaceView = [[NSOpenGLView alloc] initWithFrame : glFrame pixelFormat : QCocoaGLContext::createNSOpenGLPixelFormat() ];
- [m_contentView setAutoresizesSubviews : YES];
- [m_windowSurfaceView setAutoresizingMask : (NSViewWidthSizable | NSViewHeightSizable)];
- [m_contentView addSubview : m_windowSurfaceView];
- } else {
- m_windowSurfaceView = m_contentView;
- }
-
setGeometry(tlw->geometry());
[m_nsWindow setContentView:m_contentView];
@@ -166,11 +156,6 @@ NSView *QCocoaWindow::contentView() const
return [m_nsWindow contentView];
}
-NSView *QCocoaWindow::windowSurfaceView() const
-{
- return m_windowSurfaceView;
-}
-
void QCocoaWindow::windowDidMove()
{
if (m_glContext)