Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/system/lib/gl/libprocaddr.c
6170 views
1
/*
2
* Copyright 2021 The Emscripten Authors. All rights reserved.
3
* Emscripten is available under two separate licenses, the MIT license and the
4
* University of Illinois/NCSA Open Source License. Both these licenses can be
5
* found in the LICENSE file.
6
*/
7
8
// GL proc address library integration
9
10
#if GL_ENABLE_GET_PROC_ADDRESS
11
12
extern void* emscripten_GetProcAddress(const char *name);
13
14
__attribute__((weak)) // SDL2 will link in its own version of this
15
void* SDL_GL_GetProcAddress(const char* name) {
16
return emscripten_GetProcAddress(name);
17
}
18
19
void* eglGetProcAddress(const char* name) {
20
return emscripten_GetProcAddress(name);
21
}
22
23
void* glfwGetProcAddress(const char* name) {
24
return emscripten_GetProcAddress(name);
25
}
26
27
#endif
28
29