Hi. Please excuse me for being new. I'll try my best to explain. I read the Android Developer blog about GLSurfaceView here:
http://android-developers.blogspot.com/search/label/OpenGL%20ES It said one of the advantage we get from using GLSurfaceView is "Creating and managing a separate rendering thread to enable smooth animation." Question: Currently I'm doing this in my game. public void onDrawFrame(GL10 gl) { //update game mechanics/physics updateGame(gl); //draw game gl.glDisable(GL10.GL_DITHER); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); ......... } Is this what it's supposed to be? (I handled 'elapsed time' in my updateGame() ) Or should I create another thread to do the update? Like this: @Override public void run() { while (mRun) { //update game mechanics/physics updateGame(gl); } } public void onDrawFrame(GL10 gl) { //draw game gl.glDisable(GL10.GL_DITHER); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); ......... } Which one will produce best result for a game? Thank you in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

