YAGL_LOG_INFO("YAGL_GL_VERSION forces OpenGL version to 2.1");
*version = yagl_gl_2;
res = true;
- } else if (strcmp(tmp, "gl_3") == 0) {
- YAGL_LOG_INFO("YAGL_GL_VERSION forces OpenGL version to 3.2");
- *version = yagl_gl_3;
- res = true;
- } else if (strcmp(tmp, "gl_3_es3") == 0) {
+ } else if (strcmp(tmp, "gl_3_1") == 0) {
YAGL_LOG_INFO("YAGL_GL_VERSION forces OpenGL version to 3.1");
- *version = yagl_gl_3_es3;
+ *version = yagl_gl_3_1;
+ res = true;
+ } else if (strcmp(tmp, "gl_3_1_es3") == 0) {
+ YAGL_LOG_INFO("YAGL_GL_VERSION forces OpenGL version to 3.1 ES3");
+ *version = yagl_gl_3_1_es3;
+ res = true;
+ } else if (strcmp(tmp, "gl_3_2") == 0) {
+ YAGL_LOG_INFO("YAGL_GL_VERSION forces OpenGL version to 3.2");
+ *version = yagl_gl_3_2;
res = true;
} else {
YAGL_LOG_CRITICAL("Bad YAGL_GL_VERSION value = %s", tmp);
for (i = 0; i < num_extensions; ++i) {
tmp = (const char*)GetStringi(GL_EXTENSIONS, i);
if (strcmp(tmp, "GL_ARB_ES3_compatibility") == 0) {
- YAGL_LOG_INFO("GL_ARB_ES3_compatibility supported, using OpenGL 3.1");
- *version = yagl_gl_3_es3;
+ YAGL_LOG_INFO("GL_ARB_ES3_compatibility supported, using OpenGL 3.1 ES3");
+ *version = yagl_gl_3_1_es3;
res = true;
goto out;
}
if ((major > 3) ||
((major == 3) && (minor >= 2))) {
YAGL_LOG_INFO("GL_ARB_ES3_compatibility not supported, using OpenGL 3.2");
- *version = yagl_gl_3;
+ *version = yagl_gl_3_2;
res = true;
goto out;
}
- YAGL_LOG_INFO("GL_ARB_ES3_compatibility not supported, OpenGL 3.2 not supported, using OpenGL 2.1");
- *version = yagl_gl_2;
+ YAGL_LOG_INFO("GL_ARB_ES3_compatibility not supported, OpenGL 3.2 not supported, using OpenGL 3.1");
+ *version = yagl_gl_3_1;
res = true;
out:
{
/* OpenGL 2.1 or OpenGL >= 3.1 compatibility. */
yagl_gl_2 = 0,
- /* OpenGL >= 3.2 core, no GL_ARB_ES3_compatibility support. */
- yagl_gl_3 = 1,
+ /* OpenGL >= 3.1 core. */
+ yagl_gl_3_1 = 1,
/* OpenGL >= 3.1 core, GL_ARB_ES3_compatibility support. */
- yagl_gl_3_es3 = 2
+ yagl_gl_3_1_es3 = 2,
+ /* OpenGL >= 3.2 core, no GL_ARB_ES3_compatibility support. */
+ yagl_gl_3_2 = 3
} yagl_gl_version;
typedef bool (*yagl_api_func)(struct yagl_transport */*t*/);