mesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors
[mesa.git] / progs / tests / cva.c
index c15f3bd24129e523aacbb87995b52a769b4384c9..a47b2a9319a3f6f09975d7360e58ec2760c70c74 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: cva.c,v 1.4 2002/01/16 01:03:25 kschultz 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,7 +138,8 @@ int main( int argc, char **argv )
     */
    string = (char *) glGetString( GL_VERSION );
 
-   if ( (!strstr( string, "1.2" ))&&(!strstr(string,"1.3"))) {
+   version = atof(string);
+   if ( version < 1.2 ) {
       fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" );
       exit( -1 );
    }