Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support clients defining weak symbols of opengx functions (#70)
With this change, the translation unit (TU) of functions.c gets brought into the list of units used in the linking when gc_gl.c's TU is used, as confirmed by nm: functions.o: ... 00000000 B _ogx_functions_c 00000000 T ogx_get_proc_address ... gc_gl.o: ... 00000000 D _ogx_force_proctable U _ogx_functions_c 00000000 T ogx_initialize ... As the comment in the code explains it, this allows us to support the scenario where we use opengx in a client library (such as SDL) without forcing a dependency on it in the client application. More precisely, this change is made to support the case where an application *does use* opengx via libSDL, to make so that the weak symbol for ogx_get_proc_address() defined in libSDL gets overridden by the real one (since the application is unlikely to use this function directly, but it's indirectly used when SDL_GL_GetProcAddress() is called).
- Loading branch information