summaryrefslogtreecommitdiffstats
path: root/progs/demos
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-02-20 17:06:35 +0000
committerBrian Paul <[email protected]>2001-02-20 17:06:35 +0000
commit0a0595f2d3185d5b08e8948f7f51ed6005a653a5 (patch)
tree10554e6158544d82d68ea1c3ac4bfdf53f7bf3e3 /progs/demos
parent03ca5eb58f586cd613a7efba65ddea5f9df2849d (diff)
added extension #ifdef/#endifs
Diffstat (limited to 'progs/demos')
-rw-r--r--progs/demos/shadowtex.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/progs/demos/shadowtex.c b/progs/demos/shadowtex.c
index a68ad77a1f8..88949b764db 100644
--- a/progs/demos/shadowtex.c
+++ b/progs/demos/shadowtex.c
@@ -1,4 +1,4 @@
-/* $Id: shadowtex.c,v 1.1 2001/02/20 16:43:50 brianp Exp $ */
+/* $Id: shadowtex.c,v 1.2 2001/02/20 17:06:35 brianp Exp $ */
/*
* Shadow demo using the GL_SGIX_depth_texture, GL_SGIX_shadow and
@@ -347,12 +347,15 @@ Init(void)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+#ifdef GL_SGIX_shadow
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_TRUE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_OPERATOR_SGIX,
GL_TEXTURE_LEQUAL_R_SGIX);
-
+#endif
+#ifdef GL_SGIX_shadow_ambient
if (glutExtensionSupported("GL_SGIX_shadow_ambient"))
glTexParameterf(GL_TEXTURE_2D, GL_SHADOW_AMBIENT_SGIX, 0.3);
+#endif
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);