#include <boost/shared_ptr.hpp>
+#include <Moof/Dispatch.hh>
#include <Moof/Engine.hh>
#include <Moof/Layer.hh>
#include <Moof/Math.hh>
class MainLayer;
typedef boost::shared_ptr<MainLayer> 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);
* 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;
};