From 76a58c40db82e76f550ee7950bf06db2b7e3d08a Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 22 Feb 2022 13:09:30 -0800 Subject: [PATCH] macos: force pixel format without depth/stencil We don't need either depth or stencil buffers, so we want a pixel format without them so that things like glClear() can do less work. --- gdk/macos/gdkmacosglcontext.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c index 60e4436171..b062196ba8 100644 --- a/gdk/macos/gdkmacosglcontext.c +++ b/gdk/macos/gdkmacosglcontext.c @@ -330,6 +330,8 @@ create_pixel_format (int major, CGLPixelFormatAttribute attrs[] = { kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute)kCGLOGLPVersion_Legacy, kCGLPFAAllowOfflineRenderers, /* allow sharing across GPUs */ + kCGLPFADepthSize, 0, + kCGLPFAStencilSize, 0, kCGLPFAColorSize, 24, kCGLPFAAlphaSize, 8, 0 -- 2.30.2