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 c15f3bd24129e523aacbb87995b52a769b4384c9..a47b2a9319a3f6f09975d7360e58ec2760c70c74 100644
(file)
--- a/
progs/tests/cva.c
+++ b/
progs/tests/cva.c
@@
-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
/*
* Trivial CVA test, good for testing driver fastpaths (especially
@@
-11,6
+10,11
@@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#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
#ifdef _WIN32
#include <windows.h>
#endif
@@
-114,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 );
@@
-133,7
+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"))) {
+ 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 );
}