• 12
• 12
• 9
• 10
• 13

# d3dx9 performance

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

## Recommended Posts

Well I just made a text rendering thing that worked off a bitmap just to figure out about this ID3DXFont(). I've been pretty satisfied with performance but it's just been well... slow lately, is this thing and others in D3DX like D3DXSprite slow? Would I be better off just using the vertex buffer way for 2d games for performance, because whenever I add a scoreboard to my game which is about 16 Font->Draw()'s my FPS drops substantially. I'm not doing anything extraordinay in the call, and theres only 16 ships. Is this slow or am I doing something wrong? Or maybe I have the settings wrong for DX9? I'm new to this stuff :P
	for(i=0; i<MAX_SHIPS; i++){
rText.top = 20 + i * 20;
sprintf(buffer, "%s - %i : %i", ship.m_szName, ship.m_iKillCount, ship.m_iDeathCount);
rText.left = 650;
m_pD3DFont->DrawTextA(buffer, strlen(buffer), &rText, DT_TOP | DT_SINGLELINE, D3DCOLOR_XRGB(255, 255, 255));
}


Edit: to clarify more the drop is from 120 to about 50, it goes from smooth to kind of sketchy :( Edited by Coder: Code was too wide [Edited by - Coder on August 17, 2004 4:55:26 AM]

##### Share on other sites
If you convert to the latest SDK, ID3DXFont becomes much faster. The older font API (what you're using) is slow.

##### Share on other sites
Wow the update is great, thanks a bunch, it has no frame rate loss now :D But i've come upon another problem... D3DXSprite->Draw seems to have removed scaling/rotation, so do I have to do this manually now? It's not a big deal but if there's an alternative in D3DXSprite I'd like to use it :D I looked at the methods though and didnt see anything :(