X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMainLayer.hh;h=4f0fc77d3b2d254905b301734fc7f22895d85d66;hp=db529a12d5061b5b4b5e4ff04957c01514bd9416;hb=a295f8def17036c8071b56e181364f99a377cae7;hpb=892da43bf5796e7c5f593a6d0f53bd797a36bd3e diff --git a/src/MainLayer.hh b/src/MainLayer.hh index db529a1..4f0fc77 100644 --- a/src/MainLayer.hh +++ b/src/MainLayer.hh @@ -39,6 +39,7 @@ #include +#include #include #include #include @@ -47,18 +48,20 @@ class MainLayer; typedef boost::shared_ptr MainLayerP; -struct MainLayer : public Mf::Layer +class MainLayer : public Mf::Layer { +public: + MainLayer(); - ~MainLayer(); static MainLayerP alloc() { return MainLayerP(new MainLayer); } - void pushed(Mf::Engine& engine); + void pushedOntoEngine(); + void update(Mf::Scalar t, Mf::Scalar dt); void draw(Mf::Scalar alpha) const; bool handleEvent(const Mf::Event& event); @@ -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; };