Imagination PowerVR SDK Blog

glGenerateMipmap SGX540 issue


I cannot get mipmaping to work on SGX540.

When I draw the same texture on different size objects for 0 level it is ok and for other levels it is completly black.

The code work on Omnia HD i8910(SGX530), emulator, but does not work on Samsung Wave or Samsung Galaxy S that runs on SGX540.

I use following code:

glGenTextures(1, &mTexture);

glBindTexture(GL_TEXTURE_2D, mTexture);


glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); <-doesnt matter

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); <-doesnt matter


glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST);<-doesnt matter

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, pixels);


GL_RGB and GL_RGBA-with alpha byte does not work here.

No GL error returned

Is everything ok with my code?

Is there any workaround?


Apologies for being slow in getting back to you - have you resolved this issue?

If not, can you send a minimal example program that reproduces the issue to so that we can investigate?