Skip to content

Commit

Permalink
output more and improved information about EGL and OpenGL ES 2.x
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
  • Loading branch information
dv1 authored and robclark committed Apr 29, 2017
1 parent 88858d3 commit cd0941b
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions common.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,12 @@ int init_egl(struct egl *egl, const struct gbm *gbm)
printf("Using display %p with EGL version %d.%d\n",
egl->display, major, minor);

printf("EGL Version \"%s\"\n", eglQueryString(egl->display, EGL_VERSION));
printf("EGL Vendor \"%s\"\n", eglQueryString(egl->display, EGL_VENDOR));
printf("EGL Extensions \"%s\"\n", eglQueryString(egl->display, EGL_EXTENSIONS));
printf("===================================\n");
printf("EGL information:\n");
printf(" version: \"%s\"\n", eglQueryString(egl->display, EGL_VERSION));
printf(" vendor: \"%s\"\n", eglQueryString(egl->display, EGL_VENDOR));
printf(" extensions: \"%s\"\n", eglQueryString(egl->display, EGL_EXTENSIONS));
printf("===================================\n");

if (!eglBindAPI(EGL_OPENGL_ES_API)) {
printf("failed to bind api EGL_OPENGL_ES_API\n");
Expand Down Expand Up @@ -156,7 +159,13 @@ int init_egl(struct egl *egl, const struct gbm *gbm)
/* connect the context to the surface */
eglMakeCurrent(egl->display, egl->surface, egl->surface, egl->context);

printf("GL Extensions: \"%s\"\n", glGetString(GL_EXTENSIONS));
printf("OpenGL ES 2.x information:\n");
printf(" version: \"%s\"\n", glGetString(GL_VERSION));
printf(" shading language version: \"%s\"\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
printf(" vendor: \"%s\"\n", glGetString(GL_VENDOR));
printf(" renderer: \"%s\"\n", glGetString(GL_RENDERER));
printf(" extensions: \"%s\"\n", glGetString(GL_EXTENSIONS));
printf("===================================\n");

return 0;
}
Expand Down

0 comments on commit cd0941b

Please sign in to comment.