public void display(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); gl.glClearColor(0, 0, 0, 0); gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL2.GL_PROJECTION); gl.glLoadIdentity(); // new GLU().gluPerspective(45f, (float)width/(float)height, 0.1f, 1000f); gl.glOrtho(0.0, 800, 0.0, 800, -100.0, 100.0); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glLoadIdentity(); tr.beginRendering(800, 800); tr.draw("die Marktwirtschaft. Da regelt sich � angeblich", 16, 32); tr.draw("Hello World! This text is scrambled", 16, 16); tr.endRendering(); }
@Override protected void render(GL2 gl, GLAutoDrawable drawable) { renderer.beginRendering(drawable.getWidth(), drawable.getHeight()); renderer.draw("No time.", 25, 25); renderer.endRendering(); }