mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
add an arl test
This commit is contained in:
parent
a546abc8da
commit
a9b927cb6e
2 changed files with 10 additions and 1 deletions
9
progs/vp/arl.txt
Normal file
9
progs/vp/arl.txt
Normal file
|
|
@ -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
|
||||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue