I am trying to load some textures in my android application.
It works well on all the devices like samsung galaxy ace, s2
but any device using PowerVR SGX540 gpu, e.g. samsung galaxy S-gti9000
will have some weird artifacts....
Some textures are loaded correctly... but other textures are completely black....
I have made sure that all my textures are power-of-two, but they are not square and can be rectangular e.g. 64*128.
I am using the following for texture paramaters settings....
gl.glActiveTexture(GL10.GL_TEXTURE0);
gl.glBindTexture(GL10.GL_TEXTURE_2D, glTextureId);
gl.glTexParameterf(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR);
gl.glTexParameterf(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE);
As Tim suggests, it could be android helpfully resizing your images to match the dpi of different devices.
Check the size of the images once their loaded to ensure that they're still power-of-two. Putting the resource files in
res/drawable-nodpi
should let android know that you don't want them resized.