-/* $Id: cva.c,v 1.6 2003/11/23 10:27:10 keithw Exp $ */
/*
* Trivial CVA test, good for testing driver fastpaths (especially
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <malloc.h> /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
+#include <stddef.h> /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
#ifdef _WIN32
#include <windows.h>
#endif
#define GL_GLEXT_LEGACY
#include <GL/glut.h>
-
+#include <GL/glext.h>
GLfloat verts[][4] = {
{ -0.5, -0.5, -2.0, 0.0 },
{
GLenum type;
char *string;
+ double version;
glutInit( &argc, 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 );
}