X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMainLayer.hh;h=731adef4e2239018d91708afa184f334aed47831;hp=db529a12d5061b5b4b5e4ff04957c01514bd9416;hb=71bd9dbaf1c1e3c55a9f63392a73865d8aeee7d4;hpb=892da43bf5796e7c5f593a6d0f53bd797a36bd3e diff --git a/src/MainLayer.hh b/src/MainLayer.hh index db529a1..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,8 +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 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: @@ -68,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; };