GlCapabilities

What the device's OpenGL ES implementation can actually do.

The SDK baseline is ES 3.0 and the library manifest requires exactly that. The particle layers are the only part that needs more: their vertex, fragment and compute shaders declare #version 310 es, and the pipeline uses compute dispatch, shader storage buffers and image load/store, none of which exist before ES 3.1. Everything else - encoded raster, vector fill, line, circle, symbol and heatmap layers, stencil masks, data query text - runs on 3.0.

The check reads the version the platform advertises rather than querying a live GL context, because layers are added from the main thread, often before any context is current.

Functions

Link copied to clipboard

Human-readable form of reqGlEsVersion, e.g. 3.1.

Link copied to clipboard
fun reqGlEsVersion(context: Context): Int

The device's advertised OpenGL ES version as a packed reqGlEsVersion, e.g. 0x00030002 for ES 3.2. Cached; the value cannot change while the process lives.

Link copied to clipboard

Whether this device can render the particle layers (wind-particles and the other *-particles codes). False below ES 3.1, where their shaders cannot compile.