public final class EGLExt


Utility class that provides some helper methods for interacting EGL Extension APIs

Summary

Constants

static final @NonNull String

Extension that allows creating an EGLClientBuffer from an Android HardwareBuffer object which can later be used to create an EGLImageKHR instance.

static final @NonNull String

Enables using an Android window buffer (struct ANativeWindowBuffer) as an EGLImage source

static final @NonNull String

Determines whether creation of platform specific sync objects are supported.

static final int

Return value used in eglClientWaitSyncKHR to indicate that the sync object had signalled before the timeout expired.

static final @NonNull String

Determines if applications can query the age of the back buffer contents for an EGL surface as the number of frames elapsed since the contents were recently defined

static final @NonNull String

Determines whether the platform framebuffers support rendering in a larger color gamut specified in the BT.2020 color space

static final @NonNull String

Determines whether the underlying platform can support rendering framebuffers in the non-linear Display-P3 color space

static final @NonNull String

Determines whether extended sRGB color spaces are supported options for EGL Surfaces

static final @NonNull String

Determines whether floating point RGBA components are supported

static final int

Constant indicating false within EGL.

static final long

Value that can be sent as the timeoutNanos parameter of eglClientWaitSyncKHR indicating that waiting on the sync object to signal will never time out.

static final @NonNull String

Determines whether an EGLContext can be created with a priority hint.

static final @NonNull String

Determines whether sync objects are supported.

static final @NonNull String

Determines whether to use sRGB format default framebuffers to render sRGB content to display devices.

static final @NonNull String

Extension that defines a new EGL resource type that is suitable for sharing 2D arrays of image data between client APIs, the EGLImage, and allows creating EGLImages from EGL native pixmaps.

static final @NonNull String

Extension for supporting a new EGL resource type that is suitable for sharing 2D arrays of image data between client APIs, the EGLImage.

static final @NonNull String

Determines whether creation of GL and ES contexts without an EGLConfig is allowed

static final @NonNull String

Allows for efficient partial updates to an area of a buffer that has changed since the last time the buffer was used

static final @NonNull String

Determines whether creation of an EGL Context without a surface is supported.

static final @NonNull String

Allows for efficient partial updates to an area of a surface that changes between frames for the surface.

static final @NonNull String

Determines whether waiting for signaling of sync objects is supported.

static final int

Return value when eglGetSyncAttribKHR is called with EGL_SYNC_STATUS_KHR indicating that the sync object has already been signalled.

static final int

Attribute that can be queried in eglGetSyncAttribKHR.

static final int

Create an EGL fence sync object for signalling one time events.

static final int

Accepted in the flags parameter of eglClientWaitSyncKHR.

static final int

This extension enables the creation of EGL fence sync objects that are associated with a native synchronization fence object that is referenced using a file descriptor.

static final int

Return value when eglGetSyncAttribKHR is called with EGL_SYNC_CONDITION_KHR.

static final int

Attribute that can be queried in eglGetSyncAttribKHR.

static final int

Attribute that can be queried in eglGetSyncAttribKHR.

static final int

Return value used in eglClientWaitSyncKHR to indicate that the specified timeout period had expired before a sync object was signalled.

static final int

Constant indicating true within EGL.

static final int

Return value when eglGetSyncAttribKHR is called with EGL_SYNC_STATUS_KHR indicating that the sync object has not yet been signalled.

Public methods

static final int
eglClientWaitSyncKHR(
    @NonNull EGLDisplay eglDisplay,
    @NonNull EGLSyncKHR sync,
    int flags,
    long timeoutNanos
)

Blocks the calling thread until the specified sync object is signalled or until timeoutNanos nanoseconds have passed.

static final EGLImageKHR
@RequiresApi(value = 26)
eglCreateImageFromHardwareBuffer(
    @NonNull EGLDisplay eglDisplay,
    @NonNull HardwareBuffer hardwareBuffer
)

Creates an EGLImage from the provided HardwareBuffer.

static final EGLSyncKHR
eglCreateSyncKHR(
    @NonNull EGLDisplay eglDisplay,
    int type,
    EGLConfigAttributes attributes
)

Creates a sync object of the specified type associated with the specified display, and returns a handle to the new object.

static final boolean
eglDestroyImageKHR(
    @NonNull EGLDisplay eglDisplay,
    @NonNull EGLImageKHR image
)

Destroy the given EGLImageKHR instance.

static final boolean
eglDestroySyncKHR(
    @NonNull EGLDisplay eglDisplay,
    @NonNull EGLSyncKHR eglSync
)

