Fonts in DirectX 8

Started by
0 comments, last by DarkHack 21 years, 1 month ago
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
-DarkHack
Advertisement
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]

This topic is closed to new replies.

Advertisement