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

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

@ -79,16 +79,18 @@ 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
- `--all-extensions` -- show extensions also for fully supported versions - `-s`, `--short` -- display just essential info and exit
- `--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 |
+---------------------------------------------------------+ +---------------------------------------------------------+
@ -96,36 +98,34 @@ Arguments:
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:
GL_ARB_ES2_compatibility
GL_ARB_direct_state_access
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: Context flags:
Supported GLSL versions: Supported GLSL versions:
440 core
430 core 430 core
430 compatibility
420 core 420 core
410 core ...
400 core
330 core
310 es
300 es
100
Vendor extension support: Vendor extension support:
GL_AMD_vertex_shader_layer - GL_AMD_vertex_shader_layer SUPPORTED
GL_AMD_shader_trinary_minmax - GL_AMD_shader_trinary_minmax SUPPORTED
GL_ARB_robustness SUPPORTED GL_ARB_robustness -
GL_ATI_texture_mirror_once SUPPORTED GL_ARB_robustness_isolation -
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