Destroys the given sync object associated with the specified display

static final boolean
eglGetSyncAttribKHR(
    @NonNull EGLDisplay eglDisplay,
    @NonNull EGLSyncKHR sync,
    int attribute,
    @NonNull int[] value,
    int offset
)

Query attributes of the provided sync object.

static final void

Upload a given EGLImage to the currently bound GLTexture

static final @NonNull Set<@NonNull String>

Returns a set of supported supported extensions from a space separated string that represents the set of OpenGL extensions supported

Constants

EGL_ANDROID_CLIENT_BUFFER

public static final @NonNull String EGL_ANDROID_CLIENT_BUFFER

Extension that allows creating an EGLClientBuffer from an Android HardwareBuffer object which can later be used to create an EGLImageKHR instance. See: https://registry.khronos.org/EGL/extensions/ANDROID/EGL_ANDROID_get_native_client_buffer.txt

EGL_ANDROID_IMAGE_NATIVE_BUFFER

public static final @NonNull String EGL_ANDROID_IMAGE_NATIVE_BUFFER

Enables using an Android window buffer (struct ANativeWindowBuffer) as an EGLImage source

See: https://www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_image_native_buffer.txt

EGL_ANDROID_NATIVE_FENCE_SYNC

public static final @NonNull String EGL_ANDROID_NATIVE_FENCE_SYNC

Determines whether creation of platform specific sync objects are supported. These objects that are associated with a native synchronization fence object using a file descriptor.

See: https://www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_native_fence_sync.txt

EGL_CONDITION_SATISFIED_KHR

public static final int EGL_CONDITION_SATISFIED_KHR = 12534

Return value used in eglClientWaitSyncKHR to indicate that the sync object had signalled before the timeout expired. This includes the case where the sync object had already signalled before eglClientWaitSyncKHR was called.

EGL_EXT_BUFFER_AGE

public static final @NonNull String EGL_EXT_BUFFER_AGE

Determines if applications can query the age of the back buffer contents for an EGL surface as the number of frames elapsed since the contents were recently defined

See: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_buffer_age.txt

EGL_EXT_GL_COLORSPACE_BT2020_PQ

public static final @NonNull String EGL_EXT_GL_COLORSPACE_BT2020_PQ

Determines whether the platform framebuffers support rendering in a larger color gamut specified in the BT.2020 color space

See: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_gl_colorspace_bt2020_linear.txt

EGL_EXT_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH

public static final @NonNull String EGL_EXT_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH

Determines whether the underlying platform can support rendering framebuffers in the non-linear Display-P3 color space

See: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_gl_colorspace_display_p3_passthrough.txt

EGL_EXT_GL_COLORSPACE_SCRGB

public static final @NonNull String EGL_EXT_GL_COLORSPACE_SCRGB

Determines whether extended sRGB color spaces are supported options for EGL Surfaces

See: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_gl_colorspace_scrgb.txt

EGL_EXT_PIXEL_FORMAT_FLOAT

public static final @NonNull String EGL_EXT_PIXEL_FORMAT_FLOAT

Determines whether floating point RGBA components are supported

See: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_pixel_format_float.txt

EGL_FALSE

public static final int EGL_FALSE = 0

Constant indicating false within EGL. This is often returned in failure cases.

EGL_FOREVER_KHR

public static final long EGL_FOREVER_KHR

Value that can be sent as the timeoutNanos parameter of eglClientWaitSyncKHR indicating that waiting on the sync object to signal will never time out.

EGL_IMG_CONTEXT_PRIORITY

public static final @NonNull String EGL_IMG_CONTEXT_PRIORITY

Determines whether an EGLContext can be created with a priority hint. Not all implementations are guaranteed to honor the hint.

See: https://www.khronos.org/registry/EGL/extensions/IMG/EGL_IMG_context_priority.txt

EGL_KHR_FENCE_SYNC

public static final @NonNull String EGL_KHR_FENCE_SYNC

Determines whether sync objects are supported. Sync objects are synchronization primitives that represent events whose completion can be tested or waited upon.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

EGL_KHR_GL_COLORSPACE

public static final @NonNull String EGL_KHR_GL_COLORSPACE

Determines whether to use sRGB format default framebuffers to render sRGB content to display devices. Supports creation of EGLSurfaces which will be rendered to in sRGB by OpenGL contexts supporting that capability.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_gl_colorspace.txt

EGL_KHR_IMAGE

public static final @NonNull String EGL_KHR_IMAGE

Extension that defines a new EGL resource type that is suitable for sharing 2D arrays of image data between client APIs, the EGLImage, and allows creating EGLImages from EGL native pixmaps.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image.txt

