Browse Source

Platform: added `--short` option to magnum-info.

Also updated the documentation.
pull/132/head
Vladimír Vondruš 11 years ago
parent
commit
5a7460f570
  1. 92
      src/Magnum/Platform/magnum-info.cpp

92
src/Magnum/Platform/magnum-info.cpp

@ -79,53 +79,53 @@ namespace Magnum {
@section magnum-info-usage Usage @section magnum-info-usage Usage
magnum-info [-h|--help] [--all-extensions] [--limits] magnum-info [--magnum-...] [-h|--help] [-s|--short] [--all-extensions] [--limits]
Arguments: Arguments:
- `-h`, `--help` -- display this help message and exit
- ` -h`, `--help` -- display this help message and exit - `-s`, `--short` -- display just essential info and exit
- `--all-extensions` -- show extensions also for fully supported versions - `--all-extensions` -- display extensions also for fully supported versions
- `--limits` -- display also limits and implementation-defined values - `--limits` -- display also limits and implementation-defined values
- `--magnum-...` -- engine-specific options (see @ref Context for details)
@section magnum-info-example Example output @section magnum-info-example Example output
+---------------------------------------------------------+ ```
| Information about Magnum engine and OpenGL capabilities | +---------------------------------------------------------+
+---------------------------------------------------------+ | Information about Magnum engine and OpenGL capabilities |
+---------------------------------------------------------+
Used application: Platform::WindowlessGlxApplication
Compilation flags: Used application: Platform::WindowlessGlxApplication
CORRADE_BUILD_DEPRECATED Compilation flags:
MAGNUM_BUILD_DEPRECATED CORRADE_BUILD_DEPRECATED
CORRADE_TARGET_UNIX
Vendor: NVIDIA Corporation MAGNUM_BUILD_DEPRECATED
Renderer: GeForce GT 740M/PCIe/SSE2
OpenGL version: OpenGL 4.4 (4.4.0 NVIDIA 337.25) Renderer: AMD Radeon R7 M260 Series by ATI Technologies Inc.
Context flags: OpenGL version: 4.5.13399 Compatibility Profile Context 15.201.1151
Supported GLSL versions: Using optional features:
440 core GL_ARB_ES2_compatibility
430 core GL_ARB_direct_state_access
420 core GL_ARB_get_texture_sub_image
410 core GL_ARB_invalidate_subdata
400 core ...
330 core Using driver workarounds:
310 es amd-nv-no-forward-compatible-core-context
300 es no-layout-qualifiers-on-old-glsl
100 Context flags:
Supported GLSL versions:
Vendor extension support: 430 core
GL_AMD_vertex_shader_layer - 430 compatibility
GL_AMD_shader_trinary_minmax - 420 core
GL_ARB_robustness SUPPORTED ...
GL_ATI_texture_mirror_once SUPPORTED
GL_EXT_texture_filter_anisotropic SUPPORTED Vendor extension support:
GL_EXT_texture_mirror_clamp SUPPORTED GL_AMD_vertex_shader_layer SUPPORTED
GL_EXT_direct_state_access SUPPORTED GL_AMD_shader_trinary_minmax SUPPORTED
GL_EXT_texture_sRGB_decode SUPPORTED GL_ARB_robustness -
GL_EXT_shader_integer_mix SUPPORTED GL_ARB_robustness_isolation -
GL_EXT_debug_label - ...
GL_EXT_debug_marker - ```
GL_GREMEDY_string_marker -
*/ */
@ -138,11 +138,13 @@ class MagnumInfo: public Platform::WindowlessApplication {
MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplication(arguments, nullptr) { MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplication(arguments, nullptr) {
Utility::Arguments args; Utility::Arguments args;
args.addBooleanOption("all-extensions") args.addBooleanOption('s', "short")
.setHelp("all-extensions", "show extensions also for fully supported versions") .setHelp("short", "display just essential info and exit")
.addBooleanOption("all-extensions")
.setHelp("all-extensions", "display extensions also for fully supported versions")
.addBooleanOption("limits") .addBooleanOption("limits")
.addSkippedPrefix("magnum", "engine-specific options")
.setHelp("limits", "display also limits and implementation-defined values") .setHelp("limits", "display also limits and implementation-defined values")
.addSkippedPrefix("magnum", "engine-specific options")
.setHelp("Displays information about Magnum engine and OpenGL capabilities."); .setHelp("Displays information about Magnum engine and OpenGL capabilities.");
/** /**
@ -249,6 +251,8 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
for(const auto& version: shadingLanguageVersions) for(const auto& version: shadingLanguageVersions)
Debug() << " " << version; Debug() << " " << version;
if(args.isSet("short")) return;
Debug() << ""; Debug() << "";
/* Get first future (not supported) version */ /* Get first future (not supported) version */

Loading…
Cancel
Save