weston/libweston/renderer-gl
Pekka Paalanen d8a0ba893d gl-renderer: bikeshed GL version handling
The main point here is to print "GL ES %d.%d" instead of "GL ES 2"
because GL-renderer can and will use GL ES 3 features when present.
Saying it's GL ES 2 renderer is not quite true.

To print that, I need to extract major, minor from gr->gl_version and
those didn't have ready made macros yet. While writing the extraction,
make all these trivial functions, so that the compiler might warn us if
one passes e.g. negative literal numbers to gr_gl_version(). Explicit
types help keeping the bit operations safe too.

The only purpose for GR_GL_VERSION_INVALID was to fall back to version
2.0. Moving the fallback and logging into get_gl_version() makes that
macro unnecessary.

Finally, just in case GL version string contained garbage, reject
negative version numbers.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-25 13:16:02 +02:00
..
egl-glue.c gl-renderer: Move EGL display creation to egl-glue.c 2020-02-18 18:11:26 +13:00
gl-renderer-internal.h gl-renderer: require GL_EXT_unpack_subimage 2020-12-15 14:42:46 +00:00
gl-renderer.c gl-renderer: bikeshed GL version handling 2021-02-25 13:16:02 +02:00
gl-renderer.h gl-renderer: Replace pbuffer-create args with struct 2020-03-20 15:25:24 +00:00
meson.build build: link libm explicitly 2019-10-24 13:29:33 +03:00