EGL_KHR_IMAGE_BASE

public static final @NonNull String EGL_KHR_IMAGE_BASE

Extension for supporting a new EGL resource type that is suitable for sharing 2D arrays of image data between client APIs, the EGLImage. Although the intended purpose is sharing 2D image data, the underlying interface makes no assumptions about the format or purpose of the resource being shared, leaving those decisions to the application and associated client APIs.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_base.txt

EGL_KHR_NO_CONFIG_CONTEXT

public static final @NonNull String EGL_KHR_NO_CONFIG_CONTEXT

Determines whether creation of GL and ES contexts without an EGLConfig is allowed

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_no_config_context.txt

EGL_KHR_PARTIAL_UPDATE

public static final @NonNull String EGL_KHR_PARTIAL_UPDATE

Allows for efficient partial updates to an area of a buffer that has changed since the last time the buffer was used

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_partial_update.txt

EGL_KHR_SURFACELESS_CONTEXT

public static final @NonNull String EGL_KHR_SURFACELESS_CONTEXT

Determines whether creation of an EGL Context without a surface is supported. This is useful for applications that only want to render to client API targets (such as OpenGL framebuffer objects) and avoid the need to a throw-away EGL surface just to get a current context.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_surfaceless_context.txt

EGL_KHR_SWAP_BUFFERS_WITH_DAMAGE

public static final @NonNull String EGL_KHR_SWAP_BUFFERS_WITH_DAMAGE

Allows for efficient partial updates to an area of a surface that changes between frames for the surface. This relates to the differences between two buffers, the current back buffer and the current front buffer.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt

EGL_KHR_WAIT_SYNC

public static final @NonNull String EGL_KHR_WAIT_SYNC

Determines whether waiting for signaling of sync objects is supported. This form of wait does not necessarily block the application thread which issued the wait. Therefore applications may continue to issue commands to the client API or perform other work in parallel leading to increased performance.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_wait_sync.txt

EGL_SIGNALED_KHR

public static final int EGL_SIGNALED_KHR = 12530

Return value when eglGetSyncAttribKHR is called with EGL_SYNC_STATUS_KHR indicating that the sync object has already been signalled.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

EGL_SYNC_CONDITION_KHR

public static final int EGL_SYNC_CONDITION_KHR = 12536

Attribute that can be queried in eglGetSyncAttribKHR. This attribute can only be queried on sync objects of the type EGL_SYNC_FENCE_KHR.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

EGL_SYNC_FENCE_KHR

public static final int EGL_SYNC_FENCE_KHR = 12537

Create an EGL fence sync object for signalling one time events. The fence object created is not associated with the Android Sync fence object and is not recommended for waiting for events in a portable manner across Android/EGL boundaries but rather other EGL primitives.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

EGL_SYNC_FLUSH_COMMANDS_BIT_KHR

public static final int EGL_SYNC_FLUSH_COMMANDS_BIT_KHR = 1

Accepted in the flags parameter of eglClientWaitSyncKHR. This will implicitly ensure pending commands are flushed to prevent eglClientWaitSyncKHR from potentially blocking forever. See eglClientWaitSyncKHR for details.

EGL_SYNC_NATIVE_FENCE_ANDROID

public static final int EGL_SYNC_NATIVE_FENCE_ANDROID = 12612

This extension enables the creation of EGL fence sync objects that are associated with a native synchronization fence object that is referenced using a file descriptor. These EGL fence sync objects have nearly identical semantics to those defined by the KHR_fence_sync extension, except that they have an additional attribute storing the file descriptor referring to the native fence object. This differs from EGL_SYNC_FENCE_KHR as the fence sync object is associated with an Android Sync HAL fence object.

This extension assumes the existence of a native fence synchronization object that behaves similarly to an EGL fence sync object. These native objects must have a signal status like that of an EGLSyncKHR object that indicates whether the fence has ever been signaled. Once signaled the native object's signal status may not change again.

See: https://www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_native_fence_sync.txt

EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR

public static final int EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR = 12528

Return value when eglGetSyncAttribKHR is called with EGL_SYNC_CONDITION_KHR. This indicates that the sync object will signal on the condition of the completion of the fence command on the corresponding sync object and all preceding commands in th EGL client API's command stream.

EGL_SYNC_STATUS_KHR

public static final int EGL_SYNC_STATUS_KHR = 12529

Attribute that can be queried in eglGetSyncAttribKHR. The results can be either EGL_SIGNALED_KHR or EGL_UNSIGNALED_KHR representing whether or not the sync object has been signalled or not. This can be queried on all sync object types.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

