Reference Codebot.Render.Application.pas
Part of the Codebot Render SDL package
Codebot.Render.Application runs scenes in an SDL2 window without the LCL. It is based on the application class of Tiny Sim and runs the same TScene classes as TSceneController, so a scene written for a TGraphicsBox can also run full screen in its own window.
A program creates no forms. It sets the window properties of the global Application and calls Run with a scene class:
begin Application.Title := 'Joint Demo'; Application.Run(TJointScene); end.
Run returns when the window is closed, Terminate is called, or the scene class is set to nil.
The Codebot.Render.Application unit runs scenes in an SDL2 window without using the LCL. TApplication is the scene host of the window and is accessed through the global Application function. A program using this unit creates no forms. Instead, it sets the properties of the window and calls Run with a scene class.
Everything runs on the thread that calls Run. That thread creates the window, the OpenGL context, and the canvas, and then on each frame it delivers the window events to the scene as input, updates the scene, and swaps the buffers. Unless the scene handles these keys itself, F1 toggles full screen and F2 toggles vertical sync.
Items 24 items
| Name | Kind | Line |
|---|---|---|
| Application | function | 142 |
| EApplicationError | class | 67 |
| SSDLContextFailed | constant | 147 |
| SSDLInitFailed | constant | 145 |
| SSDLOpenGLVersion | constant | 148 |
| SSDLWindowFailed | constant | 146 |
| TApplication | class | 69 |
| Create | constructor | 105 |
| FilesDropped | function | 114 |
| Run | procedure | 109 |
| SetVSync | procedure | 102 |
| Terminate | procedure | 111 |
| Decorated | property | 131 |
| DepthBits | property | 135 |
| Fullscreen | property | 128 |
| Height | property | 126 |
| MultiSamples | property | 137 |
| Running | property | 121 |
| Scene | property | 119 |
| SceneClass | property | 117 |
| Sizeable | property | 130 |
| StencilBits | property | 136 |
| Title | property | 123 |
| Width | property | 125 |