forked from plastictown/Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (34 loc) · 855 Bytes
/
main.cpp
File metadata and controls
41 lines (34 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* https://github.com/plastictown/Engine
* Copyright (C) 2018 Mikhail Domchenkov
* agplastictown@yandex.ru
*/
#include <iostream>
#include <vector>
#include <memory>
#include <utility>
#include <exception>
#include <thread>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/freeglut.h>
#include <engine.h>
#include <SceneLoader.h>
#include <polygon.h>
#include <vertex.h>
#include <color.h>
using namespace std;
int main(int argc, char** argv) try {
Engine e(argc, argv);
std::shared_ptr<Scene> scn = std::make_shared<Scene>();
scn->setVisible(true);
e.SetScene(std::move(scn));
Engine::Run();
cin.get();
return 0;
} catch(std::exception& e) {
std::cerr << __FUNCTION__ << ": " << e.what() << std::endl;
return -1;
} catch(...) {
std::cerr << __FUNCTION__ << ": unknown exception" << std::endl;
}