#include <application/application.h>
Collaboration diagram for neo::application::Application:

Public Member Functions | |
| Application (const std::string &name) | |
| Initialize data. | |
| virtual | ~Application () |
| Terminate application. | |
| void | start () |
| Initialize application and engine. | |
| void | stop () |
| Stop application. | |
Static Public Member Functions | |
| static Application * | createApplication () |
| Create application object. | |
Protected Member Functions | |
| virtual void | initialize () |
| Initialize application. | |
| void | run () |
| Run application. | |
| virtual void | shutdown () |
| Shutdown application and engine. | |
| bool | isInitialized () const |
| Query if initialized. | |
| virtual void | processInput () |
| Process user input. | |
| virtual void | updateFrame (float deltaTime)=0 |
| Update frame. | |
| virtual void | renderFrame ()=0 |
| Render frame. | |
| virtual void | input (const input::Event *p_event) |
| Handle input. | |
| render::Resolution * | getPrevResolution (const render::Resolution &res) |
| Get previous resolution. | |
| render::Resolution * | getNextResolution (const render::Resolution &res, bool same=false) |
| Get next resolution. | |
Protected Attributes | |
| std::string | _name |
| Application name. | |
| bool | _useSetupDialog |
| Use setup dialog flag. | |
| bool | _run |
| Run flag. | |
| int | _fixedUpdate |
| Fixed-step update interval in milliseconds, 0 for dynamic update interval (default). | |
| core::Timer | _timer |
| Frame timer. | |
| float | _timeacc |
| Accumulated time from previous frames. | |
| render::Device * | _p_deviceRender |
| Render device. | |
| input::Device * | _p_deviceInput |
| Input device. | |
| core::Array< unsigned int > | _programPriority |
| Wanted priority and support of programs. | |
| core::Array< unsigned int > | _shaderPriority |
| Wanted priority and support of shaders. | |
| core::Array< render::Resolution > | _resAvailable |
| Available resolutions. | |
| WindowEventListener * | _p_listenerWindow |
| Window event listener. | |
| core::Timer | _timerFPS |
| Frame rate timer. | |
| unsigned int | _numFrames |
| Frames elapsed. | |
| float | _fps |
| Frame rate. | |
| bool | _showFPS |
| Show framerate counter flag. | |
| gui::FontPtr | _p_fontDefault |
| Default font. | |
| neo::application::Application::Application | ( | const std::string & | name | ) |
Initialize data
| name | Application name string |
| void neo::application::Application::start | ( | ) |
Initialize application, engine and all subsystems
| void neo::application::Application::stop | ( | ) |
Stop application
| static Application* neo::application::Application::createApplication | ( | ) | [static] |
Create application object
| virtual void neo::application::Application::initialize | ( | ) | [protected, virtual] |
Initialize the application. Setup render window and device, intialize engine subsystems and load application startup data.
| void neo::application::Application::run | ( | ) | [protected] |
Run application until stop() is called. Each frame consists of the following steps: Collect and process user input Update frame Render frame The update step can be looped multiple times if fixed-step update has been requested and deltatime exceeds the step size
| virtual void neo::application::Application::shutdown | ( | ) | [protected, virtual] |
Shutdown engine and all subsystems
| bool neo::application::Application::isInitialized | ( | ) | const [protected] |
| virtual void neo::application::Application::processInput | ( | ) | [protected, virtual] |
Process the user input
| virtual void neo::application::Application::updateFrame | ( | float | deltaTime | ) | [protected, pure virtual] |
Update frame
| deltaTime | Delta time elapsed since last update |
| virtual void neo::application::Application::renderFrame | ( | ) | [protected, pure virtual] |
Render the current frame
| virtual void neo::application::Application::input | ( | const input::Event * | p_event | ) | [protected, virtual] |
Handle input event
| render::Resolution* neo::application::Application::getPrevResolution | ( | const render::Resolution & | res | ) | [protected] |
| res | Current resolution |
| render::Resolution* neo::application::Application::getNextResolution | ( | const render::Resolution & | res, | |
| bool | same = false | |||
| ) | [protected] |
| res | Current resolution | |
| same | Consider same width and height |
1.5.1