Text saved on textures for 3D display in Directx 9
Here is my problem.
I will read in a certain amount of text from a textfile that I want to display as 3D objects because I want to view it from different angles and such. So far the closest I have come is with: drawing CD3DFont in 3D and drawing D3DXFont mesh in 3D.
The problem with these seem to be that the 3D objects become the letters themselves. A ''T'' for example are two rectangels or 4 polygons. A ''g'' for example is way many polygons.
What I want is to read the file letter by letter and be able to put that letter on a rectangle as a texture, twosided of course. This way large amounts of letters will not be so demanding for the computer and drag down the fps. How can I do this in some inventive way? I don''t want to manually make textures for all the possible symbols and letters that may come, that would be a hassle. Also it wouldn''t make it possible to easily change what font or size to use for the text, if that is desired.
Thankful for any help on this problem of mine.
there''s really no "fast" way to do it. best thing you can do is generate the meshes at loadtime and then keep them in memory till you need them.
anyway, its not really that hard, but you may need to include the openGL utilities library (glu32.lib) so you can make use of it''s tesselation routines (unless you want to write your own )
the basic idea is this: you know your text already, and the numerical values for each letter. you''ll want to load a windows font, then "extrude" it essentially.. the gluTess functions take care of building the mesh for you.
-eldee
;another space monkey;
[ Forced Evolution Studios ]
anyway, its not really that hard, but you may need to include the openGL utilities library (glu32.lib) so you can make use of it''s tesselation routines (unless you want to write your own )
the basic idea is this: you know your text already, and the numerical values for each letter. you''ll want to load a windows font, then "extrude" it essentially.. the gluTess functions take care of building the mesh for you.
-eldee
;another space monkey;
[ Forced Evolution Studios ]
Do NOT let Dr. Mario touch your genitals. He is not a real doctor!
-eldee;another space monkey;[ Forced Evolution Studios ]
actually, i did a little searching and found this.
i believe it''s exactly what you''re looking for.. good luck.
-eldee
;another space monkey;
[ Forced Evolution Studios ]
i believe it''s exactly what you''re looking for.. good luck.
-eldee
;another space monkey;
[ Forced Evolution Studios ]
Do NOT let Dr. Mario touch your genitals. He is not a real doctor!
-eldee;another space monkey;[ Forced Evolution Studios ]
Thanks. Is there anyway to use it with the fuctionality provided in Directx 9? That is kind of what I am trying to use for this.
Wow, thanks for the effort. But I am wondering if I maybe was unclear. I want the letters as flat textures to be created on the fly since 3D text is so demanding in large amounts. =)
quote: Original post by IncomT-65
Wow, thanks for the effort. But I am wondering if I maybe was unclear. I want the letters as flat textures to be created on the fly since 3D text is so demanding in large amounts. =)
ah, well thats even easier. you could create a raster texture using the GDI font implementations mentioned in my link above, then texture map onto a quad.. easy peasy. if you want custom fonts, you could skip the GDI route altogether and use a texture-font and store the texture coordinates in a display list (or whatever DX''s equivilent is).
-eldee
;another space monkey;
[ Forced Evolution Studios ]
Do NOT let Dr. Mario touch your genitals. He is not a real doctor!
-eldee;another space monkey;[ Forced Evolution Studios ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement