gl_cocoa: use triple buffering
authorJean Guyomarc'h <jean@guyomarch.bzh>
Wed, 8 Mar 2017 23:31:51 +0000 (00:31 +0100)
committerJean Guyomarc'h <jean@guyomarch.bzh>
Wed, 8 Mar 2017 23:57:56 +0000 (00:57 +0100)
Interestingly enough, this makes some graphical artifacts vanish...

src/modules/evas/engines/gl_cocoa/evas_outbuf.m

index 4a8e176..80f5794 100644 (file)
@@ -30,7 +30,7 @@ static int _win_count = 0;
 {
    const NSOpenGLPixelFormatAttribute attributes[] = {
       NSOpenGLPFAAccelerated,
-      NSOpenGLPFADoubleBuffer,
+      NSOpenGLPFATripleBuffer,
       0 /* Terminator */
    };
    return [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease];
@@ -117,7 +117,7 @@ evas_outbuf_new(Evas_Engine_Info_GL_Cocoa *info,
    ob->info = info;
    ob->ns_window = info->window;
    ob->rot = 0;
-   ob->swap_mode = MODE_DOUBLE;
+   ob->swap_mode = MODE_TRIPLE;
 
    glview = [[EvasGLView alloc] initWithFrame: NSMakeRect(0, 0, w, h)];
    if (EINA_UNLIKELY(!glview))