Hi
Okay, I've been having some trouble getting text to display on the screen (C++/DirectX10).
I'm attempting to use the simplest method I know of; using ID3DX10Font.
Okay so I prepare it like every tutorial says:
ID3DX10Font *mFont;
D3DX10CreateFont(g_pd3dDevice, 15, 0, FW_BOLD, 1, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Arial", &mFont);
Then in my render function:
/* Time Stuff */
/* Render mesh's */
// Create a colour for the text
D3DCOLOR fontColor = D3DCOLOR_ARGB(255,255,255,255);
// Create a rectangle to indicate where on the screen it should be drawn
RECT rct;
rct.left=10;
rct.right=780;
rct.top=10;
rct.bottom=rct.top+20;
// Draw some text
mFont->DrawText(NULL, L"Hello World", -1, &rct, DT_SINGLELINE, fontColor ); // all meshes 'explode'
Everything runs fine without the DrawText call, but when it is called all my meshes 'explode' (see screenshots) but text displays fine. Any ideas why this would be happening?
Screenshots:
before
after
Thanks in advance...