Elemental wrote at 2011-12-12 08:10:
I am running the CameraControlDemo and have activated the FPS counter. The FPS stays around 55FPS when I do nothing. When I rotate via mouse, it rises to about 110-120FPS. When I rotate via keyboard, it goes down to about 40FPS.
My question is:
Why do FPS rise when rotating via mouse, but go down when rotating via keyboard?
objo wrote at 2011-12-12 20:40:
hi Bernd, the fps counter is counting frames by the CompositionTarget.Rendering event, which should fire at around 60Hz when the model is not too big. I think the mouse events have higher frequency and will force more frequent updates of the model, but I have not investigated how this works. I don't know why it goes down when using the keyboard, could it have something to do with the keyboard repetition rate?
Elemental wrote at 2011-12-13 08:33:
The background of my question is that FPS calculation seems to be wrong for larger objects.
When I have objects with like 200 000 triangles, the FPS when rotating via keyboard is like 5 FPS.
The FPS when rotating via mouse is like 80 FPS. The 80 FPS cannot be true, because it does not look smooth anymore.
I was just wondering why there is this difference in FPS calculation, but it is not really a problem...
objo wrote at 2011-12-13 18:42:
Right, using the CompositionTarget.Rendering event is probably not an accurate method of calculate the frame rate.
Let us know if you find a better way to achieve this! (is there some other event in the WPF3D render loop that could be used?)
Customer support service by UserEcho