From: Mikko Rasa Date: Wed, 22 May 2019 20:43:12 +0000 (+0300) Subject: Turn Stage into a class X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5dad2cbf4556cd4b433722c172f0b468d0161de5;p=libs%2Fdemoscene.git Turn Stage into a class --- diff --git a/source/stage.cpp b/source/stage.cpp index dfb6688..267afe3 100644 --- a/source/stage.cpp +++ b/source/stage.cpp @@ -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()); diff --git a/source/stage.h b/source/stage.h index daf4f4b..4937177 100644 --- a/source/stage.h +++ b/source/stage.h @@ -5,8 +5,9 @@ #include #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