Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers
|
Class TCastleApplicationProperties
Unit
CastleApplicationProperties
Declaration
type TCastleApplicationProperties = class(TObject)
Description
Events and properties of the Castle Game Engine application, usually accessed through the ApplicationProperties singleton.
These members work regardless if you use CastleWindow or CastleControl. For more fine-grained application control, see TCastleApplication (in case you use CastleWindow) or Lazarus (LCL) TApplication (in case you use CastleControl).
Hierarchy
- TObject
- TCastleApplicationProperties
Overview
Methods
Properties
Description
Methods
 |
constructor Create; |
|
|
 |
destructor Destroy; override; |
|
|
 |
procedure WriteWarningOnConsole(Sender: TObject; const Category, Message: string); |
|
Add this to OnWarning to output warnings to standard output (usually, console). Eventually, on GUI Windows programs, it will make a dialog box. This is handled by WarningWrite procedure.
|
 |
procedure _Warning(const Category, Message: string); |
|
|
Properties
 |
property OnGLContextOpen: TGLContextEventList read FOnGLContextOpen; |
|
Callbacks called when the OpenGL context is opened or closed. Use when you want to be notified about OpenGL context availability, but cannot refer to a particular instance of TCastleControl or TCastleWindow.
Note that we may have many OpenGL contexts (many TCastleWindow or TCastleControl instances) open simultaneously. They all share OpenGL resources. OnGLContextOpen is called when first OpenGL context is open, that is: no previous context was open. OnGLContextClose is called when last OpenGL context is closed, that is: no more contexts remain open. Note that this implies that they may be called many times: e.g. if you open one window, then close it, then open another window then close it.
Callbacks on OnGLContextOpen are called from first to last. Callbacks on OnGLContextClose are called in reverse order, so OnGLContextClose[0] is called last.
|
 |
property OnInitializeJavaActivity: TNotifyEventList read FOnInitializeJavaActivity; |
|
Callbacks called when Android Java activity started. Called every time a Java activity is created.
For the first time, it's called right before TCastleApplication.OnInitialize.
Later this is called when Java activity died (and is restarting now), but the native code thread survived. So all native code memory is already cool (no need to call TCastleApplication.OnInitialize), but we need to reinitialize Java part.
Note that this is different from TCastleWindowCustom.OnOpen. We lose OpenGL context often, actually every time user switches to another app, without having neither Java nor native threads killed.
For non-Android applications, this is simply always called exactly once, exactly before calling TCastleApplication.OnInitialize.
|
 |
property OnPause: TNotifyEventList read FOnPause; |
|
Callbacks called when Android Java activity is paused or resumed. For now not called on non-Android, but this may change — consider these events somewhat internal for the time being.
|
Generated by PasDoc 0.14.0.
|