diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-12-31 18:17:04 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-12-31 18:17:04 +0000 |
commit | 9038ee45f93b1ae07a28a516781676ebe3a67536 (patch) | |
tree | decf78fe537ff4860b598abc139816a8443aa96a /examples | |
parent | 34908f108ad7c2ee6cff96491a0bc40381477424 (diff) | |
download | YAGE-9038ee45f93b1ae07a28a516781676ebe3a67536.tar.gz YAGE-9038ee45f93b1ae07a28a516781676ebe3a67536.zip |
[Bug] Fixed null pointers in spritebatch.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/simplegame/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/simplegame/main.cpp b/examples/simplegame/main.cpp index 03c85123..bd5a05b9 100644 --- a/examples/simplegame/main.cpp +++ b/examples/simplegame/main.cpp @@ -57,10 +57,11 @@ int main() camera.update(textureProgram); + int amount = 5; time = glfwGetTime(); - for (int i = 0; i < 1920/10; i++) { - for(int j = 0; j < 1080/10; j++) - sp.draw({(float)(10*i), (float)(10*j), 10.f, 10.f}, {0.f, 0.f, 1.f, 1.f}, fountain.id, + for (int i = 0; i < 1920/amount; i++) { + for(int j = 0; j < 1080/amount; j++) + sp.draw({(float)(amount*i), (float)(amount*j), (float)amount, (float)amount}, {0.f, 0.f, 1.f, 1.f}, fountain.id, Colour(255, 255, 255, 255), 0); } |