Simulant  21.12-166
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Protected Member Functions | Friends | List of all members
smlt::Application Class Referenceabstract
Inheritance diagram for smlt::Application:
smlt::test::TestApp

Public Member Functions

 Application (const AppConfig &config)
 
int32_t run ()
 
int32_t run (int argc, char *argv[])
 
bool initialized () const
 
ProcessID process_id () const
 
int64_t ram_usage_in_bytes () const
 
uint32_t stage_node_pool_capacity () const
 
uint32_t stage_node_pool_capacity_in_bytes () const
 
bool run_frame ()
 
void run_update (float dt)
 
void run_fixed_updates ()
 
void request_frame_time (float ms)
 
void start_coroutine (std::function< void()> func)
 
void update_coroutines ()
 
void stop_all_coroutines ()
 
void stop_running ()
 
bool is_shutting_down () const
 
void shutdown ()
 
LoaderPtr loader_for (const Path &filename, LoaderHint hint=LOADER_HINT_NONE)
 
LoaderPtr loader_for (const std::string &loader_name, const Path &filename)
 
LoaderTypePtr loader_type (const std::string &loader_name) const
 
void register_loader (LoaderTypePtr loader_type)
 
 S_DEFINE_PROPERTY (window, &Application::window_)
 
 S_DEFINE_PROPERTY (data, &Application::data_carrier_)
 
 S_DEFINE_PROPERTY (scenes, &Application::scene_manager_)
 
 S_DEFINE_PROPERTY (args, &Application::args_)
 
 S_DEFINE_PROPERTY (config, &Application::config_)
 
 S_DEFINE_PROPERTY (stage_node_pool, &Application::node_pool_)
 
 S_DEFINE_PROPERTY (shared_assets, &Application::asset_manager_)
 
 S_DEFINE_PROPERTY (time_keeper, &Application::time_keeper_)
 
 S_DEFINE_PROPERTY (stats, &Application::stats_)
 
 S_DEFINE_PROPERTY (vfs, &Application::vfs_)
 
 S_DEFINE_PROPERTY (sound_driver, &Application::sound_driver_)
 

Protected Member Functions

bool _call_init ()
 

Friends

class Window
 
void cr_run_main (std::function< void()> func)
 
Applicationget_app ()
 

Member Function Documentation

◆ is_shutting_down()

bool smlt::Application::is_shutting_down ( ) const

Returns true if the application is shutting down

◆ process_id()

ProcessID smlt::Application::process_id ( ) const

Returns the process ID for the application, or -1 if it's unavailable or unsupported

◆ ram_usage_in_bytes()

int64_t smlt::Application::ram_usage_in_bytes ( ) const

Returns an approximation of the ram usage of the current process. Returns -1 if an error occurs or not supported on the platform

◆ request_frame_time()

void smlt::Application::request_frame_time ( float  ms)

Request the target frame time - frames will delay to match it if the framerate would otherwise be too high

◆ run_fixed_updates()

void smlt::Application::run_fixed_updates ( )

Runs fixed_updates, you likely don't want to call this directly

◆ run_frame()

bool smlt::Application::run_frame ( )

Runs a single frame of the application. You likely don't want to call this!

◆ run_update()

void smlt::Application::run_update ( float  dt)

Runs the update and late_update methods on the active scene. You likely don't want to call this directly.

◆ stage_node_pool_capacity()

uint32_t smlt::Application::stage_node_pool_capacity ( ) const

Capacity of the global stagenode pool. This is a memory buffer where all stage nodes (across all stages) are stored/released

◆ stop_running()

void smlt::Application::stop_running ( )

Stops the entire application


The documentation for this class was generated from the following files: