aboutsummaryrefslogtreecommitdiffstats
path: root/progs/demos/arbfplight.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-04-26 20:58:27 +0000
committerBrian Paul <[email protected]>2005-04-26 20:58:27 +0000
commit69441868f6440705842f47f0a0e9521e58940a25 (patch)
tree1d94e079274d4258059d6c53a475788844248fad /progs/demos/arbfplight.c
parent55d8dd4078e58e6d2fe2c513861ff06b6bc114fc (diff)
no need to enable fog or set fog mode with fragment program
Diffstat (limited to 'progs/demos/arbfplight.c')
-rw-r--r--progs/demos/arbfplight.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/progs/demos/arbfplight.c b/progs/demos/arbfplight.c
index 2173ae6fedc..6ad95d4d76d 100644
--- a/progs/demos/arbfplight.c
+++ b/progs/demos/arbfplight.c
@@ -51,20 +51,16 @@ static void Redisplay( void )
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
if (PixelLight) {
-#if defined(GL_ARB_fragment_program)
glProgramLocalParameter4fvARB_func(GL_FRAGMENT_PROGRAM_ARB,
LIGHTPOS, LightPos);
glEnable(GL_FRAGMENT_PROGRAM_ARB);
glEnable(GL_VERTEX_PROGRAM_ARB);
-#endif
glDisable(GL_LIGHTING);
}
else {
glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
-#if defined(GL_ARB_fragment_program)
glDisable(GL_FRAGMENT_PROGRAM_ARB);
glDisable(GL_VERTEX_PROGRAM_ARB);
-#endif
glEnable(GL_LIGHTING);
}
@@ -302,7 +298,6 @@ static void Init( void )
glDeleteProgramsARB_func = (PFNGLDELETEPROGRAMSARBPROC) glutGetProcAddress("glDeleteProgramsARB");
assert(glDeleteProgramsARB_func);
-#if defined(GL_ARB_fragment_program)
/*
* Fragment program
*/
@@ -354,7 +349,6 @@ static void Init( void )
exit(0);
}
assert(glIsProgramARB_func(VertProg));
-#endif
/*
* Misc init
@@ -371,11 +365,9 @@ static void Init( void )
{
/* Green-ish fog color */
static const GLfloat fogColor[4] = {0.5, 1.0, 0.5, 0};
- glFogi(GL_FOG_MODE, GL_LINEAR);
glFogfv(GL_FOG_COLOR, fogColor);
glFogf(GL_FOG_START, 5.0);
glFogf(GL_FOG_END, 25.0);
- glEnable(GL_FOG);
}
#endif