diff options
Diffstat (limited to 'progs/fp')
-rw-r--r-- | progs/fp/SConscript | 15 | ||||
-rw-r--r-- | progs/fp/fp-tri.c | 13 | ||||
-rw-r--r-- | progs/fp/mov-imm.txt | 3 | ||||
-rw-r--r-- | progs/fp/mov-param.txt | 4 |
4 files changed, 21 insertions, 14 deletions
diff --git a/progs/fp/SConscript b/progs/fp/SConscript index 69614e1a9e1..e209161f321 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', @@ -23,7 +12,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 26af66ad84e..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); } 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 |