From ac04a4fa7fb2c705d518cb3e0c12a2df8fc05485 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 10 Oct 2005 18:39:34 +0000 Subject: fixed constant fogcoord bug (#4729) --- src/mesa/tnl/t_vb_fog.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index ddf849a658..f1d01bc47f 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.5 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -197,6 +197,12 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) else { /* use glFogCoord() coordinates */ input = VB->FogCoordPtr; /* source data */ + + /* input->count may be one if glFogCoord was only called once + * before glBegin. But we need to compute fog for all vertices. + */ + input->count = VB->ObjPtr->count; + VB->FogCoordPtr = &store->fogcoord; /* dest data */ } -- cgit v1.2.3