The EGL API provides an interface with accompanying type declarations and defines that together provide a single consistent method of EGL usage across platforms.
This API is designed to abstract the differences between EGL implementations and versions on different systems, and to remove the requirement for any other code to directly pull in and use these system libraries.
This API has the ability to support EGL 1.5, however it is not required to support anything beyond EGL 1.4. The user is responsible for ensuring that the functions from EGL 1.5 they are calling from the interface are valid.
EGL_VERSION_1_2
EGL_VERSION_1_0
EGL_VERSION_1_1
EGL_VERSION_1_3
EGL_VERSION_1_5
EGL_VERSION_1_4
The following type definitions were adapted from the types declared in https://www.khronos.org/registry/EGL/api/EGL/egl.h .
typedef void(* SbEglCastsToProperFunctionPointerType) (void)
The following type definitions were adapted from the types declared in https://www.khronos.org/registry/EGL/api/EGL/eglplatform.h .
typedef int32_t SbEglInt32
eglChooseConfig
SbEglBoolean (*eglChooseConfig)(SbEglDisplay dpy, const SbEglInt32* attrib_list, SbEglConfig* configs, SbEglInt32 config_size, SbEglInt32* num_config);
eglCopyBuffers
SbEglBoolean (*eglCopyBuffers)(SbEglDisplay dpy, SbEglSurface surface, SbEglNativePixmapType target);
eglCreateContext
SbEglContext (*eglCreateContext)(SbEglDisplay dpy, SbEglConfig config, SbEglContext share_context, const SbEglInt32* attrib_list);
eglCreatePbufferSurface
SbEglSurface (*eglCreatePbufferSurface)(SbEglDisplay dpy, SbEglConfig config, const SbEglInt32* attrib_list);
eglCreatePixmapSurface
SbEglSurface (*eglCreatePixmapSurface)(SbEglDisplay dpy, SbEglConfig config, SbEglNativePixmapType pixmap, const SbEglInt32* attrib_list);
eglCreateWindowSurface
SbEglSurface (*eglCreateWindowSurface)(SbEglDisplay dpy, SbEglConfig config, SbEglNativeWindowType win, const SbEglInt32* attrib_list);
eglDestroyContext
SbEglBoolean (*eglDestroyContext)(SbEglDisplay dpy, SbEglContext ctx);
eglDestroySurface
SbEglBoolean (*eglDestroySurface)(SbEglDisplay dpy, SbEglSurface surface);
eglGetConfigAttrib
SbEglBoolean (*eglGetConfigAttrib)(SbEglDisplay dpy, SbEglConfig config, SbEglInt32 attribute, SbEglInt32* value);
eglGetConfigs
SbEglBoolean (*eglGetConfigs)(SbEglDisplay dpy, SbEglConfig* configs, SbEglInt32 config_size, SbEglInt32* num_config);
eglGetCurrentDisplay
SbEglDisplay (*eglGetCurrentDisplay)(void);
eglGetCurrentSurface
SbEglSurface (*eglGetCurrentSurface)(SbEglInt32 readdraw);
eglGetDisplay
SbEglDisplay (*eglGetDisplay)(SbEglNativeDisplayType display_id);
eglGetError
SbEglInt32 (*eglGetError)(void);
eglGetProcAddress
SbEglCastsToProperFunctionPointerType (*eglGetProcAddress)(const char* procname);
eglInitialize
SbEglBoolean (*eglInitialize)(SbEglDisplay dpy, SbEglInt32* major, SbEglInt32* minor);
eglMakeCurrent
SbEglBoolean (*eglMakeCurrent)(SbEglDisplay dpy, SbEglSurface draw, SbEglSurface read, SbEglContext ctx);
eglQueryContext
SbEglBoolean (*eglQueryContext)(SbEglDisplay dpy, SbEglContext ctx, SbEglInt32 attribute, SbEglInt32* value);
eglQueryString
const char* (*eglQueryString)(SbEglDisplay dpy, SbEglInt32 name);
eglQuerySurface
SbEglBoolean (*eglQuerySurface)(SbEglDisplay dpy, SbEglSurface surface, SbEglInt32 attribute, SbEglInt32* value);
eglSwapBuffers
SbEglBoolean (*eglSwapBuffers)(SbEglDisplay dpy, SbEglSurface surface);
eglTerminate
SbEglBoolean (*eglTerminate)(SbEglDisplay dpy);
eglWaitGL
SbEglBoolean (*eglWaitGL)(void);
eglWaitNative
SbEglBoolean (*eglWaitNative)(SbEglInt32 engine);
eglBindTexImage
SbEglBoolean (*eglBindTexImage)(SbEglDisplay dpy, SbEglSurface surface, SbEglInt32 buffer);
eglReleaseTexImage
SbEglBoolean (*eglReleaseTexImage)(SbEglDisplay dpy, SbEglSurface surface, SbEglInt32 buffer);
eglSurfaceAttrib
SbEglBoolean (*eglSurfaceAttrib)(SbEglDisplay dpy, SbEglSurface surface, SbEglInt32 attribute, SbEglInt32 value);
eglSwapInterval
SbEglBoolean (*eglSwapInterval)(SbEglDisplay dpy, SbEglInt32 interval);
eglBindAPI
SbEglBoolean (*eglBindAPI)(SbEglEnum api);
eglQueryAPI
SbEglEnum (*eglQueryAPI)(void);
eglCreatePbufferFromClientBuffer
SbEglSurface (*eglCreatePbufferFromClientBuffer)(SbEglDisplay dpy, SbEglEnum buftype, SbEglClientBuffer buffer, SbEglConfig config, const SbEglInt32* attrib_list);
eglReleaseThread
SbEglBoolean (*eglReleaseThread)(void);
eglWaitClient
SbEglBoolean (*eglWaitClient)(void);
eglGetCurrentContext
SbEglContext (*eglGetCurrentContext)(void);
eglCreateSync
SbEglSync (*eglCreateSync)(SbEglDisplay dpy, SbEglEnum type, const SbEglAttrib* attrib_list);
eglDestroySync
SbEglBoolean (*eglDestroySync)(SbEglDisplay dpy, SbEglSync sync);
eglClientWaitSync
SbEglInt32 (*eglClientWaitSync)(SbEglDisplay dpy, SbEglSync sync, SbEglInt32 flags, SbEglTime timeout);
eglGetSyncAttrib
SbEglBoolean (*eglGetSyncAttrib)(SbEglDisplay dpy, SbEglSync sync, SbEglInt32 attribute, SbEglAttrib* value);
eglCreateImage
SbEglImage (*eglCreateImage)(SbEglDisplay dpy, SbEglContext ctx, SbEglEnum target, SbEglClientBuffer buffer, const SbEglAttrib* attrib_list);
eglDestroyImage
SbEglBoolean (*eglDestroyImage)(SbEglDisplay dpy, SbEglImage image);
eglGetPlatformDisplay
SbEglDisplay (*eglGetPlatformDisplay)(SbEglEnum platform, void* native_display, const SbEglAttrib* attrib_list);
eglCreatePlatformWindowSurface
SbEglSurface (*eglCreatePlatformWindowSurface)(SbEglDisplay dpy, SbEglConfig config, void* native_window, const SbEglAttrib* attrib_list);
eglCreatePlatformPixmapSurface
SbEglSurface (*eglCreatePlatformPixmapSurface)(SbEglDisplay dpy, SbEglConfig config, void* native_pixmap, const SbEglAttrib* attrib_list);
eglWaitSync
SbEglBoolean (*eglWaitSync)(SbEglDisplay dpy, SbEglSync sync, SbEglInt32 flags);