Posts: 418
Joined: Oct 2004
Reputation:
0
Dangit no edit button. Forgot that you'll also need the uv coordinates in the font cache as well if the characters in the font texture are not regularly spaced. You'd probably still want them in an array though (as opposed to calculating them on the fly) because they can live on the card theoretically.
Posts: 3,805
Joined: Mar 2004
Reputation:
3
elupus
Team-XBMC Developer
Posts: 3,805
For anybody that is interested in this. Here is a patch that moves the rounding and cordinate transformations required for font rendering onto the gpu.
When this path is in effect, the vertex coordinates are really just "posX + static vertex cordinate x" and same with y.
This means that with a small modification to the vertex shader, you could store texture/vertex coordinates in VBO, and then on render only pass the origin coordinate for each vertex and the index into the vbo for the character.
This should make rendering alot faster.
Posts: 3,805
Joined: Mar 2004
Reputation:
3
elupus
Team-XBMC Developer
Posts: 3,805
Updated patch that supports ARB vertex shaders too.
Posts: 3,805
Joined: Mar 2004
Reputation:
3
elupus
Team-XBMC Developer
Posts: 3,805
I've updated the rounding patch again so it should work on more hardware. Think it might be worth committing after we release. It's a good base for using indexed vertex buffers instead. Like I said before, you'd only need a base vertex and and index position into character buffer to render a character.
Posts: 3,805
Joined: Mar 2004
Reputation:
3
elupus
Team-XBMC Developer
Posts: 3,805
The status is that it's idling in my own repo..
The font renderer is already compatible with opengl es 1.0 thou since it is not using immidiate mode. And we have a guy already working on getting xbmc running on opengl es systems.
I suppose I should update that patch to current svn and submit somewhere. Pointless to have people redo the work.