Skip to content

Commit

Permalink
Document
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Mar 21, 2024
1 parent c78e816 commit ece1929
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ HcGlSwapBuffersPtr hcGlSwapBuffers = NULL;
HcGlGetProcAddressPtr hcGlGetProcAddress = NULL;
HcSetCallbacksPtr hcSetCallbacks = NULL;

/**
The frontend will call this function with a pointer that can load the function pointers.
This is pretty much what happens when you use a loader in OpenGL to load the function pointers,
for example gladLoadGLLoader where you pass something like SDL_GL_GetProcAddress or glfwGetProcAddress etc.
*/
HYDRA_API_EXPORT HYDRA_API_ATTR HcResult HYDRA_API_CALL hcInternalLoadFunctions(void*(*loadFunctionPtr)(const char*)) {
if (!loadFunctionPtr) {
return HC_INTERNAL_ERROR_BAD_LOADFUNCTIONPTR;
Expand Down

0 comments on commit ece1929

Please sign in to comment.