summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorCarlos Rafael Giani <dv@pseudoterminal.org>2017-04-26 20:56:13 +0200
committerRob Clark <robdclark@gmail.com>2017-04-29 10:23:41 -0400
commitcd0941bd41c7f9285a7aba2a5ace1977bcb359d8 (patch)
tree7ce96590d661ab55bd8221beec840ca7972ea8e9 /common.c
parent88858d32f2aa86d93397ed68641653cb34d8610b (diff)
downloadkmscube-cd0941bd41c7f9285a7aba2a5ace1977bcb359d8.tar.gz
output more and improved information about EGL and OpenGL ES 2.x
Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Diffstat (limited to 'common.c')
-rw-r--r--common.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/common.c b/common.c
index 64c4f91..610ff87 100644
--- a/common.c
+++ b/common.c
@@ -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");
@@ -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;
}