diff options
Diffstat (limited to 'progs/vp')
-rw-r--r-- | progs/vp/Makefile | 14 | ||||
-rw-r--r-- | progs/vp/exp.txt | 9 | ||||
-rw-r--r-- | progs/vp/log.txt | 9 | ||||
-rwxr-xr-x | progs/vp/run.sh | 7 | ||||
-rw-r--r-- | progs/vp/vp-tris.c | 3 |
5 files changed, 26 insertions, 16 deletions
diff --git a/progs/vp/Makefile b/progs/vp/Makefile index c3faeb5b60..41d025c574 100644 --- a/progs/vp/Makefile +++ b/progs/vp/Makefile @@ -8,7 +8,7 @@ TOP = ../.. include $(TOP)/configs/current -LIBS = $(APP_LIB_DEPS) +LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) SOURCES = \ vp-tris.c @@ -26,13 +26,13 @@ INCLUDES = -I. -I$(TOP)/include -I../samples .SUFFIXES: .c .c: - $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@ + $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@ .c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ .S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ ##### TARGETS ##### @@ -40,9 +40,9 @@ INCLUDES = -I. -I$(TOP)/include -I../samples default: $(PROGS) clean: - rm -f $(PROGS) - rm -f *.o - rm -f getproclist.h + -rm -f $(PROGS) + -rm -f *.o + -rm -f getproclist.h diff --git a/progs/vp/exp.txt b/progs/vp/exp.txt index 601aae7d71..53ce71db96 100644 --- a/progs/vp/exp.txt +++ b/progs/vp/exp.txt @@ -1,5 +1,6 @@ -!!VP1.0 -EXP R0, v[COL0].x; -ADD o[COL0], R0.z, -R0.w; -MOV o[HPOS], v[OPOS]; +!!ARBvp1.0 +TEMP R0; +EXP R0, vertex.color.x; +SUB result.color, R0.z, R0.w; +MOV result.position, vertex.position; END diff --git a/progs/vp/log.txt b/progs/vp/log.txt index 9b04268433..6b4e94ed0e 100644 --- a/progs/vp/log.txt +++ b/progs/vp/log.txt @@ -1,6 +1,7 @@ -!!VP1.0 -ADD R0, v[COL0], v[COL0]; +!!ARBvp1.0 +TEMP R0; +ADD R0, vertex.color, vertex.color; ADD R0, R0, R0; -LOG o[COL0], R0.x; -MOV o[HPOS], v[OPOS]; +LOG result.color, R0.x; +MOV result.position, vertex.position; END diff --git a/progs/vp/run.sh b/progs/vp/run.sh new file mode 100755 index 0000000000..fdd43d4a52 --- /dev/null +++ b/progs/vp/run.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +for i in *.txt ; do +echo $i +./vp-tris $i +done + diff --git a/progs/vp/vp-tris.c b/progs/vp/vp-tris.c index 58014dd48d..e1ddb2e14d 100644 --- a/progs/vp/vp-tris.c +++ b/progs/vp/vp-tris.c @@ -5,7 +5,6 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> -#include <GL/glut.h> #ifndef WIN32 #include <unistd.h> @@ -15,6 +14,8 @@ #include <GL/glext.h> #endif +#include <GL/glut.h> + #ifdef WIN32 static PFNGLBINDPROGRAMARBPROC glBindProgramARB = NULL; static PFNGLGENPROGRAMSARBPROC glGenProgramsARB = NULL; |