gl4es: Delay feature detection until a context exists
gl4es feature detection does not work reliably with EGL.
If a context already exists, gl4es can instead reliably detect the underlying GLES features from the context itself.
This requires gl4es to be configured with:
-DNOEGL=ON -DNO_LOADER=ON -DNO_INIT_CONSTRUCTOR=ON
This also requires gl4es to have this fix: https://github.com/ptitSeb/gl4es/pull/271
I've been told previously that we do not want to support gl4es officially but we already have an Android-specific hack, and this little MR is all that's needed to support it on other embedded platforms.
The code is self-contained and is trivial to remove once/if we have native GLES support.
As this fixes feature detection, it brings up the FPS on my RG351p from 0.1 to 7.
Edited by Gleb Mazovetskiy