I'm setting up a font object like this:
D3DX10_FONT_DESC fontDesc =
{
20, // height
0, // width
FW_NORMAL, // weight
1, // mip levels
false, // italic
ANSI_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
FF_DONTCARE,
L"Arial"
};
if (FAILED(D3DX10CreateFontIndirect(g_pDevice, &fontDesc, &g_pFont)))
{
ErrorPrintf(L"Could not create font!");
}
This succeeds (I don't see the error message). Then I'm drawing the text like this, right before my Present() call:
RECT rectText = { 10, 10, 100, 100 };
g_pFont->DrawText(NULL, L"test", -1, &rectText, DT_LEFT | DT_TOP | DT_NOCLIP, D3DXCOLOR(1, 1, 1, 1));
However, I don't see any text showing up at all. The DrawText call also returns no error. I haven't quite figured out how to turn on the debug runtime in D3D10 (it's not like D3D9 where you can just click a button in the control panel, but rather application controlled somehow), so I haven't been able to check that yet.
Unfortunately the docs I could find on ID3DX10Font are pretty sketchy, and I've looked at the SDK samples but can't see any material difference between them and what I'm doing (at least on a once-over). Does anyone know something obvious that might be the problem?












