summaryrefslogtreecommitdiff
path: root/progs/egl/xegl_tri.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/egl/xegl_tri.c')
-rw-r--r--progs/egl/xegl_tri.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/progs/egl/xegl_tri.c b/progs/egl/xegl_tri.c
index 65f352ddfa..1f1a005a21 100644
--- a/progs/egl/xegl_tri.c
+++ b/progs/egl/xegl_tri.c
@@ -120,6 +120,7 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy,
EGL_GREEN_SIZE, 1,
EGL_BLUE_SIZE, 1,
EGL_DEPTH_SIZE, 1,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
EGL_NONE
};
@@ -138,7 +139,8 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy,
scrnum = DefaultScreen( x_dpy );
root = RootWindow( x_dpy, scrnum );
- if (!eglChooseConfig( egl_dpy, attribs, &config, 1, &num_configs)) {
+ if (!eglChooseConfig( egl_dpy, attribs, &config, 1, &num_configs) ||
+ !num_configs) {
printf("Error: couldn't get an EGL visual config\n");
exit(1);
}