|
SimpleGL
1.1.0
A framework for platform independent rendering
|
This is the base class for an application. More...
#include <application.hpp>
Public Member Functions | |
| ~Application (void) | |
| Destroys the application. More... | |
| void | run () |
| Starts the application. More... | |
| void | init () |
| Initializes the application. More... | |
| void | mainLoop () |
| The main loop is a fixed timestep loop. More... | |
| virtual void | handleEvents (std::vector< Event * > events)=0 |
| This method is intended to handle events like user input. More... | |
| virtual void | updateScene (float delta)=0 |
| This method is intended to update objects of the application. More... | |
| virtual void | clear ()=0 |
| This method is intended to clear the color and depth buffers. More... | |
| virtual void | renderScene (float alpha)=0 |
| This method is intended to used for drawing the scene. More... | |
| virtual void | dispose () |
| Disposes the application. More... | |
Protected Member Functions | |
| Application (void) | |
| Initializes a new application. More... | |
Protected Attributes | |
| bool | running |
| Tells if the application is running. More... | |
| int | targetUps |
| Stores the desired UPS. More... | |
| int | targetFps |
| Stores the desired FPS. More... | |
| Window * | window |
| The window of this application. More... | |
This is the base class for an application.
Definition at line 25 of file application.hpp.
|
protected |
Initializes a new application.
Definition at line 16 of file application.cpp.
| sgl::Application::~Application | ( | void | ) |
Destroys the application.
Definition at line 22 of file application.cpp.
|
pure virtual |
This method is intended to clear the color and depth buffers.
Implemented in sgl::ApplicationGL, and sgl::ApplicationVK.
|
virtual |
Disposes the application.
Reimplemented in sgl::ApplicationGL, and sgl::ApplicationVK.
Definition at line 90 of file application.cpp.
|
pure virtual |
This method is intended to handle events like user input.
| events | A list of events. |
| void sgl::Application::init | ( | ) |
Initializes the application.
Definition at line 36 of file application.cpp.
| void sgl::Application::mainLoop | ( | ) |
The main loop is a fixed timestep loop.
Definition at line 41 of file application.cpp.
|
pure virtual |
This method is intended to used for drawing the scene.
| alpha | The alpha value. |
| void sgl::Application::run | ( | ) |
Starts the application.
Definition at line 30 of file application.cpp.
|
pure virtual |
This method is intended to update objects of the application.
| delta | The delta time. |
|
protected |
Tells if the application is running.
Definition at line 29 of file application.hpp.
|
protected |
Stores the desired FPS.
Definition at line 35 of file application.hpp.
|
protected |
Stores the desired UPS.
Definition at line 32 of file application.hpp.
|
protected |
The window of this application.
Definition at line 38 of file application.hpp.
1.8.11