diff options
author | Brian Paul <[email protected]> | 2006-04-05 03:26:12 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-04-05 03:26:12 +0000 |
commit | 1979b6b2def208143a1357e0eef9baece5ea9d3b (patch) | |
tree | 7bf08c4f246d81924095d2939a7e246089bfd7a4 /progs | |
parent | 900da88dae01c3e7716a79788f83797e334a564a (diff) |
set the texture border color for the depth texture
Diffstat (limited to 'progs')
-rw-r--r-- | progs/demos/shadowtex.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/progs/demos/shadowtex.c b/progs/demos/shadowtex.c index c3e56177052..3e4bd43abdc 100644 --- a/progs/demos/shadowtex.c +++ b/progs/demos/shadowtex.c @@ -534,6 +534,8 @@ SpecialKey(int key, int x, int y) static void Init(void) { + static const GLfloat borderColor[4] = {1.0, 0.0, 0.0, 0.0}; + #if defined(GL_ARB_depth_texture) && defined(GL_ARB_shadow) if (!glutExtensionSupported("GL_ARB_depth_texture") || !glutExtensionSupported("GL_ARB_shadow")) { @@ -552,9 +554,11 @@ Init(void) HaveEXTshadowFuncs = glutExtensionSupported("GL_EXT_shadow_funcs"); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP); + + glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); #if defined(GL_ARB_shadow) |