-
Paul Berry authored
Previously, piglit_get_gl_version() had three return values: the GL version (major and minor version numbers separately) and a boolean indicating whether or not the API is GL ES. This meant that we had to jump through hoops in order to use it, e.g.: /* Are we using GL with a version of at least 3.1? */ bool es; int major; int minor; piglit_get_gl_version(&es, &major, &minor); if (!es && (major > 3 || (major == 3 && minor >= 1))) ... This patch changes piglit_get_gl_version() so that it returns a single integer whose value is 10 times the GL version (e.g. 31 for GL version 3.1), and splits off the functionality for checking whether the API is GL ES to a new function, piglit_is_gles(). Now the same logic looks like this: /* Are we using GL with a version of at least 3.1? */ if (!piglit_is_gles() && piglit_get_gl_version() >= 31) ... Reviewed-by: Brian Paul <brianp@vmware.com>
2733dc61