]> Dogcows Code - chaz/yoink/blob - src/Main.hh
the massive refactoring effort
[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/dispatcher.hh>
26 #include <moof/math.hh>
27 #include <moof/view.hh>
28
29
30 namespace moof
31 {
32 class settings;
33 class view;
34 }
35
36
37 class Main;
38 typedef boost::shared_ptr<Main> MainP;
39
40 class Main : public moof::view
41 {
42 public:
43
44 Main(moof::settings& settings, moof::video& video);
45
46 void update(moof::scalar t, moof::scalar dt);
47 void draw(moof::scalar alpha) const;
48 bool handle_event(const moof::event& event);
49
50 static std::string getSearchPath();
51 static std::string getConfigPath();
52
53 static void printUsage();
54 static void printInfo(int argc, char* argv[]);
55
56 private:
57
58 /**
59 * Set OpenGL to a state we can know and depend on.
60 */
61 static void setupGL();
62
63 moof::dispatcher::handle mNewContextDispatch;
64 };
65
66
67 #endif // _MAIN_HH_
68
This page took 0.031734 seconds and 4 git commands to generate.