Jump to content
  • Advertisement
Sign in to follow this  
mess

Font System

This topic is 4965 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Over the past few days ive been thinking of a new system to make my d3dxfont managment better. Ive come up with system, and I would like to get some feed back on it :) Description: there will currently be only two managers that will use the font system, the UI and the Console managers, they will both have a list of DisplayTextObject's. A DisplayTextObject holds the text position, the color, the string and a pointer to the D3DXFont object of choice. The UI and Console managers will add their DisplayTextObjects to a DisplayTextRenderer (DTRenderer) each frame, the DTRenderer will call the single instance of my D3DXSprite::Begin() then it will iterate through all the DTObjects and call the Draw function of the D3DXFont pointer which will hold the font type, then after it will call D3DXSprite::End(), and last it will clear the DTRenderer list. repeating this proccess each frame. Now I will also have a FontManager, which will hold D3DXFonts in a list, each time i want a diffrent style font, i will add it to the FontManager. what do you guys think so far?

Share this post


Link to post
Share on other sites
Advertisement
well it seems there is no reason for a renderer, I got the idea from my scene graph, since i had to do sorting to the renderer. but in this case, there would be no reason to copy it.

I could just call the UI->Render() and Console->Render() in my sprite actual sprite renderer, and just batch everything together.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!