summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-10-10 18:39:34 +0000
committerBrian Paul <[email protected]>2005-10-10 18:39:34 +0000
commitac04a4fa7fb2c705d518cb3e0c12a2df8fc05485 (patch)
treee9f2ceeea568ecb9692b7e9d8ec150d3888998b1
parent8d29d463a376d1fa7d48d50ef07bfb8682bb5444 (diff)
fixed constant fogcoord bug (#4729)
-rw-r--r--src/mesa/tnl/t_vb_fog.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c
index ddf849a658e..f1d01bc47f9 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 */
}