summaryrefslogtreecommitdiffstats
path: root/progs/fp
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/fp
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/fp')
-rw-r--r--progs/fp/.gitignore43
-rwxr-xr-xprogs/fp/Makefile90
-rw-r--r--progs/fp/SConscript18
-rw-r--r--progs/fp/abs.txt5
-rw-r--r--progs/fp/add-sat.txt6
-rw-r--r--progs/fp/add-swz.txt5
-rw-r--r--progs/fp/add.txt5
-rw-r--r--progs/fp/cmp.txt5
-rw-r--r--progs/fp/cos.txt8
-rw-r--r--progs/fp/dp3.txt4
-rw-r--r--progs/fp/dp4.txt4
-rw-r--r--progs/fp/dph.txt4
-rw-r--r--progs/fp/dst.txt3
-rw-r--r--progs/fp/ex2.txt5
-rw-r--r--progs/fp/flr.txt5
-rw-r--r--progs/fp/fp-tri.c268
-rw-r--r--progs/fp/frc.txt5
-rw-r--r--progs/fp/kil-pos.txt9
-rw-r--r--progs/fp/kil-texcoord-sgt.txt8
-rw-r--r--progs/fp/kil.txt6
-rw-r--r--progs/fp/lg2.txt5
-rw-r--r--progs/fp/lit.txt5
-rw-r--r--progs/fp/local.txt11
-rw-r--r--progs/fp/lrp.txt4
-rw-r--r--progs/fp/mad.txt4
-rw-r--r--progs/fp/max.txt3
-rw-r--r--progs/fp/min.txt3
-rw-r--r--progs/fp/mov-alias.txt6
-rw-r--r--progs/fp/mov-imm.txt3
-rw-r--r--progs/fp/mov-param.txt4
-rw-r--r--progs/fp/mov.txt3
-rw-r--r--progs/fp/mul-alias.txt6
-rw-r--r--progs/fp/mul-swz.txt3
-rw-r--r--progs/fp/mul.txt3
-rw-r--r--progs/fp/negate.txt6
-rw-r--r--progs/fp/point-position.c120
-rw-r--r--progs/fp/position-frc-integer.txt7
-rw-r--r--progs/fp/position-frc.txt6
-rw-r--r--progs/fp/position-upper-left.txt7
-rw-r--r--progs/fp/position.txt6
-rw-r--r--progs/fp/pow.txt4
-rw-r--r--progs/fp/rcp.txt5
-rw-r--r--progs/fp/rsq.txt5
-rwxr-xr-xprogs/fp/run.sh7
-rw-r--r--progs/fp/scs.txt5
-rw-r--r--progs/fp/sge.txt3
-rw-r--r--progs/fp/sge2.txt8
-rw-r--r--progs/fp/sin.txt8
-rw-r--r--progs/fp/slt.txt3
-rw-r--r--progs/fp/sub.txt3
-rw-r--r--progs/fp/swz.txt3
-rw-r--r--progs/fp/swz2.txt4
-rw-r--r--progs/fp/swz3.txt5
-rw-r--r--progs/fp/tex-pos-kil-1.txt7
-rw-r--r--progs/fp/tex-pos-kil.txt8
-rw-r--r--progs/fp/tex-pos.txt6
-rw-r--r--progs/fp/tex.txt3
-rw-r--r--progs/fp/tri-depth.c110
-rw-r--r--progs/fp/tri-depth2.c117
-rw-r--r--progs/fp/tri-depthwrite.c109
-rw-r--r--progs/fp/tri-depthwrite2.c109
-rw-r--r--progs/fp/tri-param.c116
-rw-r--r--progs/fp/tri-tex.c132
-rw-r--r--progs/fp/xpd.txt3
64 files changed, 0 insertions, 1504 deletions
diff --git a/progs/fp/.gitignore b/progs/fp/.gitignore
deleted file mode 100644
index aa51f76c9bd..00000000000
--- a/progs/fp/.gitignore
+++ /dev/null
@@ -1,43 +0,0 @@
-point-position
-readtex.c
-readtex.h
-tri-abs
-tri-add
-tri-cmp
-tri-cos
-tri-depth
-tri-depth2
-tri-depthwrite
-tri-depthwrite2
-tri-dp3
-tri-dp4
-tri-dph
-tri-dst
-tri-ex2
-tri-flr
-tri-frc
-tri-kil
-tri-lg2
-tri-lit
-tri-lrp
-tri-mad
-tri-max
-tri-min
-tri-mov
-tri-mul
-tri-param
-tri-position
-tri-pow
-tri-rcp
-tri-rsq
-tri-scs
-tri-sge
-tri-sge2
-tri-sin
-tri-slt
-tri-sub
-tri-swz
-tri-swz2
-tri-tex
-tri-xpd
-fp-tri
diff --git a/progs/fp/Makefile b/progs/fp/Makefile
deleted file mode 100755
index ed959dae302..00000000000
--- a/progs/fp/Makefile
+++ /dev/null
@@ -1,90 +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 = \
- tri-tex.c \
- point-position.c \
- tri-depth.c \
- tri-depth2.c \
- tri-depthwrite.c \
- tri-depthwrite2.c \
- tri-param.c \
- fp-tri.c
-
-NOTDONE=\
- tri-txb.c \
- tri-txp.c \
- tri-depthwrite.c \
- tri-fogoption.c
-
-
-PROGS = $(SOURCES:%.c=%)
-
-INCLUDES = -I. -I$(TOP)/include -I../samples
-
-UTIL_FILES = readtex.h readtex.c
-
-
-##### 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: $(UTIL_FILES) $(PROGS)
-
-clean:
- -rm -f $(PROGS)
- -rm -f *.o
-
-
-texrect: texrect.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
-# $(APP_CC) texrect.o readtex.o $(LIBS) -o $@
-
-texrect.o: texrect.c readtex.h
- $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-invert: invert.o readtex.o
- $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
-# $(APP_CC) invert.o readtex.o $(LIBS) -o $@
-
-invert.o: invert.c readtex.h
- $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-readtex.o: readtex.c
- $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-
-
-readtex.h: $(TOP)/progs/util/readtex.h
- ln -s $(TOP)/progs/util/readtex.h .
-
-readtex.c: $(TOP)/progs/util/readtex.c
- ln -s $(TOP)/progs/util/readtex.c .
-
-
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
diff --git a/progs/fp/SConscript b/progs/fp/SConscript
deleted file mode 100644
index e209161f321..00000000000
--- a/progs/fp/SConscript
+++ /dev/null
@@ -1,18 +0,0 @@
-Import('*')
-
-progs = [
- 'fp-tri',
- 'tri-depth',
- 'tri-depth2',
- 'tri-depthwrite',
- 'tri-depthwrite2',
- 'tri-param',
- 'tri-tex',
- 'point-position',
-]
-
-for prog in progs:
- progs_env.Program(
- target = prog,
- source = [prog + '.c'],
- )
diff --git a/progs/fp/abs.txt b/progs/fp/abs.txt
deleted file mode 100644
index 61ef952b053..00000000000
--- a/progs/fp/abs.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-SUB R0, {0.5}.x, fragment.color;
-ABS result.color, R0;
-END
diff --git a/progs/fp/add-sat.txt b/progs/fp/add-sat.txt
deleted file mode 100644
index 2253efb0855..00000000000
--- a/progs/fp/add-sat.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MOV R0, fragment.color;
-ADD_SAT R0, R0, R0;
-MUL result.color, {0.5}.x, R0;
-END
diff --git a/progs/fp/add-swz.txt b/progs/fp/add-swz.txt
deleted file mode 100644
index 5ec51bcb84a..00000000000
--- a/progs/fp/add-swz.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-ADD R0, fragment.color, fragment.color;
-ADD result.color, R0.xxxx, R0;
-END
diff --git a/progs/fp/add.txt b/progs/fp/add.txt
deleted file mode 100644
index 031076df0fc..00000000000
--- a/progs/fp/add.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-ADD R0, fragment.color, fragment.color;
-ADD result.color, R0, R0;
-END
diff --git a/progs/fp/cmp.txt b/progs/fp/cmp.txt
deleted file mode 100644
index 78451609a3f..00000000000
--- a/progs/fp/cmp.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-SUB R0, {0.5}.x, fragment.color;
-CMP result.color, R0, fragment.color, {0.0}.x;
-END
diff --git a/progs/fp/cos.txt b/progs/fp/cos.txt
deleted file mode 100644
index d51b13b63a7..00000000000
--- a/progs/fp/cos.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0, fragment.color, {3.14}.x;
-COS result.color.x, R0.x;
-COS result.color.y, R0.y;
-COS result.color.z, R0.z;
-END
-
diff --git a/progs/fp/dp3.txt b/progs/fp/dp3.txt
deleted file mode 100644
index 75532f88a70..00000000000
--- a/progs/fp/dp3.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-DP3 result.color, fragment.color, fragment.color;
-END
diff --git a/progs/fp/dp4.txt b/progs/fp/dp4.txt
deleted file mode 100644
index 8d09c8dbf67..00000000000
--- a/progs/fp/dp4.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-DP4 result.color, fragment.color.xxxx, fragment.color;
-END
diff --git a/progs/fp/dph.txt b/progs/fp/dph.txt
deleted file mode 100644
index 6eb59a410d7..00000000000
--- a/progs/fp/dph.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-DPH result.color, fragment.color, fragment.color.xyzx;
-END
diff --git a/progs/fp/dst.txt b/progs/fp/dst.txt
deleted file mode 100644
index 6ebabbd5ea6..00000000000
--- a/progs/fp/dst.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-DST result.color, fragment.color, fragment.color;
-END
diff --git a/progs/fp/ex2.txt b/progs/fp/ex2.txt
deleted file mode 100644
index b540f7b1929..00000000000
--- a/progs/fp/ex2.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-EX2 R0, fragment.color.x;
-SUB result.color, R0, {1.0}.x;
-END
diff --git a/progs/fp/flr.txt b/progs/fp/flr.txt
deleted file mode 100644
index c3479c7bd5e..00000000000
--- a/progs/fp/flr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-ADD R0, fragment.color, {0.5}.x;
-FLR result.color, R0;
-END
diff --git a/progs/fp/fp-tri.c b/progs/fp/fp-tri.c
deleted file mode 100644
index e45a799a00e..00000000000
--- a/progs/fp/fp-tri.c
+++ /dev/null
@@ -1,268 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifndef WIN32
-#include <unistd.h>
-#include <signal.h>
-#endif
-
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-#include "readtex.c"
-
-
-#define TEXTURE_FILE "../images/bw.rgb"
-
-unsigned show_fps = 0;
-unsigned int frame_cnt = 0;
-void alarmhandler(int);
-static const char *filename = NULL;
-
-static void usage(char *name)
-{
- fprintf(stderr, "usage: %s [ options ] shader_filename\n", name);
-#ifndef WIN32
- fprintf(stderr, "\n" );
- fprintf(stderr, "options:\n");
- fprintf(stderr, " -fps show frames per second\n");
-#endif
-}
-
-#ifndef WIN32
-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 (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 )
-{
- GLuint Texture;
- GLint errno;
- GLuint prognum;
- char buf[50000];
- GLuint sz;
- FILE *f;
-
- if ((f = fopen(filename, "r")) == NULL) {
- fprintf(stderr, "Couldn't open %s\n", filename);
- exit(1);
- }
-
- sz = fread(buf, 1, sizeof(buf), f);
- if (!feof(f)) {
- fprintf(stderr, "file too long\n");
- exit(1);
- }
- fprintf(stderr, "%.*s\n", sz, buf);
-
- if (!GLEW_ARB_fragment_program) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &prognum);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, prognum);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- sz, (const GLubyte *)buf);
-
- errno = glGetError();
- printf("glGetError = 0x%x\n", errno);
- if (errno != GL_NO_ERROR) {
- GLint errorpos;
-
- glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
- printf("errorpos: %d\n", errorpos);
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- }
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
-
- /* Load texture */
- glGenTextures(1, &Texture);
- glBindTexture(GL_TEXTURE_2D, Texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE);
- exit(1);
- }
-
-
- glGenTextures(1, &Texture);
- glActiveTextureARB(GL_TEXTURE0_ARB + 1);
- glBindTexture(GL_TEXTURE_2D, Texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- {
- GLubyte data[32][32];
- int width = 32;
- int height = 32;
- int i;
- int j;
-
- for (i = 0; i < 32; i++)
- for (j = 0; j < 32; j++)
- {
- /**
- ** +-----------+
- ** | W |
- ** | +-----+ |
- ** | | | |
- ** | | B | |
- ** | | | |
- ** | +-----+ |
- ** | |
- ** +-----------+
- **/
- int i2 = i - height / 2;
- int j2 = j - width / 2;
- int h8 = height / 8;
- int w8 = width / 8;
- if ( -h8 <= i2 && i2 <= h8 && -w8 <= j2 && j2 <= w8 ) {
- data[i][j] = 0x00;
- } else if ( -2 * h8 <= i2 && i2 <= 2 * h8 && -2 * w8 <= j2 && j2 <= 2 * w8 ) {
- data[i][j] = 0x55;
- } else if ( -3 * h8 <= i2 && i2 <= 3 * h8 && -3 * w8 <= j2 && j2 <= 3 * w8 ) {
- data[i][j] = 0xaa;
- } else {
- data[i][j] = 0xff;
- }
- }
-
- glTexImage2D( GL_TEXTURE_2D, 0,
- GL_ALPHA8,
- 32, 32, 0,
- GL_ALPHA, GL_UNSIGNED_BYTE, data );
- }
-
-
- {
- 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);
- }
-
- glClearColor(.1, .3, .5, 0);
- fclose(f);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void Display(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, 1.0, 1.0, 0.0, 0.0);
- glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 1, 0.0, 0.0, 1.0, 1.0);
- glBegin(GL_TRIANGLES);
-
- glColor3f(0,0,1);
- glTexCoord3f(1,1,0);
- glVertex3f( 0.9, -0.9, -30.0);
-
- glColor3f(1,0,0);
- glTexCoord3f(1,-1,0);
- glVertex3f( 0.9, 0.9, -30.0);
-
- glColor3f(0,1,0);
- glTexCoord3f(-1,0,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
- if (show_fps) {
- ++frame_cnt;
- glutPostRedisplay();
- }
-}
-
-
-int main(int argc, char **argv)
-{
- glutInit(&argc, argv);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(250, 250);
- glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);
- args(argc, argv);
- glutCreateWindow(filename);
- glewInit();
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Display);
- Init();
-#ifndef WIN32
- if (show_fps) {
- signal(SIGALRM, alarmhandler);
- alarm(5);
- }
-#endif
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/frc.txt b/progs/fp/frc.txt
deleted file mode 100644
index efacaa8f927..00000000000
--- a/progs/fp/frc.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0, fragment.color, {3.0}.x;
-FRC result.color, R0;
-END
diff --git a/progs/fp/kil-pos.txt b/progs/fp/kil-pos.txt
deleted file mode 100644
index 5ff4f6f2c84..00000000000
--- a/progs/fp/kil-pos.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-SUB R0.xy, fragment.position, {125}.x;
-MOV R0.zw, {0}.x;
-DP3 R0, R0, R0;
-SUB R0.x, R0, {10000}.x;
-KIL -R0.x;
-MOV result.color, fragment.color;
-END
diff --git a/progs/fp/kil-texcoord-sgt.txt b/progs/fp/kil-texcoord-sgt.txt
deleted file mode 100644
index c74fd10dacb..00000000000
--- a/progs/fp/kil-texcoord-sgt.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0.xy, fragment.texcoord[0], fragment.texcoord[0];
-ADD R0.x, R0.x, R0.y;
-SGE R0.y, R0.x, fragment.texcoord[0].w;
-KIL -R0.y;
-MOV result.color, fragment.color;
-END
diff --git a/progs/fp/kil.txt b/progs/fp/kil.txt
deleted file mode 100644
index d95deb0a9e9..00000000000
--- a/progs/fp/kil.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-SUB R0, fragment.color, {0.5,0,0,0};
-KIL R0;
-MOV result.color, R0;
-END
diff --git a/progs/fp/lg2.txt b/progs/fp/lg2.txt
deleted file mode 100644
index 6707d7cb6d5..00000000000
--- a/progs/fp/lg2.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0, fragment.color, {4.0}.x;
-LG2 result.color, R0.x;
-END
diff --git a/progs/fp/lit.txt b/progs/fp/lit.txt
deleted file mode 100644
index 333c50d3cca..00000000000
--- a/progs/fp/lit.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-SUB R0, {0.5}.x, fragment.color;
-LIT result.color, R0;
-END
diff --git a/progs/fp/local.txt b/progs/fp/local.txt
deleted file mode 100644
index 6cb2a2f13cc..00000000000
--- a/progs/fp/local.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-PARAM c[4] = { { 0, 0, 0, 0 },
- program.local[0..1],
- { 1, 1, 1, 1 } };
-MOV R0, c[1];
-SUB R0, R0, c[0];
-ADD R0, R0, c[2];
-MUL R0, R0, c[3];
-MOV result.color, R0;
-END
diff --git a/progs/fp/lrp.txt b/progs/fp/lrp.txt
deleted file mode 100644
index 56cb5f51528..00000000000
--- a/progs/fp/lrp.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-!!ARBfp1.0
-TEMP R0, R1;
-LRP result.color, fragment.color.z, {1,0,0,1}, {0,1,0,1};
-END
diff --git a/progs/fp/mad.txt b/progs/fp/mad.txt
deleted file mode 100644
index 77ffac49cf1..00000000000
--- a/progs/fp/mad.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-!!ARBfp1.0
-TEMP R0, R1;
-MAD result.color, fragment.color.z, {1,0,0,1}, fragment.color;
-END
diff --git a/progs/fp/max.txt b/progs/fp/max.txt
deleted file mode 100644
index 0f3bffd6a50..00000000000
--- a/progs/fp/max.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-MAX result.color, {0.5}.x, fragment.color;
-END
diff --git a/progs/fp/min.txt b/progs/fp/min.txt
deleted file mode 100644
index 06d8f911c37..00000000000
--- a/progs/fp/min.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-MIN result.color, {0.5}.x, fragment.color;
-END
diff --git a/progs/fp/mov-alias.txt b/progs/fp/mov-alias.txt
deleted file mode 100644
index 5f04e9c76e2..00000000000
--- a/progs/fp/mov-alias.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MOV R0, fragment.color;
-MOV R0, R0.zyxw;
-MOV result.color, R0;
-END
diff --git a/progs/fp/mov-imm.txt b/progs/fp/mov-imm.txt
deleted file mode 100644
index 38e48079d09..00000000000
--- a/progs/fp/mov-imm.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-MOV result.color, {0.5, 0.8, 0.3, 1.0};
-END
diff --git a/progs/fp/mov-param.txt b/progs/fp/mov-param.txt
deleted file mode 100644
index 13d82fe00b8..00000000000
--- a/progs/fp/mov-param.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-!!ARBfp1.0
-PARAM Diffuse = state.material.diffuse;
-MOV result.color, Diffuse;
-END
diff --git a/progs/fp/mov.txt b/progs/fp/mov.txt
deleted file mode 100644
index 4c67baec5e5..00000000000
--- a/progs/fp/mov.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-MOV result.color, fragment.color;
-END
diff --git a/progs/fp/mul-alias.txt b/progs/fp/mul-alias.txt
deleted file mode 100644
index cf7d359e780..00000000000
--- a/progs/fp/mul-alias.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MOV R0, fragment.color;
-MUL R0, R0.zyxw, fragment.color;
-MOV result.color, R0;
-END
diff --git a/progs/fp/mul-swz.txt b/progs/fp/mul-swz.txt
deleted file mode 100644
index 7ef2f58633f..00000000000
--- a/progs/fp/mul-swz.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-MUL result.color, fragment.color.zyxw, fragment.color;
-END
diff --git a/progs/fp/mul.txt b/progs/fp/mul.txt
deleted file mode 100644
index 907155de783..00000000000
--- a/progs/fp/mul.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-MUL result.color, fragment.color, fragment.color;
-END
diff --git a/progs/fp/negate.txt b/progs/fp/negate.txt
deleted file mode 100644
index 3d00a04a587..00000000000
--- a/progs/fp/negate.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBfp1.0
-# this should result in fragment color passing through unchanged
-TEMP R0;
-ADD R0, fragment.color, fragment.color;
-ADD result.color, R0, -fragment.color;
-END
diff --git a/progs/fp/point-position.c b/progs/fp/point-position.c
deleted file mode 100644
index 1ae753c1d05..00000000000
--- a/progs/fp/point-position.c
+++ /dev/null
@@ -1,120 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.color, fragment.position, {.005}.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!GLEW_ARB_fragment_program) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
-#if 0
- glBegin(GL_QUADS);
- glTexCoord2f(1,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glTexCoord2f(1,1);
- glVertex3f( 0.9, 0.9, -30.0);
- glTexCoord2f(0,1);
- glVertex3f(-0.9, 0.9, -30.0);
- glTexCoord2f(0,0);
- glVertex3f(-0.9, -0.9, -30.0);
- glEnd();
-#else
- glPointSize(100);
- glBegin(GL_POINTS);
- glColor3f(0,0,1);
- glVertex3f( 0, 0, -30.0);
- glEnd();
-#endif
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- glewInit();
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/position-frc-integer.txt b/progs/fp/position-frc-integer.txt
deleted file mode 100644
index 3a634c9b3b8..00000000000
--- a/progs/fp/position-frc-integer.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBfp1.0
-# expected: black triangle
-# brown means the wrong pixel center convention is being used
-OPTION ARB_fragment_coord_pixel_center_integer;
-MOV result.color, {0}.x;
-FRC result.color.xy, fragment.position;
-END
diff --git a/progs/fp/position-frc.txt b/progs/fp/position-frc.txt
deleted file mode 100644
index 35ae3efa10e..00000000000
--- a/progs/fp/position-frc.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBfp1.0
-# expected: brown triangle
-# black means the wrong pixel center convention is being used
-MOV result.color, {0}.x;
-FRC result.color.xy, fragment.position;
-END
diff --git a/progs/fp/position-upper-left.txt b/progs/fp/position-upper-left.txt
deleted file mode 100644
index ac632dbfb7d..00000000000
--- a/progs/fp/position-upper-left.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBfp1.0
-# expected: the yellow vertex is the bottom one
-# if it is the top one, the wrong origin convention is being used
-OPTION ARB_fragment_coord_origin_upper_left;
-MOV result.color, {0}.x;
-MUL result.color.xy, fragment.position, {.005}.x;
-END
diff --git a/progs/fp/position.txt b/progs/fp/position.txt
deleted file mode 100644
index f59d0259c72..00000000000
--- a/progs/fp/position.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBfp1.0
-# expected: the yellow vertex is the top one
-# if it is the bottom one, the wrong origin convention is being used
-MOV result.color, {0}.x;
-MUL result.color.xy, fragment.position, {.005}.x;
-END
diff --git a/progs/fp/pow.txt b/progs/fp/pow.txt
deleted file mode 100644
index 35c738556ea..00000000000
--- a/progs/fp/pow.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-POW result.color, fragment.color.x, fragment.color.y;
-END
diff --git a/progs/fp/rcp.txt b/progs/fp/rcp.txt
deleted file mode 100644
index 122161c49e5..00000000000
--- a/progs/fp/rcp.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-ADD R0, fragment.color.x, fragment.color.x;
-RCP result.color, R0.x;
-END
diff --git a/progs/fp/rsq.txt b/progs/fp/rsq.txt
deleted file mode 100644
index b28de4bdb6c..00000000000
--- a/progs/fp/rsq.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0, fragment.color, {3.0}.x;
-RSQ result.color, R0.x;
-END
diff --git a/progs/fp/run.sh b/progs/fp/run.sh
deleted file mode 100755
index 480f8108a35..00000000000
--- a/progs/fp/run.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-for i in *.txt ; do
-echo $i
-./fp-tri $i
-done
-
diff --git a/progs/fp/scs.txt b/progs/fp/scs.txt
deleted file mode 100644
index 5a8c9f16e9e..00000000000
--- a/progs/fp/scs.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0, fragment.color, {3.14}.x;
-SCS result.color, R0.x;
-END
diff --git a/progs/fp/sge.txt b/progs/fp/sge.txt
deleted file mode 100644
index 53856924676..00000000000
--- a/progs/fp/sge.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-SGE result.color, {0.5}.x, fragment.color;
-END
diff --git a/progs/fp/sge2.txt b/progs/fp/sge2.txt
deleted file mode 100644
index e02a50d4772..00000000000
--- a/progs/fp/sge2.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-TEMP R1;
-SGE R0, fragment.color, fragment.color.yzxw;
-SGE R1, fragment.color, fragment.color.zxyw;
-MUL R0, R0, R1;
-MUL result.color, R0, fragment.color;
-END
diff --git a/progs/fp/sin.txt b/progs/fp/sin.txt
deleted file mode 100644
index 4a8cdb69f98..00000000000
--- a/progs/fp/sin.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0, fragment.color, {3.14}.x;
-MOV result.color, {0.0}.x;
-SIN result.color.x, R0.x;
-SIN result.color.y, R0.y;
-SIN result.color.z, R0.z;
-END
diff --git a/progs/fp/slt.txt b/progs/fp/slt.txt
deleted file mode 100644
index a3b3ff5656a..00000000000
--- a/progs/fp/slt.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-SLT result.color, {0.5}.x, fragment.color;
-END
diff --git a/progs/fp/sub.txt b/progs/fp/sub.txt
deleted file mode 100644
index b4e5cc0e9f8..00000000000
--- a/progs/fp/sub.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-SUB result.color, fragment.color.yzxw, fragment.color;
-END
diff --git a/progs/fp/swz.txt b/progs/fp/swz.txt
deleted file mode 100644
index e28f112b14e..00000000000
--- a/progs/fp/swz.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-SWZ result.color, fragment.color, 1,x,y,z;
-END
diff --git a/progs/fp/swz2.txt b/progs/fp/swz2.txt
deleted file mode 100644
index 5c12b848154..00000000000
--- a/progs/fp/swz2.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-!!ARBfp1.0
-TEMP R0, R1;
-SWZ result.color, fragment.color, 1, 0, 0, 1;
-END
diff --git a/progs/fp/swz3.txt b/progs/fp/swz3.txt
deleted file mode 100644
index 382f5880d3c..00000000000
--- a/progs/fp/swz3.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-!!ARBfp1.0
-TEMP R0, R1;
-MOV R0, -fragment.color;
-SWZ result.color, R0, -y, -x, z, 1;
-END
diff --git a/progs/fp/tex-pos-kil-1.txt b/progs/fp/tex-pos-kil-1.txt
deleted file mode 100644
index 3f01e79ffe7..00000000000
--- a/progs/fp/tex-pos-kil-1.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0, fragment.position, {0.03125}.x;
-TEX R0, R0, texture[1], 2D;
-KIL -R0;
-MOV result.color, fragment.color;
-END
diff --git a/progs/fp/tex-pos-kil.txt b/progs/fp/tex-pos-kil.txt
deleted file mode 100644
index b7aaa9f7c88..00000000000
--- a/progs/fp/tex-pos-kil.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MUL R0, fragment.position, {0.008}.x;
-TEX R0, R0, texture[0], 2D;
-SUB R0, R0, {0.25}.x;
-KIL R0.xyzz;
-MOV result.color, fragment.color;
-END
diff --git a/progs/fp/tex-pos.txt b/progs/fp/tex-pos.txt
deleted file mode 100644
index b969f423f57..00000000000
--- a/progs/fp/tex-pos.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-!!ARBfp1.0
-TEMP R0;
-MOV R0, {0.0}.x;
-MUL R0.xy, fragment.position, {0.008}.x;
-TEX result.color, R0, texture[0], 2D;
-END
diff --git a/progs/fp/tex.txt b/progs/fp/tex.txt
deleted file mode 100644
index b3a885d9e07..00000000000
--- a/progs/fp/tex.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-TEX result.color, fragment.color, texture[0], 2D;
-END
diff --git a/progs/fp/tri-depth.c b/progs/fp/tri-depth.c
deleted file mode 100644
index a9f3a6a5be3..00000000000
--- a/progs/fp/tri-depth.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- /* scale of 10.0 gives me a visible result on nv hardware.
- */
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.color, fragment.position.z, {10.0}.x; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!GLEW_ARB_fragment_program) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -40.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -40.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -25.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- glewInit();
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-depth2.c b/progs/fp/tri-depth2.c
deleted file mode 100644
index 8c4336817be..00000000000
--- a/progs/fp/tri-depth2.c
+++ /dev/null
@@ -1,117 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
- /* scale of 10.0 gives me a visible result on nv hardware.
- */
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEMP R0;\n"
- "MUL R0, fragment.position.z, {10.0}.x;\n"
- "MOV result.color, R0; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!GLEW_ARB_fragment_program) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glVertex3f( 0.9, 0.9, -30.0);
- glVertex3f(-0.9, 0.0, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, -0.9, -40.0);
- glVertex3f(-0.9, 0.9, -40.0);
- glVertex3f( 0.9, 0.0, -25.0);
- glEnd();
-
- glFlush();
-
-
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB | GLUT_DEPTH;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- glewInit();
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-depthwrite.c b/progs/fp/tri-depthwrite.c
deleted file mode 100644
index 7b9d70f292a..00000000000
--- a/progs/fp/tri-depthwrite.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-
-static void Init(void)
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.depth.z, fragment.color.z, {.1}.x; \n"
- "MOV result.color.xy, fragment.color; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!GLEW_ARB_fragment_program) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
-
- glBegin(GL_TRIANGLES);
- glColor4f(.8,0,.5,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glVertex3f( 0.9, 0.9, -30.0);
- glVertex3f(-0.9, 0.0, -30.0);
-
- glColor4f(0,.8,.7,0);
- glVertex3f(-0.9, -0.9, -40.0);
- glColor4f(0,.8,.7,0);
- glVertex3f(-0.9, 0.9, -40.0);
- glColor4f(0,.8,.3,0);
- glVertex3f( 0.9, 0.0, -40.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- glutInit(&argc, argv);
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300);
-
- glutInitDisplayMode(GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE);
-
- if (glutCreateWindow("Depth Test") == GL_FALSE) {
- exit(1);
- }
-
- glewInit();
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-depthwrite2.c b/progs/fp/tri-depthwrite2.c
deleted file mode 100644
index 599949551d1..00000000000
--- a/progs/fp/tri-depthwrite2.c
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-
-static void Init(void)
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MUL result.depth.z, fragment.color.z, {.1}.x; \n"
- "MOV result.color, fragment.color.z; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!GLEW_ARB_fragment_program) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
- glEnable(GL_DEPTH_TEST);
-
-
- glBegin(GL_TRIANGLES);
- glColor4f(.8,0,.5,0);
- glVertex3f( 0.9, -0.9, -30.0);
- glVertex3f( 0.9, 0.9, -30.0);
- glVertex3f(-0.9, 0.0, -30.0);
-
- glColor4f(0,.8,.7,0);
- glVertex3f(-0.9, -0.9, -40.0);
- glColor4f(0,.8,.7,0);
- glVertex3f(-0.9, 0.9, -40.0);
- glColor4f(0,.8,.3,0);
- glVertex3f( 0.9, 0.0, -40.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- glutInit(&argc, argv);
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 300, 300);
-
- glutInitDisplayMode(GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE);
-
- if (glutCreateWindow("Depth Test") == GL_FALSE) {
- exit(1);
- }
-
- glewInit();
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-param.c b/progs/fp/tri-param.c
deleted file mode 100644
index 26a804d4b38..00000000000
--- a/progs/fp/tri-param.c
+++ /dev/null
@@ -1,116 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "MOV result.color, program.local[32]; \n"
- "END"
- ;
- GLuint modulateProg;
-
- if (!GLEW_ARB_fragment_program) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
- glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 32, 0.25, .5, 0.25, 1);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.0, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 32, 0.25, 0, 0.25, 1);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
- glVertex3f( 0.9, 0.0, -30.0);
- glColor3f(1,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB | GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- glewInit();
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/tri-tex.c b/progs/fp/tri-tex.c
deleted file mode 100644
index 64299e94531..00000000000
--- a/progs/fp/tri-tex.c
+++ /dev/null
@@ -1,132 +0,0 @@
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <GL/glew.h>
-#include <GL/glut.h>
-
-#include "readtex.c"
-
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-
-
-static void Init( void )
-{
- static const char *modulate2D =
- "!!ARBfp1.0\n"
- "TEX result.color, fragment.color, texture[0], 2D; \n"
- "END"
- ;
- GLuint modulateProg;
- GLuint Texture;
-
- if (!GLEW_ARB_fragment_program) {
- printf("Error: GL_ARB_fragment_program not supported!\n");
- exit(1);
- }
- printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
-
- /* Setup the fragment program */
- glGenProgramsARB(1, &modulateProg);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(modulate2D), (const GLubyte *)modulate2D);
-
- printf("glGetError = 0x%x\n", (int) glGetError());
- printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
- (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
- assert(glIsProgramARB(modulateProg));
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- /* Load texture */
- glGenTextures(1, &Texture);
- glBindTexture(GL_TEXTURE_2D, Texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE);
- exit(1);
- }
- /* XXX this enable shouldn't really be needed!!! */
- glEnable(GL_TEXTURE_2D);
-
- glClearColor(.3, .3, .3, 0);
-}
-
-static void Reshape(int width, int height)
-{
-
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
- glMatrixMode(GL_MODELVIEW);
-}
-
-static void Key(unsigned char key, int x, int y)
-{
-
- switch (key) {
- case 27:
- exit(1);
- default:
- break;
- }
-
- glutPostRedisplay();
-}
-
-static void Draw(void)
-{
- glClear(GL_COLOR_BUFFER_BIT);
-
- glBegin(GL_TRIANGLES);
- glColor3f(0,0,1);
-/* glTexCoord2f(1, 0); */
- glVertex3f( 0.9, -0.9, -30.0);
- glColor3f(1,0,0);
-/* glTexCoord2f(1, 1); */
- glVertex3f( 0.9, 0.9, -30.0);
- glColor3f(0,1,0);
-/* glTexCoord2f(0, .5); */
- glVertex3f(-0.9, 0.0, -30.0);
- glEnd();
-
- glFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- GLenum type;
-
- glutInit(&argc, argv);
-
-
-
- glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
-
- type = GLUT_RGB;
- type |= GLUT_SINGLE;
- glutInitDisplayMode(type);
-
- if (glutCreateWindow("First Tri") == GL_FALSE) {
- exit(1);
- }
-
- glewInit();
-
- Init();
-
- glutReshapeFunc(Reshape);
- glutKeyboardFunc(Key);
- glutDisplayFunc(Draw);
- glutMainLoop();
- return 0;
-}
diff --git a/progs/fp/xpd.txt b/progs/fp/xpd.txt
deleted file mode 100644
index d8dc08dcf7f..00000000000
--- a/progs/fp/xpd.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-!!ARBfp1.0
-XPD result.color, fragment.color, {2,2,2,0};
-END