GLESCapabilities classes. A GLESCapabilities instance contains flags for functionality that is available in an
OpenGL ES context. Internally, it also contains function pointers that are only valid in that specific OpenGL ES context.GLESCapabilities instances, corresponding to OpenGL ES contexts that are current in those threads.The OpenGL ES library is loaded automatically when this class is initialized. Set the Configuration#OPENGLES_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#OPENGLES_LIBRARY_NAME option. The maximum OpenGL ES version loaded can be set with the
Configuration#OPENGLES_MAXVERSION option. This can be useful to ensure that no functionality above a specific version is used during development.
Instances of GLESCapabilities can be created with the createCapabilities method. An OpenGL ES context must be current in the current
thread before it is called. Calling this method is expensive, so the GLESCapabilities instance should be associated with the OpenGL ES context and
reused as necessary.
Before a function for a given OpenGL ES context can be called, the corresponding GLESCapabilities instance must be passed to the setCapabilities method. The user is also responsible for clearing the current GLESCapabilities instance when the context is destroyed or made
current in another thread.
Note that the createCapabilities method implicitly calls setCapabilities with the newly created instance.
| Modifier and Type | Class and Description |
|---|---|
| private static interface | GLES.
Function pointer provider. |
| private static class | GLES.
Write-once |
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadLocal | |
| private static FunctionProvider | |
| private static GLES. | |
| private static final APIUtil. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static GLESCapabilities | |
| public static void | |
| public static void | |
| private static void | |
| public static void | create(FunctionProvider
the provider of OpenGL ES function addresses functionProvider)Initializes OpenGL ES with the specified |
| public static GLESCapabilities | Returns: theGLESCapabilities instanceCreates a new |
| public static GLESCapabilities | Returns: theGLESCapabilities instancea function that allocates a bufferFactory)PointerBuffer given a size. The buffer must be filled with zeroes. If null, LWJGL will
allocate a GC-managed buffer internally.Creates a new |
| public static void | |
| public static GLESCapabilities | getCapabilities()
Returns the |
| private static FunctionProvider | |
| public static FunctionProvider | |
| pack-priv static GLESCapabilities | |
| pack-priv static void | |
| public static void | setCapabilities(GLESCapabilities caps)
Sets the |
| capabilitiesTLS | back to summary |
|---|---|
| private static final ThreadLocal<GLESCapabilities> capabilitiesTLS | |
| functionProvider | back to summary |
|---|---|
| private static FunctionProvider functionProvider
| |
| icd | back to summary |
|---|---|
| private static GLES. | |
| MAX_VERSION | back to summary |
|---|---|
| private static final APIUtil. | |
| GLES | back to summary |
|---|---|
| private GLES() | |
| checkCapabilities | back to summary |
|---|---|
| private static GLESCapabilities checkCapabilities(GLESCapabilities caps) | |
| create | back to summary |
|---|---|
| public static void create() Loads the OpenGL ES native library, using the default library name. | |
| create | back to summary |
|---|---|
| public static void create(String libName) Loads the OpenGL ES native library, using the specified library name.
| |
| create | back to summary |
|---|---|
| private static void create(SharedLibrary GLES) | |
| create | back to summary |
|---|---|
| public static void create(FunctionProvider functionProvider) Initializes OpenGL ES with the specified
| |
| createCapabilities | back to summary |
|---|---|
| public static GLESCapabilities createCapabilities() Creates a new This method calls
| |
| createCapabilities | back to summary |
|---|---|
| public static GLESCapabilities createCapabilities(IntFunction<PointerBuffer> bufferFactory) Creates a new This method calls
| |
| destroy | back to summary |
|---|---|
| public static void destroy() Unloads the OpenGL ES native library. | |
| getCapabilities | back to summary |
|---|---|
| public static GLESCapabilities getCapabilities() Returns the
| |
| getContextProvider | back to summary |
|---|---|
private static FunctionProvider getContextProvider()
| |
| getFunctionProvider | back to summary |
|---|---|
| public static FunctionProvider getFunctionProvider() Returns the
| |
| getICD | back to summary |
|---|---|
| pack-priv static GLESCapabilities getICD() | |
| initialize | back to summary |
|---|---|
| pack-priv static void initialize() Ensures that the lwjgl_opengles shared library has been loaded. | |
| setCapabilities | back to summary |
|---|---|
| public static void setCapabilities(GLESCapabilities caps) Sets the This | |
| Modifier and Type | Method and Description |
|---|---|
| public GLESCapabilities | |
| public default void |
| get | back to summary |
|---|---|
public GLESCapabilities get()
| |
| set | back to summary |
|---|---|
| public default void set(GLESCapabilities caps) | |
ICD.
This is the default implementation that skips the thread-local lookup. When a new GLESCapabilities is set, we compare it to the write-once capabilities. If different function pointers are found, we fall back to the expensive lookup.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static GLESCapabilities |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public GLESCapabilities | |
| public void |
| tempCaps | back to summary |
|---|---|
| private static GLESCapabilities tempCaps
| |
| ICDStatic | back to summary |
|---|---|
| private ICDStatic() | |
| get | back to summary |
|---|---|
| public GLESCapabilities get() Implements org.
| |
| set | back to summary |
|---|---|
| public void set(GLESCapabilities caps) Overrides default org.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final GLESCapabilities |
| Access | Constructor and Description |
|---|---|
| private |
| caps | back to summary |
|---|---|
| pack-priv static final GLESCapabilities caps | |
| WriteOnce | back to summary |
|---|---|
| private WriteOnce() | |