summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
Diffstat (limited to 'progs')
-rw-r--r--progs/vp/arl.txt9
-rw-r--r--progs/vp/vp-tris.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/progs/vp/arl.txt b/progs/vp/arl.txt
new file mode 100644
index 0000000000..da6c9f83fa
--- /dev/null
+++ b/progs/vp/arl.txt
@@ -0,0 +1,9 @@
+!!ARBvp1.0
+PARAM arr[5] = { {1,0,0,1}, {0,1,0,1}, {0,0,1,1}, {1,0,1,1}, {0,1,1,1} };
+ADDRESS addr;
+TEMP R0;
+MUL R0, {5.0}.x, vertex.color;
+ARL addr.x, R0.x;
+MOV result.color, arr[addr.x];
+MOV result.position, vertex.position;
+END
diff --git a/progs/vp/vp-tris.c b/progs/vp/vp-tris.c
index 04f5e0e152..abc056b8d0 100644
--- a/progs/vp/vp-tris.c
+++ b/progs/vp/vp-tris.c
@@ -78,7 +78,6 @@ static void Init( void )
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
sz, (const GLubyte *) buf);
- assert(glIsProgramARB(prognum));
errno = glGetError();
printf("glGetError = %d\n", errno);
if (errno != GL_NO_ERROR)
@@ -89,6 +88,7 @@ static void Init( void )
printf("errorpos: %d\n", errorpos);
printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
}
+ assert(glIsProgramARB(prognum));
}