Mesa (master): mesa: fix initialization of GL_FOG_MODE in _mesa_init_driver_state()

Brian Paul brianp at kemper.freedesktop.org
Thu Aug 11 08:06:08 PDT 2011


Module: Mesa
Branch: master
Commit: 099aad2fb0dba8baff61dc7a6803c6c976c08069
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=099aad2fb0dba8baff61dc7a6803c6c976c08069

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Aug 11 09:02:16 2011 -0600

mesa: fix initialization of GL_FOG_MODE in _mesa_init_driver_state()

---

 src/mesa/drivers/common/driverfuncs.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 70f8727..a6174ee 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -286,7 +286,10 @@ _mesa_init_driver_state(struct gl_context *ctx)
    ctx->Driver.Enable(ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE);
 
    ctx->Driver.Fogfv(ctx, GL_FOG_COLOR, ctx->Fog.Color);
-   ctx->Driver.Fogfv(ctx, GL_FOG_MODE, 0);
+   {
+      GLfloat mode = (GLfloat) ctx->Fog.Mode;
+      ctx->Driver.Fogfv(ctx, GL_FOG_MODE, &mode);
+   }
    ctx->Driver.Fogfv(ctx, GL_FOG_DENSITY, &ctx->Fog.Density);
    ctx->Driver.Fogfv(ctx, GL_FOG_START, &ctx->Fog.Start);
    ctx->Driver.Fogfv(ctx, GL_FOG_END, &ctx->Fog.End);



More information about the mesa-commit mailing list