From 5dad2cbf4556cd4b433722c172f0b468d0161de5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 22 May 2019 23:43:12 +0300 Subject: [PATCH] Turn Stage into a class --- source/stage.cpp | 5 +++++ source/stage.h | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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 -- 2.45.2