JOGL

From wiki.3h.se

Jump to: navigation, search

Rendering simple text

import com.sun.opengl.util.j2d.*; //should be where imports are
private TextRenderer renderer;    //should be where variables are set
//this should be in init()
renderer = new TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true);
 
//then this is put in the display() so you can but x and y to variables and change them in the animation
renderer.beginRendering(max-x, max-y);
renderer.draw("Heeeyylooo!!", x, y);
renderer.endRendering();

Resources

Retrieved from "http://wiki.3h.se/JOGL"
Personal tools