|
Rendu
A lightweight rendering engine for experimentations
|
Base structure of an application. More...
#include <Application.hpp>
Public Member Functions | |
| Application (RenderingConfig &config, Window &window) | |
| virtual void | draw ()=0 |
| virtual void | update () |
| virtual void | finish () |
| virtual void | resize ()=0 |
| double | timeElapsed () |
| double | frameTime () |
| double | frameRate () |
| Window & | window () |
| virtual | ~Application () |
| Application (const Application &)=delete | |
| Application & | operator= (const Application &)=delete |
| Application (Application &&)=delete | |
| Application & | operator= (Application &&)=delete |
Protected Attributes | |
| RenderingConfig & | _config |
| The current configuration. | |
| std::unique_ptr< DebugViewer > | _debug |
| Debug viewer. | |
Private Attributes | |
| Window & | _window |
| The application main window. | |
| double | _timer = 0.0 |
| Absolute timer. | |
| double | _startTime = 0.0 |
| TImer value at app start. | |
| double | _frameTime = 0.0 |
| Last frame duration. | |
| std::array< double, _framesCount > | _frameTimes |
| Last N frame times. | |
| double | _smoothTime = 0.0 |
| Time elapsed over the last N frames. | |
| size_t | _currFrame = 0 |
| Current frame index for smoothing. | |
| bool | _showDebug = false |
| Show debug viewer. | |
Static Private Attributes | |
| static const size_t | _framesCount = 30 |
| Frames to average over for FPS display. | |
Base structure of an application.
Inherited by CameraApp.
|
explicit |
Constructor.
| config | the configuration to apply when setting up |
| window | the window to render to |
|
virtual |
Destructor
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
pure virtual |
Draw call.
Implemented in AtmosphereApp, FilteringApp, IslandApp, PathTracerApp, PBRDemo, ShaderEditor, StenciledApp, and SceneEditor.
|
virtual |
End of frame operations (screenshot,...)
| double Application::frameRate | ( | ) |
| double Application::frameTime | ( | ) |
|
delete |
Move assignment.
|
delete |
Copy assignment.
|
pure virtual |
Handle a window resize event, the configuration has been updated with the new size.
Implemented in AtmosphereApp, FilteringApp, IslandApp, PathTracerApp, PBRDemo, ShaderEditor, StenciledApp, and SceneEditor.
| double Application::timeElapsed | ( | ) |
|
virtual |
Interactions call.
Reimplemented in AtmosphereApp, FilteringApp, IslandApp, PathTracerApp, PBRDemo, ShaderEditor, StenciledApp, CameraApp, and SceneEditor.
| Window & Application::window | ( | ) |