FreeType

Started by
12 comments, last by Maddius 14 years, 7 months ago
Okay so bitmap buffer is a 1d array which contains values ranging from 0 to 128? Or 0 to 255? Either way that is how intense the pixel is. Okay, so then if you wanted to change the color of the text you could just change it in the shader I guess.

So you would use the glyph interface to create your (text or does it create just one character?) and then drop all the data in the buffer into some format that directx understands as a texture.

Okay I think i'm getting there will start implementing this soon.

Thanks a bunch man.

-------
edit:

I guess pixels with zero intensity can then have zero alpha in the texture so that you will only get the text displayed and everything else blends in with the scene behind.

[Edited by - Maddius on August 24, 2009 3:13:29 PM]
Advertisement
I can understand the attraction of FreeType for people wanting portable text rendering. But if you're locked into Windows already (and it seems you are), and you are going to go through all the extra effort of manually caching and rendering rasterized glyphs, why not just use GDI? It'll give you bitmaps just fine and you don't have to deal with the additional dependencies of a third-party library.
-Mike
Yeah i'm beggining to think it might not be such a bad idea to just use the ID3DX10Font stuff, I guess it provides some functionality to just produce a texture and then shove it through a shader. My game is a FPS and shouldn't be too heavy on text, and any text there is can be pretty much created and stored at initialisation.

----
edit:

Or does it do it like it did in DX9, straight through GDI and onto the screen, which isn't bad I guess for something simple but you cant get alpha blending then I guess. How great would the slow down be with using the ID3DX10Font stuff do you think?

[Edited by - Maddius on August 24, 2009 5:30:41 PM]
Hi guys,

I have started implementing ID3DX10Font and have run into the classic of the calls of the Font API changing the render states, is there a method to save and reload render states?

Thanks.

This topic is closed to new replies.

Advertisement