[Mesa-dev] [PATCH v3 01/12] output more and improved information about EGL and OpenGL ES 2.x

Carlos Rafael Giani dv at pseudoterminal.org
Wed Apr 26 18:56:13 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 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;
 }
-- 
2.7.4



More information about the mesa-dev mailing list