aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simplegame.cpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-12-22 18:34:29 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-12-22 18:34:29 +0000
commit24253190c92c9d7ef669061670a3b7596f9ee190 (patch)
treef03d785e30a7783b5e0d5e7b669cd2997d5877ed /tests/simplegame.cpp
parentb885965a6375f98d6bec63a43233461f9f42006d (diff)
downloadYAGE-24253190c92c9d7ef669061670a3b7596f9ee190.tar.gz
YAGE-24253190c92c9d7ef669061670a3b7596f9ee190.zip
Changing directories and adding input support
Diffstat (limited to 'tests/simplegame.cpp')
-rw-r--r--tests/simplegame.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/simplegame.cpp b/tests/simplegame.cpp
index d4c7b266..04d63ec0 100644
--- a/tests/simplegame.cpp
+++ b/tests/simplegame.cpp
@@ -22,7 +22,8 @@ int main()
window.create("Simple Game", 800, 640);
SpriteBatch sp;
- program.defaultSetup();
+ program.compileShadersFromFile("resources/textureshader.vert", "resources/textureshader.frag");
+ program.linkShaders();
Texture fountain =
ResourceManager::getTexture("/home/yannherklotz/Github/YAGE/tests/"
@@ -43,13 +44,13 @@ int main()
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(), 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.pollEvents();
window.swapBuffer();
+ window.pollEvents();
}
}