aboutsummaryrefslogtreecommitdiffstats
path: root/progs/vp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-05-21 09:32:38 -0700
committerEric Anholt <[email protected]>2010-05-21 12:20:39 -0700
commit68fc4b415e322f6744299e39864fbc377c6eff74 (patch)
tree4bafffd8b0105174f3c5c0ae327a005be9145990 /progs/vp
parente4f4489e3fc0b36d72821b55794fb843b2b7fa5f (diff)
Remove demos that have moved to git+ssh://git.freedesktop.org/git/mesa/demos.
The remaining programs are ones I've had difficulty finding a build environment for to make the build system or are unit tests that should probably live next to their code instead. Hopefully people can bring over the build for remaining pieces they care about.
Diffstat (limited to 'progs/vp')
-rw-r--r--progs/vp/.gitignore1
-rw-r--r--progs/vp/Makefile53
-rw-r--r--progs/vp/SConscript6
-rw-r--r--progs/vp/abs.txt7
-rw-r--r--progs/vp/add-param-imm.txt7
-rw-r--r--progs/vp/add.txt6
-rw-r--r--progs/vp/addimm.txt5
-rw-r--r--progs/vp/arl-static.txt7
-rw-r--r--progs/vp/arl-unused.txt7
-rw-r--r--progs/vp/arl.txt9
-rw-r--r--progs/vp/dp3.txt5
-rw-r--r--progs/vp/dp4.txt5
-rw-r--r--progs/vp/dph.txt5
-rw-r--r--progs/vp/dst.txt5
-rw-r--r--progs/vp/ex2.txt6
-rw-r--r--progs/vp/exp-no-w.txt6
-rw-r--r--progs/vp/exp.txt6
-rw-r--r--progs/vp/flr.txt6
-rw-r--r--progs/vp/frc.txt6
-rw-r--r--progs/vp/lg2.txt6
-rw-r--r--progs/vp/lit.txt6
-rw-r--r--progs/vp/log.txt7
-rw-r--r--progs/vp/mad.txt5
-rw-r--r--progs/vp/max.txt5
-rw-r--r--progs/vp/min.txt5
-rw-r--r--progs/vp/mov.txt5
-rw-r--r--progs/vp/msk.txt7
-rw-r--r--progs/vp/mul.txt5
-rw-r--r--progs/vp/pow.txt5
-rw-r--r--progs/vp/psiz-imm.txt5
-rw-r--r--progs/vp/psiz-mul-clamp.txt9
-rw-r--r--progs/vp/psiz-mul.txt6
-rw-r--r--progs/vp/psiz-param-clamp.txt10
-rw-r--r--progs/vp/rcp.txt7
-rw-r--r--progs/vp/rsq.txt7
-rwxr-xr-xprogs/vp/run.sh7
-rw-r--r--progs/vp/sge.txt5
-rw-r--r--progs/vp/slt.txt5
-rw-r--r--progs/vp/sub.txt5
-rw-r--r--progs/vp/swz.txt5
-rw-r--r--progs/vp/swz2.txt5
-rw-r--r--progs/vp/vp-tris.c333
-rw-r--r--progs/vp/windows/vp2003.sln21
-rw-r--r--progs/vp/windows/vp2003.vcproj121
-rw-r--r--progs/vp/xform.txt11
-rw-r--r--progs/vp/xpd.txt5
46 files changed, 0 insertions, 781 deletions
diff --git a/progs/vp/.gitignore b/progs/vp/.gitignore
deleted file mode 100644
index a5ff9935254..00000000000
--- a/progs/vp/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-vp-tris
diff --git a/progs/vp/Makefile b/progs/vp/Makefile
deleted file mode 100644
index 58a0dacb22e..00000000000
--- a/progs/vp/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# progs/tests/Makefile
-
-
-# These programs aren't intended to be included with the normal distro.
-# They're not too interesting but they're good for testing.
-
-TOP = ../..
-include $(TOP)/configs/current
-
-
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
-
-SOURCES = \
- vp-tris.c
-
-
-
-PROGS = $(SOURCES:%.c=%)
-
-INCLUDES = -I. -I$(TOP)/include -I../samples
-
-
-##### RULES #####
-
-.SUFFIXES:
-.SUFFIXES: .c
-
-.c:
- $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
-
-.c.o:
- $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
- $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-
-##### TARGETS #####
-
-default: $(PROGS)
-
-clean:
- -rm -f $(PROGS)
- -rm -f *.o
- -rm -f getproclist.h
-
-
-
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
diff --git a/progs/vp/SConscript b/progs/vp/SConscript
deleted file mode 100644
index 787cb793af2..00000000000
--- a/progs/vp/SConscript
+++ /dev/null
@@ -1,6 +0,0 @@
-Import('*')
-
-progs_env.Program(
- target = 'vp-tris',
- source = ['vp-tris.c'],
- )
diff --git a/progs/vp/abs.txt b/progs/vp/abs.txt
deleted file mode 100644
index cd00952e349..00000000000
--- a/progs/vp/abs.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-SUB R0, {0.5}.x, vertex.color;
-ABS result.color, R0;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/add-param-imm.txt b/progs/vp/add-param-imm.txt
deleted file mode 100644
index 90bcf96528f..00000000000
--- a/progs/vp/add-param-imm.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-PARAM Emission = state.material.emission;
-ADD R0, vertex.color, {-0.5}.x;
-ADD result.color, R0, Emission.w;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/add.txt b/progs/vp/add.txt
deleted file mode 100644
index 4094cd448dc..00000000000
--- a/progs/vp/add.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-ADD R0, vertex.color, vertex.color;
-ADD result.color, R0, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/addimm.txt b/progs/vp/addimm.txt
deleted file mode 100644
index f5796d78100..00000000000
--- a/progs/vp/addimm.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-ADD result.color, vertex.color, {.5}.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/arl-static.txt b/progs/vp/arl-static.txt
deleted file mode 100644
index 83aebf689ea..00000000000
--- a/progs/vp/arl-static.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-PARAM arr[7] = { {.0,.1,.2,.3}, {.4,.5,.6,.7}, {.8,.9,.10,.1}, {.12,.3,.4,.14}, {.5,.8,.1,.9}, {.2,0,.4,.1}, {.6,.1,.8,.9}};
-ADDRESS addr;
-ARL addr.x, {3}.x;
-MOV result.color, arr[addr.x];
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/arl-unused.txt b/progs/vp/arl-unused.txt
deleted file mode 100644
index c2afe3c0924..00000000000
--- a/progs/vp/arl-unused.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-PARAM arr[7] = { {.0,.1,.2,.3}, {.4,.5,.6,.7}, {.8,.9,.10,.1}, {.12,.3,.4,.14}, {.5,.8,.1,.9}, {.2,0,.4,.1}, {.6,.1,.8,.9}};
-ADDRESS addr;
-ARL addr.x, {3}.x; # not actually used
-MOV result.color, arr[3];
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/arl.txt b/progs/vp/arl.txt
deleted file mode 100644
index a262b0149c6..00000000000
--- a/progs/vp/arl.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-!!ARBvp1.0
-PARAM arr[5] = { {0,1,2,3}, {4,5,6,7}, {8,9,10,11}, {12,13,14,14}, {16,17,18,19} };
-ADDRESS addr;
-TEMP R0;
-MAD R0, {5.0}.x, vertex.color, {2.0}.x;
-ARL addr.x, R0.x;
-MUL result.color, arr[addr.x-2], {.07}.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/dp3.txt b/progs/vp/dp3.txt
deleted file mode 100644
index 8336bd3dd8e..00000000000
--- a/progs/vp/dp3.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-DP3 result.color, vertex.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/dp4.txt b/progs/vp/dp4.txt
deleted file mode 100644
index 70505a494c5..00000000000
--- a/progs/vp/dp4.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-DP4 result.color, vertex.color.xxxx, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/dph.txt b/progs/vp/dph.txt
deleted file mode 100644
index c7cab1384dd..00000000000
--- a/progs/vp/dph.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-DPH result.color, vertex.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/dst.txt b/progs/vp/dst.txt
deleted file mode 100644
index 03613c0eece..00000000000
--- a/progs/vp/dst.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-DST result.color, vertex.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/ex2.txt b/progs/vp/ex2.txt
deleted file mode 100644
index bbef67bbb8a..00000000000
--- a/progs/vp/ex2.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-EX2 R0, vertex.color.x;
-SUB result.color, R0, {1.0}.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/exp-no-w.txt b/progs/vp/exp-no-w.txt
deleted file mode 100644
index 98ed4b7a981..00000000000
--- a/progs/vp/exp-no-w.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-EXP R0, vertex.color.x;
-SUB result.color, R0.z, {1.0}.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/exp.txt b/progs/vp/exp.txt
deleted file mode 100644
index 53ce71db965..00000000000
--- a/progs/vp/exp.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!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/flr.txt b/progs/vp/flr.txt
deleted file mode 100644
index c33280da978..00000000000
--- a/progs/vp/flr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-ADD R0, vertex.color, {0.5}.x;
-FLR result.color, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/frc.txt b/progs/vp/frc.txt
deleted file mode 100644
index d8e72b60cc7..00000000000
--- a/progs/vp/frc.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-MUL R0, vertex.color, {3.0}.x;
-FRC result.color, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/lg2.txt b/progs/vp/lg2.txt
deleted file mode 100644
index 2f59b993a41..00000000000
--- a/progs/vp/lg2.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-MUL R0, vertex.color, {4.0}.x;
-LG2 result.color, R0.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/lit.txt b/progs/vp/lit.txt
deleted file mode 100644
index 65705b41705..00000000000
--- a/progs/vp/lit.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-SUB R0, {0.5}.x, vertex.color;
-LIT result.color, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/log.txt b/progs/vp/log.txt
deleted file mode 100644
index 6b4e94ed0ed..00000000000
--- a/progs/vp/log.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-ADD R0, vertex.color, vertex.color;
-ADD R0, R0, R0;
-LOG result.color, R0.x;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/mad.txt b/progs/vp/mad.txt
deleted file mode 100644
index 0c9ed6c8b7f..00000000000
--- a/progs/vp/mad.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MAD result.color, vertex.color.z, {1,0,0,1}, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/max.txt b/progs/vp/max.txt
deleted file mode 100644
index 6747ca57277..00000000000
--- a/progs/vp/max.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MAX result.color, {0.5}.x, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/min.txt b/progs/vp/min.txt
deleted file mode 100644
index 2adc872ed9c..00000000000
--- a/progs/vp/min.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MIN result.color, {0.5}.x, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/mov.txt b/progs/vp/mov.txt
deleted file mode 100644
index 9ce1a453067..00000000000
--- a/progs/vp/mov.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MOV result.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/msk.txt b/progs/vp/msk.txt
deleted file mode 100644
index 9e925aca11e..00000000000
--- a/progs/vp/msk.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-MOV R0.xz, vertex.color;
-MOV R0.yw, {0.5}.x;
-MOV result.color, R0;
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/mul.txt b/progs/vp/mul.txt
deleted file mode 100644
index e479cdb8543..00000000000
--- a/progs/vp/mul.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MUL result.color, vertex.color, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/pow.txt b/progs/vp/pow.txt
deleted file mode 100644
index 512412997de..00000000000
--- a/progs/vp/pow.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-POW result.color, vertex.color.x, vertex.color.y;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/psiz-imm.txt b/progs/vp/psiz-imm.txt
deleted file mode 100644
index 18de2498d67..00000000000
--- a/progs/vp/psiz-imm.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MOV result.color, vertex.color;
-MOV result.pointsize, {2.0, 0, 0, 1};
-MOV result.position, vertex.position;
-END
diff --git a/progs/vp/psiz-mul-clamp.txt b/progs/vp/psiz-mul-clamp.txt
deleted file mode 100644
index 284c032d790..00000000000
--- a/progs/vp/psiz-mul-clamp.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-MOV result.color, vertex.color;
-MUL R0.x, vertex.color.x, {10.0}.x;
-MAX R0.x, R0.x, {2.0}.x;
-MIN result.pointsize.x, R0.x, {4.0}.x;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/psiz-mul.txt b/progs/vp/psiz-mul.txt
deleted file mode 100644
index a74df66de29..00000000000
--- a/progs/vp/psiz-mul.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBvp1.0
-MOV result.color, vertex.color;
-MUL result.pointsize, vertex.color.x, {10.0}.x;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/psiz-param-clamp.txt b/progs/vp/psiz-param-clamp.txt
deleted file mode 100644
index 7f83fc45165..00000000000
--- a/progs/vp/psiz-param-clamp.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-TEMP R1;
-MOV result.color, vertex.color;
-MUL R0.x, vertex.color.x, {10.0}.x;
-MAX R0.x, R0.x, {2.0}.x;
-MIN result.pointsize.x, R0.x, {4.0}.x;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/rcp.txt b/progs/vp/rcp.txt
deleted file mode 100644
index e16292bd00a..00000000000
--- a/progs/vp/rcp.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-ADD R0, vertex.color.x, vertex.color.x;
-RCP result.color, R0.x;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/rsq.txt b/progs/vp/rsq.txt
deleted file mode 100644
index 3e3f3251ee0..00000000000
--- a/progs/vp/rsq.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBvp1.0
-TEMP R0;
-MUL R0, vertex.color, {3.0}.x;
-RSQ result.color, R0.x;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/run.sh b/progs/vp/run.sh
deleted file mode 100755
index fdd43d4a52b..00000000000
--- a/progs/vp/run.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-for i in *.txt ; do
-echo $i
-./vp-tris $i
-done
-
diff --git a/progs/vp/sge.txt b/progs/vp/sge.txt
deleted file mode 100644
index 3fa82e5d5ea..00000000000
--- a/progs/vp/sge.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-SGE result.color, {0.5}.x, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/slt.txt b/progs/vp/slt.txt
deleted file mode 100644
index 6bf8ffa775d..00000000000
--- a/progs/vp/slt.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-SLT result.color, {0.5}.x, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/sub.txt b/progs/vp/sub.txt
deleted file mode 100644
index a58ab101bcd..00000000000
--- a/progs/vp/sub.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-SUB result.color, vertex.color.yzxw, vertex.color;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/swz.txt b/progs/vp/swz.txt
deleted file mode 100644
index 92c58089b1a..00000000000
--- a/progs/vp/swz.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-MOV result.color, vertex.color.xxzx;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/swz2.txt b/progs/vp/swz2.txt
deleted file mode 100644
index 84c78db49f6..00000000000
--- a/progs/vp/swz2.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-SWZ result.color, vertex.color, 1,x,y,z;
-MOV result.position, vertex.position;
-END
-
diff --git a/progs/vp/vp-tris.c b/progs/vp/vp-tris.c
deleted file mode 100644
index 09236c296f7..00000000000
--- a/progs/vp/vp-tris.c
+++ /dev/null
@@ -1,333 +0,0 @@
-/* Test glGenProgramsNV(), glIsProgramNV(), glLoadProgramNV() */
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#ifndef WIN32
-#include <unistd.h>
-#include <signal.h>
-#endif
-
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-static const char *filename = NULL;
-static GLuint nr_steps = 4;
-static GLuint prim = GL_TRIANGLES;
-static GLfloat psz = 1.0;
-static GLboolean pointsmooth = 0;
-static GLboolean program_point_size = 0;
-
-static void usage( char *name )
-{
- fprintf( stderr, "usage: %s [ options ] shader_filename\n", name );
- fprintf( stderr, "\n" );
- fprintf( stderr, "options:\n" );
- fprintf( stderr, " -f flat shaded\n" );
- fprintf( stderr, " -nNr subdivision steps\n" );
- fprintf( stderr, " -fps show frames per second\n" );
-}
-
-unsigned show_fps = 0;
-unsigned int frame_cnt = 0;
-
-#ifndef WIN32
-
-void alarmhandler(int);
-
-void alarmhandler (int sig)
-{
- if (sig == SIGALRM) {
- printf("%d frames in 5.0 seconds = %.3f FPS\n", frame_cnt,
- frame_cnt / 5.0);
-
- frame_cnt = 0;
- }
- signal(SIGALRM, alarmhandler);
- alarm(5);
-}
-
-#endif
-
-static void args(int argc, char *argv[])
-{
- GLint i;
-
- for (i = 1; i < argc; i++) {
- if (strncmp(argv[i], "-n", 2) == 0) {
- nr_steps = atoi((argv[i]) + 2);
- }
- else if (strcmp(argv[i], "-f") == 0) {
- glShadeModel(GL_FLAT);
- }
- else if (strcmp(argv[i], "-fps") == 0) {
- show_fps = 1;
- }
- else if (i == argc - 1) {
- filename = argv[i];
- }
- else {
- usage(argv[0]);
- exit(1);
- }
- }
-
- if (!filename) {
- usage(argv[0]);
- exit(1);
- }
-}
-
-
-
-static void Init( void )
-{
- GLint errno;
- GLuint prognum;
- char buf[4096];
- GLuint sz;
- FILE *f;
-
- if ((f = fopen(filename, "r")) == NULL) {
- fprintf(stderr, "couldn't open %s\n", filename);
- exit(1);
- }
-
- sz = (GLuint) fread(buf, 1, sizeof(buf) - 1, f);
- buf[sizeof(buf) - 1] = '\0';
- if (!feof(f)) {
- fprintf(stderr, "file too long\n");
- fclose(f);
- exit(1);
- }
-
- fclose(f);
- fprintf(stderr, "%.*s\n", sz, buf);
-
- if (strncmp( buf, "!!VP", 4 ) == 0) {
- glEnable( GL_VERTEX_PROGRAM_NV );
- glGenProgramsNV( 1, &prognum );
- glBindProgramNV( GL_VERTEX_PROGRAM_NV, prognum );
- glLoadProgramNV( GL_VERTEX_PROGRAM_NV, prognum, sz, (const GLubyte *) buf );
- assert( glIsProgramNV( prognum ) );
- }
- else {
- glEnable(GL_VERTEX_PROGRAM_ARB);
-
- glGenProgramsARB(1, &prognum);
-
- glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- sz, (const GLubyte *) buf);
- if (glGetError()) {
- printf("Program failed to compile:\n%s\n", buf);
- printf("Error: %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- exit(1);
- }
- assert(glIsProgramARB(prognum));
- }
-
- errno = glGetError();
- printf("glGetError = %d\n", errno);
- if (errno != GL_NO_ERROR)
- {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
-
- {
- const float Ambient[4] = { 0.0, 1.0, 0.0, 0.0 };
- const float Diffuse[4] = { 1.0, 0.0, 0.0, 0.0 };
- const float Specular[4] = { 0.0, 0.0, 1.0, 0.0 };
- const float Emission[4] = { 0.0, 0.0, 0.0, 1.0 };
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, Ambient);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse);
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular);
- glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, Emission);
- }
-}
-
-
-union vert {
- struct {
- GLfloat color[3];
- GLfloat pos[3];
- } v;
- GLfloat f[6];
-};
-
-static void make_midpoint( union vert *out,
- const union vert *v0,
- const union vert *v1)
-{
- int i;
- for (i = 0; i < 6; i++)
- out->f[i] = v0->f[i] + .5 * (v1->f[i] - v0->f[i]);
-}
-
-static void subdiv( union vert *v0,
- union vert *v1,
- union vert *v2,
- GLuint depth )
-{
- if (depth == 0) {
- glColor3fv(v0->v.color);
- glVertex3fv(v0->v.pos);
- glColor3fv(v1->v.color);
- glVertex3fv(v1->v.pos);
- glColor3fv(v2->v.color);
- glVertex3fv(v2->v.pos);
- }
- else {
- union vert m[3];
-
- make_midpoint(&m[0], v0, v1);
- make_midpoint(&m[1], v1, v2);
- make_midpoint(&m[2], v2, v0);
-
- subdiv(&m[0], &m[2], v0, depth-1);
- subdiv(&m[1], &m[0], v1, depth-1);
- subdiv(&m[2], &m[1], v2, depth-1);
- subdiv(&m[0], &m[1], &m[2], depth-1);
- }
-}
-
-static void enable( GLenum value, GLboolean flag )
-{
- if (flag)
- glEnable(value);
- else
- glDisable(value);
-}
-
-/** Assignment */
-#define ASSIGN_3V( V, V0, V1, V2 ) \
-do { \
- V[0] = V0; \
- V[1] = V1; \
- V[2] = V2; \
-} while(0)
-
-static void Display( void )
-{
- glClearColor(0.3, 0.3, 0.3, 1);
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
- glPointSize(psz);
-
- enable( GL_POINT_SMOOTH, pointsmooth );
- enable( GL_VERTEX_PROGRAM_POINT_SIZE_ARB, program_point_size );
-
- glBegin(prim);
-
-
- {
- union vert v[3];
-
- ASSIGN_3V(v[0].v.color, 0,0,1);
- ASSIGN_3V(v[0].v.pos, 0.9, -0.9, 0.0);
- ASSIGN_3V(v[1].v.color, 1,0,0);
- ASSIGN_3V(v[1].v.pos, 0.9, 0.9, 0.0);
- ASSIGN_3V(v[2].v.color, 0,1,0);
- ASSIGN_3V(v[2].v.pos, -0.9, 0, 0.0);
-
- subdiv(&v[0], &v[1], &v[2], nr_steps);
- }
-
- glEnd();
-
-
- glFlush();
- if (show_fps) {
- ++frame_cnt;
- glutPostRedisplay();
- }
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- /*glTranslatef( 0.0, 0.0, -15.0 );*/
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case 'p':
- prim = GL_POINTS;
- break;
- case 't':
- prim = GL_TRIANGLES;
- break;
- case 's':
- psz += .5;
- break;
- case 'S':
- if (psz > .5)
- psz -= .5;
- break;
- case 'm':
- pointsmooth = !pointsmooth;
- break;
- case 'z':
- program_point_size = !program_point_size;
- break;
- case '+':
- nr_steps++;
- break;
- case '-':
- if (nr_steps)
- nr_steps--;
- break;
- case ' ':
- psz = 1.0;
- prim = GL_TRIANGLES;
- nr_steps = 4;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowPosition( 0, 0 );
- glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
- glutCreateWindow(argv[argc-1]);
- glewInit();
- glutReshapeFunc( Reshape );
- glutKeyboardFunc( Key );
- glutDisplayFunc( Display );
- args( argc, argv );
- Init();
-#ifndef WIN32
- if (show_fps) {
- signal(SIGALRM, alarmhandler);
- alarm(5);
- }
-#endif
- glutMainLoop();
- return 0;
-}
diff --git a/progs/vp/windows/vp2003.sln b/progs/vp/windows/vp2003.sln
deleted file mode 100644
index 76de5cfd7ff..00000000000
--- a/progs/vp/windows/vp2003.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vp2003", "vp2003.vcproj", "{E1C70416-98E7-4282-B6B2-6C9CF90B12C0}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {E1C70416-98E7-4282-B6B2-6C9CF90B12C0}.Debug.ActiveCfg = Debug|Win32
- {E1C70416-98E7-4282-B6B2-6C9CF90B12C0}.Debug.Build.0 = Debug|Win32
- {E1C70416-98E7-4282-B6B2-6C9CF90B12C0}.Release.ActiveCfg = Release|Win32
- {E1C70416-98E7-4282-B6B2-6C9CF90B12C0}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/progs/vp/windows/vp2003.vcproj b/progs/vp/windows/vp2003.vcproj
deleted file mode 100644
index adca2c50731..00000000000
--- a/progs/vp/windows/vp2003.vcproj
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="vp2003"
- ProjectGUID="{E1C70416-98E7-4282-B6B2-6C9CF90B12C0}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="5"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="glut32.lib"
- OutputFile="$(OutDir)/vp2003.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/vp2003.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="4"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="glut32.lib"
- OutputFile="$(OutDir)/vp2003.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="..\vp-tris.c">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/progs/vp/xform.txt b/progs/vp/xform.txt
deleted file mode 100644
index d1548f1f10d..00000000000
--- a/progs/vp/xform.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-!!ARBvp1.0
-PARAM Emission = state.material.emission;
-PARAM Ambient = state.material.ambient;
-PARAM Diffuse = state.material.diffuse;
-PARAM Specular = state.material.specular;
-DP4 result.position.x, Ambient, vertex.position;
-DP4 result.position.y, Diffuse, vertex.position;
-DP4 result.position.z, Specular, vertex.position;
-DP4 result.position.w, Emission, vertex.position;
-MOV result.color, vertex.color;
-END
diff --git a/progs/vp/xpd.txt b/progs/vp/xpd.txt
deleted file mode 100644
index b8818ebc60e..00000000000
--- a/progs/vp/xpd.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBvp1.0
-XPD result.color, vertex.color, {2,2,2,0};
-MOV result.position, vertex.position;
-END
-