Sign in to follow this  
drekkar

d3dx9 performance

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[i].m_szName, ship[i].m_iKillCount, ship[i].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 this post


Link to post
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 :(

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this