Unit CastleControl

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Component with OpenGL context suitable for 2D and 3D rendering of "Castle Game Engine".

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
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.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").


Generated by PasDoc 0.13.0 on 2014-08-30 12:10:33