This adds `USE_GLES` compile-time flag. If it's defined, gfx_init()
requests an OpenGL ES >=3.0 context.
This also makes the following changes to make it work with OpenGL ES:
- The USE_GLES flag also switches shader's #version directive, which is
now provided separately from the .glsl file.
- Implicit conversion between int and float is not supported in GLSL ES.
- Use GL_RGB in gfx_copy_main_surface. Because main_surface is in GL_RGB
format, using GL_RGBA generates GL_INVALID_OPERATION in OpenGL ES.
MacOS does not support OpenGL compatibility profile, so the following
changes had to be made:
- Replaced deprecated texture2D() with texture() in shaders
- Renamed `texture` uniform variable to `tex`, to avoid name conflict
- Use VAO, which is mandatory in OpenGL 3 core profile