Exemple #1
0
  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();
  }
  protected void drawToolTipText(
      DrawContext dc, String text, int x, int y, ToolTipAttributes attributes) {
    java.awt.Color textColor =
        this.modulateColorOpacity(attributes.getTextColor(), attributes.getTextOpacity());

    TextRenderer textRenderer = this.getTextRenderer(dc, attributes.getFont());
    textRenderer.begin3DRendering();
    textRenderer.setColor(textColor);
    textRenderer.draw(text, x, y);
    textRenderer.end3DRendering();
  }
Exemple #3
0
 @Override
 protected void render(GL2 gl, GLAutoDrawable drawable) {
   renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
   renderer.draw("No time.", 25, 25);
   renderer.endRendering();
 }