Skip to main content
gamedev.net
🔒 Locked

Drawing text

Started by The C modest god Dec 20, 2004 at 6:26 AM 2 replies 700+ views
Original Post
The C modest god
The C modest god
In your Direct3D 3D engine, how do you draw 2D text? Do you put each letter in a texture?
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower. Quote: Original post by Toolmaker Quote:
Prototype
Prototype
Usually you will have one texture which contains all the characters. Then you define a grid of quads and manipulate the texture coordinates to represent each character. You draw everything in orthographic mode with alpha blending/testing enabled.
Emmanuel Deloget
Emmanuel Deloget
Hello,

Another solution - if you dan't want to write your own writing code - is to create a DIB section and to write your text using the normal GDI functions. This way, you can easily handle multilanguage, kerning and other text issues. Of course, this will be slow as hell.

I believe there is one DX smaple which uses this method, so you might have a look.

Regards,

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.