Redo the fragment program examples to match vp's
authorZack Rusin <zack@tungstengraphics.com>
Fri, 9 Nov 2007 15:08:15 +0000 (10:08 -0500)
committerZack Rusin <zack@tungstengraphics.com>
Tue, 11 Dec 2007 14:49:34 +0000 (09:49 -0500)
we just load text files instead of compiling tons of small
binaries

70 files changed:
configs/linux-llvm
progs/fp/Makefile
progs/fp/abs.txt [new file with mode: 0644]
progs/fp/add.txt [new file with mode: 0644]
progs/fp/cmp.txt [new file with mode: 0644]
progs/fp/cos.txt [new file with mode: 0644]
progs/fp/dp3.txt [new file with mode: 0644]
progs/fp/dp4.txt [new file with mode: 0644]
progs/fp/dph.txt [new file with mode: 0644]
progs/fp/dst.txt [new file with mode: 0644]
progs/fp/ex2.txt [new file with mode: 0644]
progs/fp/flr.txt [new file with mode: 0644]
progs/fp/frc.txt [new file with mode: 0644]
progs/fp/kil.txt [new file with mode: 0644]
progs/fp/lg2.txt [new file with mode: 0644]
progs/fp/lit.txt [new file with mode: 0644]
progs/fp/lrp.txt [new file with mode: 0644]
progs/fp/mad.txt [new file with mode: 0644]
progs/fp/max.txt [new file with mode: 0644]
progs/fp/min.txt [new file with mode: 0644]
progs/fp/mov.txt [new file with mode: 0644]
progs/fp/mul.txt [new file with mode: 0644]
progs/fp/position.txt [new file with mode: 0644]
progs/fp/pow.txt [new file with mode: 0644]
progs/fp/rcp.txt [new file with mode: 0644]
progs/fp/rsq.txt [new file with mode: 0644]
progs/fp/scs.txt [new file with mode: 0644]
progs/fp/sge.txt [new file with mode: 0644]
progs/fp/sge2.txt [new file with mode: 0644]
progs/fp/sin.txt [new file with mode: 0644]
progs/fp/slt.txt [new file with mode: 0644]
progs/fp/sub.txt [new file with mode: 0644]
progs/fp/swz.txt [new file with mode: 0644]
progs/fp/swz2.txt [new file with mode: 0644]
progs/fp/tri-abs.c [deleted file]
progs/fp/tri-add.c [deleted file]
progs/fp/tri-cmp.c [deleted file]
progs/fp/tri-cos.c [deleted file]
progs/fp/tri-dp3.c [deleted file]
progs/fp/tri-dp4.c [deleted file]
progs/fp/tri-dph.c [deleted file]
progs/fp/tri-dst.c [deleted file]
progs/fp/tri-ex2.c [deleted file]
progs/fp/tri-flr.c [deleted file]
progs/fp/tri-fp.c [deleted file]
progs/fp/tri-frc.c [deleted file]
progs/fp/tri-kil.c [deleted file]
progs/fp/tri-lg2.c [deleted file]
progs/fp/tri-lit.c [deleted file]
progs/fp/tri-lrp.c [deleted file]
progs/fp/tri-mad.c [deleted file]
progs/fp/tri-max.c [deleted file]
progs/fp/tri-min.c [deleted file]
progs/fp/tri-mov.c [deleted file]
progs/fp/tri-mul.c [deleted file]
progs/fp/tri-position.c [deleted file]
progs/fp/tri-pow.c [deleted file]
progs/fp/tri-rcp.c [deleted file]
progs/fp/tri-rsq.c [deleted file]
progs/fp/tri-scs.c [deleted file]
progs/fp/tri-sge.c [deleted file]
progs/fp/tri-sge2.c [deleted file]
progs/fp/tri-sin.c [deleted file]
progs/fp/tri-slt.c [deleted file]
progs/fp/tri-sub.c [deleted file]
progs/fp/tri-swz.c [deleted file]
progs/fp/tri-swz2.c [deleted file]
progs/fp/tri-xpd.c [deleted file]
progs/fp/xpd.txt [new file with mode: 0644]
src/mesa/pipe/llvm/gallivm.cpp

index b24959ec01c45e2c310a6ac835c4392e1fb91aed..6d1f31daa2723da1963c8f9b47311f444c246dee 100644 (file)
@@ -1,8 +1,8 @@
-# Configuration for debugging on Linux
+# Configuration for Linux and LLVM with debugging info
 
 include $(TOP)/configs/linux
 
