Lines Matching refs:api
228 struct api {
275 static struct api api = {
314 pthread_mutex_lock(&api.mutex);
330 pthread_mutex_unlock(&api.mutex);
386 if (api.begin_count)
456 if (api.begin_count)
565 if (!api.glx_handle)
566 get_dlopen_handle(&api.glx_handle, GLVND_GLX_LIB, false, load);
568 if (!api.glx_handle)
569 get_dlopen_handle(&api.glx_handle, GLX_LIB, exit_if_fails, load);
571 return api.glx_handle != NULL;
579 return do_dlsym(&api.glx_handle, name, exit_if_fails);
638 if (api.begin_count)
648 return get_dlopen_handle(&api.egl_handle, EGL_LIB, exit_if_fails, load);
659 return do_dlsym(&api.egl_handle, name, exit_if_fails);
679 if (api.gl_handle)
683 get_dlopen_handle(&api.gl_handle, OPENGL_LIB, true, true);
687 if (!api.gl_handle)
688 get_dlopen_handle(&api.gl_handle, OPENGL_LIB, false, true);
691 get_dlopen_handle(&api.glx_handle, GLX_LIB, true, true);
692 api.gl_handle = api.glx_handle;
701 return do_dlsym(&api.gl_handle, name, true);
710 get_dlopen_handle(&api.gles1_handle, GLES1_LIB, true, true);
711 return do_dlsym(&api.gles1_handle, name, true);
721 get_dlopen_handle(&api.gles2_handle, GLES2_LIB, true, true);
722 return do_dlsym(&api.gles2_handle, name, true);
742 if (get_dlopen_handle(&api.gles2_handle, GLES2_LIB, false, true)) {
743 void *func = do_dlsym(&api.gles2_handle, name, false);
812 if (api.glx_handle && glXGetCurrentContext())
822 get_dlopen_handle(&api.egl_handle, EGL_LIB, false, true);
823 if (api.egl_handle) {
881 InterlockedIncrement(&api.begin_count);
883 pthread_mutex_lock(&api.mutex);
884 api.begin_count++;
885 pthread_mutex_unlock(&api.mutex);
897 InterlockedDecrement(&api.begin_count);
899 pthread_mutex_lock(&api.mutex);
900 api.begin_count--;
901 pthread_mutex_unlock(&api.mutex);
925 pthread_mutex_lock(&api.mutex);
928 pthread_mutex_unlock(&api.mutex);