macos: force pixel format without depth/stencil
authorChristian Hergert <christian@hergert.me>
Tue, 22 Feb 2022 21:09:30 +0000 (13:09 -0800)
committerChristian Hergert <christian@hergert.me>
Tue, 22 Feb 2022 21:09:30 +0000 (13:09 -0800)
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

index 60e4436171ae04957d0f90db9496beb43a9a274d..b062196ba8e7471c045df607b47ab3f584259573 100644 (file)
@@ -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