CoryU's solution requires the OpenGL bindings because it ends up just using OpenGL directly // pretend we're using GLES in windows, instead use a subset of OpenGL 2.0 as GLES 2.0
(while the linked URL in their post is dead, you can still read it via the Wayback Machine: https://web.archive.org/web/20210224204635/https://bedroomcoders.co.uk/gles2-0-everywhere-thanks-to-lwjgl3/)
And for some use cases, that may what you actually want! However if you want to use OpenGL ES via ANGLE, you need to do things differently instead...
If you are using the LWJGL quick start code as a base, first you'll need to change all GL calls into GLES calls, after doing this, the code will still not work, complaining that There is no OpenGL ES context current in the current thread
To fix that, you need to add the following window hints in the init
function
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API) // This is what ACTUALLY makes it work
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API)
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3)
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0)
And after enabling it and running it using ANGLE... (overlay by RenderDoc)
And here's is running with Mesa
For more information, here's a example of using OpenGLES in LWJGL: https://github.com/LWJGL/lwjgl3/blob/e7008a878ca8065db6b5cffb53594659344de300/modules/samples/src/test/java/org/lwjgl/demo/egl/EGLDemo.java#L39