/*] Copyright (c) 2009-2010, Charles McGarvey [************************** **] All rights reserved. * * vi:ts=4 sw=4 tw=75 * * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * **************************************************************************/ #ifndef _MAIN_HH_ #define _MAIN_HH_ /** * @file Main.hh * This is where all the fun begins. */ #include #include #include #include #include #include class Main; typedef boost::shared_ptr
MainP; class Main : public Mf::Layer { public: Main(); static MainP alloc() { return MainP(new Main); } void addedToCore(); void update(Mf::Scalar t, Mf::Scalar dt); void draw(Mf::Scalar alpha) const; bool handleEvent(const Mf::Event& event); static std::string getSearchPath(); static std::string getConfigPath(); static void printUsage(); static void printInfo(int argc, char* argv[]); private: /** * Set OpenGL to a state we can know and depend on. */ static void setupGL(); static void contextCreated(); Mf::Dispatch::Handler mDispatchHandler; }; #endif // _MAIN_HH_