Menu

Using text

Help
2009-06-05
2012-12-26
  • Friedrich Fejngld

    Hej,

    I'trying to visualize some text in a 3d space.

    My draw() function looks like this:
       
           for (int i = 0; i < objects.size(); i++) {
            TextMaker TextObject = (TextMaker) objects.get(i);
            fill(255);
            text(TextObject.getWord(), TextObject.getX(), TextObject.getY(), TextObject.getZ());
            }

    But drawing nearly 30000 Objects (Words) in Processing using OPENGL slows down the Animation horribly.
    Anyway GLGraphics looks like exactly what I'm looking for. Is their any way to use texts and fonts?

    Thanks, Fejngold

     
    • Andres Colubri

      Andres Colubri - 2009-06-05

      Hello,

      OpenGL-native text is not a feature yet present in GLGraphics, although it would be very useful to have.

      There are many ways if implementing 2D text in OpenGL, take a look at the examples 13 and 17 in the following page:

      http://pepijn.fab4.be/software/nehe-java-ports/

      This examples are java ports of the original openGL nehe tutorials.

      This page has a more advanced tutorial:
      http://dmedia.dprogramming.com/?n=Tutorials.TextRendering1

       

Log in to post a comment.