Reputation: 2098
In the developer's reference http://developer.android.com/reference/android/opengl/GLSurfaceView.Renderer.html onDrawFrame() is described as:
Called to draw the current frame. This method is responsible for drawing the current frame.
What is frame? What is current frame?
Upvotes: 1
Views: 1554
Reputation: 1197
A frame is a rendering of the current state of your game or application at a specific time. See Wikipedia for more information on the general notion. The current frame is the frame drawn based on the current state of your game/app (ie. player position, shields on, enemy location, etc...).
onDrawFrame() should execute drawing methods to show the state. Ideally it is called about 60 times per second (FPS), but the actual calling rate can vary. Your other event handlers will take input and change the state of your app/game instead of directly changing how it is drawn. When onDrawFrame() is called, just use the state to impact the rendering.
Upvotes: 1