summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-10-26 19:41:57 -0400
committerSam Anthony <sam@samanthony.xyz>2024-10-26 19:41:57 -0400
commiteef1190e6a8e296e5ac4f19e44078006c82f97b8 (patch)
tree21c0cdc2195f426e904686763431c5e61f6b3c85
parent4ae3036906fc159b11b335ecc472e897b20c8d07 (diff)
downloadballs-eef1190e6a8e296e5ac4f19e44078006c82f97b8.zip
display()
-rw-r--r--balls.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/balls.c b/balls.c
index a097c82..c4f4e2a 100644
--- a/balls.c
+++ b/balls.c
@@ -316,8 +316,17 @@ compileShader(GLint shader) {
void
display(void) {
- /* TODO */
- sysfatal("display() not implemented.\n");
+ int i;
+
+ glClear(GL_COLOR_BUFFER_BIT |GL_DEPTH_BUFFER_BIT);
+
+ for (i = nelem(vao)-1; i >= 0; i--) {
+ glBindVertexArray(vao[i]);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ }
+
+ glBindVertexArray(0);
+ glutSwapBuffers();
}
void