Archived

This topic is now archived and is closed to further replies.

DarkHack

Fonts in DirectX 8

Recommended Posts

I want to draw text onto a Direct3DSurface, so then I can CopyRect to a Texture and render it... Is that possible? I''ve tried with DrawText, buy It renders directly into the D3DDevice. Sorry for my bad english. -DarkHack

Share this post


Link to post
Share on other sites
Have you looked into the CD3DFont class that comes with the common files framework? That allows you to blit 2d and 3d text. Quite handy, though, not as cool or fulfilling as writing your own I suppose.

The other way is to create a table of all the ascii characters you need in an art program, and then blit what you need to the surface, the problem with this is that CopyRects doesn't support alpha or color keying, which completely sucks. You could write a function that locks the surface and manually copys over the pixels, leaving out those that are alpha'ed out, or part of the colour key. But to me seems to be more hassle than it's worth.



[edited by - Redline on March 3, 2003 9:19:15 AM]

Share this post


Link to post
Share on other sites