-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
79 lines (60 loc) · 3.34 KB
/
main.cpp
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include "main.h"
#define STB_IMAGE_IMPLEMENTATION
#include "Libraries\Other\stb_image.h"
int main() {
#ifdef ENABLE_FILE_HANDLER
//std::string assetConfiguration = ".\\Assets\\Shaders\\Minimum\\minimum.birds";
//std::string compiledAsset = ".\\Assets\\Shaders\\Minimum\\minimum.cbirds";
//BIRD_VOID compilationResult = Loader::CompileShaderAsset(assetConfiguration);
//if (!compilationResult.success) { compilationResult.Print(); }
//Result<Loader::ShaderAsset> loadResult = Loader::LoadShaderAsset(compiledAsset);
//if (!compilationResult.success) { compilationResult.Print(); }
//std::string assetConfiguration = ".\\Assets\\Materials\\MinimumMat\\minimum.birdm";
//std::string compiledAsset = ".\\Assets\\Materials\\MinimumMat\\minimum.cbirdm";
//BIRD_VOID compilationResult = Loader::CompileMaterialAsset(assetConfiguration);
//if (!compilationResult.success) { compilationResult.Print(); }
//Loader::LoadMaterialAsset(compiledAsset);
//Loader::quickSave();
//Loader::quickLoad();
//Loader::CompileShaderConfig(".\\Assets\\Shaders\\Minimum\\minimum.birds");
//
//if (!asd.success) { asd.Print(); }
//Result<Identifier> asd = Result<Identifier>(false, "");
//BIRD_VOID asd = BIRD_VOID(nullptr);
//auto start = std::chrono::high_resolution_clock::now();
//for (size_t i = 0; i < 10000; i++)
//{
// asd = Loader::CompileShaderConfig(".\\Assets\\Shaders\\Minimum\\minimum.birds");
//}
//auto finish = std::chrono::high_resolution_clock::now();
//auto microseconds = std::chrono::duration_cast<std::chrono::microseconds>(finish - start);
//std::cout << microseconds.count() << "\n";
#endif // ENABLE_FILE_HANDLER
#ifdef ENABLE_MATERIAL_BUILDER
std::cout << (typeid(bool).hash_code() == BIRD_UNIFORM_BOOL) << std::endl;
std::cout << (typeid(int).hash_code() == BIRD_UNIFORM_INT) << std::endl;
std::cout << (typeid(unsigned int).hash_code() == BIRD_UNIFORM_UINT) << std::endl;
std::cout << (typeid(float).hash_code() == BIRD_UNIFORM_FLOAT) << std::endl;
std::cout << (typeid(glm::vec2).hash_code() == BIRD_UNIFORM_VEC2) << std::endl;
std::cout << (typeid(glm::vec3).hash_code() == BIRD_UNIFORM_VEC3) << std::endl;
std::cout << (typeid(glm::vec4).hash_code() == BIRD_UNIFORM_VEC4) << std::endl;
std::cout << (typeid(glm::mat2).hash_code() == BIRD_UNIFORM_MAT2) << std::endl;
std::cout << (typeid(glm::mat3).hash_code() == BIRD_UNIFORM_MAT3) << std::endl;
std::cout << (typeid(glm::mat4).hash_code() == BIRD_UNIFORM_MAT4) << std::endl;
std::cout << (typeid(glm::mat2x3).hash_code() == BIRD_UNIFORM_MAT2x3) << std::endl;
std::cout << (typeid(glm::mat3x2).hash_code() == BIRD_UNIFORM_MAT3x2) << std::endl;
std::cout << (typeid(glm::mat2x4).hash_code() == BIRD_UNIFORM_MAT2x4) << std::endl;
std::cout << (typeid(glm::mat4x2).hash_code() == BIRD_UNIFORM_MAT4x2) << std::endl;
std::cout << (typeid(glm::mat3x4).hash_code() == BIRD_UNIFORM_MAT3x4) << std::endl;
std::cout << (typeid(glm::mat4x3).hash_code() == BIRD_UNIFORM_MAT4x3) << std::endl;
#endif // ENABLE_MATERIAL_BUILDER
#ifdef ENABLE_APPLICATION
std::cout << "The Application of Birdsong is enabled" << std::endl;
application = new Application();
application->Start();
while (!glfwWindowShouldClose(application->applicationWindow))
application->Update();
application->Terminate();
#endif // ENABLE_APPLICATION
return 0;
}