Does anybody know if this extension works. I can’t seem to get to to work on my PowerBook G4 with Radeon 7500 Mobility under OS X 10.2.6.
The base level is fine, but i get are black textures for the mip maps.
texture=0;
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
//the following using GENERATE_MIP_MAP_SGIS dosn’t work, What is generated is
//the base level texture, and a set of mip maps that are black
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, [image size].width,[image size].height,
0, GL_RGB, GL_UNSIGNED_BYTE, [image bitmapData]);
//the following using the glu lib to generate mip maps works fine:
// gluBuild2DMipmaps (GL_TEXTURE_2D, GL_RGB8, [image size].width,[image size].height,
// GL_RGB, GL_UNSIGNED_BYTE, [image bitmapData]);
glEnable(GL_TEXTURE_2D);
With GL_GENERATE_MIPMAP turned on, when i query gl for the size of the mip maps they are properly defined (ie. if i specify a base level of 256 and i ask for the width of the lvl 1 mip map, it is 128 and so on) but when it’s off the of the mip maps are zero. So from what i gather the mip maps are being generated properly. Could this be a bug? Is there anywhere where i can look up a list of all know GL bugs on MAC OS X 10.2.6 (I know this extension was broken on 10.2.4). I’ve reported this to the Mac bug tracker but the status of it is still open, it’s been over a month now. Also nobody on the Mac gl mailing list seems to know. Any help is greatly apprciated. Thanks.