summaryrefslogtreecommitdiffstats
path: root/src/wgl
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2015-05-15 15:40:54 -0600
committerBrian Paul <brianp@vmware.com>2015-05-25 09:01:56 -0600
commit1166c025b02ea84238820f50b6e79b6f838e1fc6 (patch)
treecdda8a3fe5fa0929158ced61f22cfd9a3dc88eac /src/wgl
parent0dfa8f7003bbf7296b0b0b55fdadde0d0b41f373 (diff)
downloadmesa-demos-1166c025b02ea84238820f50b6e79b6f838e1fc6.zip
mesa-demos-1166c025b02ea84238820f50b6e79b6f838e1fc6.tar.xz
glxinfo/wglinfo: add brief (-B) output mode
v2: replace "quiet" with "brief" in usage(), per Ilia. Based on a patch by Bryan Quigley <gquigs+bugs@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90438 Acked-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/wgl')
-rw-r--r--src/wgl/wglinfo.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/wgl/wglinfo.c b/src/wgl/wglinfo.c
index b6285ec..42bf3a7 100644
--- a/src/wgl/wglinfo.c
+++ b/src/wgl/wglinfo.c
@@ -80,7 +80,7 @@ WndProc(HWND hWnd,
static void
print_screen_info(HDC _hdc, GLboolean limits, GLboolean singleLine,
- GLboolean coreProfile)
+ GLboolean coreProfile, InfoMode mode)
{
WNDCLASS wc;
HWND win;
@@ -253,7 +253,7 @@ print_screen_info(HDC _hdc, GLboolean limits, GLboolean singleLine,
*/
if (!coreProfile) {
- if (wglExtensions) {
+ if (wglExtensions && mode != Brief) {
printf("WGL extensions:\n");
print_extension_list(wglExtensions, singleLine);
}
@@ -286,8 +286,11 @@ print_screen_info(HDC _hdc, GLboolean limits, GLboolean singleLine,
}
#endif
- printf("%s extensions:\n", oglString);
- print_extension_list(glExtensions, singleLine);
+ if (mode != Brief) {
+ printf("%s extensions:\n", oglString);
+ print_extension_list(glExtensions, singleLine);
+ }
+
if (limits) {
print_limits(glExtensions, oglString, version, &extfuncs);
}
@@ -643,11 +646,13 @@ main(int argc, char *argv[])
printf("%d\n", b);
}
else {
- print_screen_info(hdc, opts.limits, opts.singleLine, GL_FALSE);
+ print_screen_info(hdc, opts.limits, opts.singleLine, GL_FALSE, opts.mode);
printf("\n");
- print_screen_info(hdc, opts.limits, opts.singleLine, GL_TRUE);
+ print_screen_info(hdc, opts.limits, opts.singleLine, GL_TRUE, opts.mode);
printf("\n");
- print_visual_info(hdc, opts.mode);
+ if (opts.mode != Brief) {
+ print_visual_info(hdc, opts.mode);
+ }
}
return 0;