Starboard Module Reference: egl.h
Stay organized with collections
Save and categorize content based on your preferences.
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.
EGL Version
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.
Macros
EGL_VERSION_1_2
SB_EGL_ALPHA_SIZE
EGL_VERSION_1_0
SB_EGL_BACK_BUFFER
EGL_VERSION_1_1
EGL_VERSION_1_3
SB_EGL_CONTEXT_MAJOR_VERSION
EGL_VERSION_1_5
SB_EGL_DEFAULT_DISPLAY
EGL_VERSION_1_4
Typedefs
SbEglCastsToProperFunctionPointerType
The following type definitions were adapted from the types declared in https://www.khronos.org/registry/EGL/api/EGL/egl.h
.
Definition
typedef void(* SbEglCastsToProperFunctionPointerType) (void)
SbEglInt32
The following type definitions were adapted from the types declared in https://www.khronos.org/registry/EGL/api/EGL/eglplatform.h
.
Definition
typedef int32_t SbEglInt32
Structs
SbEglInterface
Members
SbEglBoolean(*eglChooseConfig)(SbEglDisplay dpy, const SbEglInt32
*attrib_list, SbEglConfig *configs, SbEglInt32 config_size, SbEglInt32
*num_config)
SbEglBoolean(*eglCopyBuffers)(SbEglDisplay dpy, SbEglSurface surface,
SbEglNativePixmapType target)
SbEglContext(*eglCreateContext)(SbEglDisplay dpy, SbEglConfig config,
SbEglContext share_context, const SbEglInt32 *attrib_list)
SbEglSurface(*eglCreatePbufferSurface)(SbEglDisplay dpy, SbEglConfig
config, const SbEglInt32 *attrib_list)
SbEglSurface(*eglCreatePixmapSurface)(SbEglDisplay dpy, SbEglConfig config,
SbEglNativePixmapType pixmap, const SbEglInt32 *attrib_list)
SbEglSurface(*eglCreateWindowSurface)(SbEglDisplay dpy, SbEglConfig config,
SbEglNativeWindowType win, const SbEglInt32 *attrib_list)
SbEglBoolean(*eglDestroyContext)(SbEglDisplay dpy, SbEglContext ctx)
SbEglBoolean(*eglDestroySurface)(SbEglDisplay dpy, SbEglSurface surface)
SbEglBoolean(*eglGetConfigAttrib)(SbEglDisplay dpy, SbEglConfig config,
SbEglInt32 attribute, SbEglInt32 *value)
SbEglBoolean(*eglGetConfigs)(SbEglDisplay dpy, SbEglConfig *configs,
SbEglInt32 config_size, SbEglInt32 *num_config)
SbEglDisplay(*eglGetCurrentDisplay)(void)
SbEglSurface(*eglGetCurrentSurface)(SbEglInt32 readdraw)
SbEglDisplay(*eglGetDisplay)(SbEglNativeDisplayType display_id)
SbEglInt32(*eglGetError)(void)
SbEglCastsToProperFunctionPointerType(*eglGetProcAddress)(const char
*procname)
SbEglBoolean(*eglInitialize)(SbEglDisplay dpy, SbEglInt32 *major,
SbEglInt32 *minor)
SbEglBoolean(*eglMakeCurrent)(SbEglDisplay dpy, SbEglSurface draw,
SbEglSurface read, SbEglContext ctx)
SbEglBoolean(*eglQueryContext)(SbEglDisplay dpy, SbEglContext ctx,
SbEglInt32 attribute, SbEglInt32 *value)
const char *(*eglQueryString)(SbEglDisplay dpy, SbEglInt32 name)
SbEglBoolean(*eglQuerySurface)(SbEglDisplay dpy, SbEglSurface surface,
SbEglInt32 attribute, SbEglInt32 *value)
SbEglBoolean(*eglSwapBuffers)(SbEglDisplay dpy, SbEglSurface surface)
SbEglBoolean(*eglTerminate)(SbEglDisplay dpy)
SbEglBoolean(*eglWaitGL)(void)
SbEglBoolean(*eglWaitNative)(SbEglInt32 engine)
SbEglBoolean(*eglBindTexImage)(SbEglDisplay dpy, SbEglSurface surface,
SbEglInt32 buffer)
SbEglBoolean(*eglReleaseTexImage)(SbEglDisplay dpy, SbEglSurface surface,
SbEglInt32 buffer)
SbEglBoolean(*eglSurfaceAttrib)(SbEglDisplay dpy, SbEglSurface surface,
SbEglInt32 attribute, SbEglInt32 value)
SbEglBoolean(*eglSwapInterval)(SbEglDisplay dpy, SbEglInt32 interval)
SbEglBoolean(*eglBindAPI)(SbEglEnum api)
SbEglEnum(*eglQueryAPI)(void)
SbEglSurface(*eglCreatePbufferFromClientBuffer)(SbEglDisplay dpy, SbEglEnum
buftype, SbEglClientBuffer buffer, SbEglConfig config, const SbEglInt32
*attrib_list)
SbEglBoolean(*eglReleaseThread)(void)
SbEglBoolean(*eglWaitClient)(void)
SbEglContext(*eglGetCurrentContext)(void)
SbEglSync(*eglCreateSync)(SbEglDisplay dpy, SbEglEnum type, const
SbEglAttrib *attrib_list)
SbEglBoolean(*eglDestroySync)(SbEglDisplay dpy, SbEglSync sync)
SbEglInt32(*eglClientWaitSync)(SbEglDisplay dpy, SbEglSync sync, SbEglInt32
flags, SbEglTime timeout)
SbEglBoolean(*eglGetSyncAttrib)(SbEglDisplay dpy, SbEglSync sync,
SbEglInt32 attribute, SbEglAttrib *value)
SbEglImage(*eglCreateImage)(SbEglDisplay dpy, SbEglContext ctx, SbEglEnum
target, SbEglClientBuffer buffer, const SbEglAttrib *attrib_list)
SbEglBoolean(*eglDestroyImage)(SbEglDisplay dpy, SbEglImage image)
SbEglDisplay(*eglGetPlatformDisplay)(SbEglEnum platform, void
*native_display, const SbEglAttrib *attrib_list)
SbEglSurface(*eglCreatePlatformWindowSurface)(SbEglDisplay dpy, SbEglConfig
config, void *native_window, const SbEglAttrib *attrib_list)
SbEglSurface(*eglCreatePlatformPixmapSurface)(SbEglDisplay dpy, SbEglConfig
config, void *native_pixmap, const SbEglAttrib *attrib_list)
SbEglBoolean(*eglWaitSync)(SbEglDisplay dpy, SbEglSync sync, SbEglInt32
flags)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eThe EGL API offers a unified method for using EGL across different platforms, abstracting away system-specific differences.\u003c/p\u003e\n"],["\u003cp\u003eWhile it can support EGL 1.5, the API primarily targets EGL 1.4, requiring users to validate the use of any EGL 1.5 functions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSbEglInterface\u003c/code\u003e struct centralizes access to a comprehensive set of EGL functions for managing displays, surfaces, contexts, and more.\u003c/p\u003e\n"],["\u003cp\u003eType definitions like \u003ccode\u003eSbEglCastsToProperFunctionPointerType\u003c/code\u003e and \u003ccode\u003eSbEglInt32\u003c/code\u003e ensure compatibility and data representation within the API.\u003c/p\u003e\n"],["\u003cp\u003eMacros such as \u003ccode\u003eSB_EGL_ALPHA_FORMAT\u003c/code\u003e, \u003ccode\u003eSB_EGL_ALPHA_SIZE\u003c/code\u003e, and others denote specific EGL attributes and versions for configuration.\u003c/p\u003e\n"]]],["The EGL API abstracts EGL implementations across platforms, supporting up to EGL 1.5. It includes type definitions like `SbEglInt32` and `SbEglCastsToProperFunctionPointerType`. The `SbEglInterface` struct contains function pointers for various operations, including: creating/destroying contexts and surfaces, configuring displays, managing buffers, querying information, and handling synchronization. Macros are also defined, like `SB_EGL_ALPHA_FORMAT` and `EGL_VERSION_1_0`. The user can interface with these structures to call EGL functions.\n"],null,["The EGL API provides an interface with accompanying type declarations and\ndefines that together provide a single consistent method of EGL usage across\nplatforms.\n\nThis API is designed to abstract the differences between EGL implementations and\nversions on different systems, and to remove the requirement for any other code\nto directly pull in and use these system libraries.\n\nEGL Version\n\nThis API has the ability to support EGL 1.5, however it is not required to\nsupport anything beyond EGL 1.4. The user is responsible for ensuring that the\nfunctions from EGL 1.5 they are calling from the interface are valid.\n\nMacros\n\nSB_EGL_ALPHA_FORMAT\n\nEGL_VERSION_1_2\n\nSB_EGL_ALPHA_SIZE\n\nEGL_VERSION_1_0\n\nSB_EGL_BACK_BUFFER\n\nEGL_VERSION_1_1\n\nSB_EGL_CONFORMANT\n\nEGL_VERSION_1_3\n\nSB_EGL_CONTEXT_MAJOR_VERSION\n\nEGL_VERSION_1_5\n\nSB_EGL_DEFAULT_DISPLAY\n\nEGL_VERSION_1_4\n\nTypedefs\n\nSbEglCastsToProperFunctionPointerType\n\nThe following type definitions were adapted from the types declared in \u003chttps://www.khronos.org/registry/EGL/api/EGL/egl.h\u003e\n.\n\nDefinition \n\n typedef void(* SbEglCastsToProperFunctionPointerType) (void)\n\nSbEglInt32\n\nThe following type definitions were adapted from the types declared in \u003chttps://www.khronos.org/registry/EGL/api/EGL/eglplatform.h\u003e\n.\n\nDefinition \n\n typedef int32_t SbEglInt32\n\nStructs\n\nSbEglInterface\n\nMembers\n\n- `SbEglBoolean(*eglChooseConfig)(SbEglDisplay dpy, const SbEglInt32\n *attrib_list, SbEglConfig *configs, SbEglInt32 config_size, SbEglInt32\n *num_config)`\n- `SbEglBoolean(*eglCopyBuffers)(SbEglDisplay dpy, SbEglSurface surface,\n SbEglNativePixmapType target)`\n- `SbEglContext(*eglCreateContext)(SbEglDisplay dpy, SbEglConfig config,\n SbEglContext share_context, const SbEglInt32 *attrib_list)`\n- `SbEglSurface(*eglCreatePbufferSurface)(SbEglDisplay dpy, SbEglConfig\n config, const SbEglInt32 *attrib_list)`\n- `SbEglSurface(*eglCreatePixmapSurface)(SbEglDisplay dpy, SbEglConfig config,\n SbEglNativePixmapType pixmap, const SbEglInt32 *attrib_list)`\n- `SbEglSurface(*eglCreateWindowSurface)(SbEglDisplay dpy, SbEglConfig config,\n SbEglNativeWindowType win, const SbEglInt32 *attrib_list)`\n- `SbEglBoolean(*eglDestroyContext)(SbEglDisplay dpy, SbEglContext ctx)`\n- `SbEglBoolean(*eglDestroySurface)(SbEglDisplay dpy, SbEglSurface surface)`\n- `SbEglBoolean(*eglGetConfigAttrib)(SbEglDisplay dpy, SbEglConfig config,\n SbEglInt32 attribute, SbEglInt32 *value)`\n- `SbEglBoolean(*eglGetConfigs)(SbEglDisplay dpy, SbEglConfig *configs,\n SbEglInt32 config_size, SbEglInt32 *num_config)`\n- `SbEglDisplay(*eglGetCurrentDisplay)(void)`\n- `SbEglSurface(*eglGetCurrentSurface)(SbEglInt32 readdraw)`\n- `SbEglDisplay(*eglGetDisplay)(SbEglNativeDisplayType display_id)`\n- `SbEglInt32(*eglGetError)(void)`\n- `SbEglCastsToProperFunctionPointerType(*eglGetProcAddress)(const char\n *procname)`\n- `SbEglBoolean(*eglInitialize)(SbEglDisplay dpy, SbEglInt32 *major,\n SbEglInt32 *minor)`\n- `SbEglBoolean(*eglMakeCurrent)(SbEglDisplay dpy, SbEglSurface draw,\n SbEglSurface read, SbEglContext ctx)`\n- `SbEglBoolean(*eglQueryContext)(SbEglDisplay dpy, SbEglContext ctx,\n SbEglInt32 attribute, SbEglInt32 *value)`\n- `const char *(*eglQueryString)(SbEglDisplay dpy, SbEglInt32 name)`\n- `SbEglBoolean(*eglQuerySurface)(SbEglDisplay dpy, SbEglSurface surface,\n SbEglInt32 attribute, SbEglInt32 *value)`\n- `SbEglBoolean(*eglSwapBuffers)(SbEglDisplay dpy, SbEglSurface surface)`\n- `SbEglBoolean(*eglTerminate)(SbEglDisplay dpy)`\n- `SbEglBoolean(*eglWaitGL)(void)`\n- `SbEglBoolean(*eglWaitNative)(SbEglInt32 engine)`\n- `SbEglBoolean(*eglBindTexImage)(SbEglDisplay dpy, SbEglSurface surface,\n SbEglInt32 buffer)`\n- `SbEglBoolean(*eglReleaseTexImage)(SbEglDisplay dpy, SbEglSurface surface,\n SbEglInt32 buffer)`\n- `SbEglBoolean(*eglSurfaceAttrib)(SbEglDisplay dpy, SbEglSurface surface,\n SbEglInt32 attribute, SbEglInt32 value)`\n- `SbEglBoolean(*eglSwapInterval)(SbEglDisplay dpy, SbEglInt32 interval)`\n- `SbEglBoolean(*eglBindAPI)(SbEglEnum api)`\n- `SbEglEnum(*eglQueryAPI)(void)`\n- `SbEglSurface(*eglCreatePbufferFromClientBuffer)(SbEglDisplay dpy, SbEglEnum\n buftype, SbEglClientBuffer buffer, SbEglConfig config, const SbEglInt32\n *attrib_list)`\n- `SbEglBoolean(*eglReleaseThread)(void)`\n- `SbEglBoolean(*eglWaitClient)(void)`\n- `SbEglContext(*eglGetCurrentContext)(void)`\n- `SbEglSync(*eglCreateSync)(SbEglDisplay dpy, SbEglEnum type, const\n SbEglAttrib *attrib_list)`\n- `SbEglBoolean(*eglDestroySync)(SbEglDisplay dpy, SbEglSync sync)`\n- `SbEglInt32(*eglClientWaitSync)(SbEglDisplay dpy, SbEglSync sync, SbEglInt32\n flags, SbEglTime timeout)`\n- `SbEglBoolean(*eglGetSyncAttrib)(SbEglDisplay dpy, SbEglSync sync,\n SbEglInt32 attribute, SbEglAttrib *value)`\n- `SbEglImage(*eglCreateImage)(SbEglDisplay dpy, SbEglContext ctx, SbEglEnum\n target, SbEglClientBuffer buffer, const SbEglAttrib *attrib_list)`\n- `SbEglBoolean(*eglDestroyImage)(SbEglDisplay dpy, SbEglImage image)`\n- `SbEglDisplay(*eglGetPlatformDisplay)(SbEglEnum platform, void\n *native_display, const SbEglAttrib *attrib_list)`\n- `SbEglSurface(*eglCreatePlatformWindowSurface)(SbEglDisplay dpy, SbEglConfig\n config, void *native_window, const SbEglAttrib *attrib_list)`\n- `SbEglSurface(*eglCreatePlatformPixmapSurface)(SbEglDisplay dpy, SbEglConfig\n config, void *native_pixmap, const SbEglAttrib *attrib_list)`\n- `SbEglBoolean(*eglWaitSync)(SbEglDisplay dpy, SbEglSync sync, SbEglInt32\n flags)`"]]