Castle Game Engine: CastleControl

# Unit CastleControl
Description | Uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables
## Description Component with OpenGL context suitable for 2D and 3D rendering of "Castle Game Engine". ## Uses Classes SysUtils OpenGLContext Controls Forms CastleVectors CastleKeysMouse CastleUtils CastleTimeUtils StdCtrls CastleUIControls CastleCameras X3DNodes CastleScene CastleLevels CastleImages CastleGLVersion pk3DConnexion CastleSceneManager ## Overview ### Classes, Interfaces, Objects and Records
Name | Description
--- | ---
Class `TCastleControlBase` | OpenGL control, with a couple of extensions for "Castle Game Engine".
Class `TCastleControlCustom` | OpenGL control, with extensions for "Castle Game Engine", including Controls list for TUIControl instances.
Class `TCastleControl` | Lazarus component with an OpenGL context, most comfortable to render 3D worlds with 2D controls above.
### Functions and Procedures
`procedure Register;`
### Constants
`DefaultLimitFPS = 100.0;`
### Variables
`LimitFPS: Single = DefaultLimitFPS;`
## Description ### Functions and Procedures
`procedure Register;`
### Constants
`DefaultLimitFPS = 100.0;`
### Variables
`LimitFPS: Single = DefaultLimitFPS;`
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.UpdateEvent 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").
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:12