Geforce 8600GT, driver 181.22 (6.14.11.8122), winxp sp2
Texture is black, while mipmap sizes and data for each level (down to the 4x4 mip) are correct. Distance from textured object doesn’t matter, all mip-levels appear black.
If I specify GL_LINEAR instead of GL_LINEAR_MIPMAP_LINEAR, level0 is visible.
I had this issue with previous drivers, so maybe the problem is with my code.
glGetError reports no problems.
glEnable(GL_TEXTURE_2D);
...
glGenTextures( 1, &me->glTexHandle);
glBindTexture(GL_TEXTURE_2D,me->glTexHandle);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
for(each mipmap){
glCompressedTexImage2D(GL_TEXTURE_2D,LOD,f->iformat,wid,hei,0,nSize,data); // LOD=0,1,2...
}
Everything works as expected when I change just the mipmap-uploading code with this:
glTexParameterf( GL_TEXTURE_2D, GL_GENERATE_MIPMAP,GL_TRUE);
glTexImage2D( GL_TEXTURE_2D, LOD, f->iformat, wid, hei, 0, f->format, f->storage,data); // LOD=0
// uploading GL_BGRA uncompressed texture this time, not DXT
i.e my texture-states, shaders etc are setup correctly.
Any tutorial online on mipmapping with DDS? Or I can create a short simple test-app to demonstrate the bug.