Browse Source

Synchronized windowless app dependencies of all utilities.

And document them properly.
pull/181/head
Vladimír Vondruš 10 years ago
parent
commit
7dca1cdcbc
  1. 12
      doc/building.dox
  2. 2
      src/Magnum/Audio/magnum-al-info.cpp
  3. 20
      src/Magnum/Text/CMakeLists.txt
  4. 11
      src/Magnum/Text/fontconverter.cpp
  5. 20
      src/Magnum/TextureTools/CMakeLists.txt
  6. 11
      src/Magnum/TextureTools/distancefieldconverter.cpp

12
doc/building.dox

@ -235,19 +235,21 @@ information):
- `WITH_GLXCONTEXT` -- GLX context - `WITH_GLXCONTEXT` -- GLX context
- `WITH_WGLCONTEXT` -- WGL context - `WITH_WGLCONTEXT` -- WGL context
There are also a few command-line utilities. They are currently available only There are also a few command-line utilities, also disabled by default:
on Linux, Mac OS X and Windows, also disabled by default:
- `WITH_MAGNUMINFO` - @ref magnum-info "magnum-info" executable, provides - `WITH_MAGNUMINFO` - @ref magnum-info "magnum-info" executable, provides
information about the engine and OpenGL capabilities. information about the engine and OpenGL capabilities. Depends on some
windowless application library.
- `WITH_AL_INFO` -- @ref magnum-al-info "magnum-al-info" executable, provides - `WITH_AL_INFO` -- @ref magnum-al-info "magnum-al-info" executable, provides
information about OpenAL capabilities. information about OpenAL capabilities.
- `WITH_DISTANCEFIELDCONVERTER` - @ref magnum-distancefieldconverter "magnum-distancefieldconverter" - `WITH_DISTANCEFIELDCONVERTER` - @ref magnum-distancefieldconverter "magnum-distancefieldconverter"
executable for converting black&white images to distance field textures. executable for converting black&white images to distance field textures.
Enables also building of @ref TextureTools library. Enables also building of @ref TextureTools library. Available only on
desktop GL, depends on some windowless application library.
- `WITH_FONTCONVERTER` - @ref magnum-fontconverter "magnum-fontconverter" - `WITH_FONTCONVERTER` - @ref magnum-fontconverter "magnum-fontconverter"
executable for converting fonts to raster ones. Enables also building of executable for converting fonts to raster ones. Enables also building of
@ref Text library. @ref Text library. Available only on desktop GL, depends on some windowless
application library.
Magnum also contains a set of dependency-less plugins for importing essential Magnum also contains a set of dependency-less plugins for importing essential
file formats. Additional plugins are provided in separate plugin repository, file formats. Additional plugins are provided in separate plugin repository,

2
src/Magnum/Audio/magnum-al-info.cpp

@ -50,8 +50,6 @@ Arguments:
| Information about Magnum engine and OpenAL capabilities | | Information about Magnum engine and OpenAL capabilities |
+---------------------------------------------------------+ +---------------------------------------------------------+
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Audio Renderer: OpenAL Soft by OpenAL Community Audio Renderer: OpenAL Soft by OpenAL Community
OpenAL version: 1.1 ALSOFT 1.17.2 OpenAL version: 1.1 ALSOFT 1.17.2
Available devices: Available devices:

20
src/Magnum/Text/CMakeLists.txt

