Limit the number of (real) frames per second inside TCastleControl rendering, to not hog the CPU. Set to zero to not limit.
See TCastleWindow.ProcessMessage documentation about WaitToLimitFPS parameter, and see TCastleApplication.LimitFPS documentation.
The mechanism does mean sleeping in your process, so it's a global thing, not just a property of TCastleControl. However, the mechanism is activated only when some TCastleControl component is used, and only when LCL idle is fired (so we have no pending events, as LCL idle is "lazy" and fires only when process is really idle), and not at Lazarus design time.
When we may be clogged with events (like when using mouse look) this has an additional meaning: it is then used to force TCastleControl.DoUpdate and (if needed) repaint at least this often. So it is not only a limit, it's more like "the desired number of FPS". Although it's capped by MaxDesiredFPS (100), which is applied when LimitFPS > MaxDesiredFPS or when LimitFPS = 0 (which means "infinity").
|