]> git.tdb.fi Git - libs/demoscene.git/commitdiff
Turn Stage into a class
authorMikko Rasa <tdb@tdb.fi>
Wed, 22 May 2019 20:43:12 +0000 (23:43 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 22 May 2019 20:43:12 +0000 (23:43 +0300)
source/stage.cpp
source/stage.h

index dfb668852760d3526f20c2939c2f8d2b7889e88b..267afe3a7dbe31148c590fa8fbf907fa9cb75813 100644 (file)
@@ -14,6 +14,11 @@ Stage::~Stage()
        delete pipeline;
 }
 
+void Stage::add_postprocessor(GL::PostProcessor &pp)
+{
+       pipeline->add_postprocessor(pp);
+}
+
 void Stage::set_camera(const GL::Camera &c)
 {
        camera.set_object_matrix(c.get_object_matrix());
index daf4f4b982c72ab52fa07008c79a10d2d2b1ba69..49371776b2df432f5ae311d3471677c984d0e107 100644 (file)
@@ -5,8 +5,9 @@
 #include <msp/gl/pipeline.h>
 #include "action.h"
 
-struct Stage
+class Stage
 {
+public:
        class UseInView: public Action
        {
        public:
@@ -59,13 +60,17 @@ struct Stage
                virtual void start(float, float);
        };
 
+protected:
        Msp::GL::Pipeline *pipeline;
        Msp::GL::Camera camera;
 
+public:
        Stage();
        ~Stage();
 
+       void add_postprocessor(Msp::GL::PostProcessor &);
        void set_camera(const Msp::GL::Camera &);
+       Msp::GL::Camera &get_camera() { return camera; }
 };
 
 #endif