From e7d3088d714e5d19aa4a1bab1e375d7d4e537907 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 27 Mar 2014 13:44:26 -0700 Subject: [PATCH] win32: Add support for wglUseFontBitmaps(). Fixes #10. --- include/epoxy/wgl.h | 6 ++++++ src/gen_dispatch.py | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/include/epoxy/wgl.h b/include/epoxy/wgl.h index 026d052..2c4682f 100644 --- a/include/epoxy/wgl.h +++ b/include/epoxy/wgl.h @@ -46,6 +46,12 @@ extern "C" { #define __wglxext_h_ #endif +#ifdef UNICODE +#define wglUseFontBitmaps wglUseFontBitmapsW +#else +#define wglUseFontBitmaps wglUseFontBitmapsA +#endif + #include "epoxy/wgl_generated.h" bool epoxy_has_wgl_extension(HDC hdc, const char *extension); diff --git a/src/gen_dispatch.py b/src/gen_dispatch.py index ecf45f1..6aba85d 100755 --- a/src/gen_dispatch.py +++ b/src/gen_dispatch.py @@ -855,7 +855,14 @@ for file in args.files: name = os.path.basename(file).split('.xml')[0] generator = Generator(name) generator.parse(file) + generator.drop_weird_glx_functions() + + # This is an ANSI vs Unicode function, handled specially by + # include/epoxy/wgl.h + if 'wglUseFontBitmaps' in generator.functions: + del generator.functions['wglUseFontBitmaps'] + generator.sort_functions() generator.resolve_aliases() generator.fixup_bootstrap_function('glGetString',