summaryrefslogtreecommitdiff
path: root/progs/openvg/demos/lion.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/openvg/demos/lion.c')
-rw-r--r--progs/openvg/demos/lion.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/progs/openvg/demos/lion.c b/progs/openvg/demos/lion.c
index 7224fed399..adb269bfd8 100644
--- a/progs/openvg/demos/lion.c
+++ b/progs/openvg/demos/lion.c
@@ -67,6 +67,7 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy,
EGL_RED_SIZE, 1,
EGL_GREEN_SIZE, 1,
EGL_BLUE_SIZE, 1,
+ EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
EGL_NONE
};
@@ -85,13 +86,13 @@ 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);
}
assert(config);
- assert(num_configs > 0);
if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) {
printf("Error: eglGetConfigAttrib() failed\n");