add an arl test
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 1 Nov 2005 20:29:59 +0000 (20:29 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 1 Nov 2005 20:29:59 +0000 (20:29 +0000)
progs/vp/arl.txt [new file with mode: 0644]
progs/vp/vp-tris.c

diff --git a/progs/vp/arl.txt b/progs/vp/arl.txt
new file mode 100644 (file)
index 0000000..da6c9f8
--- /dev/null
@@ -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
index 04f5e0e1525901686449e0f0f2efc8776d2e494c..abc056b8d0cb761ea7632d21cafbe039a1107004 100644 (file)
@@ -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));
 }