aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-12-31 18:17:04 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-12-31 18:17:04 +0000
commit9038ee45f93b1ae07a28a516781676ebe3a67536 (patch)
treedecf78fe537ff4860b598abc139816a8443aa96a /examples
parent34908f108ad7c2ee6cff96491a0bc40381477424 (diff)
downloadYAGE-9038ee45f93b1ae07a28a516781676ebe3a67536.tar.gz
YAGE-9038ee45f93b1ae07a28a516781676ebe3a67536.zip
[Bug] Fixed null pointers in spritebatch.
Diffstat (limited to 'examples')
-rw-r--r--examples/simplegame/main.cpp7
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);
}