src/GLdispatch/GLdispatch.c
int RegisterStubCallbacks(const __GLdispatchStubPatchCallbacks *callbacks)
{
    if (callbacks == NULL) {
        return -1;
    }

    __GLdispatchStubCallback *stub = malloc(sizeof(*stub));
    if (stub == NULL) {
        return -1;
    }

    memcpy(&stub->callbacks, callbacks, sizeof(__GLdispatchStubPatchCallbacks));
    stub->isPatched = GL_FALSE;

    stub->id = nextDispatchStubID++;
    glvnd_list_add(&stub->entry, &dispatchStubList);
    dispatchStubListGeneration++;

    return stub->id;
}
/**
 * Does the same thing as __glDispatchRegisterStubCallbacks, but requires the
 * caller to already be holding the dispatch lock.
 *
 * This is used in __glDispatchInit to register the libGLdispatch's own stub
 * functions.
 */
Does the same thing as __glDispatchRegisterStubCallbacks, but requires the
caller to already be holding the dispatch lock.

This is used in __glDispatchInit to register the libGLdispatch's own stub
functions.
Does the same thing as __glDispatchRegisterStubCallbacks but requires the caller to already be holding the dispatch lock . This is used in __glDispatchInit to register the libGLdispatch ' s own stub functions .
int RegisterStubCallbacks(const __GLdispatchStubPatchCallbacks *callbacks)
{
    if (callbacks == NULL) {
        return -1;
    }
    __GLdispatchStubCallback *stub = malloc(sizeof(*stub));
    if (stub == NULL) {
        return -1;
    }
    memcpy(&stub->callbacks, callbacks, sizeof(__GLdispatchStubPatchCallbacks));
    stub->isPatched = GL_FALSE;
    stub->id = nextDispatchStubID++;
    glvnd_list_add(&stub->entry, &dispatchStubList);
    dispatchStubListGeneration++;
    return stub->id;
}
int RegisterStubCallbacks ( const __GLdispatchStubPatchCallbacks * callbacks ) { if ( callbacks == NULL ) { return -1 ; } __GLdispatchStubCallback * stub = malloc ( sizeof ( * stub ) ) ; if ( stub == NULL ) { return -1 ; } memcpy ( & stub -> callbacks , callbacks , sizeof ( __GLdispatchStubPatchCallbacks ) ) ; stub -> isPatched = GL_FALSE ; stub -> id = nextDispatchStubID ++ ; glvnd_list_add ( & stub -> entry , & dispatchStubList ) ; dispatchStubListGeneration ++ ; return stub -> id ; }
Does the same thing as __glDispatchRegisterStubCallbacks, but requires the
 caller to already be holding the dispatch lock.
Does the same thing as __glDispatchRegisterStubCallbacks but requires the caller to already be holding the dispatch lock .