From 24253190c92c9d7ef669061670a3b7596f9ee190 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 22 Dec 2017 18:34:29 +0000 Subject: Changing directories and adding input support --- tests/simplegame.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/simplegame.cpp') 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(); } } -- cgit