diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-10-26 19:41:57 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-10-26 19:41:57 -0400 |
| commit | eef1190e6a8e296e5ac4f19e44078006c82f97b8 (patch) | |
| tree | 21c0cdc2195f426e904686763431c5e61f6b3c85 | |
| parent | 4ae3036906fc159b11b335ecc472e897b20c8d07 (diff) | |
| download | balls-eef1190e6a8e296e5ac4f19e44078006c82f97b8.zip | |
display()
| -rw-r--r-- | balls.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 |