diff options
Diffstat (limited to 'progs/fp')
-rwxr-xr-x | progs/fp/Makefile | 1 | ||||
-rw-r--r-- | progs/fp/SConscript | 15 | ||||
-rw-r--r-- | progs/fp/fp-tri.c | 15 | ||||
-rw-r--r-- | progs/fp/mov-imm.txt | 3 | ||||
-rw-r--r-- | progs/fp/mov-param.txt | 4 | ||||
-rw-r--r-- | progs/fp/point-position.c | 2 | ||||
-rw-r--r-- | progs/fp/tri-depth.c | 2 | ||||
-rw-r--r-- | progs/fp/tri-depth2.c | 2 | ||||
-rw-r--r-- | progs/fp/tri-depthwrite.c | 2 | ||||
-rw-r--r-- | progs/fp/tri-depthwrite2.c | 2 | ||||
-rw-r--r-- | progs/fp/tri-inv.c | 2 | ||||
-rw-r--r-- | progs/fp/tri-param.c | 2 | ||||
-rw-r--r-- | progs/fp/tri-tex.c | 2 |
13 files changed, 31 insertions, 23 deletions
diff --git a/progs/fp/Makefile b/progs/fp/Makefile index 681928cf260..d77cd32b4df 100755 --- a/progs/fp/Makefile +++ b/progs/fp/Makefile @@ -17,6 +17,7 @@ SOURCES = \ tri-depth2.c \ tri-depthwrite.c \ tri-depthwrite2.c \ + tri-inv.c \ tri-param.c \ fp-tri.c diff --git a/progs/fp/SConscript b/progs/fp/SConscript index a78318542c1..113e11ab54e 100644 --- a/progs/fp/SConscript +++ b/progs/fp/SConscript @@ -1,15 +1,4 @@ -Import('env') - -if not env['GLUT']: - Return() - -env = env.Clone() - -env.Prepend(CPPPATH = [ - '../util', -]) - -env.Prepend(LIBS = ['$GLUT_LIB']) +Import('*') progs = [ 'fp-tri', @@ -24,7 +13,7 @@ progs = [ ] for prog in progs: - env.Program( + progs_env.Program( target = prog, source = [prog + '.c'], ) diff --git a/progs/fp/fp-tri.c b/progs/fp/fp-tri.c index 52a8fcfc22a..70676d4c400 100644 --- a/progs/fp/fp-tri.c +++ b/progs/fp/fp-tri.c @@ -73,7 +73,7 @@ static void Init( void ) GLuint Texture; GLint errno; GLuint prognum; - char buf[4096]; + char buf[50000]; GLuint sz; FILE *f; @@ -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); } @@ -197,7 +208,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/fp/mov-imm.txt b/progs/fp/mov-imm.txt new file mode 100644 index 00000000000..38e48079d09 --- /dev/null +++ b/progs/fp/mov-imm.txt @@ -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 index 00000000000..13d82fe00b8 --- /dev/null +++ b/progs/fp/mov-param.txt @@ -0,0 +1,4 @@ +!!ARBfp1.0 +PARAM Diffuse = state.material.diffuse; +MOV result.color, Diffuse; +END diff --git a/progs/fp/point-position.c b/progs/fp/point-position.c index c0963d7a0b5..1ae753c1d05 100644 --- a/progs/fp/point-position.c +++ b/progs/fp/point-position.c @@ -55,7 +55,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/fp/tri-depth.c b/progs/fp/tri-depth.c index 5488469e806..a9f3a6a5be3 100644 --- a/progs/fp/tri-depth.c +++ b/progs/fp/tri-depth.c @@ -57,7 +57,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/fp/tri-depth2.c b/progs/fp/tri-depth2.c index 6ed23071157..8c4336817be 100644 --- a/progs/fp/tri-depth2.c +++ b/progs/fp/tri-depth2.c @@ -59,7 +59,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/fp/tri-depthwrite.c b/progs/fp/tri-depthwrite.c index 8e4f3e62451..7b9d70f292a 100644 --- a/progs/fp/tri-depthwrite.c +++ b/progs/fp/tri-depthwrite.c @@ -55,7 +55,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/fp/tri-depthwrite2.c b/progs/fp/tri-depthwrite2.c index 3c0b4d30c97..599949551d1 100644 --- a/progs/fp/tri-depthwrite2.c +++ b/progs/fp/tri-depthwrite2.c @@ -55,7 +55,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/fp/tri-inv.c b/progs/fp/tri-inv.c index 7e8d8c5ce29..7e490fa61ca 100644 --- a/progs/fp/tri-inv.c +++ b/progs/fp/tri-inv.c @@ -56,7 +56,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/fp/tri-param.c b/progs/fp/tri-param.c index 57443d71bd0..26a804d4b38 100644 --- a/progs/fp/tri-param.c +++ b/progs/fp/tri-param.c @@ -54,7 +54,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/fp/tri-tex.c b/progs/fp/tri-tex.c index 1dbbb201cef..64299e94531 100644 --- a/progs/fp/tri-tex.c +++ b/progs/fp/tri-tex.c @@ -76,7 +76,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); |