]> git.tdb.fi Git - libs/demoscene.git/blobdiff - source/launcher.cpp
Add a vignette postprocessor
[libs/demoscene.git] / source / launcher.cpp
index 2b53c18a2b2dbe92e5b78294e28eefd59dd1fb6c..7dc9b9830eb0169148a3870f38a04cce7ab50011 100644 (file)
@@ -1,5 +1,6 @@
 #include <cmath>
 #include <msp/core/getopt.h>
+#include <msp/gl/pipelinetemplate.h>
 #include <msp/input/keys.h>
 #include <msp/io/console.h>
 #include <msp/io/file.h>
@@ -8,9 +9,12 @@
 #include "demo.h"
 #include "launcher.h"
 #include "launchscreen.h"
+#include "vignette.h"
 
 using namespace std;
-using namespace Msp;
+
+namespace Msp {
+namespace DemoScene {
 
 LauncherBase::Options::Options(Graphics::Display &dpy, int argc, char **argv):
        start_fullscreen(-1),
@@ -100,6 +104,8 @@ LauncherBase::LauncherBase(int argc, char **argv):
        gl_context.set_swap_interval(options.no_vsync ? 0 : 1);
        window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &LauncherBase::exit), 0));
        keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &LauncherBase::key_press), false));
+
+       GL::PipelineTemplate::register_postprocessor<Vignette>("vignette");
 }
 
 LauncherBase::~LauncherBase()
@@ -214,3 +220,6 @@ void LauncherBase::key_press(unsigned key)
        else if(key==Input::KEY_ESC)
                exit(0);
 }
+
+} // namespace DemoScene
+} // namespace Msp