|
nCine 2025.12.r529-30f7d03
A cross-platform 2D game engine
|
Main entry point and handler for nCine applications. More...
#include <Application.h>


Classes | |
| struct | GuiSettings |
| GUI settings (for ImGui and Nuklear) that can be changed at run-time. More... | |
| struct | RenderingSettings |
| Rendering settings that can be changed at run-time. More... | |
| struct | Timings |
Public Member Functions | |
| const AppConfiguration & | appConfiguration () const |
| Returns the configuration used to initialize the application. | |
| RenderingSettings & | renderingSettings () |
| Returns the run-time rendering settings. | |
| GuiSettings & | guiSettings () |
| Returns the run-time GUI settings. | |
| IDebugOverlay::DisplaySettings & | debugOverlaySettings () |
| Returns the run-time debug overlay settings, if debug overlay is available. | |
| const float * | timings () const |
| Returns all timings. | |
| IGfxDevice & | gfxDevice () |
| Returns the graphics device instance. | |
| IInputManager & | inputManager () |
| Returns the input manager instance. | |
| unsigned long int | numFrames () const |
| Returns the total number of frames already rendered. | |
| float | frameTime () const |
| Returns the time in seconds that last frame took to complete. | |
| IFrameTimer & | frameTimer () |
| Returns the frame timer interface. | |
| float | width () const |
| Returns the drawable screen width as a float number. | |
| float | height () const |
| Returns the drawable screen height as a float number. | |
| Vector2f | resolution () const |
Returns the drawable screen resolution as a Vector2f object. | |
| int | widthInt () const |
| Returns the drawable screen width as an integer number. | |
| int | heightInt () const |
| Returns the drawable screen height as an integer number. | |
| Vector2i | resolutionInt () const |
Returns the drawable screen resolution as a Vector2i object. | |
| bool | isSuspended () const |
| Returns the value of the suspension flag. | |
| void | setSuspended (bool suspended) |
| Sets the suspension flag value. | |
| bool | autoSuspension () const |
| Returns the value of the auto-suspension flag. | |
| void | setAutoSuspension (bool autoSuspension) |
| Sets the auto-suspension flag value. | |
| void | quit () |
| Asks the application to quit as soon as possible (by raising the quit flag) | |
| bool | shouldQuit () const |
| Returns the value of the quit flag. | |
| bool | hasFocus () const |
| Returns the focus flag value. | |
Protected Member Functions | |
| void | initCommon () |
| Must be called before giving control to the application. | |
| void | step () |
| A single step of the game loop made to render a frame. | |
| void | shutdownCommon () |
| Must be called before exiting to shut down the application. | |
| void | suspend () |
| Called when the application gets suspended. | |
| void | resume () |
| Called when the application resumes execution. | |
| virtual void | setFocus (bool hasFocus) |
| Sets the focus flag. | |
| bool | resizeScreenViewport (int width, int height) |
| Resizes the screen viewport, if it exists. | |
| bool | updateScalingFactor () |
| Checks if the window scaling factor has changed this frame. | |
Protected Attributes | |
| bool | isSuspended_ |
| bool | autoSuspension_ |
| bool | hasFocus_ |
| bool | shouldQuit_ |
| const AppConfiguration | appCfg_ |
| RenderingSettings | renderingSettings_ |
| GuiSettings | guiSettings_ |
| float | timings_ [Timings::COUNT] |
| IDebugOverlay::DisplaySettings | debugOverlayNullSettings_ |
| TimeStamp | profileStartTime_ |
| nctl::UniquePtr< FrameTimer > | frameTimer_ |
| nctl::UniquePtr< IGfxDevice > | gfxDevice_ |
| nctl::UniquePtr< IDebugOverlay > | debugOverlay_ |
| nctl::UniquePtr< IInputManager > | inputManager_ |
| nctl::UniquePtr< IAppEventHandler > | appEventHandler_ |
Friends | |
| class | PCApplication |
| class | AndroidApplication |
| class | Viewport |
| class | GlfwInputManager |
| class | Qt5Widget |
Main entry point and handler for nCine applications.
|
inline |
Returns the value of the auto-suspension flag.
If true the application will be suspended when it loses focus
| float ncine::Application::frameTime | ( | ) | const |
Returns the time in seconds that last frame took to complete.
|
inline |
Returns the value of the suspension flag.
If true the application is suspended, it will neither update nor receive events
|
protected |
Resizes the screen viewport, if it exists.
onResizeWindow() callback if the size has really changed
|
protected |
Checks if the window scaling factor has changed this frame.
onChangeScalingFactor() callback if the factor has really changed