[Mesa-dev] [PATCH 2/3] mesa: Restore the GL_COLOR_SUM enable bit on glPopAttrib(GL_FOG_BIT).

Kenneth Graunke kenneth at whitecape.org
Tue Feb 5 23:09:01 PST 2013

According to the GL 2.1 specification, Table 6.11 (Coloring),
GL_COLOR_SUM is supposed to be in the fog/enable attributes.

This patch just adds it to GL_FOG_BIT.  GL_ENABLE_BIT is still broken.

NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
 src/mesa/main/attrib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index d31bce4..57d3667 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1018,6 +1018,7 @@ _mesa_PopAttrib(void)
                _mesa_Fogf(GL_FOG_INDEX, fog->Index);
                _mesa_Fogi(GL_FOG_MODE, fog->Mode);
                _mesa_Fogi(GL_FOG_COORD_SRC, fog->FogCoordinateSource);
+               _mesa_set_enable(ctx, GL_COLOR_SUM, fog->ColorSumEnabled);
          case GL_HINT_BIT:

More information about the mesa-dev mailing list