From a69f567ea9878790dfc66580fa4be3edf65fd299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 2 May 2015 12:55:25 +0200 Subject: [PATCH 1/5] Math: fix redundant and cyclic documentation references. --- src/Magnum/Math/Angle.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Math/Angle.h b/src/Magnum/Math/Angle.h index e3d700ffe..7d4355fa7 100644 --- a/src/Magnum/Math/Angle.h +++ b/src/Magnum/Math/Angle.h @@ -208,8 +208,8 @@ template class Rad: public Unit { /** @relatesalso Rad @brief Double-precision radian value literal -See @link operator""_rad() @endlink for more information. -@see @link operator""_radf() @endlink, @link operator""_deg() @endlink +See @link operator""_deg() @endlink for more information. +@see @link operator""_radf() @endlink @requires_gl Only single-precision types are available in OpenGL ES. */ constexpr Rad operator "" _rad(long double value) { return Rad(value); } @@ -219,7 +219,7 @@ constexpr Rad operator "" _rad(long double value) { return Rad(v @brief Single-precision radian value literal See @link operator""_degf() @endlink for more information. -@see @link operator""_rad() @endlink, @link operator""_degf() @endlink +@see @link operator""_rad() @endlink */ constexpr Rad operator "" _radf(long double value) { return Rad(value); } From d3f66d1fcd40f0161f23bfd025be12de1e97c646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 2 May 2015 23:58:04 +0200 Subject: [PATCH 2/5] Doc++ --- src/Magnum/AbstractQuery.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/AbstractQuery.h b/src/Magnum/AbstractQuery.h index c00cac466..0d0b8b092 100644 --- a/src/Magnum/AbstractQuery.h +++ b/src/Magnum/AbstractQuery.h @@ -111,7 +111,7 @@ class MAGNUM_EXPORT AbstractQuery: public AbstractObject { * @ref Int, @ref UnsignedLong or @ref Long. * * Note that this function is blocking until the result is available. - * See resultAvailable(). + * See @ref resultAvailable(). * @attention @ref Magnum::UnsignedLong "UnsignedLong" and @ref Magnum::Long "Long" * result type is not available in @ref MAGNUM_TARGET_WEBGL "WebGL". * @see @fn_gl{GetQueryObject} with @def_gl{QUERY_RESULT} From f46a88d441f1725535ec83feddffb3a0070e941c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 2 May 2015 23:58:13 +0200 Subject: [PATCH 3/5] Fix linker error on NaCl. --- src/Magnum/AbstractQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/AbstractQuery.cpp b/src/Magnum/AbstractQuery.cpp index b08dced32..10868a208 100644 --- a/src/Magnum/AbstractQuery.cpp +++ b/src/Magnum/AbstractQuery.cpp @@ -121,7 +121,7 @@ template<> Int AbstractQuery::result() { Int result; #ifndef MAGNUM_TARGET_GLES glGetQueryObjectiv(_id, GL_QUERY_RESULT, &result); - #elif !defined(CORRADE_TARGET_EMSCRIPTEN) + #elif !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL) glGetQueryObjectivEXT(_id, GL_QUERY_RESULT_EXT, &result); #else CORRADE_ASSERT_UNREACHABLE(); From 65b25ca530fc7a4f943e5d97351db02db7a8504f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 2 May 2015 23:58:26 +0200 Subject: [PATCH 4/5] Fix compilation on NaCl. --- src/Magnum/Buffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Buffer.cpp b/src/Magnum/Buffer.cpp index 2aa936a95..33457f3e0 100644 --- a/src/Magnum/Buffer.cpp +++ b/src/Magnum/Buffer.cpp @@ -315,7 +315,7 @@ void* Buffer::map(const MapAccess access) { void* Buffer::mapSub(const GLintptr offset, const GLsizeiptr length, const MapAccess access) { #ifdef CORRADE_TARGET_NACL CORRADE_ASSERT(!_mappedBuffer, "Buffer::mapSub(): the buffer is already mapped", nullptr); - return _mappedBuffer = glMapBufferSubDataCHROMIUM(GLenum(bindInternal(_targetHint)), offset, length, GLenum(access)); + return _mappedBuffer = glMapBufferSubDataCHROMIUM(GLenum(bindSomewhereInternal(_targetHint)), offset, length, GLenum(access)); #else static_cast(offset); static_cast(length); From 3206f98716d47b86694f17b84e528e77fcaf2b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 2 May 2015 23:58:52 +0200 Subject: [PATCH 5/5] Work around missing std::to_string() on NaCl/Android/MinGW32. --- src/Magnum/DebugOutput.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Magnum/DebugOutput.cpp b/src/Magnum/DebugOutput.cpp index 26a80a5b0..37dc11bd9 100644 --- a/src/Magnum/DebugOutput.cpp +++ b/src/Magnum/DebugOutput.cpp @@ -32,6 +32,10 @@ #include "Magnum/Implementation/State.h" #include "Magnum/Implementation/DebugState.h" +#if defined(CORRADE_TARGET_NACL_NEWLIB) || defined(CORRADE_TARGET_ANDROID) || defined(__MINGW32__) +#include +#endif + namespace Magnum { namespace { @@ -99,7 +103,19 @@ void defaultCallback(const DebugOutput::Source source, const DebugOutput::Type t case DebugOutput::Type::Other: ; } - output << '(' + std::to_string(id) + "):" << string; + /** @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 << id; + #endif + + output << '(' + + #if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) && !defined(__MINGW32__) + std::to_string(id) + + #else + converter.str() + + #endif + "):" << string; } }