任何人都可以在opengl中引導我進行動畫製作。我曾嘗試使用正常幀逐幀動畫和使用畫布,但我有一些缺點,因爲我需要合併兩個位圖作爲單個位圖,並使動畫,所以現在我試圖嘗試使用opengl。 我曾嘗試這個代碼如何在opengl中逐幀動畫製作
img.setOnClickListener(this);
int reasonableDuration = 50;
mframeAnimation = new AnimationDrawable();
mframeAnimation.setOneShot(false);
mframeAnimation.addFrame(frame1, reasonableDuration);
mframeAnimation.addFrame(frame2, reasonableDuration);
mframeAnimation.addFrame(frame3, reasonableDuration);
mframeAnimation.addFrame(frame4, reasonableDuration);
mframeAnimation.addFrame(frame5, reasonableDuration);
mframeAnimation.addFrame(frame6, reasonableDuration);
mframeAnimation.addFrame(frame7, reasonableDuration);
moveLefttoRight = new TranslateAnimation(400, 0, 0, 0);
moveLefttoRight.setDuration(3000);
moveLefttoRight.setFillAfter(true);
img.setBackgroundDrawable(mframeAnimation);
mframeAnimation.setVisible(true, true);
//If this line is inside onClick(...) method of a button, animation works!!
}
後一派我被幀動畫上面的代碼正常幀但在這裏我需要在某一點停止的動畫,所以我需要去的OpenGL。請指導我..
您是否能夠在android中使用openGL ES實現幀動畫...如果請分享您的經驗。 –