Imagination PowerVR SDK Blog

glGenerateMipmap SGX540 issue


#1

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_MAG_FILTER, GL_LINEAR);


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


glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);


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);





glGenerateMipmap(GL_TEXTURE_2D);











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?


#2

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 devtech@imgtec.com so that we can investigate?