| | |
| | | void **devices, |
| | | EGLint *num_devices); |
| | | |
| | | /* Atomic functions */ |
| | | |
| | | EGLSyncKHR(EGLAPIENTRY *eglCreateSyncKHR)(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); |
| | | |
| | | EGLBoolean(EGLAPIENTRY *eglDestroySyncKHR)(EGLDisplay dpy, EGLSyncKHR sync); |
| | | |
| | | EGLint(EGLAPIENTRY *eglDupNativeFenceFDANDROID)(EGLDisplay dpy, EGLSyncKHR sync); |
| | | |
| | | EGLint(EGLAPIENTRY *eglWaitSyncKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); |
| | | |
| | | EGLint(EGLAPIENTRY *eglClientWaitSyncKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); |
| | | |
| | | /* Atomic functions end */ |
| | | |
| | | |
| | | /* whether EGL display was offscreen */ |
| | | int is_offscreen; |
| | | |
| | | } SDL_EGL_VideoData; |
| | | |
| | | /* OpenGLES functions */ |
| | | typedef enum SDL_EGL_ExtensionType { |
| | | SDL_EGL_DISPLAY_EXTENSION, |
| | | SDL_EGL_CLIENT_EXTENSION |
| | | } SDL_EGL_ExtensionType; |
| | | |
| | | extern SDL_bool SDL_EGL_HasExtension(_THIS, SDL_EGL_ExtensionType type, const char *ext); |
| | | |
| | | extern int SDL_EGL_GetAttribute(_THIS, SDL_GLattr attrib, int *value); |
| | | /* SDL_EGL_LoadLibrary can get a display for a specific platform (EGL_PLATFORM_*) |
| | | * or, if 0 is passed, let the implementation decide. |
| | |
| | | #define SDL_EGL_MakeCurrent_impl(BACKEND) int \ |
| | | BACKEND ## _GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) \ |
| | | {\ |
| | | if (window && context) { \ |
| | | return SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context); \ |
| | | }\ |
| | | else {\ |
| | | return SDL_EGL_MakeCurrent(_this, NULL, NULL);\ |
| | | }\ |
| | | return SDL_EGL_MakeCurrent(_this, window ? ((SDL_WindowData *) window->driverdata)->egl_surface : EGL_NO_SURFACE, context);\ |
| | | } |
| | | |
| | | #define SDL_EGL_CreateContext_impl(BACKEND) SDL_GLContext \ |