예제 #1
0
  public void display(GLAutoDrawable drawable) {
    SoulGL2 gl = new DesktopGL2(drawable.getGL().getGL2());
    gl.glClear(GL2.GL_COLOR_BUFFER_BIT);

    float dt = timer.getDT();

    overView.tick(dt);
    overView.draw(gl);
  }
예제 #2
0
  public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
    SoulGL2 gl = new DesktopGL2(drawable.getGL().getGL2());
    gl.glViewport(0, 0, width, height);

    gl.glEnable(SoulGL2.GL_CULL_FACE);
    gl.glDisable(SoulGL2.GL_DEPTH_TEST);

    PrimitiveRenderer.onSurfaceChanged(width, height);
    TextRenderer.getInstance().onSurfaceChanged(width, height);

    GlobalVariables.aspectRatio = width * 1.0f / height;
  }