Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


CD3DFont::Render3DText looks scary internally

This topic is 5419 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

Don''t you think so? I mean all the Lock/Unlock of VB, multiplications/divisions, DrawPrimitives... so many of them. Isn''t that tellin'' me "dude, your framerate is now halved"? Ugh, anyway, I''m gonna give ID3DXFont a try first... THEN, I''m gonna try the summer update

Share this post

Link to post
Share on other sites
That''s I said as well when I saw it but it looks like it doesn''t eat up your fps. An alternative is to go with ID3DXFONT directly like I did... I''m quite happy about it


Share this post

Link to post
Share on other sites
Original post by HaywireGuy
THEN, I''m gonna try the summer update

... might want to avoid id3dxfont until *after* you''ve put on the summer update --- it''s wicked-slow pre-update, and almost just as fast as cd3dfont in the update.

Also, if you''re looking a spitting out mostly static text very quickly, then your own font class may be worthwhile - just so you''re not recalculating font size/pos and rebuilding the vb every frame, plus you can better optimize the building/rendering.

Depends a lot on how much text you''re looking at outputting - if it''s not much, or if it''s not very static, then you''ll need to weigh whether it''s worth your time to write your own font class.

Share this post

Link to post
Share on other sites

I''ve looked into CD3DFont class and understood the way it
works. Yeah, you''re right, I misunderstood the code at the
beginnin'' and thought it could take up too much processin''
time, but that''s not true. However, it''s redundant to do this
kind of lockin''/unlockin'' if your text does not change.


Yes you''re right, I''m workin'' on my own font class since
yesterday, in fact I called it "label", where you can call
CD3DLabel::SetText(_T("Bla bla")) and have all the VB/textures
set up once. Use CD3DLabel::Render() to draw it without any
other calculations.


You know simply by lookin'' at how CD3DFont works, I could feel
the slowness of it... it was so scary with tons of function
calls/calculations in it. So I''m not gonna try because I
already can see the difference.

Share this post

Link to post
Share on other sites
I''m using ID3DXFONT directly coz I just want to display the fps so I avoided CD3DFont and writing my own classes. When it comes to the actual font used in the engine, well... that''s a different story altogether.

Share this post

Link to post
Share on other sites

  • 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!