Rendu
A lightweight rendering engine for experimentations
|
Apply multiple image filters on an interactive rendering of a scene. More...
#include <FilteringApp.hpp>
Public Member Functions | |
FilteringApp (RenderingConfig &config, Window &window) | |
void | draw () override |
void | update () override |
void | physics (double fullTime, double frameTime) override |
void | resize () override |
Public Member Functions inherited from CameraApp | |
CameraApp (RenderingConfig &config, Window &window) | |
virtual void | update () override |
virtual void | physics (double fullTime, double frameTime) |
Public Member Functions inherited from Application | |
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 |
Private Types | |
enum class | Processing : int { INPUT = 0 , FILL , INTEGRATE , BOXBLUR , GAUSSBLUR , FLOODFILL } |
The filter to apply. | |
enum class | View : int { SCENE = 0 , IMAGE , PAINT } |
The viewing mode: either a rendering, a still image or a painting canvas. | |
Private Member Functions | |
void | showModeOptions () |
Private Attributes | |
Texture | _sceneColor |
Scene rendering color texture. | |
Texture | _sceneDepth |
Scene rendering depth texture. | |
std::unique_ptr< PoissonFiller > | _pyramidFiller |
Poisson filling. | |
std::unique_ptr< LaplacianIntegrator > | _pyramidIntegrator |
Laplacian integration. | |
std::unique_ptr< GaussianBlur > | _gaussianBlur |
Gaussian blur processing. | |
std::unique_ptr< BoxBlur > | _boxBlur |
Box blur processing. | |
std::unique_ptr< FloodFiller > | _floodFill |
Flood filling. | |
std::unique_ptr< PaintingTool > | _painter |
The painting interface. | |
Program * | _passthrough |
Basic blit shader. | |
Program * | _sceneShader |
Object rendering shader. | |
const Mesh * | _mesh |
Basic sphere mesh. | |
Processing | _mode = Processing::INPUT |
Current filter mode. | |
View | _viewMode = View::SCENE |
Current view mode. | |
Texture | _image = Texture("image") |
The image to display in Image view mode. | |
int | _blurLevel = 3 |
Gaussian blur level. | |
int | _intDownscale = 1 |
Integrator internal resolution downscaling. | |
int | _fillDownscale = 1 |
Poisson filling internal resolution downscaling. | |
bool | _showProcInput = false |
Option to show the input for both convolution filters. | |
Additional Inherited Members | |
Protected Member Functions inherited from CameraApp | |
void | freezeCamera (bool shouldFreeze) |
Protected Attributes inherited from CameraApp | |
ControllableCamera | _userCamera |
The interactive camera. | |
Protected Attributes inherited from Application | |
RenderingConfig & | _config |
The current configuration. | |
std::unique_ptr< DebugViewer > | _debug |
Debug viewer. | |
Apply multiple image filters on an interactive rendering of a scene.
Filters available: Box blur of fixed radius, Gaussian blur, Poisson filling, Laplacian integration, Flood filling.
Inherits CameraApp.
|
explicit |
Constructor.
config | the configuration to apply when setting up |
window | the window to render to |
|
overridevirtual |
Draw call.
Implements Application.
|
overridevirtual |
Perform physics simulation update.
fullTime | the time elapsed since the beginning of the render loop |
frameTime | the duration of the last frame |
Reimplemented from CameraApp.
|
overridevirtual |
Handle a window resize event, the configuration has been updated with the new size.
Implements Application.
|
private |
Display mode-specific GUI options.
|
overridevirtual |
Per-frame update.
Reimplemented from CameraApp.