diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2008-08-18 16:38:21 -0700 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2008-08-18 16:38:21 -0700 |
commit | 12e84a8b84c331d0afef63e6119fe356c84bf383 (patch) | |
tree | 93334013bef2eb00390eb39f0c161c9b61abc543 | |
parent | e438827dec5a3aafa04e13caf5988f359c004249 (diff) |
r5xx: Enable fog options.
This uses fog HW instead of fragment programs.
If it breaks you, let me know!
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index cce07d338b..d71e4f6fe9 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -2622,6 +2622,14 @@ static void r500SetupPixelShader(r300ContextPtr rmesa) } code = &fp->code; + if (fp->mesa_program.FogOption != GL_NONE) { + /* Enable HW fog. + * (Anybody sane remembered to set glFog() opts first! */ + ctx->Fog.Enabled = GL_TRUE; + ctx->Fog.Mode = fp->mesa_program.FogOption; + r300SetFogState(ctx, GL_TRUE); + } + r300SetupTextures(ctx); R300_STATECHANGE(rmesa, fp); |