LWJGL
May 23, 2013, 14:10:47 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: What's a good way to render a lot of text at once?  (Read 1136 times)
bartvbl
Newbie
*
Posts: 8


« on: December 23, 2011, 16:19:20 »

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?
Logged
CodeBunny
Nerdus Imperius
*****
Posts: 561



WWW
« Reply #1 on: December 24, 2011, 07:58:13 »

It's called bitmap fonts.

The Slick game engine has some decent bitmap font support, you should check it out.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!