aboutsummaryrefslogtreecommitdiffstats
path: root/progs/fp
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-09-18 19:06:20 +0100
committerKeith Whitwell <[email protected]>2008-09-18 19:07:33 +0100
commita8d1521f30766b6a4707aa9966e1f2f9c0b3ac00 (patch)
tree3d457d02a4d6167c2b720f8b55a59a32f33aaed9 /progs/fp
parent89ab66448e1bcd78caab6678261c2885dcff741c (diff)
parent0b8e19ffc51c29543796d4f1e3243e97d8c32671 (diff)
Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts: src/mesa/shader/slang/slang_link.c
Diffstat (limited to 'progs/fp')
-rw-r--r--progs/fp/fp-tri.c2
-rw-r--r--progs/fp/local.txt11
2 files changed, 13 insertions, 0 deletions
diff --git a/progs/fp/fp-tri.c b/progs/fp/fp-tri.c
index c07cfa2076e..843f897871b 100644
--- a/progs/fp/fp-tri.c
+++ b/progs/fp/fp-tri.c
@@ -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);
diff --git a/progs/fp/local.txt b/progs/fp/local.txt
new file mode 100644
index 00000000000..6cb2a2f13cc
--- /dev/null
+++ b/progs/fp/local.txt
@@ -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