I’m going to write text game, something like interactive ebook, so it gonna show text a lot. I looked around for some text renderers and TextRenderer class looks really great and simple. I have watched demos and I liked it, especially antialiased text in Chris Campbell’s Blog. I tried to write simple application, just Hello World stuff, but antialiasing seems not to work. Do I need to enable anything else except following code?
init:
renderer = new TextRenderer(new Font("SansSerif", Font.BOLD, 24), true, false);
display:
renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
renderer.draw(TEST_STRING, textX, textY);
renderer.endRendering();
main:
GLCapabilities caps = new GLCapabilities();
caps.setSampleBuffers(true);
GLCanvas canvas = new GLCanvas(caps);
There is little difference, but I think text should be smooth with aa, not just bolded a little. Any help appreciated!
Images:
with AA: http://i28.tinypic.com/2mzmmnc.png
without: http://i31.tinypic.com/15q4xuh.png