aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-12-22 19:57:23 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-12-22 19:57:23 +0000
commitd6b25272499352383214c738faa8ce1870df37f3 (patch)
treeb5934eb304e80716a090b6bc2844598569211e64 /tests
parent24253190c92c9d7ef669061670a3b7596f9ee190 (diff)
downloadYAGE-d6b25272499352383214c738faa8ce1870df37f3.tar.gz
YAGE-d6b25272499352383214c738faa8ce1870df37f3.zip
Changing gitmodules
Diffstat (limited to 'tests')
-rw-r--r--tests/simplegame.cpp56
-rw-r--r--tests/spritesheet/floor_atlas.json (renamed from tests/resources/floor_atlas.json)0
-rw-r--r--tests/spritesheet/floor_atlas.png (renamed from tests/resources/floor_atlas.png)bin234876 -> 234876 bytes
-rw-r--r--tests/spritesheet/test.cpp (renamed from tests/spritesheettest.cpp)0
4 files changed, 0 insertions, 56 deletions
diff --git a/tests/simplegame.cpp b/tests/simplegame.cpp
deleted file mode 100644
index 04d63ec0..00000000
--- a/tests/simplegame.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/** ---------------------------------------------------------------------------
- * @file: simplegame.cpp
- *
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
- * MIT License, see LICENSE file for more details.
- * ----------------------------------------------------------------------------
- */
-
-#include <yage.cpp>
-
-#include <iostream>
-
-using std::cout;
-
-using namespace yage;
-
-int main()
-{
- Window window;
- GlslProgram program;
-
- window.create("Simple Game", 800, 640);
- SpriteBatch sp;
-
- program.compileShadersFromFile("resources/textureshader.vert", "resources/textureshader.frag");
- program.linkShaders();
-
- Texture fountain =
- ResourceManager::getTexture("/home/yannherklotz/Github/YAGE/tests/"
- "resources/dngn_blood_fountain.png");
-
- cout << "texture: " << fountain.width << ", " << fountain.height << '\n';
-
- Camera2D camera(800, 640);
-
- while (!window.shouldClose()) {
- window.clearBuffer();
-
- program.use();
- camera.update(program);
-
- glActiveTexture(GL_TEXTURE0);
-
- GLint texture_location = program.getUniformLocation("texture_sampler");
- glUniform1i(texture_location, 0);
-
- sp.draw({0.f, 0.f, 64.f, 64.f}, {0, 0, 1, 1}, fountain.id, Colour(255, 0, 255, 255), 0);
- sp.render();
-
- glBindTexture(GL_TEXTURE_2D, 0);
- program.unuse();
-
- window.swapBuffer();
- window.pollEvents();
- }
-}
diff --git a/tests/resources/floor_atlas.json b/tests/spritesheet/floor_atlas.json
index ff9f0aa1..ff9f0aa1 100644
--- a/tests/resources/floor_atlas.json
+++ b/tests/spritesheet/floor_atlas.json
diff --git a/tests/resources/floor_atlas.png b/tests/spritesheet/floor_atlas.png
index 61a5e90a..61a5e90a 100644
--- a/tests/resources/floor_atlas.png
+++ b/tests/spritesheet/floor_atlas.png
Binary files differ
diff --git a/tests/spritesheettest.cpp b/tests/spritesheet/test.cpp
index fcfc842c..fcfc842c 100644
--- a/tests/spritesheettest.cpp
+++ b/tests/spritesheet/test.cpp