From fc7384827761eaadc97f3c001fa33de47f5aea2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 29 Oct 2013 19:28:00 +0100 Subject: [PATCH] Improved building and CMake usage documentation. --- src/Plugins/MagnumFont/MagnumFont.h | 10 +++++++++- .../MagnumFontConverter/MagnumFontConverter.h | 14 ++++++++++++-- src/Plugins/TgaImageConverter/TgaImageConverter.h | 9 ++++++++- src/Plugins/TgaImporter/TgaImporter.h | 9 ++++++++- src/Plugins/WavAudioImporter/WavImporter.h | 9 ++++++++- 5 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/Plugins/MagnumFont/MagnumFont.h b/src/Plugins/MagnumFont/MagnumFont.h index 87126e6f2..18690b750 100644 --- a/src/Plugins/MagnumFont/MagnumFont.h +++ b/src/Plugins/MagnumFont/MagnumFont.h @@ -34,7 +34,15 @@ namespace Magnum { namespace Text { /** -@brief Simple bitmap font +@brief Simple bitmap font plugin + +This plugin depends on @ref Trade::TgaImporter "TgaImporter" plugin and is +built if `WITH_MAGNUMFONT` is enabled in CMake. To use dynamic plugin, you need +to load `%MagnumFont` plugin from `fonts/` subdirectory of your plugin dir. To +use static plugin or use this as a dependency of another plugin, you need to +request `%MagnumFont` component in CMake and link to +`${MAGNUMPLUGINS_MAGNUMFONT_LIBRARIES}`. See @ref building-plugins and +@ref cmake-plugins for more information. The font consists of two files, one text file containing character and glyph info and one TGA file containing the glyphs in distance field format. The font diff --git a/src/Plugins/MagnumFontConverter/MagnumFontConverter.h b/src/Plugins/MagnumFontConverter/MagnumFontConverter.h index c6ad3fbca..8c363f84b 100644 --- a/src/Plugins/MagnumFontConverter/MagnumFontConverter.h +++ b/src/Plugins/MagnumFontConverter/MagnumFontConverter.h @@ -33,10 +33,20 @@ namespace Magnum { namespace Text { /** -@brief Converter to MagnumFont +@brief MagnumFont converter plugin Expects filename prefix, creates two files, `prefix.conf` and `prefix.tga`. See -MagnumFont for more information about the font. +@ref MagnumFont for more information about the font. + +This plugin is available only on desktop OpenGL, as it uses @ref Texture::image() +to read back the generated data. It depends on +@ref Trade::TgaImageConverter "TgaImageConverter" plugin and is built if +`WITH_MAGNUMFONTCONVERTER` is enabled in CMake. To use dynamic plugin, you need +to load `%MagnumFontConverter` plugin from `fontconverters/` subdirectory of +your plugin dir. To use static plugin or use this as a dependency of another +plugin, you need to request `%MagnumFontConverter` component in CMake and link +to `${MAGNUMPLUGINS_MAGNUMFONTCONVERTER_LIBRARIES}`. See @ref building-plugins +and @ref cmake-plugins for more information. */ class MagnumFontConverter: public Text::AbstractFontConverter { public: diff --git a/src/Plugins/TgaImageConverter/TgaImageConverter.h b/src/Plugins/TgaImageConverter/TgaImageConverter.h index 60fd6b8b0..face4c643 100644 --- a/src/Plugins/TgaImageConverter/TgaImageConverter.h +++ b/src/Plugins/TgaImageConverter/TgaImageConverter.h @@ -42,10 +42,17 @@ namespace Magnum { namespace Trade { /** -@brief TGA image converter +@brief TGA image converter plugin Supports images with format @ref ColorFormat::BGR, @ref ColorFormat::BGRA or @ref ColorFormat::Red and type @ref ColorType::UnsignedByte. + +This plugin is built if `WITH_TGAIMAGECONVERTER` is enabled in CMake. To use +dynamic plugin, you need to load `%TgaImageConverter` plugin from +`imageconverters/` subdirectory of your plugin dir. To use static plugin or use +this as a dependency of another plugin, you need to request `%TgaImageConverter` +component in CMake and link to `${MAGNUMPLUGINS_TGAIMAGECONVERTER_LIBRARIES}`. +See @ref building-plugins and @ref cmake-plugins for more information. */ class MAGNUM_TRADE_TGAIMAGECONVERTER_EXPORT TgaImageConverter: public AbstractImageConverter { public: diff --git a/src/Plugins/TgaImporter/TgaImporter.h b/src/Plugins/TgaImporter/TgaImporter.h index 63e83654e..95deeeebb 100644 --- a/src/Plugins/TgaImporter/TgaImporter.h +++ b/src/Plugins/TgaImporter/TgaImporter.h @@ -43,10 +43,17 @@ namespace Magnum { namespace Trade { /** -@brief TGA image importer +@brief TGA importer plugin Supports uncompressed BGR, BGRA or grayscale images with 8 bits per channel. +This plugin is built if `WITH_TGAIMPORTER` is enabled in CMake. To use dynamic +plugin, you need to load `%TgaImporter` plugin from `importers/` subdirectory +of your plugin dir. To use static plugin or use this as a dependency of another +plugin, you need to request `%TgaImporter` component in CMake and link to +`${MAGNUMPLUGINS_TGAIMPORTER_LIBRARIES}`. See @ref building-plugins and +@ref cmake-plugins for more information. + The images are imported with @ref ColorType::UnsignedByte and @ref ColorFormat::BGR, @ref ColorFormat::BGRA or @ref ColorFormat::Red, respectively. Grayscale images require extension @extension{ARB,texture_rg}. diff --git a/src/Plugins/WavAudioImporter/WavImporter.h b/src/Plugins/WavAudioImporter/WavImporter.h index 770461bbb..fe7f8010e 100644 --- a/src/Plugins/WavAudioImporter/WavImporter.h +++ b/src/Plugins/WavAudioImporter/WavImporter.h @@ -35,11 +35,18 @@ namespace Magnum { namespace Audio { /** -@brief WAV importer +@brief WAV importer plugin Supports mono and stereo PCM files with 8 or 16 bits per channel. The files are imported with @ref Buffer::Format::Mono8, @ref Buffer::Format::Mono16, @ref Buffer::Format::Stereo8 or @ref Buffer::Format::Stereo16, respectively. + +This plugin is built if `WITH_WAVAUDIOIMPORTER` is enabled in CMake. To use +dynamic plugin, you need to load `%WavAudioImporter` plugin from `audioimporters/` +subdirectory of your plugin dir. To use static plugin or or use this as a +dependency of another plugin, you need to request `%WavAudioImporter` component +in CMake and link to `${MAGNUMPLUGINS_WAVAUDIOIMPORTER_LIBRARIES}`. See +@ref building-plugins and @ref cmake-plugins for more information. */ class WavImporter: public AbstractImporter { public: