ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
core.h File Reference

Core routines including main loop and initialization. More...

#include <functional>
Include dependency graph for core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  asw
 
namespace  asw::core
 

Functions

void asw::core::update ()
 Updates core module functionality.
 
float asw::core::get_delta_time ()
 Get the time between the last two calls to update(). Capped at a quarter of a second, so a breakpoint or a stalled window does not send things flying.
 
void asw::core::run (const std::function< void()> &frame)
 Run a main loop until exit() is called.
 
void asw::core::init (int width, int height, int scale=1)
 Initializes the core module.
 
void asw::core::init_opengl (int width, int height, int scale=1)
 Initializes the core module for opengl.
 
void asw::core::print_info ()
 Prints information about the core module.
 
void asw::core::exit ()
 Exit the application. Sets exiting flag to true, which will cause the main loop to exit on the next update.
 
bool asw::core::is_exiting ()
 Return exiting status.
 
void asw::core::shutdown ()
 Cleanup resources used by the core module. Should be called on application exit.
 

Detailed Description

Core routines including main loop and initialization.

Author
Allan Legemaate (alege.nosp@m.maat.nosp@m.e@gma.nosp@m.il.c.nosp@m.om)
Date
2023-09-20

Definition in file core.h.