Subversion Repositories AndroidProjects

Rev

Rev 192 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.gebauz.Bauzoid.app;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

/** Implementation of GLSurfaceView.Renderer. */
public class GameRenderer implements GLSurfaceView.Renderer
{
       
        private GameActivity mActivity = null;
       
        public GameRenderer(GameActivity activity)
        {
                mActivity = activity;
        }      

        public void onSurfaceLost()
        {      
                mActivity.onSurfaceLost();
        }
       
    public void onSurfaceCreated(GL10 gl, EGLConfig config)
    {
        mActivity.onSurfaceCreated();
    }

    public void onSurfaceChanged(GL10 gl, int w, int h)
    {
        mActivity.onSurfaceChanged(w, h);
    }

    public void onDrawFrame(GL10 gl)
    {
        mActivity.update(0.0f);
        mActivity.render();    
    }

}