-CONFIG_NAME = linux-debug
+CONFIG_NAME = linux-llvm
 
 OPT_FLAGS = -g -ansi -pedantic
 DEFINES += -DDEBUG -DDEBUG_MATH
index d979be83d347c3ecab37ca02113994bd448e3ed4..bcff6997969e3ca83a768d8ee0c92be89971416a 100644 (file)
@@ -11,46 +11,14 @@ include $(TOP)/configs/current
 LIBS = $(APP_LIB_DEPS)
 
 SOURCES = \
-       tri-abs.c \
-       tri-add.c \
-       tri-cmp.c \
-       tri-cos.c \
-       tri-dp3.c \
-       tri-dp4.c \
-       tri-dph.c \
-       tri-dst.c \
-       tri-ex2.c \
-       tri-flr.c \
-       tri-frc.c \
-       tri-kil.c \
-       tri-lg2.c \
-       tri-lit.c \
-       tri-lrp.c \
-       tri-mad.c \
-       tri-max.c \
-       tri-min.c \
-       tri-mov.c \
-       tri-mul.c \
-       tri-pow.c \
-       tri-param.c \
-       tri-rcp.c \
-       tri-rsq.c \
-       tri-scs.c \
-       tri-sge.c \
-       tri-sge2.c \
-       tri-sin.c \
-       tri-slt.c \
-       tri-sub.c \
-       tri-swz.c \
-       tri-swz2.c \
        tri-tex.c \
