summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--balls.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/balls.c b/balls.c
index 567e9d8..7fb3b3c 100644
--- a/balls.c
+++ b/balls.c
@@ -545,7 +545,8 @@ animate(int v) {
collideBalls();
cpuEvent = collideWalls();
- /* Disply current from with GPU. */
+ /* Display current frame with GPU. */
+ genVertices();
display();
/* Copy next frame's positions from CPU to GPU. */
@@ -563,8 +564,6 @@ display(void) {
glClear(GL_COLOR_BUFFER_BIT |GL_DEPTH_BUFFER_BIT);
- genVertices();
-
glBindVertexArray(vertexVAO);
for (i = 0; i < nBalls; i++)
glDrawArrays(GL_TRIANGLE_FAN, i*CIRCLE_POINTS, CIRCLE_POINTS);