]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/blob - kmscube/cube-null.cpp
Encoder: add DPMST type
[android/external-libkmsxx.git] / kmscube / cube-null.cpp
1 #include <poll.h>
3 #include "cube-egl.h"
4 #include "cube-gles2.h"
5 #include "cube.h"
7 #include <kms++util.h>
9 using namespace std;
11 void main_null()
12 {
13         EglState egl(EGL_DEFAULT_DISPLAY);
14         EglSurface surface(egl, 0);
15         GlScene scene;
17         scene.set_viewport(600, 600);
19         int framenum = 0;
21         struct pollfd fds[1] = { };
22         fds[0].fd = 0;
23         fds[0].events =  POLLIN;
25         while (true) {
26                 int r = poll(fds, ARRAY_SIZE(fds), 0);
27                 ASSERT(r >= 0);
29                 if (fds[0].revents)
30                         break;
32                 surface.make_current();
33                 scene.draw(framenum++);
34                 surface.swap_buffers();
35         }
36 }