Ignoring the fact that there appears to be no place to post desktop OpenGL questions:
I have an OpenGL context that is triple buffered via the : NSOpenGLPFATripleBuffer flag and I am driving my rendering via a CVDisplaylink set up for the CGDisplayID my content is displayed on - my understanding of Triple Buffered contexts is that you forgoe the need for vertical sync.
However, I am seeing tearing.
My Pixel format (legacy OpenGL, to be clear)
:
/
NSOpenGLPixelFormatAttribute attributes[] =
{
NSOpenGLPFAScreenMask, 0,
NSOpenGLPFAAccelerated,
NSOpenGLPFAAcceleratedCompute,
NSOpenGLPFAColorSize, 24,
NSOpenGLPFADepthSize, 16,
NSOpenGLPFATripleBuffer,
(NSOpenGLPixelFormatAttribute) 0
};
if(selectedScreen)
{
NSNumber* displayNumber = [selectedScreen deviceDescription][@"NSScreenNumber"];
CGDirectDisplayID displayID = [displayNumber unsignedIntValue];
CGOpenGLDisplayMask openGLDisplayMask = CGDisplayIDToOpenGLDisplayMask(displayID);
/
attributes[1] = openGLDisplayMask;
}
NSOpenGLPixelFormat* format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
if(format)
{
self.context = [[NSOpenGLContext alloc] initWithFormat:format shareContext:nil];
self.context.view = self.mainOpenGLView;
/
GLint swap = 0;
[self.context setValues:&swap forParameter:NSOpenGLCPSwapInterval];
}
I am running on OS X 10.10.3 on a Retina Macbook Pro with an NV 750
Thank you.