]> Dogcows Code - chaz/yoink/blob - src/Main.hh
mesh and other random adjustments
[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/timer.hh>
28 #include <moof/view.hh>
29
30
31 namespace moof
32 {
33 class settings;
34 class view;
35 }
36
37
38 class Main;
39 typedef boost::shared_ptr<Main> MainP;
40
41 class Main : public moof::view
42 {
43 public:
44
45 Main(moof::settings& settings, moof::video& video);
46
47 void update(moof::scalar t, moof::scalar dt);
48 void draw(moof::scalar alpha) const;
49 bool handle_event(const moof::event& event);
50
51 static std::string search_paths();
52 static std::string config_paths();
53
54 static void print_usage();
55 static void print_info(int argc, char* argv[]);
56
57 private:
58
59 /**
60 * Set OpenGL to a state we can know and depend on.
61 */
62 static void setup_opengl();
63
64 static void print_option(const std::string& option, bool enabled);
65
66 moof::dispatcher::handle video_reloaded_;
67 moof::timer hotload_timer_;
68 };
69
70
71 #endif // _MAIN_HH_
72
This page took 0.033662 seconds and 4 git commands to generate.