added GL_VERSION check
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 10 Jul 2003 14:39:57 +0000 (14:39 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 10 Jul 2003 14:39:57 +0000 (14:39 +0000)
progs/tests/getprocaddress.c

index 02e507fb5270f5012e0c8616ab4987aec74ad24d..057d9618ea1080bf39ed7b75bf73360a0f4d6bac 100644 (file)
@@ -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 */