Original Post
I am trying to use the CD3DFont class that came with the DirectX 8 SDK. I currently have a triangle displayed on the screen to make sure that my D3D8 initialization code wasn''t failing but it works fine. I have the CD3DFont class declared as:
CD3DFont *pFont = NULL;
Then I try to initialize the class:
pFont = new CD3DFont(_T("Arial"), 12, D3DFONT_BOLD);
// I call this after I have initialized the pd3dDevice successfully
pFont->InitDeviceObjects(pd3dDevice);
Then between my D3DDevice BeginScene and EndScene calls I''m trying to draw text:
pFont->DrawText(2, 40, 0xffffffff, _T("2D Text"));
It crashes in the DrawText member function on this line:
m_pd3dDevice->ApplyStateBlock( m_dwDrawTextStateBlock );
I am probably missing something small but I can''t seem to find it! Thanks for any help or ideas.
Todd