Browse Source

Doc++

pull/481/head
Vladimír Vondruš 6 years ago
parent
commit
c226bc2d63
  1. 6
      doc/building.dox
  2. 2
      doc/cmake.dox
  3. 19
      src/Magnum/MeshTools/sceneconverter.cpp
  4. 8
      src/Magnum/Trade/imageconverter.cpp

6
doc/building.dox

@ -620,7 +620,11 @@ There are also a few command-line utilities, also all disabled by default:
`TARGET_GL` to be enabled; enables building of one of the windowless
application libraries based on the target platform.
- `WITH_IMAGECONVERTER` --- Build the @ref magnum-imageconverter "magnum-imageconverter"
executable for converting images of different formats.
executable for converting images of different formats. Enables also
building of the @ref Trade library.
- `WITH_SCENECONVERTER` --- Build the @ref magnum-shaderconverter "magnum-sceneconverter"
executable for converting scenes of different formats. Enables also
building of the @ref MeshTools library.
Options controlling the build:

2
doc/cmake.dox

@ -267,6 +267,8 @@ Lastly, a few utility executables are available:
executable
- `imageconverter` --- @ref magnum-imageconverter "magnum-imageconverter"
executable
- `sceneconverter` --- @ref magnum-sceneconverter "magnum-imageconverter"
executable
- `gl-info` --- @ref magnum-gl-info "magnum-gl-info" executable
- `al-info` --- @ref magnum-al-info "magnum-al-info" executable

19
src/Magnum/MeshTools/sceneconverter.cpp

@ -86,7 +86,7 @@ magnum-sceneconverter [-h|--help] [-I|--importer IMPORTER]
Arguments:
- `input` --- input file
- `output` --- output file
- `output` --- output file, ignored if `--info` is present
- `-h`, `--help` --- display this help message and exit
- `-I`, `--importer IMPORTER` --- scene importer plugin (default:
@ref Trade::AnySceneImporter "AnySceneImporter")
@ -119,16 +119,16 @@ converter plugin configuration. If the `=` character is omitted, it's
equivalent to saying `key=true`; configuration subgroups are delimited with
`/`.
It's possible to specify the `--converter` option (and correspondingly also
`-c` / `--converter-options`) multiple times in order to chain more converters
together. All converters in the chain have to support the
It's possible to specify the `-C` / `--converter` option (and correspondingly
also `-c` / `--converter-options`) multiple times in order to chain more
converters together. All converters in the chain have to support the
@ref Trade::SceneConverterFeature::ConvertMesh feature,
the last converter either @ref Trade::SceneConverterFeature::ConvertMesh or
@ref Trade::SceneConverterFeature::ConvertMeshToFile. If the last converter
doesn't support conversion to a file,
@ref Trade::AnySceneConverter "AnySceneConverter" is used to save its output;
if no `--converter` is specified, @ref Trade::AnySceneConverter "AnySceneConverter"
is used.
if no `-C` / `--converter` is specified,
@ref Trade::AnySceneConverter "AnySceneConverter" is used.
@section magnum-sceneconverter-example Example usage
@ -199,7 +199,7 @@ UnsignedInt namedAttributeId(const Trade::MeshData& mesh, UnsignedInt id) {
int main(int argc, char** argv) {
Utility::Arguments args;
args.addArgument("input").setHelp("input", "input file")
.addArgument("output").setHelp("output", "output file")
.addArgument("output").setHelp("output", "output file, ignored if --info is present")
.addOption('I', "importer", "AnySceneImporter").setHelp("importer", "scene importer plugin")
.addArrayOption('C', "converter").setHelp("converter", "scene converter plugin(s)")
.addOption("plugin-dir").setHelp("plugin-dir", "override base plugin dir", "DIR")
@ -232,12 +232,13 @@ comma-separated list of key/value pairs to set in the importer / converter
plugin configuration. If the = character is omitted, it's equivalent to saying
key=true; configuration subgroups are delimited with /.
It's possible to specify the --converter option (and correspondingly also
It's possible to specify the -C / --converter option (and correspondingly also
-c / --converter-options) multiple times in order to chain more converters
together. All converters in the chain have to support the ConvertMesh feature,
the last converter either ConvertMesh or ConvertMeshToFile. If the last
converter doesn't support conversion to a file, AnySceneConverter is used to
save its output; if no --converter is specified, AnySceneConverter is used.)")
save its output; if no -C / --converter is specified, AnySceneConverter is
used.)")
.parse(argc, argv);
PluginManager::Manager<Trade::AbstractImporter> importerManager{

8
src/Magnum/Trade/imageconverter.cpp

@ -75,7 +75,7 @@ magnum-imageconverter [-h|--help] [-I|--importer IMPORTER]
Arguments:
- `input` --- input image
- `output` --- output image, ignored if `--in-place` is present
- `output` --- output image, ignored if `--in-place` or `--info` is present
- `-h`, `--help` --- display this help message and exit
- `-I`, `--importer IMPORTER` --- image importer plugin (default:
@ref Trade::AnyImageImporter "AnyImageImporter")
@ -93,7 +93,7 @@ Arguments:
- `-v`, `--verbose` --- verbose output from importer and converter plugins
Specifying `--importer raw:&lt;format&gt;` will treat the input as a raw
tightly-packed square of pixels in given @ref PixelFormat. Specifying
tightly-packed square of pixels in given @ref PixelFormat. Specifying `-C` /
`--converter raw` will save raw imported data instead of using a converter
plugin.
@ -169,8 +169,8 @@ int main(int argc, char** argv) {
.setGlobalHelp(R"(Converts images of different formats.
Specifying --importer raw:<format> will treat the input as a raw tightly-packed
square of pixels in given pixel format. Specifying --converter raw will save
raw imported data instead of using a converter plugin.
square of pixels in given pixel format. Specifying -C / --converter raw will
save raw imported data instead of using a converter plugin.
If --info is given, the utility will print information about all images present
in the file. In this case no conversion is done and output file doesn't need to

Loading…
Cancel
Save