aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-21 07:27:12 -0600
committerBrian Paul <[email protected]>2009-04-21 07:27:27 -0600
commitdad1c1be18dc4e8e7f51cdb91652124e9427e644 (patch)
treea73b32f401c10536a48e698ea9a33f8717827048
parent25e3a534035e71bb319d2e11906d376734941a21 (diff)
demos: check that GL version is 2.0 or higher
-rw-r--r--progs/tests/shader_api.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/progs/tests/shader_api.c b/progs/tests/shader_api.c
index a513ca6ba1f..6453856345c 100644
--- a/progs/tests/shader_api.c
+++ b/progs/tests/shader_api.c
@@ -321,10 +321,18 @@ static void run_test(const char *name, void (*callback)(void))
int main(int argc, char **argv)
{
+ const char *version;
+
glutInit(&argc, argv);
glutCreateWindow("Mesa bug demo");
glewInit();
+ version = (const char *) glGetString(GL_VERSION);
+ if (version[0] == '1') {
+ printf("Sorry, this test requires OpenGL 2.x GLSL support\n");
+ exit(0);
+ }
+
RUN_TEST(test_uniform_size_type);
RUN_TEST(test_attrib_size_type);
RUN_TEST(test_uniform_array_overflow);