projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors
[mesa.git]
/
progs
/
tests
/
cva.c
diff --git
a/progs/tests/cva.c
b/progs/tests/cva.c
index b596a5a4d3ec73bff3462164c9387ff46592be89..a47b2a9319a3f6f09975d7360e58ec2760c70c74 100644
(file)
--- a/
progs/tests/cva.c
+++ b/
progs/tests/cva.c
@@
-1,4
+1,3
@@
-/* $Id: cva.c,v 1.6 2003/11/23 10:27:10 keithw Exp $ */
/*
* Trivial CVA test, good for testing driver fastpaths (especially
/*
* Trivial CVA test, good for testing driver fastpaths (especially
@@
-11,7
+10,11
@@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <malloc.h> /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
+#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
#ifdef _WIN32
#include <windows.h>
#endif
@@
-115,6
+118,7
@@
int main( int argc, char **argv )
{
GLenum type;
char *string;
{
GLenum type;
char *string;
+ double version;
glutInit( &argc, argv );
glutInit( &argc, argv );
@@
-134,9
+138,8
@@
int main( int argc, char **argv )
*/
string = (char *) glGetString( GL_VERSION );
*/
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 );
}
fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" );
exit( -1 );
}