[Mesa-dev] [Mesa-dev, kmscube 01/10] output more and improved information about EGL and OpenGL ES 2.x

Carlos Rafael Giani dv at pseudoterminal.org
Fri Apr 7 21:15:59 UTC 2017


Signed-off-by: Carlos Rafael Giani <dv at pseudoterminal.org>
---
 common.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/common.c b/common.c
index 4bf3c5a..4d29eef 100644
--- a/common.c
+++ b/common.c
@@ -97,9 +97,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");
@@ -128,7 +131,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;
 }
-- 
2.7.4



More information about the mesa-dev mailing list