aboutsummaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorKarl Schultz <[email protected]>2002-01-16 01:03:25 +0000
committerKarl Schultz <[email protected]>2002-01-16 01:03:25 +0000
commit40fac75370507924b013908ecaa5fb37e8501dba (patch)
tree41ee81a1dd0939427c52d98b4ae5010b8a0a8e14 /progs
parent3d587f643229a29f615d5047e47e4a3805930588 (diff)
get tests working on windows (Robert Bergkvist)
Diffstat (limited to 'progs')
-rw-r--r--progs/tests/Makefile.win44
-rw-r--r--progs/tests/cva.c7
-rw-r--r--progs/tests/dinoshade.c4
-rw-r--r--progs/tests/multipal.c9
4 files changed, 61 insertions, 3 deletions
diff --git a/progs/tests/Makefile.win b/progs/tests/Makefile.win
new file mode 100644
index 00000000000..0de6c42e398
--- /dev/null
+++ b/progs/tests/Makefile.win
@@ -0,0 +1,44 @@
+# $Id: Makefile.win,v 1.1 2002/01/16 01:03:25 kschultz Exp $
+
+# Mesa 3-D graphics library
+# Version: 3.5
+# Copyright (C) 1995-2001 Brian Paul
+
+# Makefile for GLUT-based demo programs for Windows
+
+!include <win32.mak>
+
+##### MACROS #####
+
+TOP = ..
+INCDIR = ..\include
+LIBDIR = ..\lib
+
+SRCS = cva.c \
+ dinoshade.c \
+ fogcoord.c \
+ manytex.c \
+ multipal.c \
+ projtex.c \
+ seccolor.c \
+# sharedtex.c \
+ texline.c \
+ texwrap.c \
+ vptest1.c \
+ vptest2.c \
+ vptest3.c \
+ vptorus.c \
+ vpwarpmesh.c
+
+!include "../mesawin32.mak"
+
+##### TARGETS #####
+
+clean::
+
+clobber::
+ @del readtex.c readtex.h
+
+$(EXES) :$*.obj
+ @echo $@
+ $(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS)
diff --git a/progs/tests/cva.c b/progs/tests/cva.c
index c6292f490f5..c15f3bd2412 100644
--- a/progs/tests/cva.c
+++ b/progs/tests/cva.c
@@ -1,4 +1,4 @@
-/* $Id: cva.c,v 1.3 2000/11/30 03:06:56 gareth Exp $ */
+/* $Id: cva.c,v 1.4 2002/01/16 01:03:25 kschultz Exp $ */
/*
* Trivial CVA test, good for testing driver fastpaths (especially
@@ -11,6 +11,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
#define GL_GLEXT_LEGACY
#include <GL/glut.h>
@@ -130,7 +133,7 @@ int main( int argc, char **argv )
*/
string = (char *) glGetString( GL_VERSION );
- if ( !strstr( string, "1.2" ) ) {
+ if ( (!strstr( string, "1.2" ))&&(!strstr(string,"1.3"))) {
fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" );
exit( -1 );
}
diff --git a/progs/tests/dinoshade.c b/progs/tests/dinoshade.c
index 33fb45d36ed..e3086bb3f0b 100644
--- a/progs/tests/dinoshade.c
+++ b/progs/tests/dinoshade.c
@@ -38,6 +38,10 @@
#include <stdlib.h>
#include <string.h>
#include <math.h> /* for cos(), sin(), and sqrt() */
+#ifdef _WIN32
+#include <windows.h>
+#endif
+#define GL_GLEXT_LEGACY
#include <GL/glut.h> /* OpenGL Utility Toolkit header */
/* Some <math.h> files do not define M_PI... */
diff --git a/progs/tests/multipal.c b/progs/tests/multipal.c
index 109135080d3..d4b8e53a14f 100644
--- a/progs/tests/multipal.c
+++ b/progs/tests/multipal.c
@@ -1,4 +1,4 @@
-/* $Id: multipal.c,v 1.1 2000/11/18 17:12:33 brianp Exp $ */
+/* $Id: multipal.c,v 1.2 2002/01/16 01:03:25 kschultz Exp $ */
/*
* GL_ARB_multitexture demo
@@ -12,6 +12,9 @@
/*
* $Log: multipal.c,v $
+ * Revision 1.2 2002/01/16 01:03:25 kschultz
+ * get tests working on windows (Robert Bergkvist)
+ *
* Revision 1.1 2000/11/18 17:12:33 brianp
* test texture palettes with multitexture
*
@@ -52,6 +55,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
+#define GL_GLEXT_LEGACY
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */