public void onSurfaceCreated(GL10 gl, EGLConfig config) {
world = new World();
world.setAmbientLight(150, 150, 150);
TextureManager.getInstance().addTexture("tris3", new Texture(BitmapFactory.decodeResource(this.getResources(), R.drawable.tris3)));
snork = Loader.loadMD2(LoadAssets.loadf("tris3.md2"), scale);
snork.setTexture("tris3");
snork.strip();
snork.build();
world.addObject(snork);
}
public void onSurfaceChanged(GL10 gl, int width, int height) {
if (fb != null) {
fb = null;
}
this.width=width;
this.height=height;
fb = new FrameBuffer(gl,width, height);
}
onDrawFrame(GL10 gl) {
doAnim();
world.renderScene(fb);
world.draw(fb);
fb.display();
}
above is my key code to show texture,the md2 model loading is ok,but the texture can't show on the model,I don't know what wrong is?
Please help me ?