Download Now

    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

    NameKindLine
    Applicationfunction142
    EApplicationErrorclass67
    SSDLContextFailedconstant147
    SSDLInitFailedconstant145
    SSDLOpenGLVersionconstant148
    SSDLWindowFailedconstant146
    TApplicationclass69
    Createconstructor105
    FilesDroppedfunction114
    Runprocedure109
    SetVSyncprocedure102
    Terminateprocedure111
    Decoratedproperty131
    DepthBitsproperty135
    Fullscreenproperty128
    Heightproperty126
    MultiSamplesproperty137
    Runningproperty121
    Sceneproperty119
    SceneClassproperty117
    Sizeableproperty130
    StencilBitsproperty136
    Titleproperty123
    Widthproperty125