ok ok I got it to work, but what I don''t understand is why it shows :
Framerate : 0
when I go in debugging mode it should display around 60
this is mu OutputText() function
HRESULT OutputText(char *pString, int x, int y, D3DCOLOR FontColor, ...){ char buffer[256] ; va_list list ; va_start(list, pString) ; int ret = _vsnprintf(buffer, 256, pString, list) ; if( ret == 256 ) buffer[255] = ''\0'' ; va_end(list) ; RECT FontRect = { x, y, 0, 0 } ; HFONT hFont ; HRESULT hr ; hFont = (HFONT)GetStockObject(SYSTEM_FONT) ; if(pFont) { pFont->Release() ; pFont = NULL ; } if FAILED(D3DXCreateFont(g_lpDevice,hFont, &pFont)) { Write2Log("Failed to Initialize font") ; return E_FAIL ; } // end of if pFont->Begin() ; pFont->DrawTextA(buffer, -1, &FontRect, DT_CALCRECT, 0) ; hr = pFont->DrawTextA(buffer, -1, &FontRect, nAlign, FontColor) ; pFont->End() ; return hr ;} // end of OutputText()