From b8d762df97067dad4e9754230a8c450ed8f67fa0 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 8 Jul 2020 21:43:27 +0200 Subject: [PATCH] gg: use D3D and stb_truetype on Windows; --- thirdparty/fontstash/fontstash.h | 4 ++++ vlib/sokol/c/declaration.c.v | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/thirdparty/fontstash/fontstash.h b/thirdparty/fontstash/fontstash.h index 55cd1ce5a8..4d67e9717e 100644 --- a/thirdparty/fontstash/fontstash.h +++ b/thirdparty/fontstash/fontstash.h @@ -161,6 +161,10 @@ FONS_DEF void fonsDrawDebug(FONScontext* s, float x, float y); #define FONS_USE_FREETYPE #endif +#ifdef _WIN32 +#undef FONS_USE_FREETYPE +#endif + #ifdef FONS_USE_FREETYPE #include diff --git a/vlib/sokol/c/declaration.c.v b/vlib/sokol/c/declaration.c.v index 26f49edd6f..9b5143670a 100644 --- a/vlib/sokol/c/declaration.c.v +++ b/vlib/sokol/c/declaration.c.v @@ -18,9 +18,10 @@ pub const ( // OPENGL #flag linux -DSOKOL_GLCORE33 -#flag windows -DSOKOL_GLCORE33 //#flag darwin -framework OpenGL -framework Cocoa -framework QuartzCore +// D3D +#flag windows -DSOKOL_D3D11 // for simplicity, all header includes are here because import order matters and we dont have any way // to ensure import order with V yet