diff --git a/system/lib/gl/gl.c b/system/lib/gl/gl.c index 3465f3f429b3..88a90b2b83a5 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()