@ -65,12 +65,24 @@ if(WITH_FONTCONVERTER)
target_link_libraries(magnum-fontconverter Magnum MagnumText) target_link_libraries(magnum-fontconverter Magnum MagnumText)
if(MAGNUM_TARGET_HEADLESS) if(MAGNUM_TARGET_HEADLESS)
target_link_libraries(magnum-fontconverter MagnumWindowlessEglApplication) target_link_libraries(magnum-fontconverter MagnumWindowlessEglApplication)
elseif(CORRADE_TARGET_IOS)
target_link_libraries(magnum-fontconverter MagnumWindowlessIosApplication)
elseif(CORRADE_TARGET_APPLE) elseif(CORRADE_TARGET_APPLE)
target_link_libraries(magnum-fontconverter MagnumWindowlessCglApplication) target_link_libraries(magnum-fontconverter MagnumWindowlessCglApplication)
elseif(CORRADE_TARGET_UNIX AND NOT TARGET_GLES) elseif(CORRADE_TARGET_NACL)
target_link_libraries(magnum-fontconverter MagnumWindowlessGlxApplication) target_link_libraries(magnum-fontconverter MagnumWindowlessNaClApplication)
elseif(CORRADE_TARGET_WINDOWS AND NOT TARGET_GLES) elseif(CORRADE_TARGET_UNIX)
target_link_libraries(magnum-fontconverter MagnumWindowlessWglApplication) if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES)
target_link_libraries(magnum-fontconverter MagnumWindowlessEglApplication)
else()
target_link_libraries(magnum-fontconverter MagnumWindowlessGlxApplication)
endif()
elseif(CORRADE_TARGET_WINDOWS)
if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
target_link_libraries(magnum-fontconverter MagnumWindowlessWglApplication)
else()
target_link_libraries(magnum-fontconverter MagnumWindowlessWindowsEglApplication)
endif()
else() else()
message(FATAL_ERROR "magnum-fontconverter is not available on this platform. Set WITH_FONTCONVERTER to OFF to suppress this warning.") message(FATAL_ERROR "magnum-fontconverter is not available on this platform. Set WITH_FONTCONVERTER to OFF to suppress this warning.")
endif() endif()

11
src/Magnum/Text/fontconverter.cpp

@ -34,6 +34,10 @@
#ifdef MAGNUM_TARGET_HEADLESS #ifdef MAGNUM_TARGET_HEADLESS
#include "Magnum/Platform/WindowlessEglApplication.h" #include "Magnum/Platform/WindowlessEglApplication.h"
#elif defined(CORRADE_TARGET_NACL)
#include "Magnum/Platform/WindowlessNaClApplication.h"
#elif defined(CORRADE_TARGET_IOS)
#include "Magnum/Platform/WindowlessIosApplication.h"
#elif defined(CORRADE_TARGET_APPLE) #elif defined(CORRADE_TARGET_APPLE)
#include "Magnum/Platform/WindowlessCglApplication.h" #include "Magnum/Platform/WindowlessCglApplication.h"
#elif defined(CORRADE_TARGET_UNIX) #elif defined(CORRADE_TARGET_UNIX)
@ -43,8 +47,12 @@
#include "Magnum/Platform/WindowlessGlxApplication.h" #include "Magnum/Platform/WindowlessGlxApplication.h"
#endif #endif
#elif defined(CORRADE_TARGET_WINDOWS) #elif defined(CORRADE_TARGET_WINDOWS)
#if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_DESKTOP_GLES)
#include "Magnum/Platform/WindowlessWglApplication.h" #include "Magnum/Platform/WindowlessWglApplication.h"
#else #else
#include "Magnum/Platform/WindowlessWindowsEglApplication.h"
#endif
#else
#error no windowless application available on this platform #error no windowless application available on this platform
#endif #endif
@ -58,7 +66,7 @@ namespace Magnum {
@section magnum-fontconverter-usage Usage @section magnum-fontconverter-usage Usage
magnum-fontconverter [-h|--help] --font FONT --converter CONVERTER [--plugin-dir DIR] [--characters CHARACTERS] [--font-size N] [--atlas-size "X Y"] [--output-size "X Y"] [--radius N] [--] input output magnum-fontconverter [--magnum-...] [-h|--help] --font FONT --converter CONVERTER [--plugin-dir DIR] [--characters CHARACTERS] [--font-size N] [--atlas-size "X Y"] [--output-size "X Y"] [--radius N] [--] input output
Arguments: Arguments:
@ -76,6 +84,7 @@ Arguments:
- `--output-size "X Y"` -- output atlas size. If set to zero size, distance - `--output-size "X Y"` -- output atlas size. If set to zero size, distance
field computation will not be used. (default: `"256 256"`) field computation will not be used. (default: `"256 256"`)
- `--radius N` -- distance field computation radius (default: `24`) - `--radius N` -- distance field computation radius (default: `24`)
- `--magnum-...` -- engine-specific options (see @ref Context for details)
The resulting font files can be then used as specified in the documentation of The resulting font files can be then used as specified in the documentation of
`converter` plugin. `converter` plugin.

20
src/Magnum/TextureTools/CMakeLists.txt

@ -55,12 +55,24 @@ if(WITH_DISTANCEFIELDCONVERTER)
target_link_libraries(magnum-distancefieldconverter Magnum MagnumTextureTools) target_link_libraries(magnum-distancefieldconverter Magnum MagnumTextureTools)
if(MAGNUM_TARGET_HEADLESS) if(MAGNUM_TARGET_HEADLESS)
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessEglApplication) target_link_libraries(magnum-distancefieldconverter MagnumWindowlessEglApplication)
elseif(CORRADE_TARGET_IOS)
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessIosApplication)
elseif(CORRADE_TARGET_APPLE) elseif(CORRADE_TARGET_APPLE)
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessCglApplication) target_link_libraries(magnum-distancefieldconverter MagnumWindowlessCglApplication)
elseif(CORRADE_TARGET_UNIX AND NOT TARGET_GLES) elseif(CORRADE_TARGET_NACL)
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessGlxApplication) target_link_libraries(magnum-distancefieldconverter MagnumWindowlessNaClApplication)
elseif(CORRADE_TARGET_WINDOWS AND NOT TARGET_GLES) elseif(CORRADE_TARGET_UNIX)
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessWglApplication) if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES)
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessEglApplication)
else()
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessGlxApplication)
endif()
elseif(CORRADE_TARGET_WINDOWS)
if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessWglApplication)
else()
target_link_libraries(magnum-distancefieldconverter MagnumWindowlessWindowsEglApplication)
endif()
else() else()
message(FATAL_ERROR "magnum-distancefieldconverter is not available on this platform. Set WITH_DISTANCEFIELDCONVERTER to OFF to suppress this warning.") message(FATAL_ERROR "magnum-distancefieldconverter is not available on this platform. Set WITH_DISTANCEFIELDCONVERTER to OFF to suppress this warning.")
endif() endif()

