@Override
    public void resume() {
      GL10 gl = glGraphics.getGL();
      gl.glViewport(0, 0, glGraphics.getWidth(), glGraphics.getHeight());
      gl.glClearColor(1, 0, 0, 1);
      gl.glMatrixMode(GL10.GL_PROJECTION);
      gl.glLoadIdentity();
      gl.glOrthof(0, 320, 0, 480, 1, -1);

      gl.glMatrixMode(GL10.GL_MODELVIEW);

      bobTexture.reload();
      gl.glEnable(GL10.GL_TEXTURE_2D);
      bobTexture.bind();
    }
Beispiel #2
0
    @Override
    public void present(float deltaTime) {
      GL10 gl = glGraphics.getGL();
      gl.glClearColor(1, 0, 0, 1);
      gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
      gl.glMatrixMode(GL10.GL_PROJECTION);
      gl.glLoadIdentity();
      gl.glOrthof(0, 320, 0, 480, 1, -1);

      gl.glEnable(GL10.GL_TEXTURE_2D);
      bobTexture.bind();

      gl.glMatrixMode(GL10.GL_MODELVIEW);
      for (int i = 0; i < NUM_BOBS; i++) {
        gl.glLoadIdentity();
        gl.glTranslatef(bobs[i].x, bobs[i].y, 0);
        gl.glRotatef(45, 0, 0, 1);
        gl.glScalef(2, 0.5f, 0);
        bobModel.draw(GL10.GL_TRIANGLES, 0, 6);
      }

      fpsCounter.logFrame();
    }
Beispiel #3
0
 public void reload() {
   load();
   bind();
   setFilters(minFilter, magFilter);
   glGraphics.getGL().glBindTexture(GL10.GL_TEXTURE_2D, 0);
 }