texenv: Match state.c in deciding whether we'll be using a vertex shader.
[mesa.git] / src / mesa / main / polygon.c
index 814f7ec5faa0bc4ebdcc0d38626c03f2d5194dec..564250b881cf10c3cdae0481fdeea63d265fbe9d 100644 (file)
@@ -166,6 +166,14 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
       _mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(face)" );
       return;
    }
+
+   if (ctx->Polygon.FrontMode == GL_FILL && ctx->Polygon.BackMode == GL_FILL)
+      ctx->_TriangleCaps &= ~DD_TRI_UNFILLED;
+   else
+      ctx->_TriangleCaps |= DD_TRI_UNFILLED;
+
+   if (ctx->Driver.PolygonMode)
+      ctx->Driver.PolygonMode(ctx, face, mode);
 }
 
 #if _HAVE_FULL_GL