Lines Matching refs:api
73 * - `epoxy/gl.h` - For GL API
74 * - `epoxy/egl.h` - For EGL API
75 * - `epoxy/glx.h` - For GLX API
76 * - `epoxy/wgl.h` - For WGL API
85 * The scope of this API reference does not include the documentation for
128 * "Client API function pointers returned by eglGetProcAddress are
129 * independent of the display and the currently bound client API context,
130 * and may be used by any client API context which supports the extension.
134 * • All EGL and client API extension functions supported by the
136 * client API context or not). This includes any mandatory OpenGL ES
228 struct api {
237 * dlopen() return value for the GLX API. This is libGLX.so.1 if the
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);
802 * at call time we don't know for sure what API they're trying to use
812 if (api.glx_handle && glXGetCurrentContext())
816 /* If epoxy hasn't loaded any API-specific library yet, try to
817 * figure out what API the context is using and use that library,
818 * since future calls will also use that API (this prevents a
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);