![]() |
![]() |
New stuff in the engine 🙂
-
More comfortable control over headlight using TCastleSceneManager.UseHeadlight property. This allows to easily turn headlight on/off regardless of the
MainSceneexistence and it’s contents.See also TUseHeadlight type docs. See also new TCastleSceneManager.HeadlightNode property to customize headlight shape.
A new demo showing how to control the headlight is in examples/headlight_test/
-
view3dscene has a new menu option Print Current Camera (Viewpoint) (Pascal) that outputs a suitable
Camera.SetView(...)Pascal code. -
The engine includes a simple time usage profiler (TCastleProfiler, Profiler singleton).
It is automatically used by various CGE loading routines.
Simply call
Profiler.Enabled := true, and you will get in the log profile of theTCastleApplication.OnInitializeexecution.Display
Profiler.Summaryat any point, in any way, in your application, to show the currently gathered profile.See the TCastleProfiler docs for more.
Sample output:
12345678910111213-------------------- Time Profile beginProfile (speed of execution).Each line shows time, followed by [time spent in this process], followed by description.Lines are sorted within each group, to show the most expensive operation at the top.7.35 [7.35] - TCastleApplication.OnInitialize> 1.65 [1.65] - Loading .../character/soldier1.castle-anim-frames (TCastleSceneCore)> 1.49 [1.48] - Loading .../level/level-dungeon.x3d (TCastleSceneCore)> 0.78 [0.78] - Loading All Sounds From .../audio/index.xml (TRepoSoundEngine)> > 0.71 [0.71] - Loading .../audio/dark_fallout.ogg (TSoundFile)> > 0.00 [0.00] - Loading .../audio/flaunch.wav (TSoundFile)2.07 [2.07] - Prepare Resources .../level/level-dungeon.x3d-------------------- Time Profile end