-       tri-xpd.c \
-       tri-position.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 \
diff --git a/progs/fp/abs.txt b/progs/fp/abs.txt
new file mode 100644 (file)
index 0000000..61ef952
--- /dev/null
@@ -0,0 +1,5 @@
+!!ARBfp1.0
+TEMP R0;
+SUB R0, {0.5}.x, fragment.color;
+ABS result.color, R0;
+END
diff --git a/progs/fp/add.txt b/progs/fp/add.txt
new file mode 100644 (file)
index 0000000..031076d
--- /dev/null
@@ -0,0 +1,5 @@
+!!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
new file mode 100644 (file)
index 0000000..7845160
--- /dev/null
@@ -0,0 +1,5 @@
+!!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
new file mode 100644 (file)
index 0000000..d51b13b
--- /dev/null
@@ -0,0 +1,8 @@
+!!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
new file mode 100644 (file)
index 0000000..75532f8
--- /dev/null
@@ -0,0 +1,4 @@
+!!ARBfp1.0
+TEMP R0;
+DP3 result.color, fragment.color, fragment.color;
+END
diff --git a/progs/fp/dp4.txt b/progs/fp/dp4.txt
new file mode 100644 (file)
index 0000000..8d09c8d
--- /dev/null
@@ -0,0 +1,4 @@
+!!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
new file mode 100644 (file)
index 0000000..6eb59a4
--- /dev/null
@@ -0,0 +1,4 @@
+!!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
new file mode 100644 (file)
index 0000000..6ebabbd
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+DST result.color, fragment.color, fragment.color;
+END
diff --git a/progs/fp/ex2.txt b/progs/fp/ex2.txt
new file mode 100644 (file)
index 0000000..b540f7b
--- /dev/null
@@ -0,0 +1,5 @@
+!!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
new file mode 100644 (file)
index 0000000..c3479c7
--- /dev/null
@@ -0,0 +1,5 @@
+!!ARBfp1.0
+TEMP R0;
+ADD R0, fragment.color, {0.5}.x;
+FLR result.color,  R0;
+END
diff --git a/progs/fp/frc.txt b/progs/fp/frc.txt
new file mode 100644 (file)
index 0000000..efacaa8
--- /dev/null
@@ -0,0 +1,5 @@
+!!ARBfp1.0
+TEMP R0;
+MUL R0, fragment.color, {3.0}.x;
+FRC result.color, R0;
+END
diff --git a/progs/fp/kil.txt b/progs/fp/kil.txt
new file mode 100644 (file)
index 0000000..d95deb0
--- /dev/null
@@ -0,0 +1,6 @@
+!!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
new file mode 100644 (file)
index 0000000..6707d7c
--- /dev/null
@@ -0,0 +1,5 @@
+!!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
new file mode 100644 (file)
index 0000000..333c50d
--- /dev/null
@@ -0,0 +1,5 @@
+!!ARBfp1.0
+TEMP R0;
+SUB R0, {0.5}.x, fragment.color;
+LIT result.color, R0;
+END
diff --git a/progs/fp/lrp.txt b/progs/fp/lrp.txt
new file mode 100644 (file)
index 0000000..56cb5f5
--- /dev/null
@@ -0,0 +1,4 @@
+!!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
new file mode 100644 (file)
index 0000000..77ffac4
--- /dev/null
@@ -0,0 +1,4 @@
+!!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
new file mode 100644 (file)
index 0000000..0f3bffd
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+MAX result.color, {0.5}.x, fragment.color;
+END
diff --git a/progs/fp/min.txt b/progs/fp/min.txt
new file mode 100644 (file)
index 0000000..06d8f91
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+MIN result.color, {0.5}.x, fragment.color;
+END
diff --git a/progs/fp/mov.txt b/progs/fp/mov.txt
new file mode 100644 (file)
index 0000000..4c67bae
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+MOV result.color, fragment.color;
+END
diff --git a/progs/fp/mul.txt b/progs/fp/mul.txt
new file mode 100644 (file)
index 0000000..907155d
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+MUL result.color, fragment.color, fragment.color;
+END
diff --git a/progs/fp/position.txt b/progs/fp/position.txt
new file mode 100644 (file)
index 0000000..27fac12
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+MUL result.color, fragment.position, {.005}.x;
+END
diff --git a/progs/fp/pow.txt b/progs/fp/pow.txt
new file mode 100644 (file)
index 0000000..35c7385
--- /dev/null
@@ -0,0 +1,4 @@
+!!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
new file mode 100644 (file)
index 0000000..122161c
--- /dev/null
@@ -0,0 +1,5 @@
+!!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
new file mode 100644 (file)
index 0000000..b28de4b
--- /dev/null
@@ -0,0 +1,5 @@
+!!ARBfp1.0
+TEMP R0;
+MUL R0, fragment.color, {3.0}.x;
+RSQ result.color, R0.x;
+END
diff --git a/progs/fp/scs.txt b/progs/fp/scs.txt
new file mode 100644 (file)
index 0000000..5a8c9f1
--- /dev/null
@@ -0,0 +1,5 @@
+!!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
new file mode 100644 (file)
index 0000000..5385692
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+SGE result.color, {0.5}.x, fragment.color;
+END
diff --git a/progs/fp/sge2.txt b/progs/fp/sge2.txt
new file mode 100644 (file)
index 0000000..e02a50d
--- /dev/null
@@ -0,0 +1,8 @@
+!!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
new file mode 100644 (file)
index 0000000..4a8cdb6
--- /dev/null
@@ -0,0 +1,8 @@
+!!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
new file mode 100644 (file)
index 0000000..a3b3ff5
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+SLT result.color, {0.5}.x, fragment.color;
+END
diff --git a/progs/fp/sub.txt b/progs/fp/sub.txt
new file mode 100644 (file)
index 0000000..b4e5cc0
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+SUB result.color, fragment.color.yzxw, fragment.color;
+END
diff --git a/progs/fp/swz.txt b/progs/fp/swz.txt
new file mode 100644 (file)
index 0000000..e28f112
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+SWZ result.color, fragment.color, 1,x,y,z;
+END
diff --git a/progs/fp/swz2.txt b/progs/fp/swz2.txt
new file mode 100644 (file)
index 0000000..5c12b84
--- /dev/null
@@ -0,0 +1,4 @@
+!!ARBfp1.0
+TEMP R0, R1;
+SWZ result.color, fragment.color, 1, 0, 0, 1;
+END
diff --git a/progs/fp/tri-abs.c b/progs/fp/tri-abs.c
deleted file mode 100644 (file)
index 44aa2cf..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "SUB R0, {0.5}.x, fragment.color; \n"
-      "ABS result.color, R0; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-add.c b/progs/fp/tri-add.c
deleted file mode 100644 (file)
index b086126..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "ADD R0, fragment.color, fragment.color; \n"
-      "ADD result.color, R0, R0; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-cmp.c b/progs/fp/tri-cmp.c
deleted file mode 100644 (file)
index 968b67f..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "SUB R0, {0.5}.x, fragment.color; \n"
-      "CMP result.color, R0, fragment.color, {0.0}.x; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-cos.c b/progs/fp/tri-cos.c
deleted file mode 100644 (file)
index 7ea2453..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0; \n"
-      "MUL R0, fragment.color, {3.14}.x; \n"
-      "COS result.color.x, R0.x; \n"
-      "COS result.color.y, R0.y; \n"
-      "COS result.color.z, R0.z; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-dp3.c b/progs/fp/tri-dp3.c
deleted file mode 100644 (file)
index 0e18de2..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "DP3 result.color, fragment.color, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-dp4.c b/progs/fp/tri-dp4.c
deleted file mode 100644 (file)
index 400bbf4..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "DP4 result.color, fragment.color.xxxx, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-dph.c b/progs/fp/tri-dph.c
deleted file mode 100644 (file)
index 958073c..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "DPH result.color, fragment.color, fragment.color.xyzx; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-dst.c b/progs/fp/tri-dst.c
deleted file mode 100644 (file)
index 3d85e85..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "DST result.color, fragment.color, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-ex2.c b/progs/fp/tri-ex2.c
deleted file mode 100644 (file)
index f09b1d7..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "EX2 R0, fragment.color.x; \n"
-      "SUB result.color, R0, {1.0}.x; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-flr.c b/progs/fp/tri-flr.c
deleted file mode 100644 (file)
index 059f6b6..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "ADD R0, fragment.color, {0.5}.x; \n"
-      "FLR result.color,  R0; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-fp.c b/progs/fp/tri-fp.c
deleted file mode 100644 (file)
index 4148a8d..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "SLT result.color, {0.5}.x, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-frc.c b/progs/fp/tri-frc.c
deleted file mode 100644 (file)
index 8d60c9d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0; \n"
-      "MUL R0, fragment.color, {3.0}.x; \n"
-      "FRC result.color, R0; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-kil.c b/progs/fp/tri-kil.c
deleted file mode 100644 (file)
index 47dbd04..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "SUB R0, fragment.color, {0.5,0,0,0}; \n"
-      "KIL R0;"
-      "MOV result.color, R0;"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-lg2.c b/progs/fp/tri-lg2.c
deleted file mode 100644 (file)
index c7eec46..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "MUL R0, fragment.color, {4.0}.x; \n"
-      "LG2 result.color, R0.x; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-lit.c b/progs/fp/tri-lit.c
deleted file mode 100644 (file)
index 21e3b6f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "SUB R0, {0.5}.x, fragment.color; \n"
-      "LIT result.color, R0; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-lrp.c b/progs/fp/tri-lrp.c
deleted file mode 100644 (file)
index a5659ee..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0, R1;\n"
-      "LRP result.color, fragment.color.z, {1,0,0,1}, {0,1,0,1}; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-mad.c b/progs/fp/tri-mad.c
deleted file mode 100644 (file)
index b46d139..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0, R1;\n"
-      "MAD result.color, fragment.color.z, {1,0,0,1}, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-max.c b/progs/fp/tri-max.c
deleted file mode 100644 (file)
index 481a067..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "MAX result.color, {0.5}.x, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-min.c b/progs/fp/tri-min.c
deleted file mode 100644 (file)
index 7bb722f..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "MIN result.color, {0.5}.x, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-mov.c b/progs/fp/tri-mov.c
deleted file mode 100644 (file)
index 40b5b66..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "MOV result.color, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-mul.c b/progs/fp/tri-mul.c
deleted file mode 100644 (file)
index 61dd3e0..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "MUL result.color, fragment.color, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-position.c b/progs/fp/tri-position.c
deleted file mode 100644 (file)
index 18e8182..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "MUL result.color, fragment.position, {.005}.x; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-pow.c b/progs/fp/tri-pow.c
deleted file mode 100644 (file)
index ef91e43..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "POW result.color,  fragment.color.x, fragment.color.y; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-rcp.c b/progs/fp/tri-rcp.c
deleted file mode 100644 (file)
index e2a2704..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "ADD R0, fragment.color.x, fragment.color.x; \n"
-      "RCP result.color, R0.x; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-rsq.c b/progs/fp/tri-rsq.c
deleted file mode 100644 (file)
index c5b2c1b..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "MUL R0, fragment.color, {3.0}.x; \n"
-      "RSQ result.color, R0.x; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-scs.c b/progs/fp/tri-scs.c
deleted file mode 100644 (file)
index ce7c006..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0; \n"
-      "MUL R0, fragment.color, {3.14}.x; \n"
-      "SCS result.color, R0.x; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-sge.c b/progs/fp/tri-sge.c
deleted file mode 100644 (file)
index 6a360ca..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "SGE result.color, {0.5}.x, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-sge2.c b/progs/fp/tri-sge2.c
deleted file mode 100644 (file)
index c433009..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0;\n"
-      "TEMP R1;\n"
-      "SGE R0, fragment.color, fragment.color.yzxw; \n"
-      "SGE R1, fragment.color, fragment.color.zxyw; \n"
-      "MUL R0, R0, R1; \n"
-      "MUL result.color, R0, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-sin.c b/progs/fp/tri-sin.c
deleted file mode 100644 (file)
index 772903e..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0; \n"
-      "MUL R0, fragment.color, {3.14}.x; \n"
-      "MOV result.color, {0.0}.x; \n"
-      "SIN result.color.x, R0.x; \n"
-      "SIN result.color.y, R0.y; \n"
-      "SIN result.color.z, R0.z; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-slt.c b/progs/fp/tri-slt.c
deleted file mode 100644 (file)
index 4148a8d..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "SLT result.color, {0.5}.x, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-sub.c b/progs/fp/tri-sub.c
deleted file mode 100644 (file)
index 6faa414..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "SUB result.color, fragment.color.yzxw, fragment.color; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-swz.c b/progs/fp/tri-swz.c
deleted file mode 100644 (file)
index 5f34f7a..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "SWZ result.color, fragment.color, 1,x,y,z; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-swz2.c b/progs/fp/tri-swz2.c
deleted file mode 100644 (file)
index fd76b58..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "TEMP R0, R1;\n"
-      "SWZ result.color, fragment.color, 1, 0, 0, 1; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/tri-xpd.c b/progs/fp/tri-xpd.c
deleted file mode 100644 (file)
index 9aca46b..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/glut.h>
-#include "GL/gl.h"
-
-
-
-static void Init( void )
-{
-   static const char *modulate2D =
-      "!!ARBfp1.0\n"
-      "XPD result.color, fragment.color, {2,2,2,0}; \n"
-      "END"
-      ;
-   GLuint modulateProg;
-
-   if (!glutExtensionSupported("GL_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:
-       return;
-    }
-
-    glutPostRedisplay();
-}
-
-static void Draw(void)
-{
-   glClear(GL_COLOR_BUFFER_BIT); 
-
-   glBegin(GL_TRIANGLES);
-   glColor3f(0,0,1); 
-   glVertex3f( 0.9, -0.9, -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;
-    type |= GLUT_SINGLE;
-    glutInitDisplayMode(type);
-
-    if (glutCreateWindow("First Tri") == GL_FALSE) {
-       exit(1);
-    }
-
-    Init();
-
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-       return 0;
-}
diff --git a/progs/fp/xpd.txt b/progs/fp/xpd.txt
new file mode 100644 (file)
index 0000000..d8dc08d
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+XPD result.color, fragment.color, {2,2,2,0};
+END
index a1101a7ba87de9b38414c48e79d57b0f72d7bd9d..bdfe8af183e43d83da0d75ae117fd84dc66a0cf1 100644 (file)
@@ -157,6 +157,7 @@ add_interpolator(struct gallivm_prog *prog,
    prog->interpolators[prog->num_interp] = *interp;
    ++prog->num_interp;
 }
+
 static void
 translate_declaration(struct gallivm_prog *prog,
                       llvm::Module *module,
@@ -470,8 +471,6 @@ translate_instruction(llvm::Module *module,
       break;
    case TGSI_OPCODE_TXD:
       break;
-   case TGSI_OPCODE_TXP:
-      break;
    case TGSI_OPCODE_UP2H:
       break;
    case TGSI_OPCODE_UP2US:
@@ -1015,11 +1014,12 @@ struct gallivm_cpu_engine * gallivm_cpu_engine_create(struct gallivm_prog *prog)
    llvm::Module *mod = static_cast<llvm::Module*>(prog->module);
    llvm::ExistingModuleProvider *mp = new llvm::ExistingModuleProvider(mod);
    llvm::ExecutionEngine *ee = llvm::ExecutionEngine::create(mp, false);
+   ee->DisableLazyCompilation();
    cpu->engine = ee;
 
    llvm::Function *func = func_for_shader(prog);
 
-   prog->function = ee->getPointerToFunctionOrStub(func);
+   prog->function = ee->getPointerToFunction(func);
    CPU = cpu;
    return cpu;
 }
@@ -1037,10 +1037,11 @@ void gallivm_cpu_jit_compile(struct gallivm_cpu_engine *cpu, struct gallivm_prog
    llvm::ExistingModuleProvider *mp = new llvm::ExistingModuleProvider(mod);
    llvm::ExecutionEngine *ee = cpu->engine;
    assert(ee);
+   ee->DisableLazyCompilation();
    ee->addModuleProvider(mp);
 
    llvm::Function *func = func_for_shader(prog);
-   prog->function = ee->getPointerToFunctionOrStub(func);
+   prog->function = ee->getPointerToFunction(func);
 }
 
 void gallivm_cpu_engine_delete(struct gallivm_cpu_engine *cpu)