[gtk/wip/chergert/macos-iosurface] macos: force pixel format without depth/stencil



commit 76a58c40db82e76f550ee7950bf06db2b7e3d08a
Author: Christian Hergert <christian hergert me>
Date:   Tue Feb 22 13:09:30 2022 -0800

    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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]