Enable multisampling and swap interval by default on cocoa

Change-Id: If3d1939e6196f5aa6654645d20dab7ad251046fa
Reviewed-on: http://codereview.qt.nokia.com/3138
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
bb10
Gunnar Sletta 2011-08-18 08:23:15 +02:00 committed by Morten Johan Sørvig
parent 48ba733fcf
commit 6136a792bc
2 changed files with 7 additions and 0 deletions

View File

@ -87,6 +87,9 @@ void *qcgl_createNSOpenGLPixelFormat()
{
NSOpenGLPFADoubleBuffer,
NSOpenGLPFADepthSize, 32,
NSOpenGLPFAMultisample,
NSOpenGLPFASampleBuffers, (NSOpenGLPixelFormatAttribute)1,
NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute) 8,
0
};

View File

@ -17,6 +17,10 @@ QCocoaGLContext::QCocoaGLContext(const QSurfaceFormat &format, QPlatformGLContex
m_context = [NSOpenGLContext alloc];
[m_context initWithFormat:pixelFormat shareContext:actualShare];
const GLint interval = 1;
[m_context setValues:&interval forParameter:NSOpenGLCPSwapInterval];
}
// Match up with createNSOpenGLPixelFormat!