Hi, joa kommt auch mal vor das ich ne Frage hab
naja... ist mir auch rel. peinlich... aber egal:
|
C-/C++-Quelltext
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
tbResult DrawFPSInfo(void)
{
char cFrameRate[50] = {0};
float fCurrentTime = GetTickCount() * 0.001f;
++m_fFPS;
if(fCurrentTime - m_fLastTime > 1.0f )
{
m_fLastTime = fCurrentTime;
sprintf(cFrameRate, "%i fps", int(m_fFPS));
m_pfontFPS->Begin();
if(!m_pfontFPS->DrawText(tbVector2(((float)m_pCurrentChain->GetWidth())-100.0f, 50.0f), cFrameRate, TB_FF_ALIGN_HLEFT, -1, tbColor(1.0f, 1.0f, 1.0f), tbColor(1.0f, 1.0f, 1.0f), tbVector2(1.0f, 1.0f), 0.0f, 0.0f, 0.0f, 50.0f, 0.0f))
{
CMainFrame* pMainFrm = (CMainFrame*)AfxGetMainWnd();
char cTmp[256];
sprintf(cTmp, "FPS rendering failed! %s", cFrameRate);
pMainFrm->GetLogBar()->ShowWarning(cTmp);
}
m_pfontFPS->End();
m_fFPS = 0.0f;
}
return TB_OK;
}
|
Leider gottes zeigt er mir die Fehlermeldung an
also muss da was falsch sein... entweder nen kleines misgeschick meiner seits... oder die Funk ist wirklich fehlerhaft
PS: Es werden in SwapChains gerendert...