From d5b0b38da799210662be608ac5cb007864a50649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 8 Apr 2014 22:15:28 +0200 Subject: [PATCH 1/4] Doc++ Remove redundant docs about desktop-GL-only functionality, proper crossreferenes for overloaded functions. --- src/Magnum/CubeMapTextureArray.h | 33 +++++++++++++++++++++---- src/Magnum/RectangleTexture.h | 41 ++++++++++++++++++++++---------- src/Magnum/Texture.h | 6 ++++- src/Magnum/TextureArray.h | 2 +- 4 files changed, 62 insertions(+), 20 deletions(-) diff --git a/src/Magnum/CubeMapTextureArray.h b/src/Magnum/CubeMapTextureArray.h index 4cc079709..0461818e5 100644 --- a/src/Magnum/CubeMapTextureArray.h +++ b/src/Magnum/CubeMapTextureArray.h @@ -89,13 +89,36 @@ class CubeMapTextureArray: public AbstractTexture { */ explicit CubeMapTextureArray(): AbstractTexture(GL_TEXTURE_CUBE_MAP_ARRAY) {} - /** @copydoc Texture::setBaseLevel() */ + /** + * @brief Set base mip level + * @return Reference to self (for method chaining) + * + * Taken into account when generating mipmap using @ref generateMipmap() + * and when considering texture completeness when using mipmap + * filtering. Initial value is `0`. + * @see @ref setMaxLevel(), @ref setMinificationFilter(), + * @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and @fn_gl{TexParameter} + * or @fn_gl_extension{TextureParameter,EXT,direct_state_access} + * with @def_gl{TEXTURE_BASE_LEVEL} + */ CubeMapTextureArray& setBaseLevel(Int level) { AbstractTexture::setBaseLevel(level); return *this; } - /** @copydoc Texture::setMaxLevel() */ + /** + * @brief Set max mip level + * @return Reference to self (for method chaining) + * + * Taken into account when generating mipmap using @ref generateMipmap() + * and when considering texture completeness when using mipmap + * filtering. Initial value is `1000`, which is clamped to count of + * levels specified when using @ref setStorage(). + * @see @ref setBaseLevel(), @ref setMinificationFilter(), + * @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and @fn_gl{TexParameter} + * or @fn_gl_extension{TextureParameter,EXT,direct_state_access} + * with @def_gl{TEXTURE_MAX_LEVEL} + */ CubeMapTextureArray& setMaxLevel(Int level) { AbstractTexture::setMaxLevel(level); return *this; @@ -119,19 +142,19 @@ class CubeMapTextureArray: public AbstractTexture { return *this; } - /** @copydoc Texture::setBorderColor() */ + /** @copydoc RectangleTexture::setBorderColor(const Color4&) */ CubeMapTextureArray& setBorderColor(const Color4& color) { AbstractTexture::setBorderColor(color); return *this; } - /** @copydoc Texture::setBorderColor(const Vector4ui&) */ + /** @copydoc RectangleTexture::setBorderColor(const Vector4ui&) */ CubeMapTextureArray& setBorderColor(const Vector4ui& color) { AbstractTexture::setBorderColor(color); return *this; } - /** @copydoc Texture::setBorderColor(const Vector4i&) */ + /** @copydoc RectangleTexture::setBorderColor(const Vector4i&) */ CubeMapTextureArray& setBorderColor(const Vector4i& color) { AbstractTexture::setBorderColor(color); return *this; diff --git a/src/Magnum/RectangleTexture.h b/src/Magnum/RectangleTexture.h index 91a3fca21..1e4b5ba35 100644 --- a/src/Magnum/RectangleTexture.h +++ b/src/Magnum/RectangleTexture.h @@ -137,25 +137,48 @@ class RectangleTexture: public AbstractTexture { return *this; } - /** @copydoc Texture::setBorderColor() */ + /** + * @brief Set border color + * @return Reference to self (for method chaining) + * + * Border color when wrapping is set to @ref Sampler::Wrapping::ClampToBorder. + * If @extension{EXT,direct_state_access} is not available, the texture + * is bound to some texture unit before the operation. Initial value is + * `{0.0f, 0.0f, 0.0f, 0.0f}`. + * @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and @fn_gl{TexParameter} + * or @fn_gl_extension{TextureParameter,EXT,direct_state_access} + * with @def_gl{TEXTURE_BORDER_COLOR} + */ RectangleTexture& setBorderColor(const Color4& color) { AbstractTexture::setBorderColor(color); return *this; } - #ifndef MAGNUM_TARGET_GLES - /** @copydoc Texture::setBorderColor(const Vector4ui&) */ + /** + * @brief Set border color for integer texture + * @return Reference to self (for method chaining) + * + * Border color for integer textures when wrapping is set to + * @ref Sampler::Wrapping::ClampToBorder. If @extension{EXT,direct_state_access} + * is not available, the texture is bound to some texture unit before + * the operation. Initial value is `{0, 0, 0, 0}`. + * @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and @fn_gl{TexParameter} + * or @fn_gl_extension{TextureParameter,EXT,direct_state_access} + * with @def_gl{TEXTURE_BORDER_COLOR} + * @requires_gl30 %Extension @extension{EXT,texture_integer} + */ RectangleTexture& setBorderColor(const Vector4ui& color) { AbstractTexture::setBorderColor(color); return *this; } - /** @copydoc Texture::setBorderColor(const Vector4i&) */ + /** @overload + * @requires_gl30 %Extension @extension{EXT,texture_integer} + */ RectangleTexture& setBorderColor(const Vector4i& color) { AbstractTexture::setBorderColor(color); return *this; } - #endif /** @copydoc Texture::setMaxAnisotropy() */ RectangleTexture& setMaxAnisotropy(Float anisotropy) { @@ -190,7 +213,6 @@ class RectangleTexture: public AbstractTexture { return *this; } - #ifndef MAGNUM_TARGET_GLES /** * @brief Read texture to image * @param image %Image where to put the data @@ -206,7 +228,6 @@ class RectangleTexture: public AbstractTexture { * and @extension{ARB,robustness} are available, the DSA version is * used, because it is better for performance and there isn't any * function combining both features. - * @requires_gl %Texture image queries are not available in OpenGL ES. * @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and * @fn_gl{GetTexLevelParameter} or @fn_gl_extension{GetTextureLevelParameter,EXT,direct_state_access} * with @def_gl{TEXTURE_WIDTH} and @def_gl{TEXTURE_HEIGHT}, then @@ -223,12 +244,10 @@ class RectangleTexture: public AbstractTexture { * @param usage %Buffer usage * * See @ref image(Image2D&) for more information. - * @requires_gl %Texture image queries are not available in OpenGL ES. */ void image(BufferImage2D& image, BufferUsage usage) { AbstractTexture::image<2>(_target, 0, image, usage); } - #endif /** * @brief Set image data @@ -250,7 +269,6 @@ class RectangleTexture: public AbstractTexture { return *this; } - #ifndef MAGNUM_TARGET_GLES2 /** @overload */ RectangleTexture& setImage(TextureFormat internalFormat, BufferImage2D& image) { DataHelper<2>::setImage(*this, _target, 0, internalFormat, image); @@ -261,7 +279,6 @@ class RectangleTexture: public AbstractTexture { RectangleTexture& setImage(TextureFormat internalFormat, BufferImage2D&& image) { return setImage(internalFormat, image); } - #endif /** * @brief Set image subdata @@ -281,7 +298,6 @@ class RectangleTexture: public AbstractTexture { return *this; } - #ifndef MAGNUM_TARGET_GLES2 /** @overload */ RectangleTexture& setSubImage(const Vector2i& offset, BufferImage2D& image) { DataHelper<2>::setSubImage(*this, _target, 0, offset, image); @@ -292,7 +308,6 @@ class RectangleTexture: public AbstractTexture { RectangleTexture& setSubImage(const Vector2i& offset, BufferImage2D&& image) { return setSubImage(offset, image); } - #endif /** * @brief Invalidate texture image diff --git a/src/Magnum/Texture.h b/src/Magnum/Texture.h index 4b6694fdf..5c387d941 100644 --- a/src/Magnum/Texture.h +++ b/src/Magnum/Texture.h @@ -327,7 +327,11 @@ template class Texture: public AbstractTexture { return *this; } - /** @overload */ + /** @overload + * @requires_gl30 %Extension @extension{EXT,texture_integer} + * @requires_gl Border is available only for float textures in OpenGL + * ES. + */ Texture& setBorderColor(const Vector4i& color) { AbstractTexture::setBorderColor(color); return *this; diff --git a/src/Magnum/TextureArray.h b/src/Magnum/TextureArray.h index bdf197a88..4327ff006 100644 --- a/src/Magnum/TextureArray.h +++ b/src/Magnum/TextureArray.h @@ -137,7 +137,7 @@ template class TextureArray: public AbstractTexture { return *this; } - /** @copydoc Texture::setBorderColor() */ + /** @copydoc Texture::setBorderColor(const Color4&) */ TextureArray& setBorderColor(const Color4& color) { AbstractTexture::setBorderColor(color); return *this; From 52ab6a113b1f4a50bebd204ba738b024cc2612be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 9 Apr 2014 14:58:44 +0200 Subject: [PATCH 2/4] Prefix plugin test libraries also with Magnum*. They need to be installed into possibly system-wide location on Windows and thus we need to avoid name clashes (or at least explicitly show that e.g. TgaImporterTestLib.dll belongs to Magnum and is not any OMG virus). --- src/MagnumPlugins/MagnumFont/CMakeLists.txt | 6 +++--- src/MagnumPlugins/MagnumFont/Test/CMakeLists.txt | 2 +- src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt | 8 ++++---- src/MagnumPlugins/MagnumFontConverter/Test/CMakeLists.txt | 4 ++-- src/MagnumPlugins/ObjImporter/CMakeLists.txt | 6 +++--- src/MagnumPlugins/ObjImporter/Test/CMakeLists.txt | 2 +- src/MagnumPlugins/TgaImageConverter/CMakeLists.txt | 6 +++--- src/MagnumPlugins/TgaImageConverter/Test/CMakeLists.txt | 2 +- src/MagnumPlugins/TgaImporter/CMakeLists.txt | 6 +++--- src/MagnumPlugins/TgaImporter/Test/CMakeLists.txt | 2 +- src/MagnumPlugins/WavAudioImporter/CMakeLists.txt | 6 +++--- src/MagnumPlugins/WavAudioImporter/Test/CMakeLists.txt | 2 +- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/MagnumPlugins/MagnumFont/CMakeLists.txt b/src/MagnumPlugins/MagnumFont/CMakeLists.txt index 54026939f..af1cc14bd 100644 --- a/src/MagnumPlugins/MagnumFont/CMakeLists.txt +++ b/src/MagnumPlugins/MagnumFont/CMakeLists.txt @@ -45,13 +45,13 @@ endif() install(FILES ${MagnumFont_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFont) if(BUILD_GL_TESTS) - add_library(MagnumFontTestLib STATIC $) - target_link_libraries(MagnumFontTestLib Magnum MagnumText TgaImporterTestLib) + add_library(MagnumMagnumFontTestLib STATIC $) + target_link_libraries(MagnumMagnumFontTestLib Magnum MagnumText MagnumTgaImporterTestLib) # On Windows we need to install first and then run the tests to avoid "DLL # not found" hell, thus we need to install this too if(WIN32 AND NOT CMAKE_CROSSCOMPILING) - install(TARGETS MagnumFontTestLib + install(TARGETS MagnumMagnumFontTestLib RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) diff --git a/src/MagnumPlugins/MagnumFont/Test/CMakeLists.txt b/src/MagnumPlugins/MagnumFont/Test/CMakeLists.txt index 4c391f733..544e85504 100644 --- a/src/MagnumPlugins/MagnumFont/Test/CMakeLists.txt +++ b/src/MagnumPlugins/MagnumFont/Test/CMakeLists.txt @@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) -corrade_add_test(MagnumFontGLTest MagnumFontGLTest.cpp LIBRARIES MagnumFontTestLib ${GL_TEST_LIBRARIES}) +corrade_add_test(MagnumFontGLTest MagnumFontGLTest.cpp LIBRARIES MagnumMagnumFontTestLib ${GL_TEST_LIBRARIES}) diff --git a/src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt b/src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt index e171f6c81..47b5263a5 100644 --- a/src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt +++ b/src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt @@ -39,19 +39,19 @@ add_plugin(MagnumFontConverter ${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_INSTALL_DIR} target_link_libraries(MagnumFontConverter Magnum MagnumText) if(WIN32) - target_link_libraries(MagnumFontConverter TgaImageConverter) + target_link_libraries(MagnumFontConverter MagnumTgaImageConverter) endif() install(FILES ${MagnumFontConverter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFontConverter) if(BUILD_GL_TESTS) - add_library(MagnumFontConverterTestLib STATIC $) - target_link_libraries(MagnumFontConverterTestLib Magnum MagnumText TgaImageConverterTestLib) + add_library(MagnumMagnumFontConverterTestLib STATIC $) + target_link_libraries(MagnumMagnumFontConverterTestLib Magnum MagnumText MagnumTgaImageConverterTestLib) # On Windows we need to install first and then run the tests to avoid "DLL # not found" hell, thus we need to install this too if(WIN32 AND NOT CMAKE_CROSSCOMPILING) - install(TARGETS MagnumFontConverterTestLib + install(TARGETS MagnumMagnumFontConverterTestLib RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) diff --git a/src/MagnumPlugins/MagnumFontConverter/Test/CMakeLists.txt b/src/MagnumPlugins/MagnumFontConverter/Test/CMakeLists.txt index 2c18807e3..de49a126c 100644 --- a/src/MagnumPlugins/MagnumFontConverter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/MagnumFontConverter/Test/CMakeLists.txt @@ -29,6 +29,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) corrade_add_test(MagnumFontConverterGLTest MagnumFontConverterGLTest.cpp LIBRARIES - MagnumFontConverterTestLib - TgaImporterTestLib + MagnumMagnumFontConverterTestLib + MagnumTgaImporterTestLib ${GL_TEST_LIBRARIES}) diff --git a/src/MagnumPlugins/ObjImporter/CMakeLists.txt b/src/MagnumPlugins/ObjImporter/CMakeLists.txt index 63a09e70b..275edec1b 100644 --- a/src/MagnumPlugins/ObjImporter/CMakeLists.txt +++ b/src/MagnumPlugins/ObjImporter/CMakeLists.txt @@ -37,13 +37,13 @@ target_link_libraries(ObjImporter Magnum MagnumMeshTools) install(FILES ObjImporter.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/ObjImporter) if(BUILD_TESTS) - add_library(ObjImporterTestLib STATIC $) - target_link_libraries(ObjImporterTestLib Magnum MagnumMeshTools) + add_library(MagnumObjImporterTestLib STATIC $) + target_link_libraries(MagnumObjImporterTestLib Magnum MagnumMeshTools) # On Windows we need to install first and then run the tests to avoid "DLL # not found" hell, thus we need to install this too if(WIN32 AND NOT CMAKE_CROSSCOMPILING) - install(TARGETS ObjImporterTestLib + install(TARGETS MagnumObjImporterTestLib RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) diff --git a/src/MagnumPlugins/ObjImporter/Test/CMakeLists.txt b/src/MagnumPlugins/ObjImporter/Test/CMakeLists.txt index c5dec7146..269fd9d4f 100644 --- a/src/MagnumPlugins/ObjImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/ObjImporter/Test/CMakeLists.txt @@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) -corrade_add_test(ObjImporterTest Test.cpp LIBRARIES ObjImporterTestLib) +corrade_add_test(ObjImporterTest Test.cpp LIBRARIES MagnumObjImporterTestLib) diff --git a/src/MagnumPlugins/TgaImageConverter/CMakeLists.txt b/src/MagnumPlugins/TgaImageConverter/CMakeLists.txt index d0f03e2b8..779bb475f 100644 --- a/src/MagnumPlugins/TgaImageConverter/CMakeLists.txt +++ b/src/MagnumPlugins/TgaImageConverter/CMakeLists.txt @@ -41,13 +41,13 @@ target_link_libraries(TgaImageConverter Magnum) install(FILES ${TgaImageConverter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImageConverter) if(BUILD_TESTS) - add_library(TgaImageConverterTestLib ${SHARED_OR_STATIC} $) - target_link_libraries(TgaImageConverterTestLib Magnum) + add_library(MagnumTgaImageConverterTestLib ${SHARED_OR_STATIC} $) + target_link_libraries(MagnumTgaImageConverterTestLib Magnum) # On Windows we need to install first and then run the tests to avoid "DLL # not found" hell, thus we need to install this too if(WIN32 AND NOT CMAKE_CROSSCOMPILING) - install(TARGETS TgaImageConverterTestLib + install(TARGETS MagnumTgaImageConverterTestLib RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) diff --git a/src/MagnumPlugins/TgaImageConverter/Test/CMakeLists.txt b/src/MagnumPlugins/TgaImageConverter/Test/CMakeLists.txt index 40d3c7fbe..08100b92a 100644 --- a/src/MagnumPlugins/TgaImageConverter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/TgaImageConverter/Test/CMakeLists.txt @@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) -corrade_add_test(TgaImageConverterTest TgaImageConverterTest.cpp LIBRARIES TgaImageConverterTestLib TgaImporterTestLib) +corrade_add_test(TgaImageConverterTest TgaImageConverterTest.cpp LIBRARIES MagnumTgaImageConverterTestLib MagnumTgaImporterTestLib) diff --git a/src/MagnumPlugins/TgaImporter/CMakeLists.txt b/src/MagnumPlugins/TgaImporter/CMakeLists.txt index 05633463d..c4946a4c9 100644 --- a/src/MagnumPlugins/TgaImporter/CMakeLists.txt +++ b/src/MagnumPlugins/TgaImporter/CMakeLists.txt @@ -42,13 +42,13 @@ target_link_libraries(TgaImporter Magnum) install(FILES ${TgaImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImporter) if(BUILD_TESTS) - add_library(TgaImporterTestLib ${SHARED_OR_STATIC} $) - target_link_libraries(TgaImporterTestLib Magnum) + add_library(MagnumTgaImporterTestLib ${SHARED_OR_STATIC} $) + target_link_libraries(MagnumTgaImporterTestLib Magnum) # On Windows we need to install first and then run the tests to avoid "DLL # not found" hell, thus we need to install this too if(WIN32 AND NOT CMAKE_CROSSCOMPILING) - install(TARGETS TgaImporterTestLib + install(TARGETS MagnumTgaImporterTestLib RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) diff --git a/src/MagnumPlugins/TgaImporter/Test/CMakeLists.txt b/src/MagnumPlugins/TgaImporter/Test/CMakeLists.txt index 59ae181d2..143202d8c 100644 --- a/src/MagnumPlugins/TgaImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/TgaImporter/Test/CMakeLists.txt @@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) -corrade_add_test(TgaImporterTest TgaImporterTest.cpp LIBRARIES TgaImporterTestLib) +corrade_add_test(TgaImporterTest TgaImporterTest.cpp LIBRARIES MagnumTgaImporterTestLib) diff --git a/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt b/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt index 1ba650e7a..840382043 100644 --- a/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt +++ b/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt @@ -48,13 +48,13 @@ target_link_libraries(WavAudioImporter Magnum MagnumAudio) install(FILES ${WavAudioImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/WavAudioImporter) if(BUILD_TESTS) - add_library(WavAudioImporterTestLib STATIC $) - target_link_libraries(WavAudioImporterTestLib Magnum MagnumAudio) + add_library(MagnumWavAudioImporterTestLib STATIC $) + target_link_libraries(MagnumWavAudioImporterTestLib Magnum MagnumAudio) # On Windows we need to install first and then run the tests to avoid "DLL # not found" hell, thus we need to install this too if(WIN32 AND NOT CMAKE_CROSSCOMPILING) - install(TARGETS WavAudioImporterTestLib + install(TARGETS MagnumWavAudioImporterTestLib RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) diff --git a/src/MagnumPlugins/WavAudioImporter/Test/CMakeLists.txt b/src/MagnumPlugins/WavAudioImporter/Test/CMakeLists.txt index b0fa66b8e..53d5f7fb8 100644 --- a/src/MagnumPlugins/WavAudioImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/WavAudioImporter/Test/CMakeLists.txt @@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) -corrade_add_test(WavAudioImporterTest WavImporterTest.cpp LIBRARIES WavAudioImporterTestLib) +corrade_add_test(WavAudioImporterTest WavImporterTest.cpp LIBRARIES MagnumWavAudioImporterTestLib) From 799e073351684bfc78632d30dc3922dc2b2ad271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 9 Apr 2014 20:02:34 +0200 Subject: [PATCH 3/4] package: strip all crosscompiled binaries. --- package/archlinux/PKGBUILD-android-arm | 2 +- package/archlinux/PKGBUILD-android-x86 | 2 +- package/archlinux/PKGBUILD-mingw32 | 2 +- package/archlinux/PKGBUILD-nacl-glibc | 4 ++-- package/archlinux/PKGBUILD-nacl-newlib | 10 ++-------- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/package/archlinux/PKGBUILD-android-arm b/package/archlinux/PKGBUILD-android-arm index 10e78f3a3..87fc2e959 100644 --- a/package/archlinux/PKGBUILD-android-arm +++ b/package/archlinux/PKGBUILD-android-arm @@ -38,5 +38,5 @@ build() { package() { cd "$startdir/build-android-arm" - DESTDIR="$pkgdir/" ninja install + DESTDIR="$pkgdir/" ninja install/strip } diff --git a/package/archlinux/PKGBUILD-android-x86 b/package/archlinux/PKGBUILD-android-x86 index 315471634..0db9c1e59 100644 --- a/package/archlinux/PKGBUILD-android-x86 +++ b/package/archlinux/PKGBUILD-android-x86 @@ -38,5 +38,5 @@ build() { package() { cd "$startdir/build-android-x86" - DESTDIR="$pkgdir/" ninja install + DESTDIR="$pkgdir/" ninja install/strip } diff --git a/package/archlinux/PKGBUILD-mingw32 b/package/archlinux/PKGBUILD-mingw32 index a4b406ac8..3d678b8a3 100644 --- a/package/archlinux/PKGBUILD-mingw32 +++ b/package/archlinux/PKGBUILD-mingw32 @@ -34,5 +34,5 @@ build() { package() { cd "$startdir/build-win" - DESTDIR="$pkgdir/" ninja install + DESTDIR="$pkgdir/" ninja install/strip } diff --git a/package/archlinux/PKGBUILD-nacl-glibc b/package/archlinux/PKGBUILD-nacl-glibc index 3798cde72..25bbc2c01 100644 --- a/package/archlinux/PKGBUILD-nacl-glibc +++ b/package/archlinux/PKGBUILD-nacl-glibc @@ -56,10 +56,10 @@ build() { package() { # Install 32bit cd "$startdir/build-nacl-glibc-x86-32" - DESTDIR="$pkgdir/" ninja install + DESTDIR="$pkgdir/" ninja install/strip # Install 64bit (the headers will be overwritten, but they are (and should # be) the same for both versions cd "$startdir/build-nacl-glibc-x86-64" - DESTDIR="$pkgdir/" ninja install + DESTDIR="$pkgdir/" ninja install/strip } diff --git a/package/archlinux/PKGBUILD-nacl-newlib b/package/archlinux/PKGBUILD-nacl-newlib index 77e0fd084..d3dfa6f8e 100644 --- a/package/archlinux/PKGBUILD-nacl-newlib +++ b/package/archlinux/PKGBUILD-nacl-newlib @@ -58,16 +58,10 @@ build() { package() { # Install 32bit cd "$startdir/build-nacl-newlib-x86-32" - DESTDIR="$pkgdir/" ninja install - - # Strip 32bit binaries - /usr/nacl/toolchain/linux_x86_newlib/bin/i686-nacl-strip ${pkgdir}/usr/nacl/bin/*x86-32.nexe + DESTDIR="$pkgdir/" ninja install/strip # Install 64bit (the headers will be overwritten, but they are (and should # be) the same for both versions cd "$startdir/build-nacl-newlib-x86-64" - DESTDIR="$pkgdir/" ninja install - - # Strip 64bit binaries - /usr/nacl/toolchain/linux_x86_newlib/bin/x86_64-nacl-strip ${pkgdir}/usr/nacl/bin/*x86-64.nexe + DESTDIR="$pkgdir/" ninja install/strip } From 1ab87a4de528c1b0d8d9e83c41780a5d2d8cff4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 9 Apr 2014 20:13:58 +0200 Subject: [PATCH 4/4] Workarounds for platforms without std::to_string(). I hate this. --- src/Magnum/AbstractShaderProgram.cpp | 26 ++++++++++++++++++++++++-- src/Magnum/Shader.cpp | 22 ++++++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/Magnum/AbstractShaderProgram.cpp b/src/Magnum/AbstractShaderProgram.cpp index 43ebf0ce2..b72dcf562 100644 --- a/src/Magnum/AbstractShaderProgram.cpp +++ b/src/Magnum/AbstractShaderProgram.cpp @@ -34,6 +34,10 @@ #include "Implementation/ShaderProgramState.h" #include "Implementation/State.h" +#if defined(CORRADE_TARGET_NACL_NEWLIB) || defined(CORRADE_TARGET_ANDROID) || defined(__MINGW32__) +#include +#endif + namespace Magnum { Int AbstractShaderProgram::maxVertexAttributes() { @@ -289,13 +293,25 @@ bool AbstractShaderProgram::link(std::initializer_list> shade glGetShaderInfoLog(shader._id, message.size(), nullptr, &message[0]); message.resize(std::max(logLength, 1)-1); + /** @todo Remove when this is fixed everywhere (also the include above) */ + #if defined(CORRADE_TARGET_NACL_NEWLIB) || defined(CORRADE_TARGET_ANDROID) || defined(__MINGW32__) + std::ostringstream converter; + converter << i; + #endif + /* Show error log */ if(!success) { Error out; @@ -669,7 +675,13 @@ bool Shader::compile(std::initializer_list> shade out.setFlag(Debug::SpaceAfterEachValue, false); out << "Shader::compile(): compilation of " << shaderName(shader._type) << " shader"; - if(shaders.size() != 1) out << ' ' << std::to_string(i); + if(shaders.size() != 1) { + #if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) && !defined(__MINGW32__) + out << ' ' << std::to_string(i); + #else + out << ' ' << converter.str(); + #endif + } out << " failed with the following message:\n" << message; @@ -680,7 +692,13 @@ bool Shader::compile(std::initializer_list> shade out.setFlag(Debug::SpaceAfterEachValue, false); out << "Shader::compile(): compilation of " << shaderName(shader._type) << " shader"; - if(shaders.size() != 1) out << ' ' << std::to_string(i); + if(shaders.size() != 1) { + #if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) && !defined(__MINGW32__) + out << ' ' << std::to_string(i); + #else + out << ' ' << converter.str(); + #endif + } out << " succeeded with the following message:\n" << message; }