diff options
author | Brian Paul <[email protected]> | 2009-08-26 12:01:23 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-08-26 12:01:23 -0600 |
commit | 476290946e7bd3b7fe5688622127d8c6a9c7f367 (patch) | |
tree | ba31a644465765c2689877aa1626e479826ae301 /progs/glsl | |
parent | 2bcf787de1884dff34749d308eb245da457ef649 (diff) | |
parent | 488b3c4d1bc3d830477180759a42dbaf8f5801b0 (diff) |
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'progs/glsl')
-rw-r--r-- | progs/glsl/Makefile | 4 | ||||
-rw-r--r-- | progs/glsl/samplers.c | 16 |
2 files changed, 16 insertions, 4 deletions
diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile index 0875bdd7950..8103a5cbca0 100644 --- a/progs/glsl/Makefile +++ b/progs/glsl/Makefile @@ -37,6 +37,7 @@ DEMO_SOURCES = \ pointcoord.c \ points.c \ samplers.c \ + samplers_array.c \ shadow_sampler.c \ shtest.c \ skinning.c \ @@ -79,6 +80,9 @@ clean: ##### Extra dependencies +samplers_array.o: samplers.c + $(APP_CC) $(CFLAGS) -DSAMPLERS_ARRAY $< -c -o $@ + extfuncs.h: $(TOP)/progs/util/extfuncs.h cp $< . diff --git a/progs/glsl/samplers.c b/progs/glsl/samplers.c index 113e5bbeff1..87dad5d8575 100644 --- a/progs/glsl/samplers.c +++ b/progs/glsl/samplers.c @@ -211,10 +211,18 @@ InitTextures(void) for (y = 0; y < stripeSize; y++) { for (x = 0; x < size; x++) { GLint k = 4 * ((ypos + y) * size + x); - texImage[k + 0] = intensity; - texImage[k + 1] = intensity; - texImage[k + 2] = 0; - texImage[k + 3] = 255; + if (x < size / 2) { + texImage[k + 0] = intensity; + texImage[k + 1] = intensity; + texImage[k + 2] = 0; + texImage[k + 3] = 255; + } + else { + texImage[k + 0] = 255 - intensity; + texImage[k + 1] = 0; + texImage[k + 2] = 0; + texImage[k + 3] = 255; + } } } |