progs/fp: add simple imm, param tests
authorKeith Whitwell <keithw@vmware.com>
Fri, 20 Nov 2009 00:53:02 +0000 (16:53 -0800)
committerKeith Whitwell <keithw@vmware.com>
Fri, 20 Nov 2009 00:53:02 +0000 (16:53 -0800)
progs/fp/fp-tri.c
progs/fp/mov-imm.txt [new file with mode: 0644]
progs/fp/mov-param.txt [new file with mode: 0644]

index 52a8fcfc22ac683fdba9ebdcaf1d565747569ee1..a39818726bdeabc7f801a04c30ca018d1025cff4 100644 (file)
@@ -176,6 +176,17 @@ static void Init( void )
    }
 
 
+   {
+      const float Ambient[4] = { 0.0, 1.0, 0.0, 0.0 };
+      const float Diffuse[4] = { 1.0, 0.0, 0.0, 0.0 };
+      const float Specular[4] = { 0.0, 0.0, 1.0, 0.0 };
+      const float Emission[4] = { 0.0, 0.0, 0.0, 1.0 };
+      glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, Ambient);
+      glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse);
+      glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular);
+      glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, Emission);
+   }
+
    glClearColor(.1, .3, .5, 0);
 }
 
diff --git a/progs/fp/mov-imm.txt b/progs/fp/mov-imm.txt
new file mode 100644 (file)
index 0000000..38e4807
--- /dev/null
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+MOV result.color, {0.5, 0.8, 0.3, 1.0};
+END
diff --git a/progs/fp/mov-param.txt b/progs/fp/mov-param.txt
new file mode 100644 (file)
index 0000000..13d82fe
--- /dev/null
@@ -0,0 +1,4 @@
+!!ARBfp1.0
+PARAM Diffuse = state.material.diffuse; 
+MOV result.color, Diffuse;
+END