Philipp Klaus Krause wrote:
Rune Petersen schrieb:

Hi,
Enabling water in Scorched3D causes corruption of all textures and I
have tracked it down to interaction between glPopAttrib() and the
attributes GL_TEXTURE_GEN_S & GL_TEXTURE_GEN_T.
I using the latest CVS updates of Xorg, Mesa, and r300_driver.


This problem is not limited to the r300. I have the same problem
on r200 and i915.

Try this patch to src/main/attrib.c

-Brian

Index: main/attrib.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/main/attrib.c,v
retrieving revision 1.94
diff -c -r1.94 attrib.c
*** main/attrib.c       4 May 2005 20:11:39 -0000       1.94
--- main/attrib.c       27 May 2005 14:03:58 -0000
***************
*** 649,654 ****
--- 649,662 ----
        _mesa_TexGenfv(GL_T, GL_EYE_PLANE, unit->EyePlaneT);
        _mesa_TexGenfv(GL_R, GL_EYE_PLANE, unit->EyePlaneR);
        _mesa_TexGenfv(GL_Q, GL_EYE_PLANE, unit->EyePlaneQ);
+       _mesa_set_enable(ctx, GL_TEXTURE_GEN_S,
+                        ((unit->TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE));
+       _mesa_set_enable(ctx, GL_TEXTURE_GEN_T,
+                        ((unit->TexGenEnabled & T_BIT) ? GL_TRUE : GL_FALSE));
+       _mesa_set_enable(ctx, GL_TEXTURE_GEN_R,
+                        ((unit->TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE));
+       _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q,
+                        ((unit->TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE));
        if (ctx->Extensions.EXT_texture_lod_bias) {
           _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT,
                         GL_TEXTURE_LOD_BIAS_EXT, unit->LodBias);

Reply via email to