diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-03-14 07:14:28 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-03-17 12:13:33 +0000 |
commit | d56094423d438c84e0004e43dbbf021fa5446072 (patch) | |
tree | baf94a9bee9172ffcf62fe58fceb12ee3833bb5c | |
parent | c23a60926714805d0a3d7bfebfb841fac5ab4298 (diff) |
framework: Handle supports_gl_compat_version >= 32 with GLUT.
We were wrongly using glutInitContextFlags instead of
glutInitContextProfile. Again, I think that this only ever worked because
GLUT_CORE_PROFILE is also the default.
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | tests/util/piglit-framework-gl/piglit_glut_framework.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/util/piglit-framework-gl/piglit_glut_framework.c b/tests/util/piglit-framework-gl/piglit_glut_framework.c index b10ee1c9c..4651937d0 100644 --- a/tests/util/piglit-framework-gl/piglit_glut_framework.c +++ b/tests/util/piglit-framework-gl/piglit_glut_framework.c @@ -137,10 +137,15 @@ init_glut(void) if (test_config->supports_gl_core_version) { glutInitContextVersion(test_config->supports_gl_core_version / 10, test_config->supports_gl_core_version % 10); - glutInitContextFlags(GLUT_CORE_PROFILE); + if (test_config->supports_gl_core_version >= 32) { + glutInitContextProfile(GLUT_CORE_PROFILE); + } } else { glutInitContextVersion(test_config->supports_gl_compat_version / 10, test_config->supports_gl_compat_version % 10); + if (test_config->supports_gl_compat_version >= 32) { + glutInitContextProfile(GLUT_COMPATIBILITY_PROFILE); + } } #endif |