From 5c43493183dfb919294f9960d06cf0c1ca22d3fe Mon Sep 17 00:00:00 2001 From: R cqls Date: Thu, 31 Mar 2022 15:52:21 +0200 Subject: [PATCH] sokol: add support for compiling with `-d darwin_sokol_glcore33` on macos (#13885) --- vlib/sokol/c/declaration.c.v | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vlib/sokol/c/declaration.c.v b/vlib/sokol/c/declaration.c.v index 7800269108..fb5d1b85fa 100644 --- a/vlib/sokol/c/declaration.c.v +++ b/vlib/sokol/c/declaration.c.v @@ -13,8 +13,12 @@ pub const ( #flag windows -lgdi32 // METAL $if macos { - #flag -DSOKOL_METAL - #flag -framework Metal -framework Cocoa -framework MetalKit -framework QuartzCore + $if darwin_sokol_glcore33 ? { + #flag darwin -DSOKOL_GLCORE33 -framework OpenGL -framework Cocoa -framework QuartzCore + } $else { + #flag -DSOKOL_METAL + #flag -framework Metal -framework Cocoa -framework MetalKit -framework QuartzCore + } } $if ios { #flag -DSOKOL_METAL