fixed constant fogcoord bug (#4729)

This commit is contained in:
Brian Paul
2005-10-10 18:39:34 +00:00
parent 8d29d463a3
commit ac04a4fa7f
+8 -2
View File
@@ -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 */
}