mesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors
[mesa.git] / progs / tests / cva.c
index eff35048f3c04b89d71e3020d96289535dc9d510..a47b2a9319a3f6f09975d7360e58ec2760c70c74 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: cva.c,v 1.5 2003/01/28 15:31:35 brianp Exp $ */
 
 /*
  * Trivial CVA test, good for testing driver fastpaths (especially
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#ifdef __VMS
+# include <stddef.h>   /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
+#else
+# include <malloc.h>   /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
+#endif
 #ifdef _WIN32
 #include <windows.h>
 #endif
@@ -114,6 +118,7 @@ int main( int argc, char **argv )
 {
    GLenum type;
    char *string;
+   double version;
 
    glutInit( &argc, argv );
 
@@ -133,9 +138,8 @@ int main( int argc, char **argv )
     */
    string = (char *) glGetString( GL_VERSION );
 
-   if ( !strstr(string, "1.2") &&
-        !strstr(string, "1.3") &&
-        !strstr(string, "1.4")) {
+   version = atof(string);
+   if ( version < 1.2 ) {
       fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" );
       exit( -1 );
    }