Top Description Fields Constructors Methods
org.lwjgl.egl

public final Class EGL

extends Object
Class Inheritance
Imports
org.lwjgl.system.*, javax.annotation.*, java.nio.*, java.util.*

This class must be used before any EGL function is called. It has the following responsibilities:

Library lifecycle

The EGL library is loaded automatically when this class is initialized. Set the Configuration#EGL_EXPLICIT_INIT option to override this behavior. Manual loading/unloading can be achieved with the create and destroy functions. The name of the library loaded can be overridden with the Configuration#EGL_LIBRARY_NAME option.

EGLCapabilities creation

Instances of EGLCapabilities for an EGLDisplay can be created with the createDisplayCapabilities method. Calling this method is expensive, so the EGLCapabilities instance should be associated with the EGLDisplay and reused as necessary.

The EGLCapabilities instance for the client library is created automatically when the EGL native library is loaded.

Field Summary

Modifier and TypeField and Description
private static EGLCapabilities
private static FunctionProvider

Constructor Summary

AccessConstructor and Description
private
EGL()

Method Summary

Modifier and TypeMethod and Description
private static void
addEGLVersions(int MAJOR, int MINOR, Set<String> supportedExtensions)

private static void
addExtensions(String extensionsString, Set<String> supportedExtensions)

pack-priv static <T> T
check(T t)

public static void
create()

Loads the EGL native library, using the default library name.

public static void
create(String
the native library name
libName
)

Loads the EGL native library, using the specified library name.

private static void
public static void
create(FunctionProvider
the provider of EGL function addresses
functionProvider
)

Initializes EGL with the specified FunctionProvider.

private static EGLCapabilities
public static EGLCapabilities

Returns:

the instance
createDisplayCapabilities
(long
the EGLDisplay to query
dpy
)

Creates an EGLCapabilities instance for the specified EGLDisplay handle.

public static EGLCapabilities

Returns:

the instance
createDisplayCapabilities
(long
the EGLDisplay to query
dpy
,
int
the major EGL version supported by the EGLDisplay, as returned by EGL10#eglInitialize
majorVersion
,
int
the minor EGL version supported by the EGLDisplay, as returned by EGL10#eglInitialize
minorVersion
)

Creates an EGLCapabilities instance for the specified EGLDisplay handle.

public static void
destroy()

Unloads the EGL native library.

public static EGLCapabilities
getCapabilities()

Returns the EGLCapabilities instance for the EGL client library.

public static FunctionProvider
getFunctionProvider()

Returns the FunctionProvider for the EGL native library.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

capsback to summary
private static EGLCapabilities caps
Annotations
@Nullable
functionProviderback to summary
private static FunctionProvider functionProvider
Annotations
@Nullable

Constructor Detail

EGLback to summary
private EGL()

Method Detail

addEGLVersionsback to summary
private static void addEGLVersions(int MAJOR, int MINOR, Set<String> supportedExtensions)
addExtensionsback to summary
private static void addExtensions(String extensionsString, Set<String> supportedExtensions)
checkback to summary
pack-priv static <T> T check(T t)
createback to summary
public static void create()

Loads the EGL native library, using the default library name.

createback to summary
public static void create(String libName)

Loads the EGL native library, using the specified library name.

Parameters
libName:String

the native library name

createback to summary
private static void create(SharedLibrary EGL)
createback to summary
public static void create(FunctionProvider functionProvider)

Initializes EGL with the specified FunctionProvider. This method can be used to implement custom EGL library loading.

Parameters
functionProvider:FunctionProvider

the provider of EGL function addresses

createClientCapabilitiesback to summary
private static EGLCapabilities createClientCapabilities()
createDisplayCapabilitiesback to summary
public static EGLCapabilities createDisplayCapabilities(long dpy)

Creates an EGLCapabilities instance for the specified EGLDisplay handle.

This method call is relatively expensive. The result should be cached and reused.

Parameters
dpy:long

the EGLDisplay to query

Returns:EGLCapabilities

the instance

createDisplayCapabilitiesback to summary
public static EGLCapabilities createDisplayCapabilities(long dpy, int majorVersion, int minorVersion)

Creates an EGLCapabilities instance for the specified EGLDisplay handle.

This method call is relatively expensive. The result should be cached and reused.

Parameters
dpy:long

the EGLDisplay to query

majorVersion:int

the major EGL version supported by the EGLDisplay, as returned by EGL10#eglInitialize

minorVersion:int

the minor EGL version supported by the EGLDisplay, as returned by EGL10#eglInitialize

Returns:EGLCapabilities

the instance

destroyback to summary
public static void destroy()

Unloads the EGL native library.

getCapabilitiesback to summary
public static EGLCapabilities getCapabilities()

Returns the EGLCapabilities instance for the EGL client library. The capability flags in this instance are only set for the core EGL versions and client extensions. This may only happen if EGL 1.5 or the EGLCapabilities#EGL_EXT_client_extensions extension are supported. If not, all flags will be false and the version fields zero.

getFunctionProviderback to summary
public static FunctionProvider getFunctionProvider()

Returns the FunctionProvider for the EGL native library.