summaryrefslogtreecommitdiffstats
path: root/progs/egl/demo1.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-05-04 03:32:39 +0000
committerBrian Paul <[email protected]>2005-05-04 03:32:39 +0000
commit3aeae2068510a369ba5c90ae1355d0b0ed89d5f5 (patch)
tree0eb03362fe5bae9b4e7561a426fa4533b199d6ec /progs/egl/demo1.c
parent884b5ade869de84a80ae6625458f8cc7afba9081 (diff)
updates for latest EGLScreenMESA changes
Diffstat (limited to 'progs/egl/demo1.c')
-rw-r--r--progs/egl/demo1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/progs/egl/demo1.c b/progs/egl/demo1.c
index 9b9a2ed4aba..f656b547439 100644
--- a/progs/egl/demo1.c
+++ b/progs/egl/demo1.c
@@ -8,6 +8,25 @@
#include <stdlib.h>
+/**
+ * Test EGL_MESA_screen_surface functions
+ */
+static void
+TestScreens(EGLDisplay dpy)
+{
+#define MAX 8
+ EGLScreenMESA screens[MAX];
+ EGLint numScreens;
+ EGLint i;
+
+ eglGetScreensMESA(dpy, screens, MAX, &numScreens);
+ printf("Found %d screens\n", numScreens);
+ for (i = 0; i < numScreens; i++) {
+ printf(" Screen %d handle: %d\n", i, (int) screens[i]);
+ }
+}
+
+
int
main(int argc, char *argv[])
@@ -68,6 +87,8 @@ main(int argc, char *argv[])
b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ TestScreens(d);
+
eglDestroySurface(d, pbuffer);
eglDestroyContext(d, ctx);
eglTerminate(d);