Class TCastleWindow
Unit
Declaration
type TCastleWindow = class(TCastleWindowBase)
Description
Warning: this symbol is deprecated: use TCastleWindowBase and create instance of TCastleViewport explicitly
Window to render everything (3D or 2D) with Castle Game Engine, with a default TCastleSceneManager instance already created for you. Add your game stuff (descending from TCastleTransform, like TCastleScene) to the scene manager available in SceneManager property. Add the rest (like 2D user-inteface) to the TCastleWindowBase.Controls property (from ancestor TCastleWindowBase).
You can directly access the SceneManager and configure it however you like.
You have comfortable Load method that simply loads a single 3D model to your world.
Note that if you don't plan to use the default SceneManager instance, then you should better create TCastleWindowBase instead of this class.
If you're looking for analogous Lazarus component (that does basically the same, but can be placed on a Lazarus form) see TCastleControl component.
This is deprecated, as such "window with default scene manager" is an unnecessary API complication. Use instead TCastleWindowBase and just add there a TCastleViewport with FullSize = true, it is trivial.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleWindowBase
- TCastleWindow
Overview
Methods
![]() |
procedure NavigationInfoChanged; virtual; |
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
procedure Load(const SceneURL: string); deprecated 'create TCastleScene and load using TCastleScene.Load; this method is an inflexible shortcut for this'; |
![]() |
procedure Load(ARootNode: TX3DRootNode; const OwnsRootNode: boolean); deprecated 'create TCastleScene and load using TCastleScene.Load; this method is an inflexible shortcut for this'; |
![]() |
function MainScene: TCastleScene; deprecated 'create TCastleViewport and use TCastleViewport.Items.MainScene'; |
Properties
![]() |
property SceneManager: TGameSceneManager read FSceneManager; |
![]() |
property ShadowVolumes: boolean
read GetShadowVolumes write SetShadowVolumes
default TCastleViewport.DefaultShadowVolumes; deprecated 'create TCastleViewport and use TCastleViewport.ShadowVolumes'; |
![]() |
property ShadowVolumesRender: boolean
read GetShadowVolumesRender write SetShadowVolumesRender default false; deprecated 'create TCastleViewport and use TCastleViewport.ShadowVolumesRender'; |
![]() |
property NavigationType: TNavigationType
read GetNavigationType write SetNavigationType; deprecated 'create TCastleViewport and use TCastleViewport.NavigationType'; |
Description
Methods
![]() |
procedure NavigationInfoChanged; virtual; |
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
procedure Load(const SceneURL: string); deprecated 'create TCastleScene and load using TCastleScene.Load; this method is an inflexible shortcut for this'; |
|
Warning: this symbol is deprecated: create TCastleScene and load using TCastleScene.Load; this method is an inflexible shortcut for this Load a single 3D model to your world (removing other models, and resetting the camera). This is nice for simple 3D model browsers, but usually for games you don't want to use this method — it's more flexible to create TCastleScene yourself, and add it to scene manager yourself, see engine examples like examples/3d_rendering_processing/view_3d_model_basic.lpr . See manual for explanation: https://castle-engine.io/manual_load_3d.php | |
![]() |
procedure Load(ARootNode: TX3DRootNode; const OwnsRootNode: boolean); deprecated 'create TCastleScene and load using TCastleScene.Load; this method is an inflexible shortcut for this'; |
|
Warning: this symbol is deprecated: create TCastleScene and load using TCastleScene.Load; this method is an inflexible shortcut for this | |
![]() |
function MainScene: TCastleScene; deprecated 'create TCastleViewport and use TCastleViewport.Items.MainScene'; |
|
Warning: this symbol is deprecated: create TCastleViewport and use TCastleViewport.Items.MainScene | |
Properties
![]() |
property SceneManager: TGameSceneManager read FSceneManager; |
![]() |
property ShadowVolumes: boolean
read GetShadowVolumes write SetShadowVolumes
default TCastleViewport.DefaultShadowVolumes; deprecated 'create TCastleViewport and use TCastleViewport.ShadowVolumes'; |
|
Warning: this symbol is deprecated: create TCastleViewport and use TCastleViewport.ShadowVolumes | |
![]() |
property NavigationType: TNavigationType
read GetNavigationType write SetNavigationType; deprecated 'create TCastleViewport and use TCastleViewport.NavigationType'; |
|
Warning: this symbol is deprecated: create TCastleViewport and use TCastleViewport.NavigationType Navigation type of the main camera associated with the default SceneManager. | |
Generated by PasDoc 0.16.0.

