Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Looking for Fast Text Drawing Plugin

Author
Message
Grayvyn
16
Years of Service
User Offline
Joined: 30th Oct 2008
Location: Southern California
Posted: 17th Mar 2009 23:18
I am having major slow down in FPS when using the GDK text commands. I have seen some older posts confirming the same problem. They also offer a DLL solution but can't seem to find the file to download.
Anyone?

dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 18th Mar 2009 02:03
You can just use the D3DX font interface directly, i.e. create your font with D3DXCreateFont() where the D3D device is retrieved from dbGetDirect3DDevice() and you can just use the methods in the interface to draw it(there's lots of online resources for how to use them).

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 18th Mar 2009 03:03
Ya, and if you use ID3DXFont rather than DBP's text you get the added advantage of more text formatting options (more than just left, center, and right) as well as anti-aliasing. It's also extremely easy to use.

Grayvyn
16
Years of Service
User Offline
Joined: 30th Oct 2008
Location: Southern California
Posted: 19th Mar 2009 23:09
I decided to make my own but not using the D3D way.
At run time, I create seperate images for each font, character, size, color that I will need. It uses about 100 image numbers per font set but it works fast and solved my problem.

If anyone wants the code, just ask and I'll post it. Maybe I'll put it in the code base.

Login to post a reply

Server time is: 2024-11-25 16:49:49
Your offset time is: 2024-11-25 16:49:49