the code for placing content into the wstring frameStats is:
void Timer::calcFPS(float dTime){ static int frameCount = 0; static float timeBase = 0.0f; frameCount++; if ( (dTime - timeBase) >= 1.0f ) { int fps = frameCount; frameStats = L"FPS " + fps; frameCount = 0; timeBase += 1.0f; }}
in the Timer class under public i have std::wstring frameStats;
so i can call the DrawText function like as follows:
d3dBack.pFont->DrawText(0, timer.frameStats.c_str(), -1, &rc, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f));
Everything compiles fine, it just leaves me with an application that has an all black screen. If I replace timer.frameStats.c_str() in the DrawText function with something like L"Hello World", the screen is still all black but Hello World shows up in my application on the top left. The all black part(there should be vertices and stuff I drew) is a different issue that I will try to fix after I can get the fps showing up, right now i can just comment out the DrawText function and its no longer all black.