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. 74
      src/Magnum/Platform/magnum-info.cpp

74
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 Used application: Platform::WindowlessGlxApplication
Compilation flags: Compilation flags:
CORRADE_BUILD_DEPRECATED CORRADE_BUILD_DEPRECATED
CORRADE_TARGET_UNIX
MAGNUM_BUILD_DEPRECATED MAGNUM_BUILD_DEPRECATED
Vendor: NVIDIA Corporation Renderer: AMD Radeon R7 M260 Series by ATI Technologies Inc.
Renderer: GeForce GT 740M/PCIe/SSE2 OpenGL version: 4.5.13399 Compatibility Profile Context 15.201.1151
OpenGL version: OpenGL 4.4 (4.4.0 NVIDIA 337.25) Using optional features:
Context flags: GL_ARB_ES2_compatibility
Supported GLSL versions: GL_ARB_direct_state_access
440 core GL_ARB_get_texture_sub_image
GL_ARB_invalidate_subdata
...
Using driver workarounds:
amd-nv-no-forward-compatible-core-context
no-layout-qualifiers-on-old-glsl
Context flags:
Supported GLSL versions:
430 core 430 core
430 compatibility
420 core 420 core
410 core ...
400 core
330 core Vendor extension support:
310 es GL_AMD_vertex_shader_layer SUPPORTED
300 es GL_AMD_shader_trinary_minmax SUPPORTED
100 GL_ARB_robustness -
GL_ARB_robustness_isolation -
Vendor extension support: ...
GL_AMD_vertex_shader_layer - ```
GL_AMD_shader_trinary_minmax -
GL_ARB_robustness SUPPORTED
GL_ATI_texture_mirror_once SUPPORTED
GL_EXT_texture_filter_anisotropic SUPPORTED
GL_EXT_texture_mirror_clamp SUPPORTED
GL_EXT_direct_state_access SUPPORTED
GL_EXT_texture_sRGB_decode SUPPORTED
GL_EXT_shader_integer_mix SUPPORTED
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