Isn’t it great how everything never goes to plan? I’m reminded of that cigar-chewing philosopher, Hannibal from the A-Team, and wonder how the hell it is that his plans always ‘come together’ despite them being utterly implausible. Smug git. 😀
My current problem is the nVidia 61.77 drivers, which have introduced an extremely annoying problem in D3D9 - when rendering geometry with more than about 4000 faces, significant flickering can be observed in the final 1/4 of the triangles, as if these triangles are not being drawn every frame. It only happens when using the fixed function pipeline, and when using more than one vertex stream. Either adding a vertex program, or merging the streams into one, will resolve the problem. Occasionally adding other geometry to the scene can fix it too.
The bizarre thing is that this only occurs on static geometry buffers. I could imagine it happening more on dynamic buffers, say if it was a timing issue on the update or a bad lock mode. But these buffers (vertex and index) are only uploaded once - therefore it’s impossible for this to be an updating issue. In fact, if I dynamically upload these same buffers every frame, the problem disappears too. Finally, enabling a vertex program on the same static buffers fixes it so that proves the buffers themselves are ok. I’ve used the D3D9 debug runtime in full diagnostic mode, and get no errors or warnings.
After hours and hours of investigation (basically most of my time yesterday was on this), I’ve raised it as a bug with nVidia, since the problem goes away if you downgrade the drivers, and the behaviour seems too erratic to be anything but a driver problem. I’ve been trying to recreate the problem using a standard D3D sample, but have not managed it so far - however, there are clearly so many (unrelated) factors which can stop the bug showing up, I think that I’m just not recreating the exact situation that’s triggering it.
This issue in itself will probably scupper my plans for an Ogre 0.15 release before I go to the GDC next week. In the meantime _mental_ is committing some patches, perhaps most significant of which is the GLSL patch from nfz. I have a massive pile of things to get through before I go, so don’t be surprised if you don’t see me on #ogre3d much in the next week!
Isn’t life fun…