progs/fp: Add a bit of local variable testing to fp-tri

This commit is contained in:
Jakob Bornecrantz
2008-09-18 14:14:56 +02:00
parent 1672e8e059
commit fa7529335c
2 changed files with 13 additions and 0 deletions

View File

@@ -130,6 +130,8 @@ static void Display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, 1.0, 1.0, 0.0, 0.0);
glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 1, 0.0, 0.0, 1.0, 1.0);
glBegin(GL_TRIANGLES);
glColor3f(0,0,1);
glVertex3f( 0.9, -0.9, -30.0);

11
progs/fp/local.txt Normal file
View File

@@ -0,0 +1,11 @@
!!ARBfp1.0
TEMP R0;
PARAM c[4] = { { 0, 0, 0, 0 },
program.local[0..1],
{ 1, 1, 1, 1 } };
MOV R0, c[1];
SUB R0, R0, c[0];
ADD R0, R0, c[2];
MUL R0, R0, c[3];
MOV result.color, R0;
END