Search code examples
macosopenglopengl-4

Upgrading project to OpenGL 4.1 on OSX - Using NSOpenGLProfileVersion4_1Core makes rendering slow


I'm trying to update an OSX OpenGL project to OpenGL 4.1. My shaders use #version 410 and everything is working and pretty snappy. Today I noticed that there's a new NSOpenGLPFAOpenGLProfile value for 4.1, so I updated the pixel format profile from NSOpenGLProfileVersion3_2Core to NSOpenGLProfileVersion4_1Core, and now rendering is insanely slow. My pixel format initialization code looks like this:

NSOpenGLPixelFormatAttribute attrs[] =
{
    NSOpenGLPFADoubleBuffer,
    NSOpenGLPFADepthSize, 24,
    NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core,
    0
};

NSOpenGLPixelFormat *pf =
    [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];

Anybody know why this would be so much slower - Is there something else I need to update?


Solution

  • Using NSOpenGLProfileVersion4_1Core on Mavericks causes a full software fallback. This is not an issue on Yosemite.