From 356959952c93b64b5b6227c4fc2b3c4e9e08d6a1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 10 Jul 2003 14:39:57 +0000 Subject: [PATCH] added GL_VERSION check --- progs/tests/getprocaddress.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/progs/tests/getprocaddress.c b/progs/tests/getprocaddress.c index 02e507fb527..057d9618ea1 100644 --- a/progs/tests/getprocaddress.c +++ b/progs/tests/getprocaddress.c @@ -287,7 +287,14 @@ check_functions( const char *extensions ) for (entry = functions; entry->name; entry++) { if (entry->name[0] == '-') { if (entry->name[1] == '1') { - doTests = 1; + /* check GL version X.Y */ + const char *version = (const char *) glGetString(GL_VERSION); + if (version[0] == entry->name[1] && + version[1] == entry->name[2] && + version[2] >= entry->name[3]) + doTests = 1; + else + doTests = 0; } else { /* check if the named extension is available */ -- 2.30.2