Reference EApplicationError
Declared in Codebot.Render.Application.pas on line 67
TApplication is the scene host of an SDL2 window.
Everything runs on the thread which calls Run. The window, OpenGL context, render context and Canvas are created first, then each frame:
1. The scene is created, or replaced when SceneClass has changed
2. Window events are delivered to the scene as key, text, mouse and wheel
input
3. The shared Timer is calculated once and the scene is updated with the
size of the window
4. The window buffers are swapped
2. Window events are delivered to the scene as key, text, mouse and wheel
input
3. The shared Timer is calculated once and the scene is updated with the
size of the window
4. The window buffers are swapped
When the scene has a StepInterval a step thread calls Step on the scene, as TGraphicsBox does. It is stopped before the scene is freed. If Step raises an exception the application stops and Run raises it again.
Scenes get the Canvas, the default font loaded from 'fonts/roboto.ttf' in the assets folder, and a Window for the SDL window. The keyboard, clipboard, bitmaps, and dialogs are provided by Codebot.Platform.SDL. Each frame calls CheckSynchronize, so methods queued with TThread.Queue run between frames, and PlatformDispatch, so dialogs deliver their OnClose events. F1 toggles full screen and F2 toggles vertical sync unless the scene handles those keys.
EApplicationError = class(Exception);