11
src/Magnum/TextureTools/distancefieldconverter.cpp

@ -40,6 +40,10 @@
#ifdef MAGNUM_TARGET_HEADLESS #ifdef MAGNUM_TARGET_HEADLESS
#include "Magnum/Platform/WindowlessEglApplication.h" #include "Magnum/Platform/WindowlessEglApplication.h"
#elif defined(CORRADE_TARGET_NACL)
#include "Magnum/Platform/WindowlessNaClApplication.h"
#elif defined(CORRADE_TARGET_IOS)
#include "Magnum/Platform/WindowlessIosApplication.h"
#elif defined(CORRADE_TARGET_APPLE) #elif defined(CORRADE_TARGET_APPLE)
#include "Magnum/Platform/WindowlessCglApplication.h" #include "Magnum/Platform/WindowlessCglApplication.h"
#elif defined(CORRADE_TARGET_UNIX) #elif defined(CORRADE_TARGET_UNIX)
@ -49,8 +53,12 @@
#include "Magnum/Platform/WindowlessGlxApplication.h" #include "Magnum/Platform/WindowlessGlxApplication.h"
#endif #endif
#elif defined(CORRADE_TARGET_WINDOWS) #elif defined(CORRADE_TARGET_WINDOWS)
#if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_DESKTOP_GLES)
#include "Magnum/Platform/WindowlessWglApplication.h" #include "Magnum/Platform/WindowlessWglApplication.h"
#else #else
#include "Magnum/Platform/WindowlessWindowsEglApplication.h"
#endif
#else
#error no windowless application available on this platform #error no windowless application available on this platform
#endif #endif
@ -63,7 +71,7 @@ namespace Magnum {
@section magnum-distancefieldconverter-usage Usage @section magnum-distancefieldconverter-usage Usage
magnum-distancefieldconverter [-h|--help] [--importer IMPORTER] [--converter CONVERTER] [--plugin-dir DIR] --output-size "X Y" --radius N [--] input output magnum-distancefieldconverter [--magnum-...] [-h|--help] [--importer IMPORTER] [--converter CONVERTER] [--plugin-dir DIR] --output-size "X Y" --radius N [--] input output
Arguments: Arguments:
@ -76,6 +84,7 @@ Arguments:
Magnum install location) Magnum install location)
- `--output-size "X Y"` -- size of output image - `--output-size "X Y"` -- size of output image
- `--radius N` -- distance field computation radius - `--radius N` -- distance field computation radius
- `--magnum-...` -- engine-specific options (see @ref Context for details)
Images with @ref PixelFormat::Red, @ref PixelFormat::RGB or @ref PixelFormat::RGBA Images with @ref PixelFormat::Red, @ref PixelFormat::RGB or @ref PixelFormat::RGBA
are accepted on input. are accepted on input.

Loading…
Cancel
Save