Hi,

finally I have found the bug which causes plibs menus (libpu) to flicker
with GLX-MGA.

The ShadeModel and corresponding "TriangleCaps" does not get reset on
glPopAttrib (glPushAttrib with GL_LIGHTING_BIT).

Here is a fix: (mesa_3_2_dev branch)


Index: attrib.c
===================================================================
RCS file: /cvs/mesa3d/Mesa/src/attrib.c,v
retrieving revision 1.10
diff -u -w -r1.10 attrib.c
--- attrib.c    1999/11/08 15:28:08     1.10
+++ attrib.c    1999/11/22 17:48:12
@@ -624,6 +624,15 @@
                }
                (*ctx->Driver.Enable)( ctx, GL_LIGHTING, ctx->Light.Enabled );
             }
+            
+            /* emulate gl_ShadeModel here: */
+           if (ctx->Light.ShadeModel == GL_FLAT)
+             ctx->TriangleCaps |= DD_FLATSHADE;
+           else
+             ctx->TriangleCaps &= ~DD_FLATSHADE;
+           if (ctx->Driver.ShadeModel)
+              (*ctx->Driver.ShadeModel)(ctx, ctx->Light.ShadeModel);
+              
            ctx->Enabled &= ENABLE_LIGHT;
            if (ctx->Light.Enabled && !is_empty_list(&ctx->Light.EnabledList))
               ctx->Enabled |= ENABLE_LIGHT;




_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to