aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simplegame.cpp
diff options
context:
space:
mode:
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();
}
}