hey no result means i'm talking about no animation
here is my code:
public void onSurfaceChanged(GL10 gl, int w, int h) {
if (fb != null) {
fb.dispose();
}
fb = new FrameBuffer(gl, w, h);
world = new World();
world.setAmbientLight(20, 20, 20);
sun = new Light(world);
sun.setIntensity(250, 250, 250);
Resources res = ImageTargets.getImageTarget().getResources();
TextureManager tm = TextureManager.getInstance();
Texture ogro1 = new Texture(res.openRawResource(R.drawable.ogrobase));
tm.addTexture("ogro", ogro1);
ogro = Loader.loadMD2(res.openRawResource(R.raw.ogro), 1f);
ogro.setTexture("ogro");
// ogro.rotateY(-20);
// ogro.rotateZ(110);
ogro.rotateX(90);
world.buildAllObjects();
world.addObject(ogro);
Camera cam = world.getCamera();
cam.moveCamera(Camera.CAMERA_MOVEOUT, 50);
cam.lookAt(ogro.getTransformedCenter());
SimpleVector sv = new SimpleVector();
sv.set(ogro.getTransformedCenter());
sv.x -= 300;
sv.z -= 0;
sun.setPosition(sv);
MemoryHelper.compact();
}
public void onDrawFrame(GL10 gl) {
ogro.animate(anim, 0);
if (anim>1) {
anim=0;
} else {
anim+=0.1f;
}
fb.clear();
world.renderScene(fb);
world.draw(fb);
fb.display();
if (System.currentTimeMillis() - time >= 1000) {
Logger.log(fps + "fps");
fps = 0;
time = System.currentTimeMillis();
}
fps++;
}
}