Re: [r300] glPopAttrib() issue (Scorched3D)
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. Philipp --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [r300] glPopAttrib() issue (Scorched3D)
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 - 1.94 --- main/attrib.c 27 May 2005 14:03:58 - *** *** 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);
Re: [r300] glPopAttrib() issue (Scorched3D)
Brian Paul wrote: 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 That did it!! And it looks better than mine, I commented out FLUSH_VERTICES() for S T... =) Rune Petersen --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [r300] glPopAttrib() issue (Scorched3D)
Rune Petersen wrote: Brian Paul wrote: 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 That did it!! And it looks better than mine, I commented out FLUSH_VERTICES() for S T... =) Ok, I'll check in the patch. -Brian --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[r300] glPopAttrib() issue (Scorched3D)
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. Simplified code from draw() in WaterMap.cpp: glPushAttrib(GL_TEXTURE_BIT); GLState currentState(GLState::TEXTURE_ON | GLState::BLEND_ON); waterTexture_-draw(); glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glEnable(GL_TEXTURE_GEN_R); glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glTexGenf(GL_R, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); // Draw the water surround_.draw(); drawWater(); glPopAttrib(); If I disable GL_TEXTURE_GEN_S GL_TEXTURE_GEN_T before glPopAttrib() I get no texture corruption. If I remove glPushAttrib() glPopAttrib() I get no corruption, and of cause doesn't look right. Are there an easy way to track GL calls down through the layers? Rune Petersen --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel