I am writing a program that displays words which can be rotated or moved. The words are adjacent to other meshes of objects.
Is D3DXCreateText the best way to do this?
A scene typically consists of 50 to 1,000 groups of words. A group averages 4,000 to 6,000 vertices (at .001 chordal deviation).
It takes a couple of seconds to generate the static meshes, after that I can get 50-200 fps, which is OK.
Is there a better way to create text that will rotate or move? The words are not rotated indidually. The entire set moves as one when the user zooms, pans or rotates. The words must remain as crisp and legible as possible even at small point sizes.
I tried textures, but the appearance of the font quickly becomes fuzzy when zooming out.
D3DXCreateFont / DrawText doesn't seem to be the answer, as the text does not move when the scene is rotated.
D3DXCreateText can get too slow and too resource-consuming quickly. You can draw transformed text by rendering the text to a texture (render target) and then drawing the texture on a transformed quad, or you can use an ID3DXSprite object with D3DXCreateFont/DrawText(), and apply transformations to the ID3DXSprite object, although what you can do with that technique could be limited.
Thanks for the reply. I have found that text rendered as texture maps quickly becomes fuzzy and illegible when zooming out.
Aren't sprites 2D? Which would mean they can't rotate in 3D (yaw, around the Y axis)?
I can pump out 4M vertices (2K words) in a couple of seconds, and rotate that at 40 fps, so that's pretty acceptable. I guess I'll stick with that for now. I can try progressive meshes to reduce the rendering load.
Also, I can animate the scene while creating the meshes, by gradually showing what has been generated so far, so that will keep the user entertained.