Skip to content
Snippets Groups Projects
Commit fc01a299 authored by BATON Theau's avatar BATON Theau
Browse files

Update README.md

parent 0342a3da
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
## Images ## Images
[Screen_shot_0](assets/images/Screenshot_0.png) <p float="left">
<img src="assets/images/Screenshot_0.png" width="280" />
<img src="assets/images/Screenshot_1.png" width="280" />
</p>
## Building ## Building
......
assets/images/Screenshot_1.png

5.78 KiB

...@@ -46,7 +46,7 @@ int main(int argc, const char * argv[]) { ...@@ -46,7 +46,7 @@ int main(int argc, const char * argv[]) {
std::cout << "Group Inited" << std::endl; std::cout << "Group Inited" << std::endl;
//? Image 1 //? Image 1
std::vector<int> map = { /*std::vector<int> map = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0,
0, 0, 0, 3, 2, 2, 3, 0, 0, 0, 0, 0, 0, 3, 2, 2, 3, 0, 0, 0,
...@@ -57,6 +57,24 @@ int main(int argc, const char * argv[]) { ...@@ -57,6 +57,24 @@ int main(int argc, const char * argv[]) {
0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};*/
std::vector<int> map = {
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0,
0, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0,
0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0,
2, 0, 0, 1, 3, 1, 1, 2, 1, 1, 3, 1, 0, 0, 2,
2, 0, 0, 3, 1, 1, 2, 2, 2, 1, 1, 3, 0, 0, 2,
1, 0, 0, 1, 1, 1, 2, 1, 2, 1, 1, 1, 0, 0, 1,
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 0, 2, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1,
1, 1, 0, 0, 2, 2, 0, 1, 0, 2, 2, 0, 0, 1, 1,
1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
}; };
size_t x = 0; size_t x = 0;
...@@ -64,17 +82,20 @@ int main(int argc, const char * argv[]) { ...@@ -64,17 +82,20 @@ int main(int argc, const char * argv[]) {
std::vector<std::unique_ptr<megu::Image>> images; std::vector<std::unique_ptr<megu::Image>> images;
megu::Texture texture_0;
texture_0.store(megu::TextureBuffer("assets/textures/Cube_White.png"));
megu::Texture texture_1; megu::Texture texture_1;
texture_1.store(megu::TextureBuffer("assets/textures/Cube_GLab_1.png")); texture_1.store(megu::TextureBuffer("assets/textures/Cube_White.png"));
megu::Texture texture_2; megu::Texture texture_2;
texture_2.store(megu::TextureBuffer("assets/textures/Cube_GLab_2.png")); texture_2.store(megu::TextureBuffer("assets/textures/Cube_Red.png"));
megu::Texture texture_3; megu::Texture texture_3;
texture_3.store(megu::TextureBuffer("assets/textures/Cube_GLab_3.png")); texture_3.store(megu::TextureBuffer("assets/textures/Cube_Blue.png"));
for(auto id : map) { for(auto id : map) {
if(x == 10) { if(x == 15) {
x = 0; x = 0;
++y; ++y;
} }
...@@ -93,11 +114,15 @@ int main(int argc, const char * argv[]) { ...@@ -93,11 +114,15 @@ int main(int argc, const char * argv[]) {
case 3: case 3:
images.push_back(std::make_unique<megu::Image>(texture_3)); images.push_back(std::make_unique<megu::Image>(texture_3));
break; break;
default:
images.push_back(std::make_unique<megu::Image>(texture_0));
break;
} }
glm::vec2 pos = to_screen_coordinate({x, y}, 32.f, 32.f, 1.f); glm::vec2 pos = to_screen_coordinate({x, y}, 32.f, 32.f, 0.f);
images.back()->setPosition({pos.x + window.width()/2 - 16.f, pos.y + window.height()/4}); images.back()->setPosition({pos.x + window.width()/2 + 24.f, pos.y + window.height()/8});
} }
++x; ++x;
...@@ -163,8 +188,8 @@ int main(int argc, const char * argv[]) { ...@@ -163,8 +188,8 @@ int main(int argc, const char * argv[]) {
engine.push(0, basic_renderer); engine.push(0, basic_renderer);
engine.push(0, 1, group); engine.push(0, 0, group);
engine.push(0, 0, group_2); //engine.push(0, 0, group_2);
//? Render Loop //? Render Loop
std::cout << "Render Loop Begin !" << std::endl; std::cout << "Render Loop Begin !" << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment