From 40fac75370507924b013908ecaa5fb37e8501dba Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Wed, 16 Jan 2002 01:03:25 +0000 Subject: [PATCH] get tests working on windows (Robert Bergkvist) --- progs/tests/Makefile.win | 44 ++++++++++++++++++++++++++++++++++++++++ progs/tests/cva.c | 7 +++++-- progs/tests/dinoshade.c | 4 ++++ progs/tests/multipal.c | 9 +++++++- 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 progs/tests/Makefile.win 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 + +##### 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 #include #include +#ifdef _WIN32 +#include +#endif #define GL_GLEXT_LEGACY #include @@ -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 #include #include /* for cos(), sin(), and sqrt() */ +#ifdef _WIN32 +#include +#endif +#define GL_GLEXT_LEGACY #include /* OpenGL Utility Toolkit header */ /* Some 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 #include #include +#ifdef _WIN32 +#include +#endif +#define GL_GLEXT_LEGACY #include #include "../util/readtex.c" /* I know, this is a hack. */ -- 2.30.2