i have a d3d app, running in windowed mode, which does (almost) zero cpu
work, while using the gpu to draw some (preprocessed) data (task manager
says, cpu load is at 0%) and DX for mouse & keyboard input (can fly around,
ok, if i dont use the DrawTextA-Function of the D3DXFONT, i get about
150fps, BUT if i use the mouse to "look" around, it feels "laggy" most of
if i draw the last 5 fps values with DrawTextA (one line, cpu load still at
0%), the same behaviour. (<- scenario 1)
then, if i add some more information to the string, i draw with DrawText (4
lines, but same function-call as before), the cpu load goes up to 100% AND
the framerate goes up to about 600 or 700fps (!) (<- scenario 2)
now another strange thing: when i make another DrawTextA-call before the
"fps-status"-call in scenario 1, the cpu load goes up to 100% and the
framerate as well (like in scenario 2), but if i do this in scenario 2, cpu
load is again 0% and the framerate is only ~60fps.
i dont know, if all this font-drawing is that important, but one thing is
quite obvious: if the cpu load goes up, the framerate goes up as well and if
it's zero, the input is laggy, despite of the (still high) fps.
as the cpu load in fullscreen is always 100%, i get a constant good
framerate and it's smooth all the time in fullscreen mode
instead of drawing text to get the cpu load up (in windowed mode), i can
also put a Sleep(1) into the Render() function, which let the framerate drop
to about 60, but it runs smoother than without it.
final question: what could be the reason for this strange behaviour ?