What's a good way to render a lot of text at once?

Started by bartvbl, December 24, 2011, 00:19:20

Previous topic - Next topic

bartvbl

I am working on a small crossword solver using LWJGL. It loads a crossword from a file, then you can solve it on the pc with someone else over the internet.
This of course means that there is a lot of text to draw; letters to be written in the various fields, and all the ID's of the various hints that accompany the puzzle.
As OpenGL does not support fonts, I have to draw each of these references on a texture, store it, then draw it on the appropiate location.
The problem here is that once I get to a puzzle that has about 230 references, the game crashes due to an OutOfMemoryException, quite obviously caused by the massive amount of textures that had to be stored (the testing machine had 256Mb of VRAM).
Does anyone have suggestions how to get these references to draw in a more memory efficient way?

CodeBunny

It's called bitmap fonts.

The Slick game engine has some decent bitmap font support, you should check it out.