From fe8421d5dc7fc9e70c082293983d386f9ebd15e5 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 1 Feb 2024 21:49:18 +0000 Subject: [PATCH] Avoid redundant function declarations in gl.c. NFC (#21237) --- system/lib/gl/gl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/system/lib/gl/gl.c b/system/lib/gl/gl.c index 3465f3f429b39..88a90b2b83a50 100644 --- a/system/lib/gl/gl.c +++ b/system/lib/gl/gl.c @@ -5,28 +5,24 @@ * found in the LICENSE file. */ +#if GL_ENABLE_GET_PROC_ADDRESS + // GL proc address retrieval #include #include #include +#include #define GL_GLEXT_PROTOTYPES #include #include +#ifdef LEGACY_GL_EMULATION + #include #include "webgl_internal_funcs.h" -#if GL_ENABLE_GET_PROC_ADDRESS - -extern void *emscripten_webgl1_get_proc_address(const char *name); -extern void *_webgl1_match_ext_proc_address_without_suffix(const char *name); -extern void *emscripten_webgl2_get_proc_address(const char *name); -extern void *_webgl2_match_ext_proc_address_without_suffix(const char *name); - -#ifdef LEGACY_GL_EMULATION - #define RETURN_GL_EMU_FN(functionName) if (!strcmp(name, #functionName)) return emscripten_##functionName; void* emscripten_legacy_gl_emulation_GetProcAddress(const char *name) { @@ -244,6 +240,9 @@ for line in open('a').readlines(): } #endif +void *_webgl1_match_ext_proc_address_without_suffix(const char *name); +void *_webgl2_match_ext_proc_address_without_suffix(const char *name); + // "Sloppy" desktop OpenGL/mobile GLES emulating // behavior: different functionality is available under // different vendor suffixes. In emscripten_GetProcAddress()