the hypertorus hack of xscreensaver (recent version may be needed - 4.24 should be new enough, I've used 5.0.1) shows some seemingly random triangles when started with the right options (-solid -transparent should do). I've looked a bit at it and it seems whenever a buffer wrap happens due to the buffer being full (so _tnl_wrap_filled_vertex is called, not sure if it's correct if _tnl_wrap_buffers gets called due to other reasons) an additional tri will be introduced (actually I think one is just drawn twice). This happens with both software mesa and r200, though with r200 only when tcl_mode is either 1 or 0. hypertorus uses GL_TRIANGLE_STRIP for all its rendering. I initially thought there might be a bug because of the excessive glMaterial calls between glBegin/glEnd, but removing them completely (by replacing with enabling GL_COLOR_MATERIAL) didn't change much, except there were far fewer additional triangles, apparently because much less buffer wraps happen. Not sure, but _tnl_copy_vertices looked a bit strange to me for GL_TRIANGLE_STRIP, as it may copy 3 instead of only the last 2 vertices - apparently to avoid problems with the vertex order, but I'll wonder if that's related to this bug. (this was originally reported here: https://bugs.freedesktop.org/show_bug.cgi?id=8250)
Created attachment 7862 [details] [review] patch to fix the additional triangles generated upon _tnl_copy_vertices This patch kills the additional triangle generated by _tnl_copy_vertices. Verified with hypertorus, but I'm not sure it's quite the right thing to do, might have unwanted side effects?
Roland, the patch makes sense to me - thanks for tracking this down.
commited.
Yes, this fixes hypertorus and has no effect whatsoever on bug 8250 :-).
It seems it's still wrong for the save_api code (display lists), though I'm not 100% confident the same fix will work there...
Mass version move, cvs -> git
(In reply to comment #5) > It seems it's still wrong for the save_api code (display lists), though I'm not > 100% confident the same fix will work there... Is this still an issue?
Oh hmm that bug is very old... Since the original bug was fixed let's close it. Even if the display list code was wrong too (which might not have even been the case) it didn't seem to have caused problems or might have got fixed in the interim.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.