I posted recently that we were having some mipmapping issues with NVIDIA’s newest drivers, the 175.x series, on both Windows and Linux when using GL. Thanks to help from the nice chaps at NVIDIA these issues are now resolved for the moment - there does indeed appear to be a bug in some aspects of the hardware mipmap generation implementation in these drivers, but the workarounds exposed a couple of bugs of our own in software mipmap generation code - which hasn’t been used by Ogre on most modern hardware for several years, since we’ve opted for hardware mipmap generation for a long time.
One was that we had been retrieving the internal format of a GL texture after construction using glGetTexLevelParameteriv with GL_INTERNAL_FORMAT, in accordance with recommendations. However we made a mistake in that for cubic textures we were passing the type enum GL_TEXTURE_CUBE_MAP instead of the target enum GL_TEXTURE_CUBE_MAP_POSITIVE_X et al. Subtle, and for whatever reason it must have worked fine on older drivers, but the 175.x drivers became more strict and were throwing an error. Unfortunately our other sin was that we weren’t checking the error code after that call (after all, what could go wrong with something that simple? 😀) so we completely missed it, and the internal format, which we then used later on to generate software mipmaps, was nonsense.
As it happens, I’ve been trying out Graphic Remedy’s gDEBugger again recently - I’d previously tried it a couple of years ago and couldn’t get it to work properly with Ogre for some reason, and my post in their forum about it had gone without a resolution, so I let it expire without buying it. However, I really have come to miss having some way to easily diagnose GL issues, like you do with the D3D debug runtime (and various GL intercept / dump tools are ok, but generate so much data it’s hard to sift through it), and it’s clear to me that the error above may well have been highlighted by a tool such as this before the driver started to bork on it. So, I emailed GR to see if they’d be willing to give me an extended trial license and some assistance with resolving the problems I was having. They got back to me really quickly, and via our correspondence identified an issue that they will resolve in the next version of gDEBugger, but which I could also work around in Ogre for now. I haven’t had a lot of time with it yet but I intend to give it a workout over the next couple of weeks, and buy a permanent license if it turns out to be as useful as I expect.
I really appreciate being able to get help like this when I need it, I’m in debt to the people at NVIDIA (especially Kevin) and Graphic Remedy for the assistance. Thanks chaps!