-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathloading-test.cpp
More file actions
53 lines (50 loc) · 1.58 KB
/
loading-test.cpp
File metadata and controls
53 lines (50 loc) · 1.58 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
#include <iostream>
#include <SDL.h>
#include <string>
#include <vector>
#include "GL/glew.h"
#include "modules/parsing/generated/parsers_core.hpp"
#include "modules/parsing/map.hpp"
#include "modules/ui/editor.hpp"
#include "modules/ui/window-wrapper.hpp"
#include "modules/editor-state/editor-state.hpp"
#include "modules/assets-manager/assets.hpp"
#undef max
#undef min
#undef clamp
int main(int argc, char* argv[]) {
std::cout << "Welcome\n";
{
window::wrapper window {};
state::control control_state {};
assets::storage storage {};
state::layers_stack layers {};
layers.load_province_colors_texture_to_gpu();
state::editor editor {};
{
state::layer l {};
l.path = "./base-game";
parsers::load_layer(layers, l);
l.load_state_texture_to_gpu();
l.load_sea_texture_to_gpu();
layers.data.push_back(l);
layers.current_layer_index = 0;
layers.generate_indices();
layers.request_map_update = true;
layers.indices.load_province_texture_to_gpu();
}
{
state::layer l {};
l.path = "./editor-input";
parsers::load_layer(layers, l);
l.load_state_texture_to_gpu();
l.load_sea_texture_to_gpu();
layers.data.push_back(l);
layers.current_layer_index = 1;
layers.generate_indices();
layers.request_map_update = true;
layers.indices.load_province_texture_to_gpu();
}
}
return EXIT_SUCCESS;
}