X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMainLayer.hh;h=731adef4e2239018d91708afa184f334aed47831;hp=44a0f23ddabc73553ec161937d7718cbe20f573b;hb=6a5d12788f2778a26223de690d34b00ac16a6ec3;hpb=a4debfe4a5f5d339410788971b698ba00cb7f09c diff --git a/src/MainLayer.hh b/src/MainLayer.hh index 44a0f23..731adef 100644 --- a/src/MainLayer.hh +++ b/src/MainLayer.hh @@ -39,6 +39,7 @@ #include +#include #include #include #include @@ -47,10 +48,11 @@ class MainLayer; typedef boost::shared_ptr MainLayerP; -struct MainLayer : public Mf::Layer +class MainLayer : public Mf::Layer { +public: + MainLayer(); - ~MainLayer(); static MainLayerP alloc() { @@ -59,10 +61,9 @@ struct MainLayer : public Mf::Layer void pushed(Mf::Engine& engine); - void draw(Mf::Scalar alpha) const; - bool handleEvent(const Mf::Event& event); - - void quit(); + void update(Mf::Engine& engine, Mf::Scalar t, Mf::Scalar dt); + void draw(Mf::Engine& engine, Mf::Scalar alpha) const; + bool handleEvent(Mf::Engine& engine, const Mf::Event& event); private: @@ -70,9 +71,9 @@ private: * Set OpenGL to a state we can know and depend on. */ void setupGL(); - void contextRecreated(const Mf::Notification* note); + void contextRecreated(); - Mf::Engine* engine; + Mf::Dispatch::Handler mDispatchHandler; };