summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward O'Callaghan <funfunctor@folklore1984.net>2017-02-27 12:57:31 +1100
committerEdward O'Callaghan <funfunctor@folklore1984.net>2017-02-27 12:57:31 +1100
commit8c5c074816fadcf2526a8ca9903185a5f21096d6 (patch)
tree2326a92f9e2cda09ccbcf65d83764abc254a94fa /src
parentfdd96911d1498ef1b899e3736bd5912f4dd901c0 (diff)
src/gl_minimal.c: make it fancy
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Diffstat (limited to 'src')
-rw-r--r--src/gl_minimal.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/gl_minimal.c b/src/gl_minimal.c
index 0f77c02..c4e9efe 100644
--- a/src/gl_minimal.c
+++ b/src/gl_minimal.c
@@ -8,6 +8,7 @@
#include <GL/glext.h>/* display objects */
#include <unistd.h>
+#include <stdio.h>
#include "egl.h"
#include "common.h"
@@ -41,11 +42,19 @@ void run_gl_example(struct display * d)
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depth_rb);
// wipe the drawing surface clear
- glClearColor(1.0, 0.0, 0.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
- glFlush();
-
- sleep(2);
- eglSwapBuffers(d->egl_display, d->egl_surface);
- sleep(2);
+ for (unsigned i = 0; i < 3; i++) {
+ GLfloat r =0.0,g = 0.0,b = 0.0;
+ if (i == 0) r = 1.0;
+ if (i == 1) g = 1.0;
+ if (i == 2) b = 1.0;
+ printf("r,g,b = (%f,%f,%f)\n", r,g,b);
+ glClearColor(r, g, b, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+ glFlush();
+ sleep(3);
+ }
+
+// sleep(2);
+// eglSwapBuffers(d->egl_display, d->egl_surface);
+// sleep(2);
}