changed output from fps to time (in msec). Notes for dx10 and dx11: the first measure is wrong (zero), the followiing are correct; measured time includes output text to surface.
This commit is contained in:
@@ -207,7 +207,7 @@ public:
|
||||
|
||||
m_timer.stop();
|
||||
|
||||
print_info(pSurface, m_mode, m_timer.fps(), m_oclDevName);
|
||||
print_info(pSurface, m_mode, m_timer.time(Timer::UNITS::MSEC), m_oclDevName);
|
||||
|
||||
// traditional DX render pipeline:
|
||||
// BitBlt surface to backBuffer and flip backBuffer to frontBuffer
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
} // render()
|
||||
|
||||
|
||||
void print_info(LPDIRECT3DSURFACE9 pSurface, int mode, float fps, cv::String oclDevName)
|
||||
void print_info(LPDIRECT3DSURFACE9 pSurface, int mode, float time, cv::String oclDevName)
|
||||
{
|
||||
HDC hDC;
|
||||
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
int y = 0;
|
||||
|
||||
buf[0] = 0;
|
||||
sprintf(buf, "Mode: %s", m_modeStr[mode].c_str());
|
||||
sprintf(buf, "mode: %s", m_modeStr[mode].c_str());
|
||||
::TextOut(hDC, 0, y, buf, (int)strlen(buf));
|
||||
|
||||
y += tm.tmHeight;
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
|
||||
y += tm.tmHeight;
|
||||
buf[0] = 0;
|
||||
sprintf(buf, "FPS: %2.1f", fps);
|
||||
sprintf(buf, "time: %4.1f msec", time);
|
||||
::TextOut(hDC, 0, y, buf, (int)strlen(buf));
|
||||
|
||||
y += tm.tmHeight;
|
||||
|
Reference in New Issue
Block a user