Original Post
I am having trouble using fonts in my very simple program. If anyone could help you would make my day. This defines it in one class: ID3DXFont* g_Font; Defines the initalize function in a namespace, not in another class: int FontInit(LPDIRECT3DDEVICE9 Device, ID3DXFont** g_Font); Heres the init function: int D3D::FontInit(LPDIRECT3DDEVICE9 m_Device, ID3DXFont** m_Font) { HRESULT hr; D3DXFONT_DESC fd; memset(&fd, '0', sizeof(D3DXFONT_DESC)); fd.Height = 25; fd.Width = 12; fd.Weight = 500; fd.Italic = false; fd.CharSet = DEFAULT_CHARSET; fd.Quality = 0; fd.PitchAndFamily = 0; strcpy(fd.FaceName, "Times New Roman"); // Default font hr = D3DXCreateFontIndirect(m_Device, &fd, m_Font); if(FAILED(hr)) { MessageBox(0, "D3DXCreateFontIndirect() - FAILED", 0, 0); return -1; } return 0; } Now calling it everytime I render: int i = g_Font->DrawText(NULL, "12345678", 8, ▭, DT_NOCLIP, 0x00000000); When I ckeck 'i', i = 25, which is the size of the font. I checked the background color and is white. Changed a bunch of stuff, still can not get it to work. I don't get any errors with it either. PLEASE HELP Thanks.