Class OrientedTextRenderer

java.lang.Object
panamagl.renderers.text.OrientedTextRenderer
All Implemented Interfaces:
panamagl.renderers.text.TextRenderer<Font,Color>

public class OrientedTextRenderer extends Object implements panamagl.renderers.text.TextRenderer<Font,Color>
Render text drawn with AWT in a texture mapped on a quad in screen coordinates, as JOGL's TextRenderer does. Hence any AWT font can be used, text can be rotated, and text partially out of the viewport is partially drawn (unlike BasicTextRenderer which draws pixels at a raster position). On HiDPI screens, set the pixel scale to draw glyphs with a font scaled accordingly, as JOGL does with the surface scale. Text widths given by getTextWidth(Font, String) remain in logical pixels. This renderer only relies on AWT and OpenGL 1.x (no GLUT) and requires a context supporting the fixed pipeline (e.g. a compatibility profile).