Threaded View

Hi GClements,
I wanted to pick up the conversation on rendering font glyph textures, I have an idea of a solution but the process I may need some help with.

I am using (what I think they call) sprite rendering, a glyph texture at a time. So the actual generation of the glyph textures are sorted I believe.
I'm going to create all my text in one set of vbo's, it is going to create road name labels on my map. These will be positioned in the center of the road line, with the angle of the road line at that position. So it will hold a mixture of positions, angles and texture coordinates.

These characters will always be a fixed height on screen, so their size won't be changing when the map is zoom in or out of, but they will pan with the map. So I could use the same principal with my glyphs.

What I need help with:
1. How do I initially figure out the center texture positions? Should I just work them out using screen coordinates centering everything around 0x,0y?
2. How do I manipulate these center positions in the shader with a scale? If the you zoom in the center positions need to get closer together.
3. How do I manipulate these center positions to the actual world position. Each string will initially have a center position of 0,0 and this will change to where ever it needs to be in the world. (e.g. -0.03151243, -0.0472154)
4. I will be calculating the angle of the road line and in-turn calculate the center positions on the same angle. How do I manipulate the vertices in the shader to the an angle?
5. And I guess the last is, if I do it this way what would you suggest as far as, the kind of structure should I put the data into as far as the vbo's are concerned.