http://www.youtube.com/watch?v=Ypv_zRAs4_YNo texture, it shows all in full-white, with some places shaded a bit in gray.
Please do not use the buggy+slow texture loading, that involves getPixel() !!
Use GLUtils.texImage2D, as shown here:
- Code: Select all
protected Texture LoadTexture(int resID){
Resources res = getContext().getResources();
Bitmap bmp = BitmapFactory.decodeResource(res,resID);
int wid = bmp.getWidth();
int hei = bmp.getHeight();
int[] tmp_tex = new int[1];
g_gl.glGenTextures(1, tmp_tex, 0);
int tex = tmp_tex[0];
g_gl.glBindTexture(GL10.GL_TEXTURE_2D, tex);
g_gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);
g_gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
g_gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,GL10.GL_CLAMP_TO_EDGE);
g_gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,GL10.GL_CLAMP_TO_EDGE);
//g_gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,GL10.GL_REPLACE);
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bmp, 0);
bmp.recycle();
return new Texture(wid,hei,tex);
}
no need to change your glTexParameterf() calls or anything else but the glTexImage2D() -> GLUtils.texImage2D().
Well, there's a slight chance the bug about missing textures is in the glTexParameterf, so toy around.
Hey, maybe your texture-sizes are different than powers-of-two (the G1 doesn't support NPOT).
For the next test, it's best to add debug-output, printing to the file "/sdcard/quest_dbg.txt", I'll send results back.
Btw, for faster tests you can contact me at the IMs in my profile.