EGL_SYNC_TYPE_KHR

public static final int EGL_SYNC_TYPE_KHR = 12535

Attribute that can be queried in eglGetSyncAttribKHR. The results can be either EGL_SYNC_FENCE_KHR or EGL_SYNC_NATIVE_FENCE_ANDROID.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

EGL_TIMEOUT_EXPIRED_KHR

public static final int EGL_TIMEOUT_EXPIRED_KHR = 12533

Return value used in eglClientWaitSyncKHR to indicate that the specified timeout period had expired before a sync object was signalled.

EGL_TRUE

public static final int EGL_TRUE = 1

Constant indicating true within EGL. This is often returned in success cases.

EGL_UNSIGNALED_KHR

public static final int EGL_UNSIGNALED_KHR = 12531

Return value when eglGetSyncAttribKHR is called with EGL_SYNC_STATUS_KHR indicating that the sync object has not yet been signalled.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

Public methods

eglClientWaitSyncKHR

Added in 1.0.2
public static final int eglClientWaitSyncKHR(
    @NonNull EGLDisplay eglDisplay,
    @NonNull EGLSyncKHR sync,
    int flags,
    long timeoutNanos
)

Blocks the calling thread until the specified sync object is signalled or until timeoutNanos nanoseconds have passed. More than one eglClientWaitSyncKHR may be outstanding on the same sync at any given time. When there are multiple threads blocked on the same sync and the sync object has signalled, all such threads are released, but the order in which they are released is not defined.

If the value of timeoutNanos is zero, then eglClientWaitSyncKHR simply tests the current status of sync. If the value of timeoutNanos is the special value EGL_FOREVER_KHR, then eglClientWaitSyncKHR does not time out. For all other values, timeoutNanos is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond.

eglClientWaitSyncKHR returns one of three status values describing the reason for returning. A return value of EGL_TIMEOUT_EXPIRED_KHR indicates that the specified timeout period expired before sync was signalled, or if timeoutNanos is zero, indicates that sync is not signaled. A return value of EGL_CONDITION_SATISFIED_KHR indicates that sync was signaled before the timeout expired, which includes the case when sync was already signaled when eglClientWaitSyncKHR was called. If an error occurs then an error is generated and EGL_FALSE is returned.

If the sync object being blocked upon will not be signaled in finite time (for example by an associated fence command issued previously, but not yet flushed to the graphics pipeline), then eglClientWaitSyncKHR may wait forever. To help prevent this behavior, if the EGL_SYNC_FLUSH_COMMANDS_BIT_KHR is set on the flags parameter and the sync is unsignaled when eglClientWaitSyncKHR is called, then the equivalent flush will be performed for the current EGL context before blocking on sync. If no context is current bound for the API, the EGL_SYNC_FLUSH_COMMANDS_BIT_KHR bit is ignored.

Parameters
@NonNull EGLDisplay eglDisplay

EGLDisplay to associate the sync object with

@NonNull EGLSyncKHR sync

EGLSyncKHR object to wait on

int flags

Optional flags to provide to handle flushing of pending commands

long timeoutNanos

Optional timeout value to wait before this method returns, measured in nanoseconds. This value is always consumed as an unsigned long value so even negative values will be converted to their unsigned equivalent.

Returns
int

Result code indicating the status of the wait request. Either EGL_CONDITION_SATISFIED_KHR, if the sync did signal within the specified timeout, EGL_TIMEOUT_EXPIRED_KHR if the sync did not signal within the specified timeout, or EGL_FALSE if an error occurs.

eglCreateImageFromHardwareBuffer

Added in 1.0.2
@RequiresApi(value = 26)
public static final EGLImageKHR eglCreateImageFromHardwareBuffer(
    @NonNull EGLDisplay eglDisplay,
    @NonNull HardwareBuffer hardwareBuffer
)

Creates an EGLImage from the provided HardwareBuffer. This handles internally creating an EGLClientBuffer and an EGLImageKHR from the client buffer.

When this EGLImageKHR instance is no longer necessary, consumers should be sure to call the corresponding method eglDestroyImageKHR to deallocate the resource.

Parameters
@NonNull EGLDisplay eglDisplay

EGLDisplay connection associated with the EGLImage to create

@NonNull HardwareBuffer hardwareBuffer

Backing HardwareBuffer for the generated EGLImage instance

Returns
EGLImageKHR

an EGLImageKHR instance representing the EGLImageKHR created from the HardwareBuffer. Because this is created internally through EGL's eglCreateImageKR method, this has the KHR suffix.

