/**
   * Called every time we need to render a frame.
   *
   * @param gl The GL10 instance that the game is using.
   */
  @Override
  public void onDrawFrame(GL10 gl) {

    // Clear the buffers.
    gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

    // Draw the terrains.
    top.drawTerrain(gl);
    bottom.drawTerrain(gl);
  }
  /**
   * Called when the surface is created, and before the first frame is called to be rendered.
   *
   * @param gl The GL10 instance that the game is using.
   * @param config The EGLConfig that we could use if we wanted.
   */
  @Override
  public void onSurfaceCreated(GL10 gl, EGLConfig config) {

    // Set the look at point.
    GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);

    // Set up the GL state.
    PerlinTerrainMenu.setupGLState(gl);
  }