]> Dogcows Code - chaz/yoink/blob - src/Main.hh
destroyed global classes; view hierarchy instead
[chaz/yoink] / src / Main.hh
1
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
4 *
5 * vi:ts=4 sw=4 tw=75
6 *
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
9 *
10 **************************************************************************/
11
12 #ifndef _MAIN_HH_
13 #define _MAIN_HH_
14
15 /**
16 * @file Main.hh
17 * This is where all the fun begins.
18 */
19
20 #include <iostream>
21 #include <string>
22
23 #include <boost/shared_ptr.hpp>
24
25 #include <Moof/Dispatch.hh>
26 #include <Moof/Math.hh>
27 #include <Moof/View.hh>
28
29
30 namespace Mf {
31 class Settings;
32 class View;
33 }
34
35 class Main;
36 typedef boost::shared_ptr<Main> MainP;
37
38 class Main : public Mf::View
39 {
40 public:
41
42 Main(Mf::Settings& settings, Mf::Video& video);
43
44 void update(Mf::Scalar t, Mf::Scalar dt);
45 void draw(Mf::Scalar alpha) const;
46 bool handleEvent(const Mf::Event& event);
47
48 static std::string getSearchPath();
49 static std::string getConfigPath();
50
51 static void printUsage();
52 static void printInfo(int argc, char* argv[]);
53
54 private:
55
56 /**
57 * Set OpenGL to a state we can know and depend on.
58 */
59 static void setupGL();
60
61 Mf::Dispatch::Handle mNewContextDispatch;
62 };
63
64
65 #endif // _MAIN_HH_
66
This page took 0.035643 seconds and 5 git commands to generate.