This can return null if the EGL_ANDROID_image_native_buffer and EGL_KHR_image_base extensions are not supported or if allocation of the buffer fails.

See www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_get_native_client_buffer.txt

eglCreateSyncKHR

Added in 1.0.2
public static final EGLSyncKHR eglCreateSyncKHR(
    @NonNull EGLDisplay eglDisplay,
    int type,
    EGLConfigAttributes attributes
)

Creates a sync object of the specified type associated with the specified display, and returns a handle to the new object. The configuration of the returned EGLSyncKHR object is specified by the provided attributes.

Consumers should ensure that the EGL_KHR_fence_sync EGL extension is supported before invoking this method otherwise a null EGLSyncFenceKHR object is returned.

Additionally when the EGLSyncKHR instance is no longer necessary, consumers are encouraged to call eglDestroySyncKHR to deallocate this resource.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

Parameters
@NonNull EGLDisplay eglDisplay

EGLDisplay to associate the sync object with

int type

Indicates the type of sync object that is returned

EGLConfigAttributes attributes

Specifies the configuration of the sync object returned

Returns
EGLSyncKHR

the EGLSyncKHR object to be used as a fence or null if this extension is not supported

eglDestroyImageKHR

Added in 1.0.2
public static final boolean eglDestroyImageKHR(
    @NonNull EGLDisplay eglDisplay,
    @NonNull EGLImageKHR image
)

Destroy the given EGLImageKHR instance. Once destroyed, the image may not be used to create any additional EGLImageKHR target resources within any client API contexts, although existing EGLImageKHR siblings may continue to be used. True is returned if DestroyImageKHR succeeds, false indicates failure. This can return false if the EGLImageKHR is not associated with the default display.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_base.txt

Parameters
@NonNull EGLDisplay eglDisplay

EGLDisplay that this EGLImage is connected to

@NonNull EGLImageKHR image

EGLImageKHR to be destroyed

Returns
boolean

True if the destruction of the EGLImageKHR object was successful, false otherwise

eglDestroySyncKHR

Added in 1.0.2
public static final boolean eglDestroySyncKHR(
    @NonNull EGLDisplay eglDisplay,
    @NonNull EGLSyncKHR eglSync
)

Destroys the given sync object associated with the specified display

Consumers should ensure that the EGL_KHR_fence_sync EGL extension is supported before invoking this method otherwise a null EGLSyncFenceKHR object is returned. See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

Parameters
@NonNull EGLDisplay eglDisplay

EGLDisplay instance associated with the fence

@NonNull EGLSyncKHR eglSync

Fence object to be destroyed

Returns
boolean

true if the EGLSyncKHR object was destroyed successfully false otherwise. This can return false if the sync object is not a valid sync object for the provided display or if the display provided in this method does not match the display used to create this sync in eglCreateSyncKHR.

eglGetSyncAttribKHR

Added in 1.0.2
public static final boolean eglGetSyncAttribKHR(
    @NonNull EGLDisplay eglDisplay,
    @NonNull EGLSyncKHR sync,
    int attribute,
    @NonNull int[] value,
    int offset
)

Query attributes of the provided sync object. Accepted attributes to query depend on the type of sync object. If no errors are generated, this returns true and the value of the queried attribute is stored in the value array at the offset position. If this method returns false, the provided value array is unmodified.

See: https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

Parameters
@NonNull EGLDisplay eglDisplay

EGLDisplay to associate the sync object with

@NonNull EGLSyncKHR sync

EGLSyncKHR object to query attributes

int attribute

Corresponding EGLSyncKHR attribute to query on sync

@NonNull int[] value

Integer array used to store the result of the query

int offset

Index within the value array to store the result of the attribute query

Returns
boolean

True if the attribute was queried successfully, false otherwise. Failure cases include attempting to call this method on an invalid sync object, or the display provided not matching the display that was used to create this sync object. Additionally if the queried attribute is not supported for the sync object, false is returned.

glEGLImageTargetTexture2DOES

Added in 1.0.2
public static final void glEGLImageTargetTexture2DOES(int target, @NonNull EGLImageKHR image)

Upload a given EGLImage to the currently bound GLTexture

This method requires either of the following EGL extensions to be supported: EGL_KHR_image_base or EGL_KHR_image

See: https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt

parseExtensions

Added in 1.0.2
public static final @NonNull Set<@NonNull StringparseExtensions(@NonNull String queryString)

Returns a set of supported supported extensions from a space separated string that represents the set of OpenGL extensions supported