OK, can someone clue me in to EXACTLY what things can cause z-fighting (I know there is a doc somewhere, but I cant seem to find it for some reason).
In my example I am rendering about 20 quads. Then, of those 20 quads, I am going back and “highlighting” a single one of them by drawing it again with a different texture. I know different pipelines cause this (due to slightly different calculations) but both passes of the quad:
1)are calculated at the same time (ie: I calculate one vertex, copy its xyz to the new vertex, and generate new tex coords for it)
2)are in vertex arrays, with only normal pointer and a single tex coord pointer enabled.
3)are rendered with glDrawElements, with the exact same vertex ordering and both with GL_QUADS
4)are the exact same state settings (blending, depth test, no alpah/stencil test, no lighting, single texture, etc).
5)no calls to any matrix function (so the same projection is used)
Now, I may have violated one of the above (sometimes you get that “oh, I’m not actualy doing what I think” moments), but I’m PRETTY SURE the only thing I am changing between renderings is
a) the tex coords (could this be a cause? I doubt it)
b) the texture (both are 2D, same filtering/wraping, although the size might be different…I dont remember)
c) the color (set with glColor3fv)
d) the fact that the quad is drawn with 19 others in the first pass, and by itself in the second pass, but I am NOT using strips (as I said, Im using GL_QUADS)
Other than that, it should be the same settings. As far as I know, the quad should either be fully drawn or fully rejected (depending on depth settings), but instead I am getting that striped look you get when the verts are calculated slightly different.
Any input on what factors can cause this (maybe matt?) Its a GF2 64MB, 11.01 drivers…prehaps its the drivers. I saw in the archives Tom N. solved a similar problem last year with a driver upgrads, so I’ll try that (or actually, a downgrade) tonight.