split a texture into lots of smaller textures (for bitmap fonts)

oli larkin's icon

I am trying to render small non-antialiased text in openGL, that will look the same on windows and mac. I have a monospace font from which i have made a png that contains 255 characters. I have a JSUI i made that renders the string you send it (see attached) and i am trying to convert it to jitter.

My problem is dealing with textures. i am not sure if it's best to convert each character/glyph in the png to a separate texture or to map only a specific part of a texture at a time. Either way i am not sure how to go about it.

anyone got any ideas?

thanks,

oli

Rob Ramirez's icon

definitely keep them as one texture.

maybe check out vade's 3d.glyph shader?http://001.vade.info/

oli larkin's icon

thanks that looks as if it should be helpful

oli