
SGreth
Shared on Sun, 02/11/2007 - 20:15I started doing some basic GUI work at the end of last week. After I got a cursor tracking mouse movements on-screen the next obvious step is to get some text rendered. Unfortunately in Microsoft's haste of releasing XNA they didn't supply any functionality to render text (via font or via bitmap). With my recent stint into the world GDI+ programming creating a tool that generates a bitmap-based font was pretty easy. Here is a screenie of the app -

Basically - you give it a font, the desired resolution, and *BAM* I've got a bitmap that I can pull from to render text. In the world of 3D applications textures need to be a power of 2...well, not really with new cards...but I digress...
What's left
Now I need to export a meta-file that has the X,Y coordinate offsets for each glyph and write a quick & dirty C# API to handle all the drawing. I'd like to have that wrapped up by the end of the week so I can have some on-screen text and move on to doing the GUI plumbing.
To Open Source - or not to Open Source?
While I was doing some research (read: googling) on a new source repository application sourceforge came up more than once. That's when I started thinking...maybe I should make this entire project open source (read: free). Just a passing thought....
Image o' the day (a little HTML humor)


Basically - you give it a font, the desired resolution, and *BAM* I've got a bitmap that I can pull from to render text. In the world of 3D applications textures need to be a power of 2...well, not really with new cards...but I digress...
What's left
Now I need to export a meta-file that has the X,Y coordinate offsets for each glyph and write a quick & dirty C# API to handle all the drawing. I'd like to have that wrapped up by the end of the week so I can have some on-screen text and move on to doing the GUI plumbing.
To Open Source - or not to Open Source?
While I was doing some research (read: googling) on a new source repository application sourceforge came up more than once. That's when I started thinking...maybe I should make this entire project open source (read: free). Just a passing thought....
Image o' the day (a little HTML humor)

- SGreth's blog
- Log in or register to post comments
Comments
Submitted by doodirock on Sun, 02/11/2007 - 20:48
Submitted by mac79 on Mon, 02/12/2007 - 06:42
Submitted by SGreth on Mon, 02/12/2007 - 06:57
Submitted by mac79 on Mon, 02/12/2007 - 07:47