From 54df26232c851e0d3897d94b6c58798922c9d610 Mon Sep 17 00:00:00 2001 From: Martin Fouilleul Date: Thu, 16 Feb 2023 15:16:51 +0100 Subject: [PATCH] [wip, opengl] include gl headers in generated glapi files --- ext/glapi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/glapi.py b/ext/glapi.py index c2bf1b2..38f2a4a 100644 --- a/ext/glapi.py +++ b/ext/glapi.py @@ -83,7 +83,8 @@ f = open(apiPath, 'w') emit_doc(f, apiName, '.h') emit_begin_guard(f, apiName) -f.write('#include"GL/glcorearb.h"\n\n') +f.write('#include"GL/glcorearb.h"\n') +f.write('#include"GLES3/gl32.h"\n\n') # generate interface struct f.write('typedef struct mg_gl\n{\n') @@ -95,7 +96,7 @@ f.write('} mg_gl;\n\n') f.write('extern mp_thread_local mg_gl* __mgGLAPI;\n\n'); # generate interface macros - +# TODO guard for different api/versions and only #define functions present in desired version for func in glall: f.write('#define ' + func + ' __mgGLAPI->' + remove_prefix(func, 'gl') + '\n')